ion7-core / model.meta

module

model.meta

Functions

M.meta_count

Total number of GGUF metadata entries embedded in the model.

M.meta_count(self)
→ integer

M.meta_key_at

Read the metadata key at index `i` (0-based).

M.meta_key_at(self, i)
iinteger
→ string|nil

M.meta_val_at

Read the metadata value at index `i` (0-based).

M.meta_val_at(self, i)
iinteger
→ string|nil

M.meta

Look up a metadata value by key, e.g. `"general.name"`.

M.meta(self, key)
keystring
→ string|nil

M.meta_val

Backwards-compatible alias for `meta`.

M.meta_val(self, key)

M.meta_all

Return ALL GGUF metadata as a flat `{ [key] = value }` table. Useful for one-shot logging or dumping to JSON. We allocate the two scratch buffers once and reuse them across the iteration.

M.meta_all(self)
→ tablestring>

M.chat_template

Read the model's built-in Jinja2 chat template.

M.chat_template(self, name)
namestring|nilTemplate variant name (e.g. `"tool_use"`),
→ string|nilTemplate string, or nil if none is embedded.