Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
text-generation-inference
Commits
df227ac2
Unverified
Commit
df227ac2
authored
Feb 02, 2023
by
OlivierDehaene
Committed by
GitHub
Feb 02, 2023
Browse files
fix(server): allow greedy repetition penalty (#51)
parent
775115e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
1 deletion
+0
-1
server/text_generation/utils.py
server/text_generation/utils.py
+0
-1
No files found.
server/text_generation/utils.py
View file @
df227ac2
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment