Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/vllm_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This document will guide you through the process of using vLLM with TRL for faster generation in online methods like GRPO and Online DPO. We first summarize a tl;dr on how to use vLLM with TRL, and then we will go into the details of how it works under the hood.

> [!WARNING]
> TRL currently only supports vLLM versions from `0.11.0` to `0.17.1`. Please ensure you have a version in this range installed to avoid compatibility issues.
> TRL currently only supports vLLM versions from `0.11.0` to `0.18.0`. Please ensure you have a version in this range installed to avoid compatibility issues.

> [!TIP]
> The following trainers currently support generation with vLLM:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test = [
"pytest"
]
vllm = [
"vllm>=0.11.0,<=0.17.1",
"vllm>=0.11.0,<=0.18.0",
"fastapi",
"pydantic",
"aiohttp>=3.13.3",
Expand Down
2 changes: 1 addition & 1 deletion trl/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _patch_vllm_disabled_tqdm() -> None:

- Bug introduced in https://github.com/vllm-project/vllm/pull/52
- Fixed in https://github.com/vllm-project/vllm/pull/28471 (released in v0.11.1)
- Since TRL currently supports vLLM v0.11.0-0.17.1, we patch it here
- Since TRL currently supports vLLM v0.11.0-0.18.0, we patch it here
- This can be removed when TRL requires vLLM>=0.11.1
"""
if _is_package_version_below("vllm", "0.11.1"):
Expand Down
4 changes: 2 additions & 2 deletions trl/import_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ def is_uvicorn_available() -> bool:
def is_vllm_available(min_version: str | None = None) -> bool:
_vllm_available, _vllm_version = _is_package_available("vllm", return_version=True)
if _vllm_available:
if not (Version("0.11.0") <= Version(_vllm_version) <= Version("0.17.1")):
if not (Version("0.11.0") <= Version(_vllm_version) <= Version("0.18.0")):
warnings.warn(
f"TRL currently supports vLLM versions from 0.11.0 to 0.17.1. You have version {_vllm_version} "
f"TRL currently supports vLLM versions from 0.11.0 to 0.18.0. You have version {_vllm_version} "
"installed. We recommend installing a supported version to avoid compatibility issues.",
stacklevel=2,
)
Expand Down
Loading