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
ae5c0fc4
"vscode:/vscode.git/clone" did not exist on "5a0d079c6bee1185bdb0cb1922643fa9d5d518c2"
Unverified
Commit
ae5c0fc4
authored
Jul 30, 2024
by
Ying Sheng
Committed by
GitHub
Jul 30, 2024
Browse files
Support disable_ignore_eos in bench_serving.py (#824)
parent
a30d5d75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
python/sglang/bench_serving.py
python/sglang/bench_serving.py
+9
-1
No files found.
python/sglang/bench_serving.py
View file @
ae5c0fc4
...
...
@@ -84,6 +84,9 @@ async def async_request_trt_llm(
"min_length"
:
request_func_input
.
output_len
,
"end_id"
:
1048576
,
}
if
args
.
disable_ignore_eos
:
del
payload
[
"min_length"
]
del
payload
[
"end_id"
]
output
=
RequestFuncOutput
()
output
.
prompt_len
=
request_func_input
.
prompt_len
...
...
@@ -149,7 +152,7 @@ async def async_request_openai_completions(
"best_of"
:
1
,
"max_tokens"
:
request_func_input
.
output_len
,
"stream"
:
not
args
.
disable_stream
,
"ignore_eos"
:
True
,
"ignore_eos"
:
not
args
.
disable_ignore_eos
,
}
headers
=
{
"Authorization"
:
f
"Bearer
{
os
.
environ
.
get
(
'OPENAI_API_KEY'
)
}
"
}
...
...
@@ -969,6 +972,11 @@ if __name__ == "__main__":
action
=
"store_true"
,
help
=
"Disable streaming mode."
,
)
parser
.
add_argument
(
"--disable-ignore-eos"
,
action
=
"store_true"
,
help
=
"Disable ignoring EOS."
,
)
set_ulimit
()
...
...
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