pub struct Arch {Show 19 fields
pub arch: String,
pub block_count: u64,
pub context_length: u64,
pub embedding_length: u64,
pub feed_forward_length: u64,
pub head_count: u64,
pub head_count_kv: u64,
pub head_dim: u64,
pub rms_eps: f32,
pub rope_freq_base: f32,
pub value_length: u64,
pub rope_dimension_count: u64,
pub full_attention_interval: u64,
pub nextn_predict_layers: u64,
pub ssm_conv_kernel: u64,
pub ssm_state_size: u64,
pub ssm_group_count: u64,
pub ssm_time_step_rank: u64,
pub ssm_inner_size: u64,
}Expand description
The transformer architecture fields the hand-written model lanes read from GGUF metadata. Every field is a key under the architecture prefix and reads 0 (or the documented default) when absent.
Fields§
§arch: String§block_count: u64§context_length: u64context_length — the trained context window (Qwen3.8: 262144).
embedding_length: u64§feed_forward_length: u64§head_count: u64§head_count_kv: u64§head_dim: u64§rms_eps: f32§rope_freq_base: f32§value_length: u64attention.value_length — V head dim, which need not equal the K head dim.
rope_dimension_count: u64rope.dimension_count — how many of each head’s dims actually rotate. Qwen3.8 rotates 64 of 256;
treating this as the full head_dim silently corrupts three quarters of every query and key.
full_attention_interval: u64full_attention_interval — every Nth block is full attention, the rest are linear (Gated DeltaNet).
Qwen3.8: 4, so blocks 3, 7, 11 … are attention and the other 48 are GDN.
nextn_predict_layers: u64nextn_predict_layers — MTP draft blocks appended to block_count. Qwen3.8 ships 1, inside the same
file, so block_count (65) is one MORE than the model’s real depth (64).
ssm_conv_kernel: u64ssm.conv_kernel — taps in GDN’s depthwise causal conv (4).
ssm_state_size: u64ssm.state_size — the D of each head’s D×D associative memory (128).
ssm_group_count: u64ssm.group_count — GDN key heads (16).
ssm_time_step_rank: u64ssm.time_step_rank — GDN value heads (48). Three value heads share each key head.
ssm_inner_size: u64ssm.inner_size — the GDN value width, time_step_rank · state_size (6144).
Implementations§
Source§impl Arch
impl Arch
Sourcepub fn model_layers(&self) -> u64
pub fn model_layers(&self) -> u64
Blocks that are actually part of the model — block_count minus the MTP draft blocks appended to it.
Sourcepub fn is_full_attention_layer(&self, l: u64) -> bool
pub fn is_full_attention_layer(&self, l: u64) -> bool
Is block l a full-attention block? With full_attention_interval = N, every Nth block is, counting
from 1, i.e. indices N-1, 2N-1, …. A checkpoint without the key is uniformly full attention.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Arch
impl RefUnwindSafe for Arch
impl Send for Arch
impl Sync for Arch
impl Unpin for Arch
impl UnsafeUnpin for Arch
impl UnwindSafe for Arch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.