Add synthetic data replay ratio support - #103
Merged
Merged
Conversation
Add configurable synthetic_ratio to control the proportion of synthetic vs benchmark data in each epoch (CLM-inspired replay). When set, each type's allocation is split between synthetic and benchmark source groups with weighted sampling within each group. - SamplerConfig: add synthetic_sources and synthetic_ratio fields - MultitaskSampler: add _split_sample method, use in sample_epoch - train_multitask.py: wire --synthetic-ratio CLI arg and config parsing with auto-detection of synthetic sources by name/path - All 5 multitask YAML configs: add commented-out synthetic_ratio option - 5 new tests covering ratio control, edge cases, and fallback behavior
This was referenced Sep 26, 2026
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
Replaces #102 (auto-closed during branch cleanup).
synthetic_ratioandsynthetic_sourcesparameters toSamplerConfigsynthetic_sourcesnot explicitly set--synthetic-ratio 0.4)Closes part of #97 (synthetic replay ratio approach)
Combined correctness verification
All 3 data mixing features (temperature + difficulty_weights + synthetic_ratio) compose correctly:
Test plan
python -m pytest tests/test_sampler.py -v— 22 tests pass (all 3 features combined)