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
c76040e3
Unverified
Commit
c76040e3
authored
Mar 12, 2025
by
Lianmin Zheng
Committed by
GitHub
Mar 12, 2025
Browse files
Support page size > 1 (#4356)
parent
2f6bacee
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
1 deletion
+65
-1
test/srt/test_mla_deepseek_v3.py
test/srt/test_mla_deepseek_v3.py
+1
-1
test/srt/test_page_size.py
test/srt/test_page_size.py
+46
-0
test/srt/test_retract_decode.py
test/srt/test_retract_decode.py
+18
-0
No files found.
test/srt/test_mla_deepseek_v3.py
View file @
c76040e3
...
...
@@ -13,7 +13,7 @@ from sglang.test.test_utils import (
)
class
TestDeepseekV3
(
unittest
.
TestCase
):
class
Test
MLA
DeepseekV3
(
unittest
.
TestCase
):
@
classmethod
def
setUpClass
(
cls
):
cls
.
model
=
"lmsys/sglang-ci-dsv3-test"
...
...
test/srt/test_page_size.py
0 → 100644
View file @
c76040e3
import
os
import
unittest
from
types
import
SimpleNamespace
from
sglang.srt.utils
import
kill_process_tree
from
sglang.test.run_eval
import
run_eval
from
sglang.test.test_utils
import
(
DEFAULT_MODEL_NAME_FOR_TEST
,
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
DEFAULT_URL_FOR_TEST
,
popen_launch_server
,
)
class
TestPageSize
(
unittest
.
TestCase
):
@
classmethod
def
setUpClass
(
cls
):
os
.
environ
[
"SGLANG_DEBUG_MEMORY_POOL"
]
=
"1"
cls
.
model
=
DEFAULT_MODEL_NAME_FOR_TEST
cls
.
base_url
=
DEFAULT_URL_FOR_TEST
cls
.
process
=
popen_launch_server
(
cls
.
model
,
cls
.
base_url
,
timeout
=
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
other_args
=
[
"--page-size"
,
4
,
"--chunked-prefill-size"
,
128
],
)
@
classmethod
def
tearDownClass
(
cls
):
kill_process_tree
(
cls
.
process
.
pid
)
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
base_url
=
self
.
base_url
,
model
=
self
.
model
,
eval_name
=
"mmlu"
,
num_examples
=
64
,
num_threads
=
32
,
)
metrics
=
run_eval
(
args
)
self
.
assertGreaterEqual
(
metrics
[
"score"
],
0.65
)
if
__name__
==
"__main__"
:
unittest
.
main
()
test/srt/test_retract_decode.py
View file @
c76040e3
import
os
import
unittest
from
types
import
SimpleNamespace
...
...
@@ -14,6 +15,8 @@ from sglang.test.test_utils import (
class
TestRetractDecode
(
unittest
.
TestCase
):
@
classmethod
def
setUpClass
(
cls
):
os
.
environ
[
"SGLANG_TEST_RETRACT"
]
=
"1"
cls
.
model
=
DEFAULT_MODEL_NAME_FOR_TEST
cls
.
base_url
=
DEFAULT_URL_FOR_TEST
cls
.
process
=
popen_launch_server
(
...
...
@@ -37,5 +40,20 @@ class TestRetractDecode(unittest.TestCase):
self
.
assertGreaterEqual
(
metrics
[
"score"
],
0.65
)
class
TestRetractDecodeChunkCache
(
unittest
.
TestCase
):
@
classmethod
def
setUpClass
(
cls
):
os
.
environ
[
"SGLANG_TEST_RETRACT"
]
=
"1"
cls
.
model
=
DEFAULT_MODEL_NAME_FOR_TEST
cls
.
base_url
=
DEFAULT_URL_FOR_TEST
cls
.
process
=
popen_launch_server
(
cls
.
model
,
cls
.
base_url
,
timeout
=
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
other_args
=
[
"--disable-radix-cache"
,
"--chunked-prefill-size"
,
128
],
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Prev
1
2
Next
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