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
987ac3d6
Commit
987ac3d6
authored
Oct 16, 2025
by
Baber
Browse files
nit
parent
41fd08f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
lm_eval/models/vllm_causallms.py
lm_eval/models/vllm_causallms.py
+8
-3
No files found.
lm_eval/models/vllm_causallms.py
View file @
987ac3d6
...
@@ -111,7 +111,7 @@ def _vllm_mp_worker(
...
@@ -111,7 +111,7 @@ def _vllm_mp_worker(
@
register_model
(
"vllm"
)
@
register_model
(
"vllm"
)
class
VLLM
(
TemplateLM
):
class
VLLM
(
TemplateLM
):
_DEFAULT_MAX_LENGTH
=
2048
_DEFAULT_MAX_LENGTH
=
4096
def
__init__
(
def
__init__
(
self
,
self
,
...
@@ -283,14 +283,19 @@ class VLLM(TemplateLM):
...
@@ -283,14 +283,19 @@ class VLLM(TemplateLM):
@
property
@
property
def
max_length
(
self
):
def
max_length
(
self
):
return
8096
if
self
.
_max_length_internal
>
8096
else
self
.
_max_length
return
(
8096
if
self
.
_max_length_internal
and
self
.
_max_length_internal
>
8096
else
self
.
_max_length
)
@
property
@
property
def
_max_length_internal
(
self
):
def
_max_length_internal
(
self
):
if
self
.
_max_length
:
# if max length manually set, return it
if
self
.
_max_length
:
# if max length manually set, return it
return
self
.
_max_length
return
self
.
_max_length
if
self
.
data_parallel_size
<=
1
:
if
self
.
data_parallel_size
<=
1
:
return
self
.
model
.
llm_engine
.
model_config
.
max_model_len
if
max_l
:
=
self
.
model
.
llm_engine
.
model_config
.
max_model_len
:
return
max_l
else
:
else
:
seqlen_config_attrs
=
(
"n_positions"
,
"max_position_embeddings"
,
"n_ctx"
)
seqlen_config_attrs
=
(
"n_positions"
,
"max_position_embeddings"
,
"n_ctx"
)
for
attr
in
seqlen_config_attrs
:
for
attr
in
seqlen_config_attrs
:
...
...
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