nemo_automodel.components.speculative.dspark.draft_qwen3
nemo_automodel.components.speculative.dspark.draft_qwen3
Module Contents
Classes
Functions
Data
API
Bases: Module
attention_dropout
head_dim
k_norm
k_proj
num_attention_heads
num_key_value_groups
num_key_value_heads
o_proj
q_norm
q_proj
scaling
sliding_window
v_proj
Bases: GradientCheckpointingLayer
hidden_size
input_layernorm
mlp
post_attention_layernorm
self_attn
Bases: Qwen3PreTrainedModel
_no_split_modules
block_size
embed_tokens
enable_confidence_head
fc
hidden_norm
layers
lm_head
markov_head
mask_token_id
norm
num_anchors
rotary_emb
target_layer_ids
Keep the RoPE inv_freq buffer in fp32 across dtype casts.
model.to(bfloat16) (the training build path) would otherwise round
inv_freq to bf16 and dephase RoPE with absolute position, eroding
draft acceptance (see pin_rope_inv_freq_fp32).
Run one DSpark training forward.
Sequence packing (position_ids [B, S] per-document reset positions,
seq_lens [B, max_docs], doc_remaining [B, S]) keeps every block
inside its anchor’s document: the anchor’s first target must be in-document,
the block’s context prefix and supervision are restricted to that document,
and the draft’s RoPE uses the per-document positions.