nemo_automodel.components.speculative.eagle.target_v12
nemo_automodel.components.speculative.eagle.target_v12
Target-model wrapper for EAGLE-1 / EAGLE-2 training.
Module Contents
Classes
Functions
API
Target-model outputs needed by the EAGLE-1 / EAGLE-2 trainer.
Thin wrapper that exposes hidden-state supervision from a causal LM.
Run the target transformer and prepare shifted supervision tensors.
Return the target model input embeddings.
Return the target model lm_head.
Shift a batched sequence tensor left and zero-fill the tail.
Materialise a (possibly tensor-parallel) tensor as a plain local tensor.
With a tensor-parallel target the lm_head is column-parallel, so its logits
come back as a vocab-sharded DTensor. The draft consumes plain tensors,
so gather the full tensor before handing it on. A no-op for an already-plain
(unsharded or pure-FSDP-replicated) tensor.