pub struct Glm5NextMhcSiteWeights {
pub hc_fn: DevicePtr,
pub hc_fn_bf16: bool,
pub hc_scale: DevicePtr,
pub hc_base: DevicePtr,
pub mix: DevicePtr,
}Expand description
Per-site mHC weights. One set for the attention site, one for the FFN site.
🪤 hc_fn is FP32 to the kernel and BF16 on disk — the loader upcasts. Reading it at
the on-disk width is the #341/#347 dtype-mismatch class, and the shapes do not say so.
Fields§
§hc_fn: DevicePtr[mix_hc, hc_mult * hidden], where mix_hc = (2 + hc_mult) * hc_mult. FP32 unless
hc_fn_bf16, in which case BF16 — the width the checkpoint actually stores.
hc_fn_bf16: boolIs hc_fn BF16? Production sets it; the microtests and the split gate build their own
F32 weights and leave it false, so the oracle they compare against is unchanged.
hc_scale: DevicePtr[3] FP32 — the three logit scales (pre, post, comb), in that order.
hc_base: DevicePtr[mix_hc] FP32.
mix: DevicePtr[MHC_MIX_MAX_TOKENS, mix_hc] FP32 scratch: hc_mix writes it, hc_finish reads it.
Per-site, so the two sites of a layer cannot alias; both run on one stream in order.
Trait Implementations§
Source§impl Clone for Glm5NextMhcSiteWeights
impl Clone for Glm5NextMhcSiteWeights
Source§fn clone(&self) -> Glm5NextMhcSiteWeights
fn clone(&self) -> Glm5NextMhcSiteWeights
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more