Skip to content

chore: Upgrade vLLM from 0.17.1 to 0.20.0 - #2384

Merged
kajalj22 merged 6 commits into
mainfrom
kajalj/upgrade-vllm-2.11
May 22, 2026
Merged

chore: Upgrade vLLM from 0.17.1 to 0.20.0#2384
kajalj22 merged 6 commits into
mainfrom
kajalj/upgrade-vllm-2.11

Conversation

@kajalj22

@kajalj22 kajalj22 commented May 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades vLLM from 0.17.1 to 0.20.0, along with dependent version bumps and API adaptation changes.

Dependency changes (pyproject.toml)

  • vLLM 0.17.1 → 0.20.0
  • torch 2.10.0 → 2.11.0
  • torchvision 0.25.0 → 0.26.0
  • flashinfer 0.6.4 → 0.6.8.post1
  • requires-python capped to <3.14

vLLM 0.20 API adaptation (vllm_worker_async.py)

  • vLLM 0.20 moved chat preprocessing from OpenAIServing._preprocess_chat to OpenAIServingRender.preprocess_chat
  • Created NeMoRLOpenAIServingRender(NeMoRLOpenAIServingMixin, OpenAIServingRender) to carry our required_prefix_token_ids override into the new render architecture
  • Removed mixin from Chat/Tokenization classes (they now delegate to the render object)
  • Added new required kwargs: reasoning_parser, skip_mm_cache, enable_auto_tools, openai_serving_render

Weight loading fix (vllm_backend.py)

  • Wrapped process_weights_after_loading calls in set_current_vllm_config context manager (required by vLLM 0.20)

Pickle fix (megatron_policy_worker.py)

  • Changed self.model.configgetattr(self.model, "config", None) to prevent cloudpickle from capturing torch.distributed.config (a non-pickleable ConfigModuleInstance in torch 2.11)

Test plan

  • CI unit tests pass (Generation, Policy, Other)
  • CI container build succeeds (including sglang)
  • Functional tests pass

🤖 Generated with Claude Code

@kajalj22
kajalj22 requested a review from a team as a code owner May 1, 2026 18:51
@copy-pr-bot

copy-pr-bot Bot commented May 1, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@kajalj22 kajalj22 changed the title Upgrade vLLM to 2.11 Upgrade vLLM to 0.20.0 May 1, 2026
@kajalj22
kajalj22 marked this pull request as draft May 1, 2026 18:56
@kajalj22 kajalj22 changed the title Upgrade vLLM to 0.20.0 chore: Upgrade vLLM to 0.20.0 May 1, 2026
@kajalj22

kajalj22 commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test e2a1776

@kajalj22 kajalj22 added the CI:L1 Run doctests, unit tests, and functional tests label May 1, 2026
@kajalj22

kajalj22 commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test e52995e

@kajalj22
kajalj22 force-pushed the kajalj/upgrade-vllm-2.11 branch from e52995e to f7ae9ae Compare May 6, 2026 20:00
@kajalj22

kajalj22 commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 648be36

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 21c0e8e

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 711a112

@copy-pr-bot

copy-pr-bot Bot commented May 14, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@kajalj22
kajalj22 force-pushed the kajalj/upgrade-vllm-2.11 branch from a5f29ce to ba3ab1e Compare May 14, 2026 21:21
@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test ba3ab1e

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 197eb71

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 97289f5

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test f19fc23

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 132152f

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test fd73aa2

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 1af50ac

kajalj22 and others added 4 commits May 21, 2026 18:20
- vLLM 0.17.1 → 0.20.0, torch 2.10 → 2.11, torchvision 0.25 → 0.26,
  flashinfer 0.6.4 → 0.6.8.post1
- Cap requires-python to <3.14
- Adapt to vLLM 0.20 render architecture: move prefix-token override
  to NeMoRLOpenAIServingRender
- Wrap process_weights_after_loading in set_current_vllm_config context
- Fix cloudpickle ConfigModuleInstance error (torch 2.11)
- Fix Eagle3 draft weight loading: trim padded vocab embeddings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kajal Jain <kajalj@nvidia.com>
vLLM 0.20 moved chat preprocessing to the render layer, but
create_chat_completion no longer catches errors from that path.
Prompts exceeding max_model_len now raise VLLMValidationError
as an unhandled exception (500) instead of returning ErrorResponse
(400). The Gym proxy only detects context-length overflow on 400,
so the 500 crashes rollouts.

Catch VLLMValidationError at the endpoint and return HTTP 400 to
restore the graceful handling chain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kajal Jain <kajalj@nvidia.com>
sglang is incompatible with the vLLM 0.20 / torch 2.11 upgrade.
Unconditionally set SKIP_SGLANG_BUILD=1 so the Docker build and
tests skip sglang until it is updated separately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kajal Jain <kajalj@nvidia.com>
Eagle3 draft models can have draft_vocab_size (32k) different from
vocab_size (151k). The old code used a single org_vocab_size from the
first VocabParallelEmbedding (embed_tokens), which meant lm_head
weights were never trimmed (padded_32k < 151k → condition false),
causing an assertion failure in vLLM's weight_loader.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented May 21, 2026

Copy link
Copy Markdown

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 92e00b7

vLLM 0.20 added quant_config arg to ParallelLMHead in
Eagle3LlamaForCausalLM.__init__, so the old_snippet no longer matched
and the has_own_lm_head patch silently failed to apply.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test a0f1d4b

Comment thread pyproject.toml
@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 73e9b54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests CI Relating to CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants