-
Notifications
You must be signed in to change notification settings - Fork 523
Create a tool for data blend preparation to enable fast experimentation with distillation #1888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
510a414
Implement prepare_data_blend utility.
danielkorzekwa d22f71c
remodve not needed __all__ variable
danielkorzekwa 52e6035
implement prepare_data_blend.py
danielkorzekwa 8d40667
created a tool for efficient data blend preparation
danielkorzekwa aeaba79
add change log and improve a unit test
danielkorzekwa aaccd76
improve docs
danielkorzekwa 360c999
📝 CodeRabbit Chat: Update dataset blend preparation example (#1929)
coderabbitai[bot] 78794fb
Fix token accounting when resuming cached data blend preparation
danielkorzekwa 187af2d
include _tokens{max_tokens} in the processed_json bin/idx file names
danielkorzekwa e65ee79
improve docs
danielkorzekwa 73b4e7b
Improve docs
danielkorzekwa 9ac0540
refactoring and update docs for prepare_megatron_data_blend utility
danielkorzekwa 48c36e4
Merge branch 'main' into dkorzekwa/prepare_data_blend
danielkorzekwa 79148ba
improve docs
danielkorzekwa e43ac53
allow for a more readable max_tokens number formatting (target_tokens…
danielkorzekwa 08b5ba8
Immprove logging
danielkorzekwa 556c64f
improve docs
danielkorzekwa 6c201eb
Improve docs
danielkorzekwa 8af74ea
improve imports
danielkorzekwa 97df800
Improve unit test,use the same hf_dataset as in other testsI
danielkorzekwa a7f9194
fix a bug: do not use hard-coded target_tokens:1000
danielkorzekwa 73e34f5
create a tiny tokenizer instead of tiny qwen model for test_prepare_m…
danielkorzekwa 581c38c
Merge branch 'main' into dkorzekwa/prepare_data_blend
danielkorzekwa aee0181
fix change log
danielkorzekwa c6b3971
fix broken tests
danielkorzekwa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,14 @@ Model optimization research depends on short feedback loops: test a hypothesis c | |
| reproducibly, and spend full-scale compute only on the most promising experiments. This guide collects practical | ||
| ModelOpt workflows for that iterative research process. | ||
|
|
||
| The guide starts with efficient model evaluation and will grow as additional research workflows are documented. | ||
| It complements the feature-specific [examples](../) by connecting them into experimentation strategies rather | ||
| than replacing their detailed instructions. | ||
| Current workflows include: | ||
|
|
||
| - [Efficient model evaluation](#efficient-evaluation-with-lm-eval-harness) with smaller benchmark subsets. | ||
| - [Efficient data blend preparation](#prepare-token-budgeted-data-blends) for distillation experiments. | ||
|
|
||
| The guide will grow as additional research workflows are documented. It complements the feature-specific | ||
| [examples](../) by connecting them into experimentation strategies rather than replacing their detailed | ||
| instructions. | ||
|
|
||
| ## Efficient evaluation with LM-Eval Harness | ||
|
|
||
|
|
@@ -42,6 +47,13 @@ and should not be reported as final benchmark results. | |
| Add `--log_samples` for paired per-question analysis. When multiple GPUs are available, use data parallelism to | ||
| split samples across model copies; see the [LM-Eval examples](../llm_eval/README.md) for commands. | ||
|
|
||
| ## Prepare token-budgeted data blends | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is useful in-general even for tokenizing 100B blend, not just for researchers. Can you move this section inside |
||
|
|
||
| Preparing complete distillation datasets can consume unnecessary time and storage during early experiments. | ||
| ModelOpt can preserve source weights while preparing only a requested token budget. See | ||
| [Prepare token-budgeted data blends](../dataset/MEGATRON_DATA_PREP.md#prepare-token-budgeted-data-blends) for the | ||
| configuration format, commands, and generated outputs. | ||
|
|
||
| ## Planned topics | ||
|
|
||
| Future additions can cover: | ||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.