vLLM 官方博客(RSS) · 2026/10/16

Table of Contents Inside the Kimi K3 optimization effort: understandin

Table of Contents Inside the Kimi K3 optimization effort: understanding the bottlenecks and the decisions that made inference faster In this article AgentX: the workload and results Inside Kimi K3: experts, attention and recurrent state 1. Cache: keep conversa

Table of Contents Inside the Kimi K3 optimization effort: understanding the bottlenecks and the decisions that made inference faster In this article AgentX: the workload and results Inside Kimi K3: experts, attention and recurrent state 1. Cache: keep conversation state available for reuse 2. MoE: remove duplicate work across GPUs 3. Memory traffic: fuse operations and remove unnecessary copies 4. MLA: faster long-context decoding with AMD AITER assembly 5. KDA: parallelize prefill and speculative verification 6. Speculative decoding: choose how many tokens to draft What to optimize next Contributions and acknowledgments On AgentX, an eight-GPU AMD Instinct MI355X system serving Kimi K3 with vLLM delivers 24.4% more total tokens per second per GPU than NVIDIA HGX B300 at 50 tokens/s/user P90 interactivity. Under the benchmark’s ownership-cost model, it delivers 87.4% more tokens per dollar . In this post, we’ll unpack the engineering behind Kimi K3 on AMD Instinct MI355X, connecting vLLM’s serving decisions to GPU kernels and the hardware underneath. We’ll explain why the optimizations worked and build the intuition to spot wasted work, identify bottlenecks and find the next optimization in your own inference stack. Current Kimi K3 AgentX throughput and modeled tokens per dollar at 30, 50 and 150 tokens per second per user; AMD in black, NVIDIA in green. Interactivity is reciprocal P90 response inter-token latency and excludes time to first token. Total tokens include reused input and generated output. Source: SemiAnalysis InferenceX , October 9, 2026 snapshot. Comparison configurations . Published dense matrix peaks are 10.1 PFLOP/s MXFP4 for AMD Instinct MI355X and 13.5 PFLOP/s FP4 for NVIDIA B300. Both have 288 GB HBM3E and 8 TB/s peak memory bandwidth. Reaching this serving performance reflects sustained software engineering by AMD and collaborators across the vLLM community. AgentX: the workload and results The public AgentX benchmark replays real coding-agent session traces with synthetic tokens, retaining request lengths, timing and prefix-sharing patterns. The workload offers over 96% theoretical prefix reuse with unlimited cache. Speculative runs use a fixed synthetic acceptance reference. At 50 tokens/s/user P90 interactivity , AMD Instinct MI355X serves approximately 7,567 total tokens/s/GPU , compared with 6,083 for NVIDIA HGX B300 , a 24.4% throughput advantage . Using SemiAnalysis’s modeled TCO of $1.50 versus $2.26 per GPU-hour , respectively, that translates to 18.16 million versus 9.69 million total tokens per dollar of TCO: 87.4% more tokens per dollar . SemiAnalysis InferenceX Kimi K3 total tokens per modeled dollar versus P90 interactivity, with an added annotation comparing AMD Instinct MI355X and NVIDIA HGX B300 at 50 tokens per second per user. SemiAnalysis InferenceX public curves, with the 50 tokens/s/user target annotated. Benchmark notes . The public curves compare complete serving stacks. The measurements beside each optimization come from separate tests and explain individual mechanisms under their stated configurations. Inside Kimi K3: experts, attention and recurrent state A returning agent turn can reuse most of its prefix, but processing a short continuation still touches three kinds of data. Kimi K3 uses two kinds of attention. Its 24 MLA layers retain a compressed KV history that grows with the conversation. A new query still consults that history. Its 69 KDA layers instead carry forward state matrices with fixed dimensions, updating them as new tokens arrive. Model configuration . In MoE layers, a router selects expert networks to transform each token. Their weights are shared across requests. Kimi K3 request flow: recover compatible saved state, process the new suffix through MLA or KDA attention and routed experts, then decode or verify new positions. MLA retains more history as the conversation grows. KDA updates a fixed-dimension state; retaining earlier checkpoints means keeping additional copies of that state. Across turns: cache reuse and offload (Section 1). Within a model step: expert projections, kernel handoffs, and MLA/KDA scheduling (Sections 2–5). Choosing draft depth: committed output versus complete cycle cost (Section 6). 1. Cache: keep conversation state available for reuse DCP reduces duplicate history in GPU memory; CPU offload preserves reusable state outside it. DCP: share the history across GPUs Under TP8, each GPU handles 12 of Kimi K3’s 96 MLA query heads but stores the entire compressed KV history. Tensor parallelism divides the heads without dividing the cache. With eight-way decode context parallelism (DCP8) , each GPU stores one eighth of the cached positions. During decode, the GPUs exchange queries, compute against their local history and merge their partial answers. TP replicates the complete MLA history on each GPU. DCP exchanges query heads, divides cached positions between GPUs, then merges their partial answers using softmax weights. Two GPUs illustrate the same partition used by TP8/DCP8. This extra division applies to MLA history; KDA state keeps its existing partition across heads. Each partial answer carries normalization information so the merge can weight shards correctly. #51705 extends the ROCm AITER DCP path to multi-token verification. For a 142,000-token conversation, the estimated MLA payload is 24 layers × 142,000 positions × 576 FP8 bytes ≈ 1.96 GB per GPU. DCP8 reduces this to about 245 MB, before allocation overhead. Each GPU processes eight times as many heads against one eighth of the history, leaving the leading attention arithmetic roughly unchanged. CPU offload: keep state that no longer fits in HBM When state no longer fits in GPU memory, the AMD recipe ’s native vLLM CPU offload preserves MLA history and KDA checkpoints in host DRAM. A cache hit needs matching resume points. If MLA history reaches token 3,072 but the latest compatible KDA checkpoint is at 2,048, the request must resume at 2,048 and recompute the remaining prefix. MLA history reaches token 3,072, but the latest compatible KDA checkpoint is at 2,048. The request must resume at 2,048 and recompute the remaining 1,024 prefix positions. A usable resume point needs compatible state across all required layers. Positions are illustrative. Saving the attention-block tail alongside the KDA checkpoint aligns their resume positions ( #54736 ). Restoring that state trades a transfer back to the GPU for avoided prefix recomputation. Once a request resumes, its new tokens can still make several GPUs repeat the same calculation. 2. MoE: remove duplicate work across GPUs On one GPU, the routed-expert output projection returns the complete vector its consumer expects. In the original ROCm path, an earlier reduction and normalization gave all eight GPUs the same latent input, and each held the full weights. The same projection therefore ran eight times. The output coordinates can be divided among GPUs, but every rank still needs the complete result. Kimi K3 already has an all-reduce for its shared-expert partials. Each GPU adds only the routed outputs it owns to its shared-expert partial. The existing all-reduce assembles the complete result, with no new collective ( #51253 ). The ROCm implementation builds on the corresponding CUDA strategy. Before: each GPU repeats the full routed projection. After: output coordinates are divided among GPUs and added before the existing shared-expert all-reduce. Both paths give every GPU the same full output. Two GPUs illustrate output-coordinate ownership. Both paths use one existing all-reduce and return the same full result to every GPU. Each output coordinate receives its routed contribution exactly once. The full projection weights remain replicated. Output throughput rose 3.05–4.91% in the PR’s test on eight AMD Instinct MI355X GPUs at TP8, across concurrency 8–128 with random 8K-input/1K-output requests and prefix caching disabled. Free up GPU memory to keep more cached state Each rank now computes only its assigned projection coordinates while retaining the full weights. Loading only the rows each rank uses frees about 3.85 GiB per GPU across 92 MoE layers at TP8 ( #59591 ). The fused path’s calculation stays the same; the extra space can hold MLA history and KDA checkpoints. This change landed after the image used for the headline public result. Its separate AgentX experiment found less than 1% higher throughput at concurrency 32 and 48, but 28.9% at 70 , where the reported prefix-cache hit rate rose from 74.8% to 80.1%. PR 59591: throughput gains and prefix-cache hit rates at concurrency 32, 48, 64 and 70. Gains increase with load in these separate measurements. Separate #59591 measurements : eight AMD Instinct MI355X GPUs, TP8/DCP8, FP8 KV, 30-minute runs, no CPU offload or speculative decoding. Points show the reported runs; repeated-run uncertainty was not reported. The larger gain at high concurrency is consistent with cache pressure. Com

FDE 判断

这条信息对 FDE 的直接价值在于提醒交付人员持续关注模型、智能体与企业流程之间的变化。面对类似项目,应先确认客户的真实业务目标、数据边界、权限条件和验收指标,再选择工具并用最小场景验证结果,避免只追逐功能更新。