Skip to content

There may be some compatibility conflicts between Transformers 5.0 and older vLLM. #388

@SyncLionPaw

Description

@SyncLionPaw

Recently, Transformers released version 5.0.0, which may introduce some compatibility issues.
Our pyproject.toml currently only specifies "transformers>=4.55.0", so during installation, it might automatically install version 5.0.0.
This could cause problems because the vLLM version that verl depends on might be too old to be compatible with Transformers 5.0.

Specific Error:

(APIServer pid=98439) File "/rllm/.venv/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 1326, in getattr
(APIServer pid=98439) raise AttributeError(f"{self.class.name} has no attribute {key}")
(APIServer pid=98439) AttributeError: Qwen2Tokenizer has no attribute all_special_tokens_extended. Did you mean: 'num_special_tokens_to_add'?

Reproduction Steps:

Follow the quickstart guide, install the environment, and run rllm/examples/math_tool/run_math_with_tool.py.

Tested Working Combination:
• transformers: 4.57.0
• vLLM: 0.11.0

This combination works correctly.

Possible Solutions:

  1. Temporary Fix: Add version constraints in pyproject.toml to temporarily limit Transformers to versions below 5.0.0 (e.g., transformers>=4.57.0,<5.0.0).

  2. Alternative Approach: Upgrade vLLM to a version that supports Transformers 5.0.0 (though this version is automatically installed by verl, which might require coordination).

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