nemo_automodel.components.speculative.eagle.core_v12
nemo_automodel.components.speculative.eagle.core_v12
Core EAGLE-1 / EAGLE-2 draft-training logic.
Module Contents
Classes
API
Aggregated metrics from one EAGLE-1 / EAGLE-2 training step.
Bases: Module
Draft-side trainer for EAGLE-1 / EAGLE-2 hidden-state prediction.
Project predicted hidden states through the frozen target lm_head.
Run one EAGLE-1 / EAGLE-2 training step.
Per-token tensors are [B, T] (position_ids / doc_remaining
included) except the [B, T, H] hidden states and [B, T, V]
target_logits; seq_lens is [B, max_docs]. When packing is on,
position_ids / seq_lens make the draft block-causal and per-document,
and doc_remaining (real tokens after each slot within its document) gates
supervision: a document’s last real token (doc_remaining == 0) is dropped
because the wrapper’s global left-shift makes its target the next document’s
first token.