[Bugfix] Fix Qwen3-VL-Reranker model loading for sequence classification (#32089)

Signed-off-by: rickychen-infinirc <ricky.chen@infinirc.com>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Co-authored-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
RickyChen / 陳昭儒
2026-01-11 04:40:09 +08:00
committed by GitHub
parent e15a5ff07b
commit 8020a60402
2 changed files with 18 additions and 12 deletions

View File

@@ -254,7 +254,9 @@ class Qwen3ForSequenceClassificationConfig(VerifyAndUpdateConfig):
"Try loading the original Qwen3 Reranker?, see: "
"https://github.com/vllm-project/vllm/tree/main/examples/pooling/score/qwen3_reranker_offline.py"
)
model_config.hf_config.method = "from_2_way_softmax"
text_config = config.get_text_config()
text_config.method = "from_2_way_softmax"
text_config.classifier_from_token = tokens
class Qwen3VLForSequenceClassificationConfig(Qwen3ForSequenceClassificationConfig):