"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "1dc231d14a48bd5ac48e53a5fa283e59da48673a"
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