nemo_automodel.components.speculative.eagle.msd_curriculum
nemo_automodel.components.speculative.eagle.msd_curriculum
Two-stage data curriculum for Multimodal Speculative Decoding training.
Module Contents
Classes
API
Stateless-by-step two-stage curriculum with checkpointable progress.
Call :meth:source_for_step from a training loop that owns separate text
and multimodal dataloaders, then draw the selected dataloader’s next batch.
:meth:next_source is a convenience for single-process loops and stores
the next global step in its checkpoint state.
Restore curriculum progress from a checkpoint state dictionary.
Return the multimodal batch probability at global_step.
Return the current source selection and advance one optimizer step.
Return the curriculum phase active at global_step.
Deterministically choose the data source for global_step.
The random draw is seeded from the global step rather than mutable RNG state. Resumed and distributed runs therefore make the same sampling decision for a given optimizer step.
Return progress required to resume :meth:next_source.
Configuration for the two-stage MSD data curriculum.
The first stage consumes text-only instruction data. In the second stage,
the probability of selecting a multimodal batch rises linearly to
final_multimodal_ratio. A final ratio of one makes the post-ramp phase
entirely multimodal, matching the curriculum described in the MSD paper.
Parameters:
Number of initial optimizer steps using only text batches.
Number of stage-two steps over which the multimodal sampling probability rises to its final value. Set to zero to switch immediately after the text-only stage.
Multimodal batch probability after the ramp.
Seed used for stateless, step-indexed source selection. All distributed ranks therefore select the same source for a global optimizer step without communicating RNG state.
Bases: enum.Enum
High-level phase of the two-stage MSD training schedule.
Bases: enum.Enum
Data source selected for one MSD optimizer step.