pub struct Step35MtpGeom {
pub il: u32,
pub n_head: usize,
pub n_head_kv: usize,
pub n_rot: usize,
pub rope_base: f32,
pub swa: bool,
pub window: usize,
pub clamp_shexp: Option<f32>,
}Expand description
step35 MTP-block geometry, RESOLVED at load time from the file that actually carries the
block’s own Step35Config arrays.
Why resolved and not “look it up per forward from the model’s cfg”: Step-3.7-Flash ships MTP
as a SEPARATE GGUF, and the two files disagree about which layers exist. The trunk artifact
declares block_count=45 / nextn_predict_layers=0, so its per-layer arrays hold 45 entries
(0..=44) and Step35Config::n_head(45) falls off the end into the .last() fallback — index
44, which is a FULL-attn layer at 64 heads. The draft file declares block_count=48 /
nextn=3 and its arrays’ index 45 is the truth: SWA, 96 heads (matching that file’s
blk.45.attn_q.weight [4096, 12288] = 96*128 and blk.45.attn_gate.weight [4096, 96]).
Receipt: research/step37-bringup-20260802/raw/gguf-header-stepfun-mtp-q8-20260802.txt plus
the tail dump in research/step37-p2-20260806/raw/ — head_count[43..48] = [96, 64, 96, 96, 96], sliding_window_pattern[43..48] = [True, False, True, True, True].
Fields§
§il: u32Block index inside the file that carries it (45 for Step-3.7-Flash). Diagnostics only.
n_head: usize§n_head_kv: usize§n_rot: usize§rope_base: f32§swa: bool§window: usize§clamp_shexp: Option<f32>This block’s swiglu_clamp_shexp limit. The MTP block’s FFN is a DENSE SwiGLU, and
upstream’s one build_ffn serves both the dense MLP and the shared expert off the
SHEXP array (llama-graph.cpp:1751) — so a dense MTP block keys off shexp, not exp.
0.0 (None) on Step-3.7-Flash’s block 45; live (16.0) only on trunk layers 43-44.
Implementations§
Source§impl Step35MtpGeom
impl Step35MtpGeom
Sourcepub fn resolve(cfg: &ModelConfig, il: u32) -> Self
pub fn resolve(cfg: &ModelConfig, il: u32) -> Self
Resolve block il from the geometry table of the file that OWNS that block.
Trait Implementations§
Source§impl Clone for Step35MtpGeom
impl Clone for Step35MtpGeom
Source§fn clone(&self) -> Step35MtpGeom
fn clone(&self) -> Step35MtpGeom
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more