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
gaoqiong
lm-evaluation-harness
Commits
dc5eba86
Unverified
Commit
dc5eba86
authored
Apr 18, 2024
by
Sergio Perez
Committed by
GitHub
Apr 18, 2024
Browse files
fix error when appending eot_token_id for generate_until tasks (#1699)
parent
8b326be7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/models/nemo_lm.py
lm_eval/models/nemo_lm.py
+2
-2
No files found.
lm_eval/models/nemo_lm.py
View file @
dc5eba86
...
...
@@ -485,8 +485,8 @@ class NeMoLM(LM):
def
get_until
(
req_args
):
until
=
req_args
.
get
(
"until"
,
[])
until
=
deepcopy
(
until
)
# prevent from modifying req_args for cache_key
if
self
.
eot_token_id
not
in
until
:
until
.
append
(
self
.
eot_token_id
)
if
self
.
tokenizer
.
ids_to_tokens
([
self
.
eot_token_id
])[
0
]
not
in
until
:
until
.
append
(
self
.
tokenizer
.
ids_to_tokens
([
self
.
eot_token_id
])[
0
]
)
return
until
def
_collate
(
x
):
...
...
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