Skip to content

Commit

Permalink
[Bugfix] Fix vocab_size field access in llava_next.py (vllm-proje…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywonchung authored and jimpang committed Jul 24, 2024
1 parent 91e0c67 commit c65e4fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion vllm/model_executor/models/llava.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ def __init__(self,
quant_config=quant_config)
logit_scale = getattr(config, "logit_scale", 1.0)
self.logits_processor = LogitsProcessor(self.unpadded_vocab_size,
config.vocab_size, logit_scale)
config.text_config.vocab_size,
logit_scale)
self.sampler = Sampler()

def _validate_pixel_values(self, data: torch.Tensor) -> torch.Tensor:
Expand Down
3 changes: 2 additions & 1 deletion vllm/model_executor/models/llava_next.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ def __init__(self,
quant_config=quant_config)
logit_scale = getattr(config, "logit_scale", 1.0)
self.logits_processor = LogitsProcessor(self.unpadded_vocab_size,
config.vocab_size, logit_scale)
config.text_config.vocab_size,
logit_scale)
self.sampler = Sampler()

self.image_newline = nn.Parameter(
Expand Down

0 comments on commit c65e4fb

Please sign in to comment.