Skip to content

Commit

Permalink
Formatting & adding quant_config
Browse files Browse the repository at this point in the history
  • Loading branch information
shawntan committed Aug 19, 2024
1 parent a5c7b7a commit 553e89c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vllm/model_executor/models/granite.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def __init__(
self.vocab_size,
config.hidden_size,
org_num_embeddings=config.vocab_size,
quant_config=quant_config,
)
else:
self.embed_tokens = PPMissingLayer()
Expand Down Expand Up @@ -424,8 +425,9 @@ def forward(
attn_metadata, intermediate_tensors)
return model_output

def compute_logits(self, hidden_states: torch.Tensor,
sampling_metadata: SamplingMetadata) -> Optional[torch.Tensor]:
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)
logits /= self.config.logits_scaling
Expand Down

0 comments on commit 553e89c

Please sign in to comment.