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
e86b1ccb
Unverified
Commit
e86b1ccb
authored
Aug 14, 2024
by
Lianmin Zheng
Committed by
GitHub
Aug 14, 2024
Browse files
Enable chunked prefill by default (#1040)
parent
8d2d876f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
.github/workflows/e2e-test.yml
.github/workflows/e2e-test.yml
+2
-2
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+1
-1
test/srt/test_moe_serving_throughput.py
test/srt/test_moe_serving_throughput.py
+2
-2
test/srt/test_serving_throughput.py
test/srt/test_serving_throughput.py
+5
-5
No files found.
.github/workflows/e2e-test.yml
View file @
e86b1ccb
...
...
@@ -47,8 +47,8 @@ jobs:
python3 -m unittest test_serving_throughput.TestServingThroughput.test_default_without_radix_cache
timeout-minutes
:
10
-
name
:
Benchmark Serving Throughput (w/ ChunkedPrefill)
-
name
:
Benchmark Serving Throughput (w/
o
ChunkedPrefill)
run
:
|
cd test/srt
python3 -m unittest test_serving_throughput.TestServingThroughput.test_default_with_chunked_prefill
python3 -m unittest test_serving_throughput.TestServingThroughput.test_default_with
out
_chunked_prefill
timeout-minutes
:
10
python/sglang/srt/server_args.py
View file @
e86b1ccb
...
...
@@ -49,7 +49,7 @@ class ServerArgs:
max_running_requests
:
Optional
[
int
]
=
None
max_num_reqs
:
Optional
[
int
]
=
None
max_total_tokens
:
Optional
[
int
]
=
None
chunked_prefill_size
:
int
=
-
1
chunked_prefill_size
:
int
=
8192
max_prefill_tokens
:
int
=
16384
schedule_policy
:
str
=
"lpm"
schedule_conservativeness
:
float
=
1.0
...
...
test/srt/test_moe_serving_throughput.py
View file @
e86b1ccb
...
...
@@ -86,11 +86,11 @@ class TestServingThroughput(unittest.TestCase):
# A100 (PCIE) performance
assert
res
[
"output_throughput"
]
>
930
def
test_default_with_chunked_prefill
(
self
):
def
test_default_with
out
_chunked_prefill
(
self
):
res
=
self
.
run_test
(
disable_radix_cache
=
ServerArgs
.
disable_radix_cache
,
disable_flashinfer
=
ServerArgs
.
disable_flashinfer
,
chunked_prefill_size
=
8192
,
chunked_prefill_size
=
-
1
,
)
if
os
.
getenv
(
"SGLANG_IS_IN_CI"
,
"false"
)
==
"true"
:
...
...
test/srt/test_serving_throughput.py
View file @
e86b1ccb
...
...
@@ -71,7 +71,7 @@ class TestServingThroughput(unittest.TestCase):
if
os
.
getenv
(
"SGLANG_IS_IN_CI"
,
"false"
)
==
"true"
:
# A100 (PCIE) performance
assert
res
[
"output_throughput"
]
>
=
1400
assert
res
[
"output_throughput"
]
>
1400
def
test_default_without_radix_cache
(
self
):
res
=
self
.
run_test
(
...
...
@@ -82,18 +82,18 @@ class TestServingThroughput(unittest.TestCase):
if
os
.
getenv
(
"SGLANG_IS_IN_CI"
,
"false"
)
==
"true"
:
# A100 (PCIE) performance
assert
res
[
"output_throughput"
]
>
=
1450
assert
res
[
"output_throughput"
]
>
1450
def
test_default_with_chunked_prefill
(
self
):
def
test_default_with
out
_chunked_prefill
(
self
):
res
=
self
.
run_test
(
disable_radix_cache
=
ServerArgs
.
disable_radix_cache
,
disable_flashinfer
=
ServerArgs
.
disable_flashinfer
,
chunked_prefill_size
=
8192
,
chunked_prefill_size
=
-
1
,
)
if
os
.
getenv
(
"SGLANG_IS_IN_CI"
,
"false"
)
==
"true"
:
# A100 (PCIE) performance
assert
res
[
"output_throughput"
]
>
=
1400
assert
res
[
"output_throughput"
]
>
1400
def
test_all_cases
(
self
):
for
disable_radix_cache
in
[
False
,
True
]:
...
...
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