Fix: qwen3_5 model type not recognized by Transformers#2
Closed
Fix: qwen3_5 model type not recognized by Transformers#2
Conversation
The qwen3_5 model type was added in transformers v5.2.0 (Feb 2026). Older versions lack the CONFIG_MAPPING entry for qwen3_5, causing: KeyError: 'qwen3_5' ValueError: ...does not recognize this architecture Added: - requirements.txt: minimum transformers>=5.2.0 - fix_qwen3_5_model_recognition.sh: automated fix script - QWEN3_5_FIX.md: documentation of the issue and solution Co-authored-by: www917 <www917@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When loading a Qwen3.5 model checkpoint (e.g.
Qwen/Qwen3.5-4B) with vLLM or transformers, the following error occurs:Root Cause
The
qwen3_5model type was added to the Hugging Facetransformerslibrary in version 5.2.0 (released February 16, 2026, via PR #43830). Older versions lack theCONFIG_MAPPINGentry forqwen3_5inconfiguration_auto.py, which causes theKeyError.Solution
Upgrade
transformersto version >= 5.2.0:pip install "transformers>=5.2.0"Or install from source if no release supports it yet:
Changes
requirements.txt: Addedtransformers>=5.2.0as a minimum version requirementfix_qwen3_5_model_recognition.sh: Automated fix script that upgrades transformers and verifies the fixQWEN3_5_FIX.md: Documentation of the issue, root cause, and solutionsReferences