"Plugson/src/vscode:/vscode.git/clone" did not exist on "1f49265f29459295bc1b66c53da3de9e99a9370e"
Unverified Commit c76040e3 authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

Support page size > 1 (#4356)

parent 2f6bacee
......@@ -13,7 +13,7 @@ from sglang.test.test_utils import (
)
class TestDeepseekV3(unittest.TestCase):
class TestMLADeepseekV3(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.model = "lmsys/sglang-ci-dsv3-test"
......
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()
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()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment