nemo_automodel.recipes.llm.train_domino
nemo_automodel.recipes.llm.train_domino
Domino draft-model training recipe (Qwen3-style targets).
Domino (sgl-project/SpecForge#571) extends the DFlash parallel draft backbone
with a lightweight causal correction head (a GRU state plus a low-rank logit
correction; see nemo_automodel.components.speculative.dflash.domino_core).
This recipe reuses every piece of the DFlash recipe — online target hidden-state
capture, anchor sampling, the block attention mask, gradient accumulation, and
checkpointing — and only swaps in the Domino trainer wrapper, enables the Domino
head on the draft via dflash_config, and drives the base-anchor lambda_base
curriculum.
Module Contents
Classes
Functions
Data
API
Bases: TrainDFlashRecipe
Recipe for Domino draft-model training: DFlash backbone + causal correction head.
Extend the DFlash draft config with the Domino head fields.
Build the Domino trainer wrapper on the (Domino-head-enabled) DFlash draft.
Create rank-symmetric Domino validation accumulators.
Return additive Domino base-head validation statistics.
Every returned value is a pair of scalar tensors on the trainer device. The shared validation loop SUM-reduces each pair before division.
Return Domino head and curriculum diagnostics as window sums.
lambda_base is a schedule value rather than a statistic, so its
denominator is the micro-batch count: averaging it over the window is
what makes it comparable with the loss curves beside it.
Log the Domino-specific diagnostics for the most recent step (rank-0 local).
Forward through the Domino wrapper, injecting the current curriculum weight.
Build everything via the DFlash recipe, then read the lambda_base schedule.
Entrypoint for TrainDominoRecipe.