GgufValue

sealed interface GgufValue(source)

A GGUF metadata value.

Inheritors

Types

Link copied to clipboard
data class Array(val elementType: GgufValueType, val size: Long, val values: List<GgufValue>?) : GgufValue

ARRAY. Large arrays (tokenizer vocabularies, merges) are skipped rather than kept in memory: values is then null and only elementType and size are known.

Link copied to clipboard
data class Bool(val value: Boolean) : GgufValue

BOOL.

Link copied to clipboard
data class Integer(val type: GgufValueType, val value: Long) : GgufValue

Any integer type. UINT64 values above Long.MAX_VALUE are stored with their raw bits.

Link copied to clipboard
data class Real(val type: GgufValueType, val value: Double) : GgufValue

FLOAT32 or FLOAT64.

Link copied to clipboard
data class Text(val value: String) : GgufValue

STRING (UTF-8).

Properties

Link copied to clipboard
abstract val type: GgufValueType

The stored value type.