fix(server): allow greedy repetition penalty (#51)
This commit is contained in:
parent
775115e3a5
commit
df227ac20d
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue