Skip to main content

Step35MtpGeom

Struct Step35MtpGeom 

Source
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: u32

Block 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

Source

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

Source§

fn clone(&self) -> Step35MtpGeom

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Step35MtpGeom

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.