Learn R Programming

localLLM (version 1.3.0)

model_metadata: Get All GGUF Metadata from a Loaded Model

Description

Returns all key-value metadata pairs embedded in the model's GGUF file, including architecture, tokenizer settings, chat template, and more. Useful for diagnosing issues such as missing chat templates.

Usage

model_metadata(model)

Value

Named character vector where names are metadata keys and values are the corresponding values. Common keys include

general.architecture and

tokenizer.chat_template.

Arguments

model

A model object from model_load

Examples

Run this code
if (FALSE) {
model <- model_load("model.gguf")
meta <- model_metadata(model)
# Check if chat template is embedded
meta["tokenizer.chat_template"]
# Check model architecture
meta["general.architecture"]
}

Run the code above in your browser using DataLab