mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
Update server/text_generation_server/utils/logits_process.py
Co-authored-by: OlivierDehaene <olivier@huggingface.co>
This commit is contained in:
parent
d969151a1e
commit
c6fafff7f2
@ -114,8 +114,6 @@ class HeterogeneousRepetitionPenaltyLogitsProcessor(LogitsProcessor):
|
||||
score < 0, score * self.penalty_tensor, score / self.penalty_tensor
|
||||
)
|
||||
|
||||
# set score to 0 where input_ids is a padding token
|
||||
score *= input_ids.ne(0)
|
||||
scores.scatter_(1, input_ids, score)
|
||||
return scores
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user