[Kimi] Support kimi-k3 (#32541)
Co-authored-by: DarkSharpness <76582120+DarkSharpness@users.noreply.github.com> Co-authored-by: Xiaoyu Zhang <1182563586@qq.com> Co-authored-by: Mick <mickjagger19@icloud.com> Co-authored-by: Yuhao Yang <47235274+yhyang201@users.noreply.github.com> Co-authored-by: Cheng Wan <54331508+ch-wan@users.noreply.github.com> Co-authored-by: Ke Bao <ispobaoke@gmail.com> Co-authored-by: Baizhou Zhang <sobereddiezhang@gmail.com> Co-authored-by: Chunan Zeng <zcnrex@gmail.com> Co-authored-by: Khoa Pham <khoa.pham@radixark.ai> Co-authored-by: Ziyi Xu <ziyi.xu@radixark.ai> Co-authored-by: Zijie Xia <37504505+zijiexia@users.noreply.github.com> Co-authored-by: Yuwei An <ayw.sirius19@gmail.com> Co-authored-by: zhangxiaohao <1024393531@qq.com> Co-authored-by: Yangmin Li <yangminl@nvidia.com> Co-authored-by: Julien Lin <jullin@nvidia.com> Co-authored-by: Hao Phan <htphan@nvidia.com> Co-authored-by: Thomas Wang <1am9trash@gmail.com> Co-authored-by: RolaoDenthu <xinyisong0111@gmail.com> Co-authored-by: pigeonsoup <32922982+pigeonsoup@users.noreply.github.com> Co-authored-by: HaiShaw <hixiao@gmail.com> Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com> Co-authored-by: Pranjal Shankhdhar <pranjal.ssh@gmail.com> Co-authored-by: Lee Nau <lee.nau@gmail.com> Co-authored-by: HMING <126185151+Hearum@users.noreply.github.com> Co-authored-by: elvischenv <219235043+elvischenv@users.noreply.github.com> Co-authored-by: Byron Hsu <byronhsu1230@gmail.com> Co-authored-by: Byron Hsu <byron+per@periodiclabs.ai> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Thomas Wang <thomawan@amd.com> Co-authored-by: Xinyi Song <86638975+RolaoDenthu@users.noreply.github.com> Co-authored-by: Mohammad Miadh Angkad <176301910+mmangkad@users.noreply.github.com> Co-authored-by: Cheng Wan <cheng.wan@radixark.ai> Co-authored-by: BBuf <xiaoyu.zhang@radixark.ai> Co-authored-by: Hanming Lu <hanminglu@meta.com> Co-authored-by: Xinyi Song <xinyis10@illinois.edu>
This commit is contained in:
co-authored by
DarkSharpness
Xiaoyu Zhang
Mick
Yuhao Yang
Cheng Wan
Ke Bao
Baizhou Zhang
Chunan Zeng
Khoa Pham
Ziyi Xu
Zijie Xia
Yuwei An
zhangxiaohao
Yangmin Li
Julien Lin
Hao Phan
Thomas Wang
RolaoDenthu
pigeonsoup
HaiShaw
Xinyuan Tong
Pranjal Shankhdhar
Lee Nau
HMING
elvischenv
Byron Hsu
Byron Hsu
Claude Opus 5
Thomas Wang
Xinyi Song
Mohammad Miadh Angkad
Cheng Wan
BBuf
Hanming Lu
Xinyi Song
parent
0753663b8e
commit
abddb1c7e9
@@ -1,7 +1,7 @@
|
||||
"""Four-Blackwell acceptance coverage for Kimi Linear TokenSpeed MLA DCP.
|
||||
|
||||
The captured-shape and eager-shape requests deliberately straddle
|
||||
``--cuda-graph-max-bs-decode=64``. This guards both the regular CUDA graph
|
||||
``--cuda-graph-max-bs-decode``. This guards both the regular CUDA graph
|
||||
decode path and the full-capacity eager DCP LSE scratch-buffer path.
|
||||
"""
|
||||
|
||||
@@ -20,9 +20,10 @@ from sglang.test.test_utils import (
|
||||
popen_launch_server,
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=900, stage="base-c", runner_config="4-gpu-b200")
|
||||
register_cuda_ci(est_time=240, stage="extra-b", runner_config="4-gpu-b200")
|
||||
|
||||
KIMI_LINEAR_MODEL = "moonshotai/Kimi-Linear-48B-A3B-Instruct"
|
||||
CUDA_GRAPH_MAX_BS_DECODE = 256
|
||||
|
||||
|
||||
def _has_four_blackwell_gpus() -> bool:
|
||||
@@ -41,12 +42,11 @@ def _has_four_blackwell_gpus() -> bool:
|
||||
class TestKimiLinearDCP4(GSM8KMixin, CustomTestCase):
|
||||
model = KIMI_LINEAR_MODEL
|
||||
base_url = DEFAULT_URL_FOR_TEST
|
||||
gsm8k_score_threshold = 0.90
|
||||
gsm8k_score_threshold = 0.88
|
||||
gsm8k_num_examples = 200
|
||||
# Keep accuracy evaluation within the captured decode batch sizes so its
|
||||
# score is batch-invariant. The separate smoke test still exercises the
|
||||
# eager path with batch size 65.
|
||||
gsm8k_num_threads = 4
|
||||
# score is batch-invariant.
|
||||
gsm8k_num_threads = 128
|
||||
gsm8k_num_shots = 5
|
||||
|
||||
@classmethod
|
||||
@@ -74,7 +74,7 @@ class TestKimiLinearDCP4(GSM8KMixin, CustomTestCase):
|
||||
"--dtype",
|
||||
"bfloat16",
|
||||
"--cuda-graph-max-bs-decode",
|
||||
"64",
|
||||
str(CUDA_GRAPH_MAX_BS_DECODE),
|
||||
"--cuda-graph-backend-prefill",
|
||||
"disabled",
|
||||
"--mem-fraction-static",
|
||||
@@ -112,12 +112,24 @@ class TestKimiLinearDCP4(GSM8KMixin, CustomTestCase):
|
||||
self.assertTrue(output["text"].strip())
|
||||
self.assertGreater(output["meta_info"]["completion_tokens"], 0)
|
||||
|
||||
def _effective_max_running_requests(self) -> int:
|
||||
response = requests.get(self.base_url + "/server_info", timeout=30)
|
||||
response.raise_for_status()
|
||||
return min(
|
||||
state["effective_max_running_requests_per_dp"]
|
||||
for state in response.json()["internal_states"]
|
||||
)
|
||||
|
||||
def test_decode_cuda_graph_and_eager_batch(self):
|
||||
# Batch two replays a captured shape; batch 65 is above the configured
|
||||
# regular CUDA graph maximum and therefore exercises eager decode.
|
||||
self._assert_batch_completes(2)
|
||||
self._assert_batch_completes(2)
|
||||
self._assert_batch_completes(65)
|
||||
self.assertGreater(
|
||||
self._effective_max_running_requests(),
|
||||
CUDA_GRAPH_MAX_BS_DECODE,
|
||||
"eager DCP decode is unreachable: concurrency was capped at or "
|
||||
"below the CUDA graph capture ceiling",
|
||||
)
|
||||
self._assert_batch_completes(CUDA_GRAPH_MAX_BS_DECODE + 1)
|
||||
|
||||
def test_physical_capacity_sanity(self):
|
||||
response = requests.get(self.base_url + "/server_info", timeout=30)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
"""Four-Blackwell Kimi Linear TokenSpeed DCP + DSpark static acceptance test."""
|
||||
|
||||
import json
|
||||
import socket
|
||||
import tempfile
|
||||
@@ -39,6 +41,7 @@ def _has_four_blackwell_gpus() -> bool:
|
||||
|
||||
|
||||
def _write_dummy_qwen3_dspark_draft(root: Path) -> str:
|
||||
"""Write a dummy Qwen3 DSpark config with Kimi Linear dimensions."""
|
||||
draft_dir = root / "qwen3-dspark-kimi-proxy"
|
||||
draft_dir.mkdir()
|
||||
config = {
|
||||
|
||||
Reference in New Issue
Block a user