feat(video): add Gym support for sync and async GRPO - #3500
Closed
ehosseiniasl wants to merge 3 commits into
Closed
Conversation
ehosseiniasl
force-pushed
the
ehsan/video-rl-gym-async-grpo
branch
from
August 5, 2026 16:54
1f2e5cd to
283241a
Compare
rohitrango
force-pushed
the
rohit/gymv-mm-integration-v2
branch
from
August 5, 2026 16:55
d60004f to
d3e02b4
Compare
ehosseiniasl
force-pushed
the
ehsan/video-rl-gym-async-grpo
branch
from
August 5, 2026 17:36
283241a to
655081f
Compare
ehosseiniasl
force-pushed
the
ehsan/video-rl-gym-async-grpo
branch
from
August 6, 2026 04:25
655081f to
ae0a56f
Compare
ehosseiniasl
force-pushed
the
ehsan/video-rl-gym-async-grpo
branch
from
August 7, 2026 14:51
ae0a56f to
29eb7c0
Compare
This was referenced Aug 7, 2026
Signed-off-by: Ehsan Hosseini Asl <ehsan.hosseiniasl@gmail.com>
ehosseiniasl
force-pushed
the
ehsan/video-rl-gym-async-grpo
branch
from
August 11, 2026 21:51
29eb7c0 to
998cdf8
Compare
Contributor
|
@ehosseiniasl Do you have an ETA for when this PR will be merged? |
Contributor
|
@rohitrango Could you maybe answer? |
ananthsub
pushed a commit
to NVIDIA-NeMo/Gym
that referenced
this pull request
Aug 19, 2026
## Summary Add video-input support to the NeMo Gym Responses API and vLLM model backend for multimodal RL training. - Accept `input_video` and `video_url` content parts. - Convert Responses API video inputs into vLLM-compatible chat content. - Reject video parts that do not contain a valid URL. - Prefer prompt and generation token IDs returned by the generation request. - Preserve multimodal processor arguments when falling back to the tokenize endpoint. - Validate that generation token IDs and log probabilities have matching lengths. - Propagate token IDs, log probabilities, and optional training metadata through Gym responses. - Ensure component processes load their owning Gym checkout instead of a stale container installation. ## Motivation Video GRPO requires Gym to preserve video content and the exact prompt and generation tokenization used by vLLM. Using token IDs produced by a separate or differently configured tokenization request can cause rollout and policy log probabilities to reference different token sequences, resulting in incorrect training data and elevated TMPE. ## Validation - Added coverage for `input_video` and `video_url` conversion. - Added coverage for missing video URLs. - Added coverage for native vLLM prompt and generation token IDs. - Added coverage for the tokenize fallback and multimodal processor arguments. - Added coverage for token-ID and log-probability propagation. - Added coverage ensuring component processes prefer the owning Gym checkout. - Exercised through downstream synchronous and asynchronous NeMo RL video GRPO training. ## Dependencies None. ## Related integrations - NVIDIA-NeMo/Megatron-Bridge#5304 `feat(video): enable canonical Nemotron Omni training for V2 MoE checkpoints` - NVIDIA-NeMo/RL#3500 `feat(video): add Gym support for sync and async GRPO` --------- Signed-off-by: Ehsan Hosseini Asl <ehsan.hosseiniasl@gmail.com>
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.
Summary
Add end-to-end video support for NeMo Gym GRPO with synchronous and asynchronous Megatron training.
NemotronOmniModelProviderinstead of the historical LLaVA model path.0.25.1, removing the custom-vLLM-fork dependency.Motivation
Video GRPO requires the rollout and policy paths to consume the same frames, multimodal token layout, and token IDs. Differences in video preprocessing or tokenization can produce incorrect
policy log probabilities and elevated TMPE.
The implementation keeps video media and preprocessing metadata intact throughout Gym, vLLM, distributed trajectory handling, and Megatron training. It also supports asynchronous generation,
in-flight weight refits, and replay-buffer checkpoint recovery without losing multimodal data.
Validation
Focused tests
0.25.1.git diff --check.2-node synchronous GRPO
58114801.01420.250.000816-node asynchronous GRPO
58228011.013-1.017.0.219-0.406across the inspected steps.Both runs used:
grpo.max_num_steps=-1grpo.seq_logprob_error_threshold=null0.25.1Dependency stack
Merge order:
feat(video): enable canonical Nemotron Omni training for V2 MoE checkpointsfeat(video): support video inputs in vLLM responses