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
7010b2aa
Unverified
Commit
7010b2aa
authored
Aug 03, 2023
by
Lintang Sutawika
Committed by
GitHub
Aug 03, 2023
Browse files
Merge pull request #730 from EleutherAI/lintangsutawika-patch-1
Update huggingface.py
parents
176d5a26
f40c434e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+1
-1
No files found.
lm_eval/models/huggingface.py
View file @
7010b2aa
...
@@ -758,7 +758,7 @@ class HFLM(LM):
...
@@ -758,7 +758,7 @@ class HFLM(LM):
attn_masks
=
attn_masks
.
to
(
self
.
device
)
attn_masks
=
attn_masks
.
to
(
self
.
device
)
if
"max_length"
not
in
kwargs
:
if
"max_length"
not
in
kwargs
:
kwargs
[
"max_length"
]
=
(
context_enc
.
shape
[
1
]
+
max_gen_toks
,)
kwargs
[
"max_length"
]
=
context_enc
.
shape
[
1
]
+
max_gen_toks
# perform batched generation
# perform batched generation
cont
=
self
.
_model_generate
(
cont
=
self
.
_model_generate
(
...
...
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