Skip to content

Commit

Permalink
Update vllm/model_executor/models/granitemoe.py
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Hill <[email protected]>
  • Loading branch information
shawntan and njhill authored Sep 30, 2024
1 parent 280b22b commit 2d86b7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vllm/model_executor/models/granitemoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,11 @@ def forward(
return hidden_states

def compute_logits(self, hidden_states: torch.Tensor,
sampling_metadata: SamplingMetadata) -> torch.Tensor:
sampling_metadata: SamplingMetadata) -> Optional[torch.Tensor]:
logits = self.logits_processor(self.lm_head, hidden_states,
sampling_metadata)
logits = logits / self.config.logits_scaling
if logits is not None:
logits /= self.config.logits_scaling
return logits

def make_empty_intermediate_tensors(
Expand Down

0 comments on commit 2d86b7d

Please sign in to comment.