Skip to content

[Bug]: vllm fails to load continual pre-trained Qwen3.5-MoE model due to missing support for transformers 5.x renamed class (Qwen3_5MoeTextConfig)#36236

Description

@itacora

Your current environment

The output of python collect_env.py
- vllm: 0.16.0 / 0.16.1rc1.dev133+g9a87b0578 / 0.17.0rc0 nightly
- transformers: 5.2.0 / 5.3.0
- Python: 3.12.12
- pytorch: 2.10.0
- cuda: 12.9

馃悰 Describe the bug

LLM models

  • Base model: Qwen/Qwen3.5-122B-A10B (MoE)
  • Model type: CPT (Continued Pre-Training) from base model using transformers 5.3.0

Bug Description

vllm fails to load a CPT model based on Qwen3.5-122B-A10B when using transformers >= 5.x.

transformers 5.x renamed Qwen3_5MoeConfig to Qwen3_5MoeTextConfig, but vllm still references the old class name internally. Since the CPT (Continued Pre-Training) was performed using transformers 5.3.0, the output config.json uses the new class names, making it incompatible with the current vllm.

Error

TypeError: Invalid type of HuggingFace config.
Expected type: <class 'vllm.transformers_utils.configs.qwen3_5_moe.Qwen3_5MoeConfig'>
but found type: <class 'transformers.models.qwen3_5_moe.configuration_qwen3_5_moe.Qwen3_5MoeTextConfig'>

Model config.json (base model output)

{
  "architectures": ["Qwen3_5MoeForConditionalGeneration"],
  "model_type": "qwen3_5_moe",
  "transformers_version": "4.57.0.dev0",
}

Model config.json (CPT model output)

{
  "architectures": ["Qwen3_5MoeForCausalLM"],
  "model_type": "qwen3_5_moe_text",
  "transformers_version": "5.3.0",
}

Steps to Reproduce

  1. Perform CPT on Qwen/Qwen3.5-122B-A10B using transformers >= 5.x
  2. Attempt to serve the CPT checkpoint with vllm

Expected Behavior

vllm should support transformers 5.x and correctly handle Qwen3_5MoeTextConfig for CPT models based on Qwen3.5-MoE.

#Possible Fix

In vllm/transformers_utils/configs/qwen3_5_moe.py and related files, update the class reference from Qwen3_5MoeConfig to Qwen3_5MoeTextConfig to match transformers 5.x naming convention.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleOver 90 days of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions