Skip to content

Support for GRPO finetuning with vLLM#2273

Description

@AdityaKulshrestha

Feature request

Hi team,

I wanted to enquire on the support for vLLM for GRPO finetuning. I tried with running the vllm instance using the commmand: trl vllm-serve --model Qwen/Qwen2-0.5B-Instruct

I got the this error message:

Calling add_step_closure function does not have any effect. It's lazy mode only functionality. (warning logged once)
Calling mark_step function does not have any effect. It's lazy mode only functionality. (warning logged once)
Calling iter_mark_step function does not have any effect. It's lazy mode only functionality. (warning logged once)
[2025-09-21 12:21:36,921] [INFO] [real_accelerator.py:225:get_accelerator] Setting ds_accelerator to hpu (auto detect)
INFO 09-21 12:21:38 [__init__.py:254] Automatically detected platform hpu.
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.10/dist-packages/trl/scripts/vllm_serve.py", line 272, in llm_worker
    llm = LLM(
  File "/root/aditya/vllm-fork/vllm/entrypoints/llm.py", line 244, in __init__
    self.llm_engine = LLMEngine.from_engine_args(
  File "/root/aditya/vllm-fork/vllm/engine/llm_engine.py", line 497, in from_engine_args
    vllm_config = engine_args.create_engine_config(usage_context)
  File "/root/aditya/vllm-fork/vllm/engine/arg_utils.py", line 1065, in create_engine_config
    model_config = self.create_model_config()
  File "/root/aditya/vllm-fork/vllm/engine/arg_utils.py", line 956, in create_model_config
    return ModelConfig(
  File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_dataclasses.py", line 123, in __init__
    s.__pydantic_validator__.validate_python(ArgsKwargs(args, kwargs), self_instance=s)
pydantic_core._pydantic_core.ValidationError: 1 validation error for ModelConfig
enforce_eager
  Input should be a valid boolean [type=bool_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/bool_type
INFO:     Started server process [3198502]
INFO:     Waiting for application startup.

Motivation

It would be easier training model requiring larger context length or large VRAM requirements by directly running a policy model on another card and serve it using vLLM.

Your contribution

I am happy to contribute to this PR, any sort of guidance would be really helpful.
I am more than happy to pick this task up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions