> 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.datasets.llm.mock_iterable_dataset

## Module Contents

### Classes

| Name                                                                                                       | Description                                                  |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [`MockIterableDataset`](#nemo_automodel-components-datasets-llm-mock_iterable_dataset-MockIterableDataset) | Mock dataset that generates synthetic data for benchmarking. |

### API

```python
class nemo_automodel.components.datasets.llm.mock_iterable_dataset.MockIterableDataset(
    vocab_size: int = 1024,
    seq_len: int = 1024,
    num_samples: int = 1000000,
    batch_size: int = 1
)
```

**Bases:** `IterableDataset`

Mock dataset that generates synthetic data for benchmarking.

This dataset generates random tokens similar to the benchmarking script,
creating input\_ids, labels, and position\_ids for each sample.

```python
nemo_automodel.components.datasets.llm.mock_iterable_dataset.MockIterableDataset.__iter__()
```

Generate synthetic batches.

```python
nemo_automodel.components.datasets.llm.mock_iterable_dataset.MockIterableDataset.__len__()
```

Return the number of samples.