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
change
sglang
Commits
48e9e719
Unverified
Commit
48e9e719
authored
Oct 05, 2025
by
yhyang201
Committed by
GitHub
Oct 04, 2025
Browse files
Add --max-new-tokens CLI flag for MMMU evaluation (#11217)
parent
31b49c0b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
benchmark/mmmu/eval_utils.py
benchmark/mmmu/eval_utils.py
+8
-1
No files found.
benchmark/mmmu/eval_utils.py
View file @
48e9e719
...
@@ -36,6 +36,7 @@ class EvalArgs:
...
@@ -36,6 +36,7 @@ class EvalArgs:
profile
:
bool
=
False
profile
:
bool
=
False
profile_number
:
int
=
5
profile_number
:
int
=
5
concurrency
:
int
=
1
concurrency
:
int
=
1
max_new_tokens
:
int
=
30
response_answer_regex
:
str
=
"(.*)"
response_answer_regex
:
str
=
"(.*)"
lora_path
:
Optional
[
str
]
=
None
lora_path
:
Optional
[
str
]
=
None
...
@@ -94,6 +95,12 @@ class EvalArgs:
...
@@ -94,6 +95,12 @@ class EvalArgs:
default
=
EvalArgs
.
concurrency
,
default
=
EvalArgs
.
concurrency
,
help
=
"Number of concurrent requests to make during evaluation. Default is 1, which means no concurrency."
,
help
=
"Number of concurrent requests to make during evaluation. Default is 1, which means no concurrency."
,
)
)
parser
.
add_argument
(
"--max-new-tokens"
,
type
=
int
,
default
=
EvalArgs
.
max_new_tokens
,
help
=
"Maximum number of new tokens to generate per sample."
,
)
parser
.
add_argument
(
parser
.
add_argument
(
"--response-answer-regex"
,
"--response-answer-regex"
,
type
=
str
,
type
=
str
,
...
@@ -234,7 +241,7 @@ def prepare_samples(eval_args: EvalArgs):
...
@@ -234,7 +241,7 @@ def prepare_samples(eval_args: EvalArgs):
def
get_sampling_params
(
eval_args
):
def
get_sampling_params
(
eval_args
):
max_new_tokens
=
30
max_new_tokens
=
eval_args
.
max_new_tokens
temperature
=
0.001
temperature
=
0.001
extra_request_body
=
{}
extra_request_body
=
{}
...
...
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