Support spec v2 for Frozen-KV MTP; remove v1 worker (#27607)

Co-authored-by: Khoa Pham <khoa.pham@radixark.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Liangsheng Yin
2026-06-09 15:30:20 -07:00
committed by GitHub
co-authored by Khoa Pham Claude Opus 4.8
parent 7f730edfdc
commit decb88e0e3
13 changed files with 750 additions and 1074 deletions
@@ -1,4 +1,3 @@
import os
import unittest
from types import SimpleNamespace
from typing import Optional
@@ -43,12 +42,6 @@ def get_avg_spec_accept_length(base_url: str) -> Optional[float]:
class TestFrozenKVMTP(CustomTestCase):
base_url = DEFAULT_URL_FOR_TEST
@classmethod
def _server_env(cls) -> dict[str, str]:
env = dict(os.environ)
env["SGLANG_ENABLE_SPEC_V2"] = "0"
return env
@classmethod
def _common_server_args(cls) -> list[str]:
args = [
@@ -110,7 +103,6 @@ class TestFrozenKVMTP(CustomTestCase):
"google/gemma-4-E4B-it",
self.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH * 3,
env=self._server_env(),
other_args=self._server_args(topk),
)
requests.get(self.base_url + "/flush_cache", timeout=30)
@@ -1,4 +1,3 @@
import os
import unittest
from types import SimpleNamespace
from typing import Optional
@@ -68,12 +67,6 @@ def get_avg_spec_accept_length(base_url: str) -> Optional[float]:
class TestGemma4MTP26BA4B(CustomTestCase):
base_url = DEFAULT_URL_FOR_TEST
@classmethod
def _server_env(cls) -> dict[str, str]:
env = dict(os.environ)
env["SGLANG_ENABLE_SPEC_V2"] = "0"
return env
@classmethod
def _common_server_args(cls) -> list[str]:
args = [
@@ -140,7 +133,6 @@ class TestGemma4MTP26BA4B(CustomTestCase):
TARGET_PATH,
self.base_url,
timeout=SERVER_LAUNCH_TIMEOUT,
env=self._server_env(),
other_args=self._server_args(topk),
)
requests.get(self.base_url + "/flush_cache", timeout=30)
@@ -1,4 +1,3 @@
import os
import unittest
from types import SimpleNamespace
from typing import Optional
@@ -58,12 +57,6 @@ def get_avg_spec_accept_length(base_url: str) -> Optional[float]:
class TestGemma4MTP31B(CustomTestCase):
base_url = DEFAULT_URL_FOR_TEST
@classmethod
def _server_env(cls) -> dict[str, str]:
env = dict(os.environ)
env["SGLANG_ENABLE_SPEC_V2"] = "0"
return env
@classmethod
def _common_server_args(cls) -> list[str]:
args = [
@@ -127,7 +120,6 @@ class TestGemma4MTP31B(CustomTestCase):
TARGET_PATH,
self.base_url,
timeout=SERVER_LAUNCH_TIMEOUT,
env=self._server_env(),
other_args=self._server_args(topk),
)
requests.get(self.base_url + "/flush_cache", timeout=30)