Repository navigation
fix(kimi-k3): preserve dense ModelSlim MLA weights - #36603
Merged
ch-wan merged 4 commits intoAug 28, 2026
Merged
Conversation
McZyWu
requested review from
Alisehen,
AniZpZ,
BBuf,
Edwardf0t1,
FlamingoPg,
HaiShaw,
OrangeRedeng,
b8zhong,
ch-wan and
mmangkad
as code owners
August 27, 2026 03:19
Contributor
Author
Four-node Kimi-K3 hardware validationValidated the production logic now at PR head Configuration:
Results:
This covers the failing weight-loading path and a full multi-node inference/accuracy run. Compatibility with #35314
The available Ascend hosts do not contain a Kimi-K3 GGUF/ExpertPack checkpoint, and #35314's ExpertPack kernel is a single-GPU CUDA/RTX 5090 path, so its full E2E cannot be run on this NPU cluster. The class-level selection and all hardware-independent #35314 regressions were exercised instead. |
sglang-npu-bot
approved these changes
Aug 27, 2026
Collaborator
|
/tag-and-rerun-ci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The Kimi-K3 ModelSlim W4A8 multi-node accuracy job fails after loading its 351 checkpoint shards with:
Failed job: https://github.com/sgl-project/sglang/actions/runs/32936865342/job/98168349010
#35314 added split-GGUF K/V support for the Kimi-K3 ExpertPack path, but selected that representation through
supports_kimi_k3_quantized_latent_projections. ModelSlim already advertises that capability for Kimi-K3 latent-MoE linear layers, while its MLA checkpoint storeskv_b_proj.weightas a regular dense FLOAT tensor. As a result, model construction removedkv_b_proj, registered unloaded GGUF placeholders, and the post-load Q4_0/Q2_K validation failed.Modifications
supports_kimi_k3_split_gguf_kv_bcapability toExpertPackConfig.supports_kimi_k3_quantized_latent_projectionsunchanged, preserving ModelSlim latent-MoE quantization and the ExpertPack path added by Support deepseek v4 and kimi k3 on ssd #35314.kv_b_projand an explicitly split-GGUF configuration uses separate K/V tensors.Current head:
bca476e03b118b474192754705320c565658d7f6.Checkpoint inspection
The target checkpoints were inspected before the hardware run:
/home/weights/Kimi-K3-w4a8-int-moeself_attn.kv_b_proj.weighttensors.FLOAT.k_b_qweightorv_b_qweighttensors are present./home/weights/Kimi-K3-DSparkkv_bor split-GGUF tensors are present.This confirms that the failing checkpoint must retain the dense ModelSlim MLA path.
Four-node NPU validation
The PR production logic was validated on four Ascend nodes with 16 ranks per node (64 NPU ranks total). The hardware run used commit
f956e283e24b33d505bec0bb7173f646a4c9e9c7; the current head only applies Black's one-line formatting to the same helper, with no behavioral change.Configuration:
auto.--mem-fraction-static 0.75,--max-mamba-cache-size 240,--chunked-prefill-size 16384, and--max-running-requests 64.Startup and inference results:
Kimi-K3 MLA K projectionerrorsUsing ModelSlimW8A8Int8/healthGSM8K 200
Command shape:
Results:
The result is above the 96.5% 200-question baseline reported in #33465 and consistent with the approximately 98% result reported around #34715.
Compatibility with #35314
The fix keeps #35314's ExpertPack behavior intact:
The real
ExpertPackConfigstill hassupports_kimi_k3_quantized_latent_projections = Trueand now explicitly declaressupports_kimi_k3_split_gguf_kv_b = True.A direct final-head class-level check passed:
Kimi-K3 GGUF regression suite: 9/9 passed.
ExpertPack runtime suite: 10 passed; 1 CUDA-pinned-memory test skipped as expected on the NPU host.
The Support deepseek v4 and kimi k3 on ssd #35314 K/V checkpoint mapping, Q4_0/Q2_K post-load checks, forced MLA dispatch, ExpertPack loader/runtime, and CUDA MXFP4 kernels are unchanged by this PR.
The available Ascend hosts do not contain a Kimi-K3 GGUF/ExpertPack checkpoint. In addition, #35314's Kimi ExpertPack runtime is a single-GPU CUDA/RTX 5090 path, so its full E2E cannot run on this NPU cluster. The actual configuration-selection path and all hardware-independent #35314 regressions were exercised instead.
Other checks
test/registered/expert_pack/test_kimi_k3_gguf.py: 9/9 passed on the final head.test/registered/expert_pack/test_expert_pack_runtime.py: 10 passed, 1 skipped on the final head.python scripts/lint/check_registered_tests.py: passed.python scripts/lint/check_no_bare_pytest_main.py: passed.git diff --check: passed.The remaining required
pr-test-finishfailure is the repository gate rejecting a PR without the maintainer-controlledrun-cilabel; its log reportsMissing required label 'run-ci'. The manually executed four-node NPU validation above covers the originally failing hardware path.Validation artifacts
Artifacts are retained on the validation nodes under:
This directory contains the four rank logs, exact launch script, smoke request,
gsm8k200.logand status, the direct ExpertPack compatibility check, and both final regression logs/status files.Checklist
CI States
Latest PR Test (Base): ⏳ Run #33136037154
Latest PR Test (Extra): ❌ Run #33136037039
Latest PR Test (AMD ROCm 7.2): ❌ Run #33136037153