Expand description
2026-09-25: The one definition of an MTP proposer’s attention-metadata
slab, packed by MtpHead::forward_one, forward_batch_position and
DeepseekV4MtpHead::propose.
Owner: model-layers (MTP head). Invariants:
pack_mtp_attn_metareturns a slab only when it fits the caller’sregion_bytes; otherwise it returns an error and builds nothing.
Constants§
- MTP_
META_ OFFSET - 2026-09-25:
scratchbyte offset of the single-sequence MTP metadata slab, used byMtpHead::forward_oneandDeepseekV4MtpHead::propose. The target’s batched decode metadata starts atscratch + 32768. The batched propose writes its ownpropose_metaallocation instead.
Functions§
- mtp_
attn_ meta_ batch_ dev - 2026-09-30: The attention metadata
pack_mtp_attn_meta_batchlays out atbasefornrows (MtpBatchMetaLayout);max_blocks_per_seqis the step’s, set by its reader. - mtp_
attn_ meta_ dev - 2026-09-25: Pack one MTP attention-metadata slab, or return an error when
it would not fit
region_bytes. - pack_
mtp_ attn_ meta