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
2bd5dcb6
Commit
2bd5dcb6
authored
Oct 11, 2023
by
Zhiwei Zhuang
Browse files
finished test code
parent
1aa3bc1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+1
-2
No files found.
lm_eval/models/huggingface.py
View file @
2bd5dcb6
...
@@ -847,7 +847,7 @@ class HFLM(LM):
...
@@ -847,7 +847,7 @@ class HFLM(LM):
# for each different set of kwargs, we execute all requests, by batch.
# for each different set of kwargs, we execute all requests, by batch.
for
key
,
re_ord
in
re_ords
.
items
():
for
key
,
re_ord
in
re_ords
.
items
():
for
chunk
in
utils
.
chunks
(
for
chunk
in
utils
.
chunks
(
re_ord
.
get_reordered
(),
tqdm
(
re_ord
.
get_reordered
(),
disable
=
self
.
rank
!=
0
),
n
=
self
.
batch_size
n
=
self
.
batch_size
if
self
.
batch_size
!=
"auto"
if
self
.
batch_size
!=
"auto"
else
adaptive_batch_size
else
adaptive_batch_size
...
@@ -858,7 +858,6 @@ class HFLM(LM):
...
@@ -858,7 +858,6 @@ class HFLM(LM):
and
not
adaptive_batch_size
and
not
adaptive_batch_size
else
None
,
else
None
,
):
):
contexts
,
all_gen_kwargs
=
zip
(
*
chunk
)
contexts
,
all_gen_kwargs
=
zip
(
*
chunk
)
# we assume all gen kwargs in the batch are the same
# we assume all gen kwargs in the batch are the same
# this is safe to assume because the `grouper` object ensures it.
# this is safe to assume because the `grouper` object ensures it.
...
...
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