Train from inline multimodal rollouts - #3320
Conversation
# Conflicts: # src/prime_rl/inference/vllm/serving_tokens.py # tests/unit/inference/test_serving_tokens.py
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ab4ca01. Configure here.
| try: | ||
| return _BY_MODEL_TYPE[model_type] | ||
| except KeyError as exc: | ||
| raise NotImplementedError(f"Raw image training is not implemented for model type {model_type!r}") from exc |
There was a problem hiding this comment.
Missing KL mismatch validation table for new models
Medium Severity
This PR introduces new custom multimodal adapters (QwenVLAdapter for qwen3_vl/qwen3_vl_moe/qwen3_5/qwen3_5_moe and KimiK25Adapter for kimi_k25) with distinct ForwardPolicy configurations that change how position_ids, mm_token_type_ids, and context parallelism behave during the model forward pass. Per project rules, any PR introducing a new custom model must include a table showing mean KL mismatch across 20 steps on a math environment with batch_size=64, with all entries below 0.015. No such table is present in the PR description.
Additional Locations (2)
Triggered by project rule: BugBot Instructions
Reviewed by Cursor Bugbot for commit ab4ca01. Configure here.


Summary
bd7c91eand Verifiers PR fix(ring_attn): make FA3 causal/window_size kwargs version-agnostic #2417 at6720736e1vLLM 0.28 alignment
Prime now delegates content-parts parsing, raw-media resolution, multimodal engine-input construction, DP routing, max-token defaulting, and usage reporting to the vLLM 0.28 implementation on
main. Its serving subclass retains only expanded prompt IDs pending vLLM #53187, compact routed-expert responses, and the KV-transfer bridge pending a release containing vLLM #42644.Cache-salt forwarding through content-parts remains a small upstream vLLM follow-up; Prime no longer carries a copied endpoint implementation for it.
Stack
Validation
uv lock --checkuv run pytest -q tests/unit/orchestrator/test_algorithms.py tests/unit/orchestrator/test_batch.py tests/unit/orchestrator/test_qwen3_vl_e2e.py(50 passed)Note
Medium Risk
Changes the multimodal training data path (transport, packing, lazy image decode, and model-family forward policy) and inference response shape; misaligned placeholder lengths or refs would fail at materialize/forward time rather than in the old encoded-tensor path.
Overview
Multimodal RL no longer ships preprocessed pixel tensors over the batch transport. Samples carry
mm_refs(base64 image URLs plus offset/length in the vLLM-expanded prompt) withmm_token_type_ids, built in the orchestrator from inlineimage_urlparts and image-token runs. Truncation and packing keep whole placeholder blocks and remap refs when sequences are concatenated, without requiring matchingmm_kwargsshapes to co-pack.The trainer materializes vision inputs at forward time via a small
prime_rl.multimodalregistry (Qwen-VL / Kimi K2.5 adapters) andmaterialize_mm_refs, withForwardPolicydriving position IDs and context-parallel deferral.forward()acceptsmm_forward_policywhile the existing SFT eager-processor path stays on kwargs-only behavior.vLLM
PrimeRlServingTokensnow surfacesprompt_token_idsfrom the engine stream (expanded prompt after multimodal placeholders) alongside the existing routed-experts and KV-transfer bridges. Tests and the Qwen3-VL e2e check were updated for rawcontent_parts/ expanded prompt IDs instead of afeaturespayload round-trip.Reviewed by Cursor Bugbot for commit 577123e. Bugbot is set up for automated code reviews on this repo. Configure here.