Views
No views yet
moonshotai/Kimi-K3.recipe/ additionally contains everything needed to upgrade this checkpoint locally into the
FP8-attention + FP8-shared-expert build we benchmarked (that build is ~1.6 TB and does not
fit this account's storage quota, so it ships as a reproducible recipe rather than weights).recipe/vllm-0.28.0-situ-scale-fix.patch.
The subtlety: the loader composes that scale in three places, and the third — a post-load
recompute — silently overwrites the earlier fixes, which is why partial patches look like they
"don't take". Upstream PR #53132 (main since 2026-08-21) ships in v0.28.1.--kernel-config '{"moe_backend":"marlin"}'
and accept dequant-class speed.1vllm serve Weyaxi/Kimi-K3-NVFP4-W4A4 \
2 --served-model-name kimi-k3-w4a4 --tokenizer moonshotai/Kimi-K3 \
3 --trust-remote-code --limit-mm-per-prompt '{"image":0,"video":0}' \
4 --tensor-parallel-size 8 --gpu-memory-utilization 0.92 \
5 --max-model-len 1048576 --kv-cache-dtype fp8 \
6 --attention-config '{"use_prefill_query_quantization":true,"mla_prefill_backend":"flashinfer"}' \
7 --enable-prefix-caching --enable-auto-tool-choice \
8 --tool-call-parser kimi_k3 --reasoning-parser kimi_k3 \
9 --kernel-config '{"moe_backend":"flashinfer_trtllm"}' --enable-expert-parallel \
10 --speculative-config '{"model":"Inferact/Kimi-K3-DSpark","method":"dspark","num_speculative_tokens":7,"attention_backend":"FLASHINFER_MLA","draft_sample_method":"probabilistic","rejection_sample_method":"block"}' \
11 --max-num-batched-tokens 8192 --max-num-seqs 512recipe/scripts/ does it in place:| step | script | what it does |
|---|---|---|
| 1 | attn_fp8_inplace.py | FP8 W8A8-dynamic channel quant of 579 attention tensors, (out,1) scales |
| 2 | se_fp8_inplace.py | same for 279 shared-expert + dense-layer-0 tensors |
| 3 | build_rung2_config.py, build_se_config.py | rebuild quantization_config groups + ignore list |
| — | config.fp8attn-fp8se.json | the resulting config, for reference |
| — | fetch_*, splice_* | HTTP range-fetch / atomic in-place shard rewrite helpers |
kv_b_proj and o_proj (117 tensors) receive already-FP8
activations (FP8 KV cache + prefill query quantization). No generic kernel accepts FP8 inputs
there, so they must stay BF16 — they are in the ignore list.| workload | quant vs native |
|---|---|
| Per-stream pacing (TPOT) at heavy saturation, c=128 | 1.05–1.13× (ours) |
| Real text, ShareGPT c=128 | 0.95–1.01× agg, TPOT 1.08× ours |
| Standard aggregate throughput | 0.89–0.97× (native) |
| Batched decode c=64–128, n=8 sampling | 0.70–0.85× (native) |
| Cache-heavy agentic / RAG | 0.87× / 0.97×, cached TTFT ~1.5× (native) |
| Rate-paced 3–7 req/s | native at every rate |
| KV pool | −8.7% (native) |