bridge.models.deepseek.deepseek_v4_data#
Fixed-shape synthetic THD data for the DeepSeek-V4 Pro benchmarks.
Each pack holds one full-length sequence, as in the fixed-length mock runs those
benchmarks follow. This is neither MCore’s variable-length dp_balanced data
scheduler nor its random token stream.
Module Contents#
Classes#
Deterministic synthetic next-token samples with static packed metadata. |
|
One fixed synthetic sequence per MBS1 pack for the DSv4 benchmarks. |
API#
- class bridge.models.deepseek.deepseek_v4_data._FixedTHDMockDataset(
- *,
- num_samples: int,
- seq_length: int,
- vocab_size: int,
- seed: int,
- eod: int,
- metadata_capacity: int,
Bases:
torch.utils.data.DatasetDeterministic synthetic next-token samples with static packed metadata.
Initialization
- __len__() int#
- __getitem__(index: int) dict[str, torch.Tensor]#
- class bridge.models.deepseek.deepseek_v4_data.FixedTHDMockDatasetConfig#
Bases:
megatron.bridge.data.base.DatasetProviderOne fixed synthetic sequence per MBS1 pack for the DSv4 benchmarks.
The offline-packing metadata declaration makes Bridge retain boundaries on intermediate PP stages. Samples are generated in memory; no pack file is used.
- seq_length: int#
None
- vocab_size: int#
None
- seed: int#
None
- metadata_capacity: int#
None
- dataloader_type: str#
‘single’
- num_workers: int#
0
- persistent_workers: bool#
False
- skip_getting_attention_mask_from_dataset: bool#
True
- enable_offline_packing: bool#
‘field(…)’
- pad_to_max_length: bool#
‘field(…)’
- offline_packing_specs: megatron.bridge.data.packing.config.PackedSequenceSpecs#
‘field(…)’
- __post_init__() None#
- finalize() None#
Validate the fixed pack dimensions and expose static graph metadata.
- build_datasets(
- context: megatron.bridge.data.base.DatasetBuildContext,
Build reproducible train, validation, and test sample streams.