feat(data): support deterministic weighted dataset mixing - #342
Closed
lkxdsb wants to merge 14 commits into
Closed
Conversation
lkxdsb
marked this pull request as ready for review
August 17, 2026 06:57
…I#543) * feat(optimizer): complete dynamic AdamW8bit state routing * test(optimizer): account for dynamic 8-bit quantization error * test(skills): account for single-turn demo skill
Author
|
Hi maintainers, a gentle follow-up on this PR. I have merged the latest The fork workflows are currently awaiting maintainer approval. When convenient, could you please take a look and approve the CI runs/review the implementation? I would be happy to address any feedback. Thank you for your time! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
K >= 2)--dataset-source NAME=PATH:WEIGHTinputs and a versioned JSON manifeststop,cycle, andrenormalizeexhaustion policies with optional per-epoch sample budgetsMotivation
AReno previously required project-specific loader code to combine datasets, making weighted runs difficult to validate and reproduce. This change keeps mixing inside the existing dataset-loader and SFT contracts and validates every source before model or worker initialization.
Usage
Dataset mixing is opt-in for SFT. Use either repeated inline sources or a JSON manifest; both forms are mutually exclusive with
--dataset-path.Inline sources
Weights must be finite and positive and are normalized automatically. Inline sources default to seed
42,cycle, per-source shuffling, and an epoch budget equal to the total loaded row count.JSON manifest
{ "version": 1, "seed": 42, "exhaustion": "cycle", "shuffle_within_sources": true, "samples_per_epoch": 1000, "sources": [ {"name": "math", "path": "math.jsonl", "weight": 0.7}, {"name": "code", "path": "code.jsonl", "weight": 0.3} ] }Policy semantics:
stop: end at the first selected-source exhaustion without repeating recordscycle: restart exhausted sources until the configured epoch budget is reachedrenormalize: remove exhausted sources and continue with normalized remaining weights, emitting each record once--dataset-mix-samples-per-epochbounds scheduled rows, not downloads or accepted rows. Length filtering can consume extra scheduled rows, and sample weights need not equal final target-token contribution.Observability
stage=dataset_mix_plan: normalized contract and deterministic hashesstage=dataset_mix_progress: per-source scheduled, filtered, trained, and target-token countsdataset_mix_plan.<pid>.epoch-<n>.json: sample-free per-epoch plan under--metrics-log-dirRows retain source identity in reserved
__areno_meta__metadata. Invalid weights, duplicate names, empty/incompatible sources, unknown fields, and reserved-field collisions fail before expensive initialization.Validation
Automated
main— 703 passed, 48 skipped; the remaining 9 failures reproduce unchanged on a cleanorigin/mainworktree and are unrelated platform/network test assumptionspre-commit run --all-filespython -m compileall -q areno testsprompt + response,tokens + prompt_mask, and image-backed responses)PYTHONHASHSEEDvaluesKaggle GPU
Validated with Qwen3-0.6B FP16 on two Tesla T4 GPUs (
world_size=2,tp_size=2,dp_size=1), PyTorch 2.10.0+cu128, native attention, and the compiled AReno CUDA extension:See the Kaggle validation guide and its 12 notebook screenshots.
Limitations
Closes #198