mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
cohere fix
This commit is contained in:
parent
f4dc44b88c
commit
bcd9d3a5cb
@ -263,5 +263,8 @@ class TransformersFlashCausalLM(FlashCausalLM):
|
||||
# For Granite while next transformers version is released and we can use `lm_head_indices` natively
|
||||
if hasattr(self.model.config, "logits_scaling"):
|
||||
logits = logits / self.model.config.logits_scaling
|
||||
# For Cohere for similar reasons
|
||||
elif hasattr(self.model, "logit_scale"):
|
||||
logits = logits * self.model.logit_scale
|
||||
|
||||
return logits, None
|
||||
|
Loading…
Reference in New Issue
Block a user