Skip to content

Commit 828a239

Browse files
shawntannjhill
andcommitted
Update vllm/model_executor/models/granitemoe.py
Co-authored-by: Nick Hill <[email protected]>
1 parent ec26f4d commit 828a239

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vllm/model_executor/models/granitemoe.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,11 @@ def forward(
382382
return hidden_states
383383

384384
def compute_logits(self, hidden_states: torch.Tensor,
385-
sampling_metadata: SamplingMetadata) -> torch.Tensor:
385+
sampling_metadata: SamplingMetadata) -> Optional[torch.Tensor]:
386386
logits = self.logits_processor(self.lm_head, hidden_states,
387387
sampling_metadata)
388-
logits = logits / self.config.logits_scaling
388+
if logits is not None:
389+
logits /= self.config.logits_scaling
389390
return logits
390391

391392
def make_empty_intermediate_tensors(

0 commit comments

Comments
 (0)