Skip to content

Commit

Permalink
Fix qwen2-vl
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoin committed Oct 29, 2024
1 parent 61c49b7 commit a41cff0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vllm/model_executor/models/qwen2_vl.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,15 +938,19 @@ def __init__(self,
quant_config=None,
)

self.model = Qwen2Model(config, cache_config, quant_config)
self.model = Qwen2Model(config,
cache_config,
quant_config,
prefix="model")

if get_pp_group().is_last_rank:
if config.tie_word_embeddings:
self.lm_head = self.model.embed_tokens
else:
self.lm_head = ParallelLMHead(config.vocab_size,
config.hidden_size,
quant_config=quant_config)
quant_config=quant_config,
prefix="lm_head")
else:
self.lm_head = PPMissingLayer()

Expand Down

0 comments on commit a41cff0

Please sign in to comment.