GgufMeta

Trait GgufMeta 

Source
pub trait GgufMeta {
    // Required methods
    fn get_u64(&self, key: &str) -> Option<u64>;
    fn get_f64(&self, key: &str) -> Option<f64>;
    fn get_str(&self, key: &str) -> Option<&str>;
    fn get_arr_len(&self, key: &str) -> Option<usize>;

    // Provided methods
    fn get_u64_arr(&self, _key: &str) -> Option<Vec<u64>> { ... }
    fn get_f64_arr(&self, _key: &str) -> Option<Vec<f64>> { ... }
}
Expand description

2026-09-26: Typed read access to GGUF metadata. Integer getters widen to u64 and float getters to f64. A getter returns None when the key is absent or holds another value type; the builder decides whether absence is an error or has a fallback.

Required Methods§

Source

fn get_u64(&self, key: &str) -> Option<u64>

Source

fn get_f64(&self, key: &str) -> Option<f64>

Source

fn get_str(&self, key: &str) -> Option<&str>

Source

fn get_arr_len(&self, key: &str) -> Option<usize>

Provided Methods§

Source

fn get_u64_arr(&self, _key: &str) -> Option<Vec<u64>>

2026-09-26: Default None. A reader without it cannot build a DeepSeek-V4.1 config, which requires attention.compress_ratios and the engram.* integer arrays.

Source

fn get_f64_arr(&self, _key: &str) -> Option<Vec<f64>>

2026-09-26: Default None. DeepSeek-V4.1 reads swiglu_clamp_exp through it when the key is present.

Implementors§