nemo_automodel.components.speculative.dspark.core
nemo_automodel.components.speculative.dspark.core
DSpark online training wrapper.
The DSpark draft is self-contained: it samples anchors, builds the block attention mask, runs the semi-autoregressive backbone + Markov head, and emits everything the objective needs. This module is therefore a thin wrapper that calls the draft with the target supervision and computes the three-term loss.
Module Contents
Classes
Data
API
Dataclass
Per-step training outputs for the DSpark draft (loss + its three terms).
ce_loss
confidence_loss
l1_loss
loss
Bases: Module
DSpark online training wrapper computing the three-term objective.
ce_loss_alpha
confidence_head_alpha
l1_loss_alpha
Run the draft on the target supervision and compute the DSpark loss.