[Bugfix][Models] Accept Qwen3_5MoeTextConfig in Qwen3_5MoeProcessingInfo for transformers 5.x compatibility (#50704)
Signed-off-by: loulanyue <loulanyue@users.noreply.github.com> Co-authored-by: loulanyue <loulanyue@users.noreply.github.com>
Rafli Surya Wijaya committed
Aug 2, 2026 at 13:50 UTC
0601850791155003afbe5a0d5d086350cada8deb
1 file changed
+5
-1
vllm/model_executor/models/qwen3_5.py
+5
-1
@@ -108,7 +108,11 @@ class Qwen3_5ProcessingInfo(Qwen3VLProcessingInfo):
108
109
class Qwen3_5MoeProcessingInfo(Qwen3VLProcessingInfo):
110
def get_hf_config(self):
111
- return self.ctx.get_hf_config(Qwen3_5MoeConfig)
111
+ # transformers 5.x renames the top-level Qwen3.5-MoE config class to
112
+ # Qwen3_5MoeTextConfig for text-only models, while transformers ≤4.x
113
+ # returns Qwen3_5MoeConfig (the multimodal wrapper). Accept both so
114
+ # that vLLM works regardless of which transformers version is installed.
115
+ return self.ctx.get_hf_config((Qwen3_5MoeConfig, Qwen3_5MoeTextConfig))
116
117
118
class Qwen3_5DecoderLayer(Qwen3NextDecoderLayer):