pub fn kv_memory_is_partial<S: BuildHasher>(
metadata: &HashMap<String, String, S>,
architecture: Option<&str>,
) -> boolExpand description
Whether the model’s KV memory retains only part of the token history (sliding-window, hybrid, or recurrent attention).
Checks, in order:
{arch}.full_attention_interval> 1 — hybrid interleaved attention (e.g.qwen35.full_attention_interval = 4: every 4th layer is full attention, the rest sliding-window).{arch}.attention.sliding_window> 0 — sliding-window attention (Gemma 2/3, Cohere 2, GPT-OSS, …).{arch}.ssm.conv_kernelpresent — recurrent / hybrid-recurrent state (Mamba, Jamba, Granite-H, Falcon-H, …), which is inherently partial.
§Arguments
metadata— raw GGUF key/value map (seecrate::domain::Model::metadata).architecture— the model’s architecture, used as the key prefix. WhenNone, falls back to thegeneral.architecturemetadata key.
§Returns
false when the metadata carries none of the marker keys — including when
the architecture can’t be determined at all, since an unprefixed lookup
still runs and full-attention is the common case.