Repository navigation
feat: support Qwen/Qwen3-Omni-30B-A3B-Instruct and Audiomcq dataset. - #2356
Merged
Merged
Conversation
Both directories are local tool runtime state (Codex CLI cache and Humanize plugin's per-session skill outputs) and should not be tracked in the project tree. Required so /humanize:start-rlcr-loop's clean-tree precondition is satisfied without committing tool state. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: Yuekai Zhang <[email protected]>
Add a new built-in dataset wrapper AudioMCQDataset for the Harland/AudioMCQ-StrongAC-GeminiCoT subset (already pre-filtered to the StrongAC partition + Gemini-CoT high-quality subset; ships every audio file inline next to a data.jsonl manifest), wire it into the existing config-driven audio GRPO loader via DATASET_REGISTRY, and extend vlm_hf_data_processor to recognize the new task name. The loader uses snapshot_download with a cached lookup, applies a defensive audio-contribution=='strong' guard for forward compatibility even though the upstream dataset is already filtered, performs an eager head-row asset probe at __init__ to fail fast before Ray actors or vLLM/Megatron initialize, downmixes multi-channel audio to mono before resampling to 16kHz with scipy.signal.resample_poly, and emits the AVQA-shape multimodal message schema with the full-text answer preserved (plus choices on the formatted sample for parity with MMAU). Also add a standalone examples/configs/audio_grpo_7B_megatron.yaml recipe targeting Qwen2.5-Omni-7B on a single node with 8 H100/H200 80GB GPUs (Megatron TP=4, vLLM TP=2), inheriting from the generic grpo_math_1B_megatron.yaml base and redeclaring audio-specific vLLM/Megatron/processor/env settings inline. Tests cover registry plumbing, defensive strong-filter, deterministic seeded shuffle + max_samples, eager-init missing-file failure, format_data missing-file failure, message shape, and processor acceptance using mocked snapshot fixtures (no network). Docs: docs/guides/grpo-audio.md gains an AudioMCQ section describing asset prerequisites, the 3B override-only switch path, and the new 7B recipe. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: Yuekai Zhang <[email protected]>
Signed-off-by: Yuekai Zhang <[email protected]>
Add the assertions Codex flagged as missing from AC-11: - TestAudioMCQRegistry::test_load_response_dataset_round_trip — registry load via the public load_response_dataset entry point. - TestAudioMCQRegistry::test_unsupported_dataset_name_raises — negative test for an unsupported dataset_name=audiomcq_strong alias. - TestAudioMCQConstruction::test_max_samples_applied_after_defensive_filter — proves max_samples truncation runs AFTER the strong filter so weak rows cannot leak through when the truncation count is small. - TestAudioMCQConstruction::test_validation_split_is_seed_reproducible — equal-seed split_validation_size produces identical train/val ID sets; different seeds produce different splits. - TestAudioMCQFormatData::test_format_data_missing_file_raises_filenotfound — the FileNotFoundError message now must contain the resolved on-disk path, not just the source_dataset name. - TestAudioMCQProcessor::test_vlm_hf_data_processor_returns_audiomcq_datum_spec — replace the previous lenient processor smoke with a real success- path assertion that vlm_hf_data_processor returns a DatumSpec whose task_name == "audiomcq", message_log is populated, and extra_env_info carries ground_truth + choices. Uses a minimal _FakeProcessor instead of a MagicMock so hasattr(processor, "conversation_preprocessor") evaluates to False. - TestAudioMCQProcessor::test_dispatcher_rejects_unknown_task_name — direct verification of the existing 'No data processor' error path. All 18 tests pass. Signed-off-by: Yuekai Zhang <[email protected]>
Signed-off-by: Yuekai Zhang <[email protected]>
Round 1 review #2 caught a real bug: split="validation" silently returned training rows because the constructor unconditionally loaded load_dataset(..., split="train") from the manifest and then called split_train_validation, which only populated self.val_dataset on the training instance. Any future YAML stanza with data.validation.dataset_name=audiomcq would have evaluated on training data. The upstream Harland/AudioMCQ-StrongAC-GeminiCoT repo only ships a native train manifest, so we synthesize validation from it. The split arg now routes correctly: - split="train" with split_validation_size=0: full filtered+shuffled set, no validation slice. - split="train" with split_validation_size>0: train slice plus self.val_dataset for the train-and-validate-from-train convention. - split="validation" with split_validation_size>0: returns the held-out slice as the dataset. - split="validation" with split_validation_size=0: raises a clear ValueError instead of silently returning training data. Add two regression tests: - test_split_validation_returns_held_out_slice_not_train: proves split="validation" returns the same IDs as the train loader's val_dataset and is disjoint from the train slice. - test_validation_split_requires_size: proves the no-size case raises a clear ValueError naming split_validation_size. Signed-off-by: Yuekai Zhang <[email protected]>
… recipe The first 7B-AudioMCQ smoke run aborted at policy init with: AssertionError: train_micro_batch_size != logprob_batch_size with TP>=4 The recipe sets megatron tensor_model_parallel_size=4, which triggers NeMo-RL's known batch-variant accuracy guard for both DTensor and Megatron backends. Per the doc URL the assertion prints, the cleanest fix that keeps TP=4 is matching logprob_batch_size to train_micro_batch_size (=1). Lowering TP would not buy us anything correctness-wise and would cost memory headroom. Signed-off-by: Yuekai Zhang <[email protected]>
The Harland/AudioMCQ-StrongAC-GeminiCoT dataset only ships a native train manifest, so set both the train and validation entries to the same audiomcq dataset with split_validation_size=0.026 and seed=42. After our round-2 split-routing fix, this gives a deterministic 507-row held-out slice that the validation loader returns directly while the train loader keeps the remaining 18973 rows. Verified locally: the two loaders produce identical val_ids and the train slice is disjoint. Signed-off-by: Yuekai Zhang <[email protected]>
setup_response_data already collects validation rows from each train wrapper's val_dataset (populated by split_train_validation when split_validation_size>0) AND from the explicit data.validation entry. The previous YAML configured both with split=audiomcq and identical seed/size, which fed the same ~507 held-out rows into the validation pool twice (live job 11365708 reported "Validation dataset loaded with 1014 samples", i.e. 2x507). Setting data.validation=null keeps a single canonical source so future runs see the unique 507-row val slice. Training is unaffected; the running job is left in place because max_val_samples=32 caps the per-validation impact of the duplication. Signed-off-by: Yuekai Zhang <[email protected]>
Restore the explicit `data.validation` block in the 7B audio recipe so val size is configured next to the validation block (cleaner than hiding it on `data.train.split_validation_size`). To make this work without the duplication seen in job 11365708 (1014 = 2x507) AND without train/val leakage, AudioMCQDataset gains a `populate_val_dataset` flag (default True for backward compat): - `populate_val_dataset=True` (current default): the train wrapper returns the train slice and exposes the held-out slice via self.val_dataset (the AVQA convention). - `populate_val_dataset=False`: when an explicit data.validation block loads validation separately, the train wrapper still drops the held-out rows from self.dataset (no leakage) but leaves self.val_dataset unset (no double-counting). Yaml now sets `populate_val_dataset: false` on train and a matching `split_validation_size`/`seed` on the validation block. Two regression tests cover the disjoint-train guarantee and the no-population guarantee. Signed-off-by: Yuekai Zhang <[email protected]>
- save_period 400 -> 50 (more frequent checkpoints) - max_val_samples 32 -> 256, val_batch_size 32 -> 256 - val_at_start: true (sanity validation before any training step) - drop the duplicate max_val_samples: 32 left over from the previous setting; YAML's last-key-wins masked it but the dead line was confusing Signed-off-by: Yuekai Zhang <[email protected]>
Signed-off-by: Yuekai Zhang <[email protected]>
- Drop AVQA from the title; this is the unified Audio GRPO guide now. - Lead with a recipe matrix (3B AVQA / 7B AudioMCQ-StrongAC-GeminiCoT) and clarify the pieces are independent so users can mix model sizes and datasets. - Split into Datasets / Train / Convert / Evaluate / Results sections so the train -> convert -> eval flow reads top-to-bottom for either recipe. Keep the AVQA + R1-AQA reproduction details intact. - Cite the AudioMCQ paper (https://arxiv.org/abs/2509.21060) and expand the StrongAC + Gemini-CoT filter description. - Document the convert step's HF rate-limit workaround (HF_HUB_OFFLINE=1 / TRANSFORMERS_OFFLINE=1) and the 7B-specific eval override (vLLM tensor_parallel_size=2, gpus_per_node=2). - Record the 7B step_50 MMAU sanity result (0.7250) as an early sanity-check number under Results. Signed-off-by: Yuekai Zhang <[email protected]>
Signed-off-by: Yuekai Zhang <[email protected]>
Contributor
Author
yuekaizhang
marked this pull request as draft
May 6, 2026 06:33
yuekaizhang
marked this pull request as ready for review
May 12, 2026 02:50
Add a 4n8g nightly test for the Qwen3-Omni-30B-A3B-Instruct AudioMCQ GRPO recipe, mirroring the qwen2.5-omni avqa nightly. Trains 20 steps and checks train/reward > 0.75 and validation/accuracy > 0.8. - New recipe examples/configs/recipes/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.yaml (defaults to the audio_grpo_qwen3_omni_megatron.yaml exemplar, 20 steps). - New driver tests/test_suites/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh (4 nodes x 8 GPU, NUM_MINUTES=60), registered in nightly.txt. - Fix the exemplar recipe: set loss_fn.truncated_importance_sampling_type=tis. With the ratio set but the type left at the None default, the loss raises "Invalid truncated importance sampling type: None" at the first train step. - Raise the nightly GPU-hour cap 1360 -> 1410 to fit the new 32 GPU-hr test (4n8g is the minimum hardware; 1n8g OOMs at the optimizer). New total 1377. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Yuekai Zhang <[email protected]>
Signed-off-by: Yuekai Zhang <[email protected]>
yuki-97
reviewed
Jun 8, 2026
yuki-97
left a comment
Contributor
There was a problem hiding this comment.
@yuekaizhang, thanks for adding this! left some comments.
yuekaizhang
added a commit
to yuekaizhang/RL
that referenced
this pull request
Jun 8, 2026
Address yuki-97's review on PR NVIDIA-NeMo#2356: - Simplify AudioMCQDataset to mirror avqa.py: drop populate_val_dataset and the split="validation" branch; synthesize the held-out validation slice via split_train_validation. - Hold out an absolute 256-row validation slice (matches grpo.max_val_samples) instead of split_validation_size: 0.026, and drop the redundant data.validation block. - Remove the dead vllm_cfg.limit_mm_per_prompt (30B) and move it to vllm_kwargs (7B); only **vllm_kwargs reaches vllm.LLM(). - Relocate the 7B and 30B audio configs into examples/configs/recipes/vlm/ and delete the thin wrapper; add a Qwen2.5-Omni-7B 1n8g nightly and register both audio recipes in nightly.txt. - docs: update recipe paths, dataset split description, and gotcha count. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Yuekai Zhang <[email protected]>
Address yuki-97's review on PR NVIDIA-NeMo#2356: - Simplify AudioMCQDataset to mirror avqa.py: drop populate_val_dataset and the split="validation" branch; synthesize the held-out validation slice via split_train_validation. - Hold out an absolute 256-row validation slice (matches grpo.max_val_samples) instead of split_validation_size: 0.026, and drop the redundant data.validation block. - Remove the dead vllm_cfg.limit_mm_per_prompt (30B) and move it to vllm_kwargs (7B); only **vllm_kwargs reaches vllm.LLM(). - Relocate the 7B and 30B audio configs into examples/configs/recipes/vlm/ and delete the thin wrapper; add a Qwen2.5-Omni-7B 1n8g nightly and register both audio recipes in nightly.txt. - docs: update recipe paths, dataset split description, and gotcha count. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Yuekai Zhang <[email protected]>
Contributor
Author
|
/ok to test c16425d |
1 similar comment
Contributor
Author
|
/ok to test c16425d |
yuki-97
enabled auto-merge (squash)
June 9, 2026 06:52
yuki-97
previously approved these changes
Jun 9, 2026
yuki-97
left a comment
Contributor
There was a problem hiding this comment.
lgtm, thanks @yuekaizhang
Signed-off-by: Yuekai Zhang <[email protected]>
Contributor
Author
|
/ok to test 854d020 |
Signed-off-by: Yuekai Zhang <[email protected]>
Contributor
Author
|
/ok to test 76633ea |
Contributor
Author
|
/ok to test 76633ea |
yuki-97
approved these changes
Jun 9, 2026
pengdurice
pushed a commit
to pengdurice/RL
that referenced
this pull request
Jun 12, 2026
…VIDIA-NeMo#2356) Signed-off-by: Yuekai Zhang <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2 of 4 tasks
This branch was previously deployed
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.

What does this PR do ?
Conditioned on NVIDIA-NeMo/Megatron-Bridge#3317
The PR adds support for the ICLR 2026 AudioMCQ datasets in nemo-rl and includes a qwen2.5-omni-7B and Qwen3-Omni audio grpo training YAML file using these datasets.
Training curve:
@yuki-97 I was wondering if you coule help review the PR when you have some time. Thanks.