Repository navigation
perf(sampler): load the gemma-4 LoRA sampler as the text-only model - #360
Merged
Merged
Conversation
This was referenced Oct 22, 2026
hodaaaaaaaaaa
marked this pull request as draft
October 22, 2026 16:25
VLLM_ENABLE_MULTIMODAL=1 now also skips the Gemma4ForCausalLM override, and the API server forwards it to Kubernetes worker pods so the sampler sees the same setting.
hodaaaaaaaaaa
marked this pull request as ready for review
October 22, 2026 23:45
droot
approved these changes
Oct 23, 2026
ShubyM
approved these changes
Oct 23, 2026
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
The gemma-4 LoRA sampler loads the full gemma-4 model, including its image and audio parts. OpenRL only sends text, but vLLM still sets those parts up at start-up. The full fine-tuning sampler already loads the text-only model; LoRA was left out when that was added.
Change
gemma-4 LoRA samplers load the text-only model (
Gemma4ForCausalLM) too. LoRA adapters still apply correctly: on an A100, a trained adapter gives the same tokens under both models, and log-probabilities agree within 0.0011.VLLM_ENABLE_MULTIMODAL=1, which already turns image and video input back on, now also keeps the full model. The API server passes it on to sampler pods.Results
From the latest fleet test on GKE (eight GSM8K GRPO jobs launched together: gemma-4-E2B on H100, Qwen3-0.6B on L4, LoRA and full fine-tuning), with all three sampler start-up changes (#358, #359, #360):