Skip to content
Open
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
12 changes: 6 additions & 6 deletions skyrl-train/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ sandboxes = [
"litellm[proxy]>=1.67.5",
]
vllm = [
"vllm==0.11.0",
"vllm==0.13.0",
"flash-attn==2.8.3",
"torch==2.8.0",
"torch==2.9.0",
"flashinfer-python",
"flashinfer-jit-cache",
"torchvision"
Expand All @@ -142,13 +142,13 @@ sglang = [
mcore = [
"transformer-engine[pytorch]==2.9.0",
"flash-attn==2.8.1",
"vllm==0.11.0",
"torch==2.8.0",
"flashinfer-python==0.5.2",
"vllm==0.13.0",
"torch==2.9.0",
"flashinfer-python==0.5.3",
"torchvision",
"megatron-bridge @ git+https://github.com/NVIDIA-NeMo/Megatron-Bridge.git@v0.2.0",
"megatron-core==0.15.0",
"flashinfer-jit-cache==0.5.2",
"flashinfer-jit-cache==0.5.3",
"nvidia-modelopt",
]
flashrl = [
Expand Down
15 changes: 12 additions & 3 deletions skyrl-train/skyrl_train/inference_engines/vllm/vllm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,27 +364,36 @@ def _create_engine(self, *args, **kwargs):
model_name = model_path

base_model_paths = [BaseModelPath(name=model_name, model_path=model_path)]
models = OpenAIServingModels(engine, model_config, base_model_paths)

# vllm >= 0.11.2 removed model_config from OpenAI serving APIs
is_new_api = version.parse(vllm.__version__) >= version.parse("0.11.2")
legacy_kwargs = {}
if is_new_api:
models = OpenAIServingModels(engine, base_model_paths)
else:
models = OpenAIServingModels(engine, model_config, base_model_paths)
legacy_kwargs["model_config"] = model_config

# TODO(Charlie): revisit kwargs `enable_auto_tools` and `tool_parser` when we need to
# support OAI-style tool calling; and `request_logger` for better debugging.
self.openai_serving_chat = OpenAIServingChat(
engine_client=engine,
model_config=model_config,
models=models,
response_role="assistant",
request_logger=None,
chat_template=None,
chat_template_content_format="auto",
**legacy_kwargs,
**openai_kwargs,
)

# TODO(Charlie): revisit kwargs `return_tokens_as_token_ids`,
# `enable_prompt_tokens_details`, `enable_force_include_usage`.
self.openai_serving_completion = OpenAIServingCompletion(
engine_client=engine,
model_config=model_config,
models=models,
request_logger=None,
**legacy_kwargs,
)
return engine

Expand Down
Loading