Add Mimo-v2-flash model to ci test (#15887)
This commit is contained in:
@@ -9,6 +9,8 @@ from sglang.test.few_shot_gsm8k import run_eval as run_eval_gsm8k
|
|||||||
class GSM8KMixin:
|
class GSM8KMixin:
|
||||||
gsm8k_accuracy_thres: float
|
gsm8k_accuracy_thres: float
|
||||||
gsm8k_accept_length_thres: Optional[float] = None
|
gsm8k_accept_length_thres: Optional[float] = None
|
||||||
|
gsm8k_num_questions: int = 200
|
||||||
|
gsm8k_parallel: int = 128
|
||||||
|
|
||||||
def test_gsm8k(self):
|
def test_gsm8k(self):
|
||||||
requests.get(self.base_url + "/flush_cache")
|
requests.get(self.base_url + "/flush_cache")
|
||||||
@@ -16,9 +18,9 @@ class GSM8KMixin:
|
|||||||
args = SimpleNamespace(
|
args = SimpleNamespace(
|
||||||
num_shots=5,
|
num_shots=5,
|
||||||
data_path=None,
|
data_path=None,
|
||||||
num_questions=200,
|
num_questions=self.gsm8k_num_questions,
|
||||||
max_new_tokens=512,
|
max_new_tokens=512,
|
||||||
parallel=128,
|
parallel=self.gsm8k_parallel,
|
||||||
host="http://127.0.0.1",
|
host="http://127.0.0.1",
|
||||||
port=int(self.base_url.split(":")[-1]),
|
port=int(self.base_url.split(":")[-1]),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
from sglang.test.send_one import BenchArgs, send_one_prompt
|
||||||
|
from sglang.test.test_utils import is_in_ci, write_github_step_summary
|
||||||
|
|
||||||
|
|
||||||
|
class SpecDecodingMixin:
|
||||||
|
bs_1_speed_thres: float
|
||||||
|
accept_length_thres: float
|
||||||
|
|
||||||
|
def test_bs_1_speed(self):
|
||||||
|
args = BenchArgs(port=int(self.base_url.split(":")[-1]), max_new_tokens=2048)
|
||||||
|
acc_length, speed = send_one_prompt(args)
|
||||||
|
|
||||||
|
print(f"{acc_length=:.2f} {speed=:.2f}")
|
||||||
|
|
||||||
|
if is_in_ci():
|
||||||
|
write_github_step_summary(
|
||||||
|
f"### test_bs_1_speed ({self.model})\n"
|
||||||
|
f"{acc_length=:.2f}\n"
|
||||||
|
f"{speed=:.2f} token/s\n"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.assertGreater(acc_length, self.accept_length_thres)
|
||||||
|
self.assertGreater(speed, self.bs_1_speed_thres)
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
from sglang.test.kits.gsm8k_accuracy_kit import GSM8KMixin
|
||||||
|
from sglang.test.kits.spec_decoding_kit import SpecDecodingMixin
|
||||||
|
from sglang.test.server_fixtures.default_fixture import DefaultServerBase
|
||||||
|
|
||||||
|
|
||||||
|
class TestMiMoV2Flash(GSM8KMixin, SpecDecodingMixin, DefaultServerBase):
|
||||||
|
gsm8k_accuracy_thres = 0.75
|
||||||
|
gsm8k_num_questions = 1319
|
||||||
|
gsm8k_parallel = 1319
|
||||||
|
model = "XiaomiMiMo/MiMo-V2-Flash"
|
||||||
|
|
||||||
|
other_args = [
|
||||||
|
"--tp",
|
||||||
|
"4",
|
||||||
|
"--dp",
|
||||||
|
"2",
|
||||||
|
"--enable-dp-attention",
|
||||||
|
"--trust-remote-code",
|
||||||
|
"--attention-backend",
|
||||||
|
"fa3",
|
||||||
|
"--max-running-requests",
|
||||||
|
"128",
|
||||||
|
"--cuda-graph-max-bs",
|
||||||
|
"64",
|
||||||
|
"--mem-fraction-static",
|
||||||
|
"0.75",
|
||||||
|
"--speculative-algorithm",
|
||||||
|
"EAGLE",
|
||||||
|
"--speculative-num-steps",
|
||||||
|
"3",
|
||||||
|
"--speculative-eagle-topk",
|
||||||
|
"1",
|
||||||
|
"--speculative-num-draft-tokens",
|
||||||
|
"4",
|
||||||
|
"--enable-multi-layer-eagle",
|
||||||
|
"--model-loader-extra-config",
|
||||||
|
'{"enable_multithread_load": true,"num_threads": 64}',
|
||||||
|
]
|
||||||
|
|
||||||
|
bs_1_speed_thres = 170
|
||||||
|
accept_length_thres = 3.2
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
@@ -139,6 +139,7 @@ suites = {
|
|||||||
TestFile("models/test_kimi_k2_models.py", 200),
|
TestFile("models/test_kimi_k2_models.py", 200),
|
||||||
TestFile("test_deepseek_v32_basic.py", 275),
|
TestFile("test_deepseek_v32_basic.py", 275),
|
||||||
TestFile("test_deepseek_v32_mtp.py", 275),
|
TestFile("test_deepseek_v32_mtp.py", 275),
|
||||||
|
TestFile("models/test_mimo_models.py", 200),
|
||||||
],
|
],
|
||||||
"per-commit-8-gpu-h20": [
|
"per-commit-8-gpu-h20": [
|
||||||
TestFile("quant/test_w4a8_deepseek_v3.py", 520),
|
TestFile("quant/test_w4a8_deepseek_v3.py", 520),
|
||||||
|
|||||||
Reference in New Issue
Block a user