[Bugfix] Fix Qwen3-VL reranker crash on missing tie_word_embeddings in text config (#59989)

Signed-off-by: Vadim Gimpelson <vadim.gimpelson@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
authored and GitHub committed 2026-10-26 03:18:08 +00:00
1 parent cd9aa5b5ee
commit 93dc587bd9
1 file changed
+2 -2
+2 -2
View File
@@ -539,7 +539,7 @@ def load_weights_using_from_2_way_softmax(
text_config.vocab_size,
text_config.hidden_size,
)
if text_config.tie_word_embeddings:
if language_model.config.get_text_config().tie_word_embeddings:
# embed_tokens is the assumed name for input embeddings. If the model does not
# have this attribute, we fall back to get_input_embeddings(), which is used by
# the Transformers modeling backend.
@@ -608,7 +608,7 @@ def load_weights_no_post_processing(model, weights: Iterable[tuple[str, torch.Te
text_config.vocab_size,
text_config.hidden_size,
)
if text_config.tie_word_embeddings:
if language_model.config.get_text_config().tie_word_embeddings:
# embed_tokens is the assumed name for input embeddings. If the model does not
# have this attribute, we fall back to get_input_embeddings(), which is used by
# the Transformers modeling backend.