Repository navigation
Conversation
…timodal=False Signed-off-by: Thanaji Rao Thakkalapelli <thanaji.rao.thakkalapelli@intel.com>
tthakkal
marked this pull request as ready for review
November 2, 2026 00:51
This branch has not been 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.
Problem
generate(..., process_multimodal=False)sends the raw media ascontent_partsand relies on the engine to expand it.The engine must return the expanded
prompt_token_idsand themm_placeholders.verifiers uses this mode for image prompts.
Some servers only accept a prompt that is already expanded, so they return neither field.
Dynamo's TITO
/inference/v1/generateis one:Engine response must include prompt_token_ids when process_multimodal=False.So no image rollout works against these servers. Text-only prompts are unaffected.
Change
New opt-in flag
RENDERERS_CLIENT_MM_EXPANSION=1. It applies toprocess_multimodal=Falsecalls that contain media parts:MultiModalData.MalformedGenerateResponseError. A renderer that is out of sync then fails loudly instead of training on mismatched tokens.token_idsand vLLM'sfeaturespayload, using the existing_build_mm_featurespath. Nocontent_partsare sent.process_multimodal=Falseresponse shape built from the client-side expansion:prompt_idsis the expanded promptrenderer_prompt_idsis the caller's promptmm_placeholdersis{modality: [{offset, length}]}multi_modal_dataisNoneThe flag is off by default, and the existing paths are unchanged.
It's an env var rather than a
generate()argument because the caller here (verifiers'RendererClient) doesn't expose one. Happy to switch to a parameter if you prefer.Testing
Unit test:
test_generate_client_mm_expansionintests/test_client.pychecks that the request carries the expanded prompt with nocontent_parts, and that the result has theprocess_multimodal=Falsecontract even though the server returns noprompt_token_ids. It fails without the change.tests/test_client.py: 111 passed.End to end: Qwen3.5-4B VLM RL with a prime-rl trainer and a Dynamo 1.7.0.dev + vLLM 0.32 rollout server, on a maze environment with image prompts.
Notes
prompt_token_idsandmm_placeholdersforprocess_multimodal=False, the flag isn't needed. The Dynamo-side fix is the TITOcontent_partsPR (dynamo-tito-content-parts.patch). feat(rl): support Prime-RL over native vLLM ai-dynamo/dynamo#13481 only covers pre-processedfeatures.featurescarries already-normalized pixel values, the server must run withmm_device_do_normalize=false, or images are normalized twice. This applies to anyfeaturesrequest, not only this flag.Note
Add opt-in client-side multimodal expansion in
renderers.client.generateRENDERERS_CLIENT_MM_EXPANSION=1. Whenprocess_multimodalis false and messages contain media parts, the client renders with multimodal processing enabled and sends the expanded prompt tokens plus multimodal data.MalformedGenerateResponseError; on match it returns the originalrenderer_prompt_ids, the expandedprompt_ids, and the placeholder ranges, withmulti_modal_data=None.test_generate_client_mm_expansionin test_client.py covering the request token IDs, omittedcontent_parts, and returned placeholder range.max_prompt_lencheck, so expanded prompts are not length-limited; the path only activates when the env flag is set.Macroscope summarized 5bdc116.