nemo_automodel.components.models.qwen3_5.packing
nemo_automodel.components.models.qwen3_5.packing
Shared packed-sequence metadata for dense and MoE Qwen3.5 models.
Module Contents
Classes
Functions
API
Packed-sequence metadata shared by every GatedDeltaNet layer.
Parameters:
Indexed document mask of shape [batch, sequence] on the compute device, with zero denoting padding.
Flattened valid-token indices of shape [tokens] on the compute device.
Cumulative document lengths of shape [documents + 1] on the compute device.
CPU mirror of cu_seqlens with shape [documents + 1]
for FLA host-side chunk planning.
Build shared GatedDeltaNet metadata once for a model forward.
Parameters:
Optional indexed document mask of shape [batch, sequence] or a backend-specific attention mask.
Optional indexed document IDs of shape [batch, sequence] supplied beside a backend-specific attention mask.
Returns: GatedDeltaPackedMetadata | None
Device and CPU packed-sequence metadata whose tensor layouts are