GgufParametersLoader

class GgufParametersLoader(sourceProvider: () -> Source, onProgress: (current: Long, total: Long, message: String?) -> Unit = { _, _, _ -> }) : ParametersLoader(source)

Deprecated

Use StreamingGgufParametersLoader for memory-efficient loading with quantized type support

Replace with

StreamingGgufParametersLoader(sourceProvider, onProgress)

ParametersLoader implementation backed by the legacy GGUFReader.

Notes:

  • Currently supports loading tensors as FP32 or Int32 only.

  • For quantized GGML tensor payloads, this implementation does not perform dequantization and will throw.

  • A lightweight progress callback can be provided to observe per-tensor progress (current/total/name).

See also

for the recommended streaming-based loader that supports quantized types and memory-efficient parsing.

Constructors

Link copied to clipboard
constructor(sourceProvider: () -> Source, onProgress: (current: Long, total: Long, message: String?) -> Unit = { _, _, _ -> })

Functions

Link copied to clipboard
open suspend override fun <T : DType, V> load(ctx: ExecutionContext, dtype: KClass<T>, onTensorLoaded: (String, Tensor<T, V>) -> Unit)