Unverified Commit df227ac2 authored by OlivierDehaene's avatar OlivierDehaene Committed by GitHub
Browse files

fix(server): allow greedy repetition penalty (#51)

parent 775115e3
...@@ -73,7 +73,6 @@ class NextTokenChooser: ...@@ -73,7 +73,6 @@ class NextTokenChooser:
sampling = True sampling = True
if repetition_penalty is not None and repetition_penalty != 1.0: if repetition_penalty is not None and repetition_penalty != 1.0:
warpers.append(RepetitionPenaltyLogitsProcessor(penalty=repetition_penalty)) warpers.append(RepetitionPenaltyLogitsProcessor(penalty=repetition_penalty))
sampling = True
self.warpers = warpers self.warpers = warpers
self.choice = Sampling(seed, device) if sampling else Greedy() self.choice = Sampling(seed, device) if sampling else Greedy()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment