Support page size > 1 (#4356)

This commit is contained in:
Lianmin Zheng
2025-03-12 22:22:39 -07:00
committed by GitHub
parent 2f6bacee03
commit c76040e31b
23 changed files with 877 additions and 284 deletions

View File

@@ -1,3 +1,4 @@
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()