pub struct DeepseekV4MtpModule {
pub body: Box<dyn TransformerLayer>,
pub enorm: DenseWeight,
pub hnorm: DenseWeight,
pub e_proj: DenseWeight,
pub h_proj: DenseWeight,
pub norm: DenseWeight,
pub hc_head: Option<HcHeadWeights>,
}Expand description
2026-09-25: A loaded DeepSeek-V4 MTP draft module: the V4 layer body plus the MTP input combiner, final norm and HC head.
Fields§
§body: Box<dyn TransformerLayer>2026-09-25: The V4 layer body, built by assemble_layer from the mtp.0 prefix.
enorm: DenseWeight2026-09-25: RMSNorm weight applied to the token embedding before e_proj.
hnorm: DenseWeight2026-09-25: RMSNorm weight applied to the target’s hidden state before h_proj.
e_proj: DenseWeight2026-09-25: [hidden, hidden] projection of the normed embedding; summed with
the h_proj branch.
h_proj: DenseWeight2026-09-25: [hidden, hidden] projection of the normed hidden state; summed
with the e_proj branch.
norm: DenseWeight2026-09-25: Final RMSNorm weight, applied before the target’s LM head.
hc_head: Option<HcHeadWeights>2026-09-25: The module’s own HC head (mtp.0.hc_head_*). The body is built
with layer_idx = num_hidden_layers, so it is not the last model layer
and never collapses the HC streams; the proposer does that with these
weights. The body holds a clone of the same pointers. Some in every
returned module: assemble_layer refuses hc_mult == 0.