Skip to content

Add mock SFT dataset and varlen dataset family - #6685

Open
ilml wants to merge 3 commits into
NVIDIA:pull-request/6684from
ilml:split/3386-dataset-mock-sft-varlen
Open

Add mock SFT dataset and varlen dataset family#6685
ilml wants to merge 3 commits into
NVIDIA:pull-request/6684from
ilml:split/3386-dataset-mock-sft-varlen

Conversation

@ilml

@ilml ilml commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the mock SFT dataset (with a generalized SFT padding divisor) and the varlen dataset family (VarlenLowLevelDataset, VarlenDataset, MockVarlenDataset) with unit tests. The datasets are inert until the follow-up training-integration PR wires them into pretraining.

Part of the #3386 split series tracked in the Dynamic Context Parallelism project. Original changes by @xiaoyao0115 in #3386.

Series and merge order (reviews can run in parallel):

PR Content Merge order
#5902 config field, CLI arg, validation 1 (independent)
#6684 core packing scheduler 1 (independent)
this PR mock SFT + varlen datasets 2 — after #6684 (stacked on it) and #5902
training-integration PR scheduler + varlen wiring into training loop 3 — last

Stacking notes:

Contribution process

  • Draft PR per contributing guidelines
  • Commits signed off (DCO)

ilml and others added 3 commits August 19, 2026 21:34
Split 2/10 from NVIDIA#3386 (sequence packing / THD E2E support). Adds the
sequence_packing_scheduler knob to ModelParallelConfig, its
TransformerConfig validation (TE>=2.9 pin, variable_seq_lengths,
alltoall dispatcher), the explicit CLI args, and validate_args checks.
Feature-flagged no-op until the scheduler lands.

Original changes by @xiaoyao0115 in NVIDIA#3386.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: ilml <tolong@nvidia.com>
Split 6/10 from NVIDIA#3386 (sequence packing / THD E2E support). Adds
MockSFTDataset/MockSFTLowLevelDataset with file- and distribution-mode
sequence-length configs, the load_json_arg helper, the
--sft-mock-dataset-config-json arg with lognormal default, and
generalizes the SFT padding divisor beyond cp>1.

Original changes by @xiaoyao0115 in NVIDIA#3386.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: ilml <tolong@nvidia.com>
Split 9/10 from NVIDIA#3386 (sequence packing / THD E2E support). Adds the
variable-length packed (THD) dataset family: HF-hub/parquet/jsonl
loading, THD __getitem__ with cu_seqlens, SBHD validation mode, and the
mock variant, with unit tests.

Also adds hybrid_context_parallel=False to the _make_config test helper
(deviation from NVIDIA#3386: fixes a latent AttributeError in
_calculate_padding_divisor with SimpleNamespace configs).

Original changes by @xiaoyao0115 in NVIDIA#3386.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: ilml <tolong@nvidia.com>
@ilml

ilml commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test ddb5304

@copy-pr-bot

copy-pr-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant