GgufModelMetadata

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?>)(source)

Parsed model metadata from a GGUF file.

This class extracts common metadata fields from the GGUF key-value store in a structured, type-safe manner. Supports various model types including LLMs, vision models, and object detectors.

Usage:

StreamingGGUFReader.open(source).use { reader ->
val metadata = GgufModelMetadata.from(reader)
println("Architecture: ${metadata.architecture}")
println("Classes: ${metadata.classNames?.size ?: "none"}")
}

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Model architecture identifier (e.g., "llama", "yolov3-tiny", "bert")

Link copied to clipboard

Author/organization

Link copied to clipboard

Class names for classification/detection models

Link copied to clipboard

Context length for language models

Link copied to clipboard

Hidden size / embedding dimension

Link copied to clipboard

Number of attention heads

Link copied to clipboard

Input size for vision models

Link copied to clipboard

Number of layers

Link copied to clipboard

License information

Link copied to clipboard
val name: String?

Model name/description

Link copied to clipboard

Number of classes (may differ from classNames.size if names not provided)

Link copied to clipboard

All raw metadata fields for custom access

Link copied to clipboard
val url: String?

Source URL or repository

Link copied to clipboard

Model version

Link copied to clipboard

Vocabulary size