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
zhaoyu6
sglang
Commits
32b44d2f
"superbench/vscode:/vscode.git/clone" did not exist on "54da021b4d4c374fc48644d1c071032a32cd7e1b"
Unverified
Commit
32b44d2f
authored
Feb 17, 2025
by
Yineng Zhang
Committed by
GitHub
Feb 17, 2025
Browse files
add mtp unit test (#3634)
parent
5f1a485d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
1 deletion
+54
-1
test/srt/test_mla.py
test/srt/test_mla.py
+54
-1
No files found.
test/srt/test_mla.py
View file @
32b44d2f
...
...
@@ -74,7 +74,7 @@ class TestDeepseekV3(unittest.TestCase):
def
tearDownClass
(
cls
):
kill_process_tree
(
cls
.
process
.
pid
)
def
test_
mmlu
(
self
):
def
test_
gsm8k
(
self
):
args
=
SimpleNamespace
(
num_shots
=
5
,
data_path
=
None
,
...
...
@@ -90,5 +90,58 @@ class TestDeepseekV3(unittest.TestCase):
self
.
assertGreater
(
metrics
[
"accuracy"
],
0.62
)
class
TestDeepseekV3MTP
(
unittest
.
TestCase
):
@
classmethod
def
setUpClass
(
cls
):
cls
.
model
=
"lmzheng/sglang-ci-dsv3-test"
cls
.
base_url
=
DEFAULT_URL_FOR_TEST
other_args
=
[
"--trust-remote-code"
]
if
torch
.
cuda
.
is_available
()
and
torch
.
version
.
cuda
:
other_args
.
extend
(
[
"--enable-torch-compile"
,
"--cuda-graph-max-bs"
,
"2"
,
"--disable-radix"
,
"--enable-torch-compile"
,
"--torch-compile-max-bs"
,
"1"
,
"--speculative-algorithm"
,
"NEXTN"
,
"--speculative-draft"
,
"SGLang/sglang-ci-dsv3-test-NextN"
,
"--speculative-num-steps"
,
"2"
,
"--speculative-eagle-topk"
,
"4"
,
"--speculative-num-draft-tokens"
,
"4"
,
]
)
cls
.
process
=
popen_launch_server
(
cls
.
model
,
cls
.
base_url
,
timeout
=
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
other_args
=
other_args
,
)
@
classmethod
def
tearDownClass
(
cls
):
kill_process_tree
(
cls
.
process
.
pid
)
def
test_gsm8k
(
self
):
args
=
SimpleNamespace
(
num_shots
=
5
,
data_path
=
None
,
num_questions
=
200
,
max_new_tokens
=
512
,
parallel
=
128
,
host
=
"http://127.0.0.1"
,
port
=
int
(
self
.
base_url
.
split
(
":"
)[
-
1
]),
)
metrics
=
run_eval_few_shot_gsm8k
(
args
)
print
(
metrics
)
if
__name__
==
"__main__"
:
unittest
.
main
()
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