-
Notifications
You must be signed in to change notification settings - Fork 544
feat(nemotron-omni): add Megatron Nano image GRPO support #3290
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
38 commits
Select commit
Hold shift + click to select a range
4c9b5a0
chore: update Megatron-Bridge pin
aroshanghias-nvd a174f29
feat(megatron): integrate canonical Nemotron Omni model
aroshanghias-nvd 3974f7c
feat(multimodal): support Nemotron Omni image batches
aroshanghias-nvd 7615435
feat(vllm): support Nemotron Omni generation parity
aroshanghias-nvd e0446d0
feat(nemotron-omni): add Nano GRPO recipes
aroshanghias-nvd da1a684
style(nemotron-omni): apply repository formatting
aroshanghias-nvd e26067e
docs(nemotron-omni): document Megatron GRPO support
aroshanghias-nvd 4fc74f6
refactor: generalize multimodal tensor padding
aroshanghias-nvd bbd5b18
refactor(megatron): pack Nemotron Omni inputs before forward
aroshanghias-nvd 88110ed
test(nemotron-omni): cover TP CP and sequence parallel
aroshanghias-nvd 1c01cd4
test(nemotron-omni): cover pipeline-parallel schedule
aroshanghias-nvd 3b0776a
fix(nemotron-omni): select compatible attention backend
aroshanghias-nvd cf05866
test(vllm): exercise bad-words cache concurrency
aroshanghias-nvd b798c96
refactor(nemotron-omni): align caller-packed CP contract
aroshanghias-nvd b16b8ba
fix(nemotron-omni): preserve packed routing semantics
aroshanghias-nvd 875956c
chore: refresh uv lockfile
aroshanghias-nvd 5a2f1ad
chore: update Megatron-Bridge after Omni merge
aroshanghias-nvd 0273383
fix(automodel): filter unsupported multimodal metadata
aroshanghias-nvd 18fb15b
fix(vllm): isolate Nemotron Omni LayerScale handling
aroshanghias-nvd 4f68d4e
refactor(megatron): remove redundant legacy Omni checks
aroshanghias-nvd 79ae5bc
test(multimodal): strengthen dynamic-shape coverage
aroshanghias-nvd a981993
test(nemotron-omni): add Megatron nightly drivers
aroshanghias-nvd 07e9432
chore: merge latest main
aroshanghias-nvd 7f7c301
fix: keep optional vLLM defaults in recipes
aroshanghias-nvd ac8a254
fix(megatron): mark caller-packed THD padding
aroshanghias-nvd 4c52923
merge: synchronize main into Nemotron Omni
aroshanghias-nvd d25ce6f
fix: port Nemotron Omni integration to vLLM 0.25
aroshanghias-nvd e5b47bf
test: skip Omni MCore tests without MBridge
aroshanghias-nvd aa10e24
test: route sequence packing fusion checks to mcore
aroshanghias-nvd bb89288
fix: keep vLLM logprobs mode optional
aroshanghias-nvd 94365da
Merge remote-tracking branch 'origin/main' into pr3290-main-merge
aroshanghias-nvd c0dc3f2
Merge remote-tracking branch 'origin/main' into pr3290-main-merge
aroshanghias-nvd a7e52a3
Merge remote-tracking branch 'origin/main' into pr3290-main-merge
aroshanghias-nvd 822d7b1
fix(nemotron-omni): restore logprobs default and guard mixed-res auto…
yfw b8d7523
docs(nemotron-omni): name the model the automodel mixed-res guard app…
yfw c65b1f0
Merge branch 'main' into aroshanghias/nemotron-omni-main-migration
yfw aff74f9
raise nightly GPU-hour limit to 3800
yfw a9a9a87
Merge branch 'main' into aroshanghias/nemotron-omni-main-migration
aroshanghias-nvd 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
55 changes: 55 additions & 0 deletions
55
...ples/configs/recipes/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-megatron-tp8ep8.v1.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,55 @@ | ||
| defaults: ../../vlm_grpo_3B_megatron.yaml | ||
| loss_fn: | ||
| reference_policy_kl_penalty: 0.0 | ||
| checkpointing: | ||
| checkpoint_dir: results/vlm_grpo_nemotron_omni_megatron | ||
| policy: | ||
| model_name: nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 | ||
| train_global_batch_size: 8 | ||
| logprob_batch_size: 1 | ||
| max_total_sequence_length: 8192 | ||
| sequence_packing: | ||
| enabled: true | ||
| megatron_cfg: | ||
| env_vars: | ||
| TORCH_CUDA_ARCH_LIST: '9.0' | ||
| tensor_model_parallel_size: 8 | ||
| expert_model_parallel_size: 8 | ||
| sequence_parallel: true | ||
| bias_activation_fusion: false | ||
| activation_checkpointing: true | ||
| generation: | ||
| max_new_tokens: 4096 | ||
| bad_words: | ||
| - <image> | ||
| - <img> | ||
| - </img> | ||
| - <so_embedding> | ||
| - <so_start> | ||
| - <so_end> | ||
| vllm_cfg: | ||
| tensor_parallel_size: 8 | ||
| enforce_eager: true | ||
| max_model_len: 8192 | ||
| cap_max_tokens_to_context: true | ||
| gpu_memory_utilization: 0.5 | ||
| enable_prefix_caching: false | ||
| logprobs_mode: raw_logprobs | ||
| vllm_kwargs: | ||
| limit_mm_per_prompt: | ||
| image: 2 | ||
| max_num_batched_tokens: 16384 | ||
| mamba_ssm_cache_dtype: float32 | ||
| skip_mm_profiling: true | ||
| kernel_config: | ||
| enable_flashinfer_autotune: false | ||
| moe_backend: triton | ||
| data: | ||
| default: | ||
| prompt_file: examples/prompts/clevr_cogent_cot_nemotron_omni.txt | ||
| logger: | ||
| wandb: | ||
| project: grpo-vlm | ||
| name: nemotron-omni-megatron | ||
| cluster: | ||
| gpus_per_node: 8 | ||
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
65 changes: 65 additions & 0 deletions
65
...ples/configs/recipes/vlm/vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-megatron-tp8ep16.v1.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,65 @@ | ||
| defaults: ./vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-megatron-tp8ep8.v1.yaml | ||
| grpo: | ||
| num_prompts_per_step: 512 | ||
| overlong_filtering: true | ||
| zero_variance_prompt_filtering: false | ||
| deduplicate_multimodal_data: false | ||
| loss_fn: | ||
| ratio_clip_max: 0.28 | ||
| use_on_policy_kl_approximation: true | ||
| sequence_level_importance_ratios: true | ||
| token_level_loss: false | ||
| checkpointing: | ||
| checkpoint_dir: results/vlm_grpo_nemotron_omni_mmpr_megatron | ||
| keep_top_k: 4 | ||
| checkpoint_must_save_by: 00:03:45:00 | ||
| policy: | ||
| train_global_batch_size: 2048 | ||
| logprob_chunk_size: 1024 | ||
| megatron_cfg: | ||
| empty_unused_memory_level: 2 | ||
| expert_model_parallel_size: 16 | ||
| optimizer: | ||
| lr: 3.0e-06 | ||
| min_lr: 2.0e-09 | ||
| weight_decay: 0.0 | ||
| adam_beta2: 0.99 | ||
| scheduler: | ||
| lr_decay_iters: null | ||
| lr_warmup_iters: 10 | ||
| lr_warmup_init: 3.0e-08 | ||
| generation: | ||
| max_new_tokens: ${policy.max_total_sequence_length} | ||
| vllm_cfg: | ||
| tensor_parallel_size: 2 | ||
| load_format: auto | ||
| enforce_eager: false | ||
| max_model_len: ${policy.max_total_sequence_length} | ||
| gpu_memory_utilization: 0.75 | ||
| vllm_kwargs: | ||
| max_num_batched_tokens: 32768 | ||
| max_num_seqs: 512 | ||
| data: | ||
| train: | ||
| dataset_name: mmpr-tiny | ||
| download_dir: results/mmpr_tiny_processed | ||
| split_validation_size: 0.008 | ||
| seed: 42 | ||
| default: | ||
| prompt_file: null | ||
| env_name: mmpr-tiny | ||
| env: | ||
| mmpr-tiny: | ||
| num_workers: 8 | ||
| reward_functions: | ||
| - name: geo3k | ||
| weight: 1.0 | ||
| kwargs: | ||
| format_score: 0.1 | ||
| logger: | ||
| wandb_enabled: true | ||
| wandb: | ||
| project: nemotron-omni-main-migration | ||
| name: nemotron-omni-mmpr-megatron | ||
| cluster: | ||
| num_nodes: 4 |
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.