Package-level declarations

Types

Link copied to clipboard
data class FieldParts(val size: Int, val parts: List<List<Any>>, val idxs: List<Int>, val types: List<GGUFValueType>)
Link copied to clipboard

GGML quantization types.

Link copied to clipboard
data class GgufModelMetadata(val architecture: String?, val name: String?, val author: String?, val license: String?, val version: String?, val url: String?, val classNames: List<String>?, val numClasses: Int?, val inputSize: Int?, val contextLength: Int?, val embeddingLength: Int?, val headCount: Int?, val layerCount: Int?, val vocabSize: Int?, val rawFields: Map<String, Any?>)

Parsed model metadata from a GGUF file.

Link copied to clipboard

GGUF model parser extending BaseModelParser. Provides metadata-first parsing of GGUF model files using SKaiNET's GGUF I/O capabilities.

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

ParametersLoader implementation backed by GGUFReader.

Link copied to clipboard
class GGUFReader(source: Source, loadTensorData: Boolean = true, decodeF16ToFloat: Boolean = true, decodeBF16ToFloat: Boolean = true)
Link copied to clipboard
Link copied to clipboard
data class ReaderField(val offset: Int, val name: String, val parts: List<List<Any>> = emptyList(), val data: List<Int> = listOf(-1), val types: List<GGUFValueType> = emptyList())
Link copied to clipboard
data class ReaderTensor(val name: String, val tensorType: GGMLQuantizationType, val rawTypeValue: Int, val shape: List<UInt>, val nElements: Int, val nBytes: Int, val dataOffset: Int, val data: List<Any>, val field: ReaderField)
Link copied to clipboard

Streaming GGUF reader that parses metadata without loading the entire file.

Link copied to clipboard
data class StreamingTensorInfo(val name: String, val shape: List<UInt>, val tensorType: GGMLQuantizationType, val rawTypeValue: Int, val nElements: Long, val nBytes: Int, val relativeOffset: Long, var absoluteDataOffset: Long)

Tensor metadata for streaming access.

Link copied to clipboard

Abstracts the mapping from logical tensor roles to GGUF tensor name strings.

Properties

Link copied to clipboard
const val GGUF_DEFAULT_ALIGNMENT: Int = 32
Link copied to clipboard
const val GGUF_MAGIC: UInt

This is a kotlin gguf reader related logic interpreted from python code "gguf-py/gguf/constants.py" of github repo "https://github.com/ggerganov/llama.cpp"

Link copied to clipboard
const val GGUF_VERSION: Int = 3
Link copied to clipboard
const val QK_K: Int = 256
Link copied to clipboard

This is a kotlin gguf reader interpreted from python code "gguf-py/gguf/gguf_reader.py" of github repo "https://github.com/ggerganov/llama.cpp"

Functions

Link copied to clipboard

Android implementation of createRandomAccessSource.

Platform-specific factory for creating RandomAccessSource instances.

JS implementation of createRandomAccessSource.

JVM implementation of createRandomAccessSource.

Native implementation of createRandomAccessSource.

WasmJS implementation of createRandomAccessSource.

WasmWASI implementation of createRandomAccessSource.

Link copied to clipboard

This is a kotlin gguf reader related logic interpreted from python code "gguf-py/gguf/quants.py" of github repo "https://github.com/ggerganov/llama.cpp"