RL icon indicating copy to clipboard operation
RL copied to clipboard

chore: Bump vllm to 0.11.2, torch to 2.9, transformers to 4.57.1

Open yfw opened this issue 1 month ago • 9 comments

What does this PR do ?

Updates vllm to 0.11.2, torch to 2.9, transformers to 4.57.1. Also updates Automodel to use main branch.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this

Before your PR is "Ready for review"

Pre checks:

  • [ ] Make sure you read and followed Contributor guidelines
  • [ ] Did you write any new necessary tests?
  • [ ] Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • [ ] Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

Summary by CodeRabbit

Release Notes

  • Updates

    • Upgraded core dependencies: PyTorch (2.9.0), Transformers (4.57.1), and vLLM (0.11.2)
    • Added multi-node distributed training configuration support
  • Improvements

    • Enhanced vLLM integration robustness and compatibility
    • Optimized FP8 weight handling for improved efficiency

✏️ Tip: You can customize this high-level summary in your review settings.

yfw avatar Nov 24 '25 23:11 yfw

❌ Submodule Fast-Forward Check Failed

Check based on commit: 82b6f9576ead74d58a15597ce35570aece72404c (PR #1563 from yifu/vllm0112_bump)

❌ Submodules that need attention:

Automodel: ❌ Commits have DIVERGED from a common ancestor TARGET (main branch): https://github.com/NVIDIA-NeMo/Automodel/commits/a2db048383cd54b3fafc928df4c30bf7bbf7c430/ CURRENT (PR #1563 from yifu/vllm0112_bump): https://github.com/NVIDIA-NeMo/Automodel/commits/f9fc82c055e1cc69a68ff0bc7614aabe507a43ea/

Please ensure all submodule commits are fast-forwards of the main branch before merging.

github-actions[bot] avatar Nov 24 '25 23:11 github-actions[bot]

✅ Submodule Fast-Forward Check Results

Check based on commit: 39a9b03cf195c27d857db479fba36532beacec5c (PR #1563 from yifu/vllm0112_bump)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

github-actions[bot] avatar Nov 25 '25 09:11 github-actions[bot]

✅ Submodule Fast-Forward Check Results

Check based on commit: fa2ccf4914d63d55ad209cecd5324517d9ffaf12 (PR #1563 from yifu/vllm0112_bump)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

github-actions[bot] avatar Nov 26 '25 17:11 github-actions[bot]

✅ Submodule Fast-Forward Check Results

Check based on commit: baf37d63203c7d713e4acbb0f7408d099a53a7d6 (PR #1563 from yifu/vllm0112_bump)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

github-actions[bot] avatar Nov 27 '25 00:11 github-actions[bot]

✅ Submodule Fast-Forward Check Results

Check based on commit: b671719f60004039c797bb2f8b7e08f39463293d (PR #1563 from yifu/vllm0112_bump)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

github-actions[bot] avatar Dec 01 '25 19:12 github-actions[bot]

📝 Walkthrough

Walkthrough

This PR updates core dependencies (PyTorch 2.9.0, transformers 4.57.1, vLLM 0.11.2), refactors vLLM worker initialization to use dynamic file lookup instead of hardcoded paths, introduces in-place FP8 weight post-processing, and migrates test configurations from single-node to two-node setups.

Changes

Cohort / File(s) Summary
Dependency Updates
pyproject.toml, tools/build-custom-vllm.sh
Bumped PyTorch from 2.8.0 to 2.9.0, transformers from ≥4.55.4 to ≥4.57.1, and vLLM from 0.11.0 to 0.11.2; updated CUDA wheel index from cu128 to cu129.
Submodule Updates
.gitmodules, 3rdparty/Automodel-workspace/Automodel
Changed Automodel submodule branch to yifu/bump-torch-and-hf and updated commit pointer.
Configuration & Test Updates
examples/configs/recipes/llm/grpo-llama3.1-8b-instruct-2n8g-megatron-fp8-e2e.yaml, tests/test_suites/llm/grpo-llama3.1-8b-instruct-2n8g-megatron-fp8-e2e.sh, tests/test_suites/nightly.txt
Updated checkpoint/log paths from 1n8g to 2n8g, set cluster.num_nodes: 2, changed NUM_NODES from 1 to 2, and switched nightly test reference from 1n8g to 2n8g configuration.
FP8 Weight Processing
nemo_rl/models/generation/fp8.py
Added maybe_post_process_fp8_weight_block() function for in-place FP8 weight and scale re-quantization; adjusted process_weights_after_loading() to call the new function without extra parameters.
vLLM Worker Initialization
nemo_rl/models/generation/vllm/vllm_worker.py
Replaced hardcoded vLLM import paths with dynamic file lookup via importlib.find_spec(); introduced _get_vllm_file() helper and two new patching functions (_patch_vllm_init_workers_ray() and _patch_vllm_vit_flash_attn_backend()) for robust version-agnostic patching.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • vllm_worker.py: Carefully verify dynamic file lookup logic handles vLLM versions robustly and that patched behaviors (Ray executor env variables, attention backend override) remain correct.
  • fp8.py: Ensure in-place weight/scale updates preserve gradient flow and model training behavior; confirm compatibility with DeepGemm E8M0 quantization.
  • Dependency compatibility: Cross-check PyTorch 2.9.0, transformers 4.57.1, and vLLM 0.11.2 compatibility across different compute environments and CUDA versions (cu129).
  • Multi-node test configurations: Validate that 2-node setup produces expected distributed behavior and resource allocation.

Possibly related PRs

  • NVIDIA-NeMo/RL#1116: Updates custom vLLM build tooling and dependency instructions similar to this PR's torch/vLLM version bumps.
  • NVIDIA-NeMo/RL#1334: Modifies the same vLLM worker integration and related dependency/test configurations.

Suggested reviewers

  • terrykong
  • parthchadha
  • guyueh1

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Test Results For Major Changes ⚠️ Warning PR introduces major dependency bumps (torch 2.9.0, transformers 4.57.1, vllm 0.11.2) and code changes to FP8 quantization and vLLM workers, but PR description contains no test results, performance benchmarks, or compatibility verification. Review comments flag incompatibility issues with this dependency combination. Document comprehensive test results in PR description including: integration test results with updated dependencies, training convergence verification, 2-node test configuration results, FP8 quantization validation, and confirmation that torch 2.9.0 + transformers 4.57.1 combination has been tested.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: dependency version bumps for vllm, torch, and transformers, which are the primary modifications across multiple files.
✨ Finishing touches
  • [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch yifu/vllm0112_bump

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Dec 01 '25 19:12 coderabbitai[bot]

✅ Submodule Fast-Forward Check Results

Check based on commit: c5c3eca1ed41f31f8ad9f6ff5fed11872727713c (PR #1563 from yifu/vllm0112_bump)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

github-actions[bot] avatar Dec 01 '25 22:12 github-actions[bot]

✅ Submodule Fast-Forward Check Results

Check based on commit: ee4a84c96683f98e05f0e1302ee5601e7f9a7b6a (PR #1563 from yifu/vllm0112_bump)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

github-actions[bot] avatar Dec 01 '25 23:12 github-actions[bot]

✅ Submodule Fast-Forward Check Results

Check based on commit: ae0f57db361566c6ec92b8016e1b7981a7458489 (PR #1563 from yifu/vllm0112_bump)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

github-actions[bot] avatar Dec 02 '25 11:12 github-actions[bot]

@yfw we need to update the torch version in tools/build-custom-vllm.sh as well

guyueh1 avatar Dec 02 '25 18:12 guyueh1

@yfw we need to update the torch version in tools/build-custom-vllm.sh as well

I pulled in this change for this: https://github.com/NVIDIA-NeMo/RL/pull/1563/commits/eab60198c430cdd2750388951c76e3bc101d64b8

yfw avatar Dec 02 '25 19:12 yfw

✅ Submodule Fast-Forward Check Results

Check based on commit: f393e7a16e977202f1d537dc33e4a26a90300edb (PR #1563 from yifu/vllm0112_bump)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

github-actions[bot] avatar Dec 02 '25 19:12 github-actions[bot]

✅ Submodule Fast-Forward Check Results

Check based on commit: 00c48d721afd87e125d09bcca7276479cb9e9e65 (PR #1563 from yifu/vllm0112_bump)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

github-actions[bot] avatar Dec 03 '25 00:12 github-actions[bot]