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
4d10ad56
Unverified
Commit
4d10ad56
authored
Jan 02, 2024
by
Baber Abbasi
Committed by
GitHub
Jan 02, 2024
Browse files
batch_schedular bug in Collator (#1229)
* auto-batch requires len of iter * handle case when batch_size="auto:N"
parent
a12ef445
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
lm_eval/models/vllm_causallms.py
lm_eval/models/vllm_causallms.py
+2
-1
lm_eval/utils.py
lm_eval/utils.py
+1
-0
No files found.
lm_eval/models/vllm_causallms.py
View file @
4d10ad56
...
@@ -96,7 +96,8 @@ class VLLM(LM):
...
@@ -96,7 +96,8 @@ class VLLM(LM):
trust_remote_code
=
trust_remote_code
,
trust_remote_code
=
trust_remote_code
,
tokenizer_revision
=
tokenizer_revision
,
tokenizer_revision
=
tokenizer_revision
,
)
)
self
.
batch_size
=
batch_size
self
.
batch_size
=
"auto"
if
batch_size
.
startswith
(
"auto:"
)
else
batch_size
self
.
_max_gen_toks
=
max_gen_toks
self
.
_max_gen_toks
=
max_gen_toks
@
property
@
property
...
...
lm_eval/utils.py
View file @
4d10ad56
...
@@ -920,6 +920,7 @@ class Collator:
...
@@ -920,6 +920,7 @@ class Collator:
```
```
"""
"""
arr
=
[]
arr
=
[]
_iter
=
tuple
(
_iter
)
for
i
,
x
in
enumerate
(
_iter
):
for
i
,
x
in
enumerate
(
_iter
):
arr
.
append
(
x
)
arr
.
append
(
x
)
if
len
(
arr
)
==
(
fn
(
i
,
_iter
)
if
fn
else
n
):
if
len
(
arr
)
==
(
fn
(
i
,
_iter
)
if
fn
else
n
):
...
...
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