Skip to content

Commit 490a6af

Browse files
nit: Fix garbled outputs
1 parent 934198d commit 490a6af

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • vllm/model_executor/models/transformers

vllm/model_executor/models/transformers/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,10 @@ def _get_tie_word_embeddings(self):
377377
"""
378378
Check if the model has tied word embeddings.
379379
"""
380+
# Composite models (e.g. audio) inherit tie_word_embeddings=True on the
381+
# top-level config; using text_config which reflects the actual lm_head.
382+
if self.config is not self.text_config:
383+
return getattr(self.text_config, "tie_word_embeddings", False)
380384
# Transformers v4 and v5 will store this in different places
381385
tie_word_embeddings_v4 = getattr(self.text_config, "tie_word_embeddings", False)
382386
tie_word_embeddings_v5 = getattr(self.config, "tie_word_embeddings", False)

0 commit comments

Comments
 (0)