-
Notifications
You must be signed in to change notification settings - Fork 558
feat: Multimodal nemo gym compatible grpo pipeline #3414
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
27 commits
Select commit
Hold shift + click to select a range
b7fa6e3
feat(nemo-gym): support multimodal rollouts with tokenizer_config plu…
rohitrango edb54a6
feat(nemo-gym): plumb multimodal rollouts through the async single-co…
rohitrango 4cb8023
chore(examples): add Nemotron-Omni gym-v smoke configs (tangram + pol…
rohitrango 37098a9
fix(nemo-gym): drop unused nemo_gym_row arg from _postprocess_nemo_gy…
rohitrango 5b43d98
delete scratchspace configs
rohitrango faa185a
consolidate into one entrypoint
rohitrango 98de6f8
reverted processor design to be consistent with vlm_grpo
rohitrango a50f772
chore: clean up multimodal processor plumbing
rohitrango f6300f8
change per-turn images to get results from tool-calls, etc (anything
rohitrango 629a1d4
fix(nemo_gym): flush per-turn image bucket on any trainable item
rohitrango 171506f
docs: add Google-style docstrings to image encoding helpers
rohitrango a104ae6
change non-default config option
rohitrango d3e02b4
build: preserve main dependency configuration
rohitrango 428f5ab
(chore): add copyright notice to test
rohitrango 33b70ec
(chore): undo vllm chat request change
rohitrango ef3f163
fix: address NeMo Gym multimodal image indexing issues
rohitrango 1c5bfbb
lint fixes
rohitrango 062e999
allow mixed (multimodal, text) batches from nemo-gym batch rollouts
rohitrango 0edbe98
chore: apply ruff format to llm_message_utils
rohitrango a70eacc
feat(recipes): add Nemotron-Omni 30B circle-click 2n8g VLM-GRPO recipe
rohitrango 68a538b
feat(nemo_gym): assert placeholder-style processor at actor init
rohitrango b9e1a27
chore(recipes): inherit from vlm_grpo_3B_megatron exemplar in circle-…
rohitrango 4bb7e20
minimized config
rohitrango aa5ea0b
test(vlm): add circle-click gym driver script, disabled for now
yfw 8ba3fe6
Merge branch 'main' into rohit/gymv-mm-integration-v2
aroshanghias-nvd f27dc6d
Merge branch 'main' into rohit/gymv-mm-integration-v2
rohitrango 234cdd7
Merge branch 'main' into rohit/gymv-mm-integration-v2
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
160 changes: 160 additions & 0 deletions
160
...nfigs/recipes/vlm/vlm_grpo-nemotron-omni-30ba3b-circle-click-2n8g-megatron-tp2ep8.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,160 @@ | ||
| defaults: ../../vlm_grpo_3B_megatron.yaml | ||
| grpo: | ||
| num_prompts_per_step: 1 | ||
| num_val_generations_per_prompt: 1 | ||
| max_num_steps: 100 | ||
| val_period: 500 | ||
| overlong_filtering: true | ||
| max_val_samples: null | ||
| val_batch_size: null | ||
| seq_logprob_error_threshold: 2 | ||
| loss_fn: | ||
| reference_policy_kl_penalty: 0 | ||
| kl_input_clamp_value: null | ||
| kl_output_clamp_value: null | ||
| ratio_clip_max: 0.28 | ||
| use_on_policy_kl_approximation: true | ||
| use_importance_sampling_correction: true | ||
| checkpointing: | ||
| enabled: false | ||
| checkpoint_dir: results/grpo-nemotron-omni-30ba3b-gymv-circle-click | ||
| metric_name: val:total_reward/mean | ||
| keep_top_k: 1000000 | ||
| checkpoint_must_save_by: 00:03:40:00 | ||
| policy: | ||
| model_name: nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 | ||
| is_vlm: true | ||
| tokenizer: | ||
| chat_template_kwargs: | ||
| enable_thinking: true | ||
| truncate_history_thinking: false | ||
| train_global_batch_size: ${mul:${grpo.num_prompts_per_step}, ${grpo.num_generations_per_prompt}} | ||
| generation_batch_size: 64 | ||
| logprob_batch_size: 1 | ||
| max_total_sequence_length: 8192 | ||
| logprob_chunk_size: 2048 | ||
| megatron_cfg: | ||
| activation_checkpointing: true | ||
| bias_activation_fusion: false | ||
| tensor_model_parallel_size: 2 | ||
| expert_model_parallel_size: 8 | ||
| context_parallel_size: 2 | ||
| sequence_parallel: true | ||
| moe_router_dtype: fp32 | ||
| moe_router_bias_update_rate: 0.001 | ||
| moe_aux_loss_coeff: 0.0 | ||
| moe_router_enable_expert_bias: true | ||
| defer_fp32_logits: true | ||
| track_moe_metrics: true | ||
| moe_per_layer_logging: true | ||
| radio_force_cpe_eval_mode: true | ||
| clear_memory_caches_before_refit: true | ||
| optimizer: | ||
| lr: 3.0e-06 | ||
| min_lr: 3.0e-06 | ||
| weight_decay: 0.0 | ||
| optimizer_cpu_offload: true | ||
| optimizer_offload_fraction: 1.0 | ||
| scheduler: | ||
| lr_decay_iters: null | ||
| lr_warmup_iters: 0 | ||
| lr_warmup_init: 3.0e-07 | ||
| distributed_data_parallel_config: | ||
| overlap_param_gather: false | ||
| average_in_collective: false | ||
| sequence_packing: | ||
| enabled: true | ||
| make_sequence_length_divisible_by: 32 | ||
| optimizer: null | ||
| scheduler: null | ||
| generation: | ||
| max_new_tokens: ${policy.max_total_sequence_length} | ||
| bad_words: [] | ||
| mcore_generation_config: | ||
| transformer_impl: inference_optimized | ||
| activation_checkpointing: false | ||
| mamba_inference_ssm_states_dtype: float32 | ||
| inference_moe_token_dispatcher_type: nccl | ||
| inference_grouped_gemm_backend: vllm | ||
| moe_router_num_groups: null | ||
| moe_router_group_topk: null | ||
| pipeline_model_parallel_size: 1 | ||
| expert_tensor_parallel_size: 1 | ||
| expert_model_parallel_size: 8 | ||
| sequence_parallel: true | ||
| context_parallel_size: 1 | ||
| tensor_model_parallel_size: 2 | ||
| buffer_size_gb: 20 | ||
| num_cuda_graphs: -1 | ||
| max_tokens: ${policy.max_total_sequence_length} | ||
| async_engine: true | ||
| expose_http_server: true | ||
| enable_prefix_caching: true | ||
| parsers: | ||
| - deepseek-r1-reasoning | ||
| - qwen3-coder-tool | ||
| vllm_cfg: | ||
| async_engine: true | ||
| tensor_parallel_size: 8 | ||
| enforce_eager: true | ||
| enable_prefix_caching: false | ||
| expose_http_server: true | ||
| reasoning_parser_plugin: nemo_rl/models/generation/vllm/reasoning_parsers/nano_v3_reasoning_parser.py | ||
| http_server_serving_chat_kwargs: | ||
| enable_auto_tools: true | ||
| tool_parser: qwen3_coder | ||
| reasoning_parser: nano_v3 | ||
| chat_template_content_format: string | ||
| default_chat_template_kwargs: | ||
| enable_thinking: true | ||
| truncate_history_thinking: false | ||
| vllm_kwargs: | ||
| limit_mm_per_prompt: | ||
| image: 1 | ||
| max_num_batched_tokens: 16384 | ||
| mamba_ssm_cache_dtype: float32 | ||
| compilation_config: | ||
| backend: eager | ||
| colocated: | ||
| enabled: false | ||
| resources: | ||
| gpus_per_node: 8 | ||
| num_nodes: 1 | ||
| data: | ||
| max_input_seq_length: null | ||
| shuffle: false | ||
| train: | ||
| data_path: /path/to/train_dataset.jsonl | ||
| validation: | ||
| data_path: /path/to/eval_dataset.jsonl | ||
| default: | ||
| dataset_name: NemoGymDataset | ||
| env_name: nemo_gym | ||
| prompt_file: null | ||
| processor: nemo_gym_data_processor | ||
| env: | ||
| should_use_nemo_gym: true | ||
| should_log_nemo_gym_responses: true | ||
| nemo_gym: | ||
| is_trajectory_collection: false | ||
| port_range_low: 5000 | ||
| port_range_high: 5999 | ||
| config_paths: | ||
| - responses_api_models/vllm_model/configs/vllm_model_for_training.yaml | ||
| - resources_servers/circle_click/configs/circle_click.yaml | ||
| circle_click_simple_agent: | ||
| responses_api_agents: | ||
| simple_agent: | ||
| max_steps: 1 | ||
| logger: | ||
| log_dir: logs/grpo-nemotron-omni-30ba3b-gymv-circle-click | ||
| wandb_enabled: true | ||
| wandb: | ||
| project: grpo-nemotron-omni-gymv | ||
| name: grpo-nemotron-omni-30ba3b-gymv-circle-click | ||
| mlflow: | ||
| experiment_name: grpo-nemotron-omni-gymv | ||
| run_name: grpo-nemotron-omni-30ba3b-gymv-circle-click | ||
| cluster: | ||
| gpus_per_node: 8 | ||
| num_nodes: 2 |
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
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.