-
Notifications
You must be signed in to change notification settings - Fork 555
feat: add Energon-owned SFT sequence packing #4070
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
Open
rohitrango
wants to merge
12
commits into
NVIDIA-NeMo:main
Choose a base branch
from
rohitrango:rohit/sft_v2_stage2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ad2110b
feat: add Energon-owned SFT sequence packing
rohitrango 1277857
fix: transport packed boundaries across TP ranks
rohitrango 2615ba9
test: cover Energon-owned sequence packing
rohitrango eb62214
chore: add packing module to pyrefly
rohitrango da8a263
chore: add test copyright headers
rohitrango ac2519d
Update nemo_rl/data/packing/algorithms.py
rohitrango 51cdc68
test(sft): add CP2 Energon packing recipe
rohitrango 31d3111
fix(sft): address Energon packing review feedback
rohitrango 1fa1033
docs(sft): clarify packed sample metrics
rohitrango 295add7
feat(sft): allow all Energon packing algorithms
rohitrango f8eaef7
Merge branch 'main' into rohit/sft_v2_stage2
rohitrango 619c3d6
fix(sft): satisfy lint checks
rohitrango 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
14 changes: 14 additions & 0 deletions
14
...es/vlm/vlm_sft-nemotron-omni-30ba3b-clevr-1n8g-megatron-tp4ep8cp2-energon.v1.packing.yaml
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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| defaults: ./vlm_sft-nemotron-omni-30ba3b-clevr-1n8g-megatron-tp8ep8-energon.v1.packing.yaml | ||
| sft: | ||
| max_num_steps: 50 | ||
| policy: | ||
| make_sequence_length_divisible_by: ${mul:${policy.megatron_cfg.context_parallel_size}, | ||
| ${mul:2, ${policy.megatron_cfg.tensor_model_parallel_size}}} | ||
| megatron_cfg: | ||
| tensor_model_parallel_size: 4 | ||
| context_parallel_size: 2 | ||
| logger: | ||
| wandb_enabled: true | ||
| log_dir: logs/sft-nemotron-omni-30b-clevr-energon-packing-tp4ep8cp2 | ||
| wandb: | ||
| name: sft-nemotron-omni-30b-clevr-energon-packing-tp4ep8cp2 |
17 changes: 17 additions & 0 deletions
17
...cipes/vlm/vlm_sft-nemotron-omni-30ba3b-clevr-1n8g-megatron-tp8ep8-energon.v1.packing.yaml
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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| defaults: ./vlm_sft-nemotron-omni-30ba3b-clevr-1n8g-megatron-tp8ep8-energon.v1.yaml | ||
|
|
||
| policy: | ||
| sequence_packing: | ||
| enabled: true | ||
| fuse_loss: true | ||
| algorithm: balanced_greedy_knapsack | ||
|
|
||
| data: | ||
| energon: | ||
| packing_buffer_size: 64 | ||
| max_samples_per_sequence: 16 | ||
|
|
||
| logger: | ||
| log_dir: logs/sft-nemotron-omni-30b-clevr-energon-packing | ||
| wandb: | ||
| name: sft-nemotron-omni-30b-clevr-energon-packing |
20 changes: 20 additions & 0 deletions
20
...recipes/vlm/vlm_sft-qwen2.5-vl-3b-instruct-clevr-1n2g-megatrontp1-energon.v1.packing.yaml
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 |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| defaults: ./vlm_sft-qwen2.5-vl-3b-instruct-clevr-1n2g-megatrontp1-energon.v1.yaml | ||
|
|
||
| policy: | ||
| sequence_packing: | ||
| enabled: true | ||
| fuse_loss: true | ||
| algorithm: balanced_greedy_knapsack | ||
|
|
||
| data: | ||
| energon: | ||
| packing_buffer_size: 64 | ||
| max_samples_per_sequence: 16 | ||
|
|
||
| checkpointing: | ||
| checkpoint_dir: results/sft_${policy.model_name}_clevr_energon_packing | ||
|
|
||
| logger: | ||
| log_dir: logs/sft-qwen2.5-vl-3b-clevr-energon-packing | ||
| wandb: | ||
| name: sft-qwen2.5-vl-3b-clevr-energon-packing | ||
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
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.