Skip to content

Commit

Permalink
fix: granite logit scale in logit computation (#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpinDale authored Dec 27, 2024
1 parent 1264e0b commit 11f49b5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions aphrodite/modeling/models/granite.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,12 @@ def forward(
return model_output

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

def sample(
Expand Down

0 comments on commit 11f49b5

Please sign in to comment.