pub struct GraphMhc<'a> {
pub attn_w: &'a [f32],
pub attn_b: &'a [f32],
pub ffn_w: &'a [f32],
pub ffn_b: &'a [f32],
pub enter: bool,
pub leave: bool,
pub iters: usize,
pub pre_scale: f32,
pub dsv4: Option<GraphMhcDsv4>,
pub head: Option<GraphMhcHead<'a>>,
}Expand description
Per-layer weights for the whole-token wgpu graph.
SenseNova-Loop mHC of one graph layer (two streams, sensenova::Mhc):
the attention and FFN routers ([8, 2·hidden] f32 and their biases),
whether this layer opens the range (copies the hidden into both
streams) or closes it (hands the streams’ mean on), the Sinkhorn
iterations and the branch scale.
Fields§
§attn_w: &'a [f32]§attn_b: &'a [f32]§ffn_w: &'a [f32]§ffn_b: &'a [f32]§enter: bool§leave: bool§iters: usize§pre_scale: f32§dsv4: Option<GraphMhcDsv4>DeepSeek-V4’s form (GLM-5.3): Some = the logits scaled per group
(pre, post, mix) before their base is added, pre = σ + eps, the mix
a row softmax plus eps then eps-floored column / row normalizations,
and the router’s RMS taken with rms_eps. None = SenseNova-Loop’s
log-domain Sinkhorn.
head: Option<GraphMhcHead<'a>>The range’s closing fold (leave): Some = Hy4-flash’s head,
σ(l·scale + base) + eps over [ns, ns·hidden] router weights;
None = the streams’ mean. A backend without the arm must decline it.