> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# nemo_automodel.components.speculative.eagle.msd_curriculum

Two-stage data curriculum for Multimodal Speculative Decoding training.

## Module Contents

### Classes

| Name                                                                                                     | Description                                                          |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`MSDCurriculum`](#nemo_automodel-components-speculative-eagle-msd_curriculum-MSDCurriculum)             | Stateless-by-step two-stage curriculum with checkpointable progress. |
| [`MSDCurriculumConfig`](#nemo_automodel-components-speculative-eagle-msd_curriculum-MSDCurriculumConfig) | Configuration for the two-stage MSD data curriculum.                 |
| [`MSDCurriculumPhase`](#nemo_automodel-components-speculative-eagle-msd_curriculum-MSDCurriculumPhase)   | High-level phase of the two-stage MSD training schedule.             |
| [`MSDDataSource`](#nemo_automodel-components-speculative-eagle-msd_curriculum-MSDDataSource)             | Data source selected for one MSD optimizer step.                     |

### API

```python
class nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculum(
    config: nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculumConfig,
    global_step: int = 0
)
```

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.

```python
nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculum.load_state_dict(
    state_dict: dict[str, typing.Any]
) -> None
```

Restore curriculum progress from a checkpoint state dictionary.

```python
nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculum.multimodal_probability(
    global_step: int
) -> float
```

Return the multimodal batch probability at `global_step`.

```python
nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculum.next_source() -> nemo_automodel.components.speculative.eagle.msd_curriculum.MSDDataSource
```

Return the current source selection and advance one optimizer step.

```python
nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculum.phase_for_step(
    global_step: int
) -> nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculumPhase
```

Return the curriculum phase active at `global_step`.

```python
nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculum.source_for_step(
    global_step: int
) -> nemo_automodel.components.speculative.eagle.msd_curriculum.MSDDataSource
```

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.

```python
nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculum.state_dict() -> dict[str, typing.Any]
```

Return progress required to resume :meth:`next_source`.

```python
class nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculumConfig(
    text_only_steps: int,
    multimodal_ramp_steps: int,
    final_multimodal_ratio: float = 1.0,
    seed: int = 42
)
```

Dataclass

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.

```python
nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculumConfig.__post_init__() -> None
```

```python
class nemo_automodel.components.speculative.eagle.msd_curriculum.MSDCurriculumPhase
```

**Bases:** `enum.Enum`

High-level phase of the two-stage MSD training schedule.

```python
class nemo_automodel.components.speculative.eagle.msd_curriculum.MSDDataSource
```

**Bases:** `enum.Enum`

Data source selected for one MSD optimizer step.