vLLM、Kimi K3 の Day-0 サポートを開始し効率的な推論を実現
vLLM は Moonshot AI が公開した高性能オープンウェイトモデル「Kimi K3」の Day-0 サポートを正式に提供開始し、複雑なアーキテクチャへの最適化と実用的なデプロイ手順を公開した。
AI深層分析を開く2026年7月28日 01:06
AI深層分析
キーポイント
Kimi K3 の Day-0 vLLM サポート開始
Moonshot AI が Kimi K3 の重みを一般公開したことに伴い、vLLM は当日の即時サポートを開始し、開発者がすぐに利用可能な状態を整えた。
複雑なアーキテクチャへの技術的対応
KDA や MXFP4 MoE、KV キャッシュ管理など Kimi K3 の独自アーキテクチャを vLLM エンジン上で動作させるためのカーネル最適化とキャッシュ戦略が実装された。
実用的なデプロイ構成の提供
8 枚の NVIDIA B300 または AMD MI355X GPU を使用した具体的な起動コマンドと、DSpark speculator の活用方法が公式に公開された。
重要な引用
We're thrilled to announce efficient day-0 vLLM support for Kimi K3, one of the most powerful open-weight models ever released.
The most exciting challenge Kimi K3 brings is making KDA, MXFP4 MoE, KV cache management, prefill/decode disaggregation, speculative decoding, and long-context deployment recipes work together in a runnable serving engine.
編集コメントを表示
編集コメント
Kimi K3 のような高度なアーキテクチャを vLLM で即日サポートするのは、オープンソースコミュニティの成熟度を示す象徴的な事例である。開発者はこのリリースを契機に、大規模モデルの実用化に向けた具体的な検証を加速させることができる。
Kimi K3 の vLLM への Day-0 サポートが開始されました。これは過去に公開されたオープンウェイトモデルの中でも特に強力なモデルの一つです。
先週、Kimi K3 の本番環境向け統合作業をプレビューしましたが、今日 Moonshot AI が重み(weights)を公開し、サポートも正式に稼働しました。
imageKimi K3 の vLLM への Day-0 サポート
Kimi K3 は、Kimi Delta Attention(KDA)と Attention Residuals(AttnRes)を基盤とした、2.8 トリリンパラメータの MoE モデルです。トークンごとに 16 の専門家(エクスパート)が 896 から選択され、100 万トークンのコンテキストウィンドウとネイティブなビジョン機能を備えています。私たちが最も興奮しているのは、KDA、MXFP4 MoE、KV キャッシュ管理、prefill/decode の非同期化、スペキュレーティブ・デコーディング、そして長文コンテキストの展開レシピを、実行可能なサービングエンジンとして統合する課題です。
プレビュー記事ではカーネルとキャッシュアーキテクチャについて解説し、特に再帰状態におけるプリフィックスキャッシングの難しさを取り上げました。今回のリリース記事は実践的なガイドとなり、vLLM が Kimi K3 のアーキテクチャにどう適応したか、数値の背後にあるカーネル処理、そして Day-0 で何が可能になっているかを解説します。
クイックスタート
正確な Docker コマンドは、リンク先のレシピをご覧ください。
vllm serve moonshotai/Kimi-K3 \
--tensor-parallel-size 8 \
--trust-remote-code \
--load-format fastsafetensors \
--enable-prefix-caching \
--enable-auto-tool-choice \
--tool-call-parser kimi_k3 \
--reasoning-parser kimi_k3
Kimi K3 を実行する最も簡単な方法は、上記のコマンドを使用して NVIDIA B300 GPU または AMD MI355X GPU を 8 基用意することです。
Inferact はまた、Kimi K3 用の DSpark speculator をトレーニングしオープンソース化しました。serve コマンドに以下のオプションを追加することで有効化できます:
--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"}'
Docker イメージやデプロイ戦略など、詳細については レシピ をご参照ください。依存関係が複雑なため、現在は Docker イメージのみを利用可能です。この Docker イメージには、FlashInfer などいくつかのプレリリース版の依存パッケージが含まれています。
TL;DR
- 2.8 トリオンパラメータを持つマルチモーダル MoE:Kimi K3 はトークンごとに 896 の専門家から 16 を活性化し、最大 100 万トークンのコンテキストウィンドウをサポートします。また、Kimi Delta Attention、Attention Residuals、LatentMoE、ネイティブ MXFP4(4 ビット)重みに基づいて構築されています。
vLLM は Kimi K3 のアーキテクチャに特化した広範な最適化により、16 枚の NVIDIA GB300 NVL72 GPU を用いて、推測デコーディングなしでユーザーあたり 118 トークン/秒、DSpark を活用すれば 370 トークン/秒(3.14 倍の向上)という高速なサービスを実現しています。
vLLM は、推測デコーディング、プリフェッチとデコードの分離、Mooncake を用いたエージェント向け KV キャッシュ、ツール呼び出し、推論出力、構造化出力といった生産環境で必要な機能を幅広くサポートします。また、リリース時点ですでに NVIDIA(Hopper および Blackwell)および AMD(MI355X)への対応も完了しています。
vLLM は、Kimi K3 向けに vLLM と TorchSpec でトレーニングされ、Inferact によってオープンソース化された最先端のブロック拡散型推測デコーディングアルゴリズム「DSpark」もサポートしています。
Kimi K3 の再帰的かつフルアテンションな設計に対応するため、vLLM は再帰的な KDA 状態を基盤としたハイブリッドプレフィックスキャッシュの仕組みを再設計しました。この変更は、同様のハイブリッド線形モデルを採用するすべてのモデルで恩恵を受けるようになります。
Kimi K3 のアーキテクチャと vLLM によるサービング
imageKimi K3 アーキテクチャの革新点
*Kimi K3 アーキテクチャの革新点は、オリジナルのリリースブログ記事で詳しく紹介されています。
Kimi K3 のアーキテクチャは標準的な Transformer とは異なる点があり、それぞれがサービングエンジンに求められる処理内容を変えています。内部構造の詳細については プレビュー記事 で解説していますが、ここでは新機能の概要を振り返りつつ、vLLM がどのように対応してサービングを実現しているかに焦点を当てます。
Kimi Delta Attention: 再帰型と完全注意機構を融合したハイブリッドスタック
新機能: Kimi K3 のレイヤーの大部分は KDA(Kimi Delta Attention)で構成されています。これは、成長する KV キャッシュではなく固定サイズの再帰状態を保持する線形注意機構です。これに、正確なグローバルな記憶保持を実現するための周期的な完全注意層が交互に配置されています。このアーキテクチャこそが、100 万トークンという膨大なコンテキストを現実的なコストで実現する鍵となっています。
vLLM での推論: vLLM は単一のハイブリッド KV キャッシュマネージャーを採用し、一つのスケジューラーの下で二種類のメモリを並列管理します。完全注意層にはページ化された KV ブロックを使用し、KDA 層にはコンパクトな再帰状態ブロックを使用します。prefill(初期処理)では FlashKDA が、decode(生成処理)では融合された CUDA カーネル(または推測デコーディング実行時には Flash-Linear-Attention/Triton パス)が専用バックエンドとして動作します。
最も難易度が高いのは、Kimi K3 のハイブリッドキャッシュにおけるプレフィックスキャッシングの実装です。完全注意層はトークンごとの KV を保存する一方、KDA 層はすべてのトークンで再帰状態と畳み込み状態を更新しますが、ありとあらゆるプレフィックス境界でスナップショットを保持することはコスト的に不可能です。vLLM は、大規模な物理的な KDA 状態ブロックと微細なプレフィックスマッチングの処理を分離しました。これにより、ブロック内部に状態のスナップショットを登録し、拡張前にコピーを行うことで、長い共有プロンプトでも KDA の状態とページ化された KV の両方を再利用可能にしています。このハイブリッドキャッシュ機構は vLLM コアで新たに実装され [1]、Kimi K3 に類似したすべてのハイブリッドモデルの性能向上に貢献しています。
[1]: https://vllm.ai/blog/2026-07-22-kimi-k3-preview
imageKimi K3 のハイブリッド KDA とフルアテンションキャッシュ
*Kimi K3 は、Kimi Delta Attention レイヤーと周期的なフルアテンションレイヤーを交互に配置しています。vLLM のハイブリッドキャッシュは、再帰状態とページ化された KV キャッシュを統合して管理します。
アテンション残差:深さ方向の残差寄与の学習済みミキシング*
新機能: 各トークンに対して、Block AttnRes は通常の残差加算に代わり、深さ方向のアテンションを採用します。すべての Transformer サブレイヤーは、学習済みの疑似クエリを使用して、先行するレイヤブロックからの RMS 正規化された残差状態に重みを付けます。その後、対応する加重結合体をその入力として受け取ります。
vLLM の実装: vLLM は最適化された Triton および CUDA カーネルを用いて、深さ方向のアテンションロジットの計算、ソフトマックス処理、および隠れ状態の集約を単一の融合演算で実行します。残差更新と出力 RMSNorm も、サポートされる環境では同一カーネルに折り込まれており、プリフェッチ(prefill)とデコード(decode)の両方で中間メモリアクセスやカーネル起動のオーバーヘッドを削減しています。
安定した LatentMoE:16-of-896 のスパース性を持つ量子化バランス型潜在空間エキスパート
新機能概要 NVIDIA が発表した LatentMoE は、ルーティングされたトークン活性化を狭い潜在次元に射影して専門家計算を行い、その結果をモデル幅に戻すことで、専門家の重み帯域幅と全対全通信量を削減します。これにより、推論コストをほぼ同じに保ちつつ、より多くの専門家を活用できるようになります。
Kimi K3 はこの設計を拡張し、896 個の専門家を備え、トークンあたり 16 個をアクティブに使用します。また、ヒューリスティックなバランス更新ではなく、Quantile Balancing を用いてルータースコアの量子化から専門家割り当てを導出しています。
vLLM での実装方法: 専門家は専門家並列性でシャードされます。vLLM は異なるトポロジー向けに最適化された 2 つの MoE バックエンドを提供します。Tensor Parallelism (TP > 1) には TRT-LLM-Gen を、非集約型または専門家並列 (DEP) には MegaMoE を使用します。さらに、各ランクが同程度の計算量を持つようにするオプションの Expert-Parallel Load Balancing (EPLB) もサポートしています。重みは MoE パス上で MXFP4 でネイティブに実行されます。
チャットテンプレート:Jinja テンプレートではなくレンダリングプログラム
何が変わったか: Kimi K3 のチャットテンプレートでは、システム・ユーザー・アシスタントのメッセージやマルチモーダルコンテンツ、ツール定義、そしてツールの結果を、厳密に制御トークンを使ってエンコードする必要があります。一般的な Jinja チャットテンプレートのようにリクエストをテキストとしてレンダリングしてからトークン化するのではなく、Kimi K3 は Python プログラムを用いてプロンプトのトークンシーケンスを直接構築します。また、生成される出力にも推論領域、回答テキスト、ツール呼び出しが明確に区切られており、これらを API 応答としてパースする必要があります。
vLLM でのサービング: vLLM は Python と Rust のフロントエンドにおいて、入力レンダラーとストリーミング出力パーサーの両方を実装しています。これにより制御トークンの境界を維持しつつ、ユーザーやツールが提供するテキストは通常のコンテンツとして扱います。ツール呼び出しや構造化された出力については、vLLM が Kimi K3 の形式を XGrammar と統合しており、デコード時に構造化領域を制約することで、推論・コンテンツ・ツール呼び出しの 3 つのフィールドとして分離して返却します。
本番環境向けに設計
2.8T のハイブリッド MoE モデルを効果的にサービングするには、各ユーザーに対して高速であり、多数の並行セッションで効率的であり、エージェント利用にもスケーラブルである必要があります。vLLM は Kimi K3 をこれら 3 つの要件すべてに対応させるために設計されています。
超低遅延:DSpark を活用した推測デコーディング
Kimi K3 のような 2.8T パラメータモデルで精度を損なわずに超低遅延を実現するには、スペキュレーティブ・ディコーディング(推測デコーディング)が最適な選択肢です。そこで vLLM は、最先端のスペキュレーティブ・ディコーディングアルゴリズムである DSpark をリリース初日からサポートしています。また、Kimi K3 専用の DSpark speculator も訓練して公開しました。
このドラフトモデルは vLLM と TorchSpec を用いて訓練されており、推論時と学習時の数値結果が完全に一致するように設計されています。
DSpark はブロック拡散バックボーンを採用し、Kimi K3 の豊富な中間状態に基づいて一度の並列パスで複数のスペキュレーティブトークンを生成します。これにより、ブロックが深くなってもドラフトのコストは一定に保たれます。低ランクマルコフヘッドがブロック内の依存関係を担い、信頼度ヘッドが各ドラフトが受け入れられる確率を予測します。
ドラフトモデルも MLA(Multi-Head Latent Attention)ネイティブとして設計され、Kimi K3 自身のアテンション構造を模倣しています。これにより、ドラフトとターゲットの KV 配置が類似し、高度な KV マネジメントや P/D 非同期構成との互換性が最大化されています。
imageKimi K3 DSpark の位置別受け入れ率
*各種データセットにおける Kimi K3 DSpark の位置別受け入れ率。*
DSpark を用いることで、SPEED Bench による測定結果、単一ユーザーリクエストにおける処理速度が 118 tok/s から 370 tok/s に向上し、約 3.14 倍の高速化を実現しました。また、さまざまなタスクでの採択率と加速効果もベンチマークしており、その結果を上記に示します。
コーディングや低エントロピーなタスクでは、1 ステップあたり平均 4.73 トークンが採択されます。一方、クリエイティブライティングのような高エントロピーなタスクでも、1 ステップあたり約 2.61 トークンの採択を達成しています。
vLLM における DSpark を用いた信頼度ベースのスケジューリングは現在も継続的に開発が進められています。この機能を有効にすると、DSpark モデルに含まれる信頼度ヘッドを活用し、各ドラフトトークンが採択される確率を予測します。これにより、有力な提案を優先し、採択されにくい弱Proposal を切り捨てて検証コストを削減し、生存しないトークンへの無駄な処理を防ぎます。
今回のリリース時点で、draft モデル と推論サポートの両方がオープンソース化されています。有効化方法は以下のデプロイガイドをご覧ください。
imageKimi K3 向けの DSpark ドラフト・検証フロー
*軽量な DSpark ドラフトが候補トークンを提案し、Kimi K3 がそれを単一の並列パスで検証することで、シングルストリームデコードを加速します。
TEP prefill のためのシーケンシャル並列処理
imageTEP 事前計算におけるシーケンス並列化
*シーケンス並列化はトークンの所有権を各ランクに分割します。アテンションの残差項は各シャードに対して個別に適用され、次の層への QKV 投影の前に 1 回のオールギャザーでバッチ全体が再構築されます。
事前計算フェーズでは、アテンションのテンソル並列化と MoE エキスパート並列化(TEP)を組み合わせます。純粋な TP と比較して TEP は通信オーバーヘッドを削減し、各ランクに完全なエキスパートを保持することで、より効率的なエキスパート GEMM 形状を実現します。
しかし、単純な TEP 実装では層ごとに 2 回のオールリデュース操作(アテンション出力投影後と MoE の後にそれぞれ 1 回)が発生するため、すべてのランクでバッチ全体が展開され、アテンションの残差項が冗長に全バッチに対して適用されてしまいます。これを解決するために シーケンス並列化 を実装しました。o_proj 後のオールリデュースをリデューズスキャターに置き換え、各ランクがトークンのシャードを所有するようにします。アテンションの残差項はシャード単位で適用され、MoE の all-to-all でディスパッチとコンバインを行い、次の層への QKV 投影の前に 1 回のオールギャザーでバッチ全体を復元します。
この設計には 2 つの重要な利点があります。
通信オーバーヘッドの削減:Reduce-scatter、all-to-all dispatch、all-to-all combine、all-gather の組み合わせは、理論的には 2 つの all-reduce よりも軽量です。しかし実際には、NCCL の reduce-scatter や all-gather は prefill(初期化フェーズ)のメッセージサイズに最適化されておらず、速度向上は見込めません。そこで私たちは、NCCL を上回る 1.7 倍〜4.5 倍の高速化を実現するカスタムカーネルを実装しました。特に小〜中規模のメッセージサイズにおいてその効果が発揮されます。
シャードされたアテンション残差:アテンションの残差は層全体を通じて各ランクにシャードされたまま維持され、各ランクはバッチ全体ではなく自らのトークン断片のみを計算・管理します。これは特に Kimi K3 において重要です。同モデルでは AttnRes が残差ストリームを永続的な層間状態へと変換し、独自の計算とメモリ負荷を生み出しているためです。
シーケンス並列化は適切な状況でデフォルトで有効になります。具体的には、MegaMoE カーネルを使用する TP(Tensor Parallelism)や、TP + DP(Data Parallelism)+ EP(Expert Parallelism)を組み合わせる場合などです。追加の設定フラグは不要です。
大規模推論:prefill/decode の分離
スループット重視の環境では、vLLM は Kimi K3 をノード間でエキスパート並列化とデータ並列化で実行し、prefill(初期化)と decode(生成)を別々のレプリカで処理する「PD 分離」を採用しています。これにより、各フェーズに特化した最適なリソース配分が可能になります。検証済みのトポロジーの一つでは、TEP8 の prefill を DEP16 の decode に割り当て、KV キャッシュの転送には NIXL エンジンを利用します。
ハイブリッドモデルにおける PD 分離(Prefill/Decode Disaggregation)は非常にシビアな要件を課します。再帰的な KDA 状態、フルアテンションのページ化 KV キャッシュ、そしてブロックテーブルがすべて正しく同期されなければなりません。NIXL コネクタは共有される KV キャッシュページを、トークンレベルの MLA キャッシュとリクエストレベルの KDA 状態(畳み込みおよび再帰的状態を含む)という 2 つの論理ビューとして扱います。ハンドシェイク時には MLA/KDA のメタデータを交換し、それぞれの転送に対して個別の転送記述子を構築します。
TP(Tensor Parallelism)が不均一な環境では、vLLM のハイブリッドアロケータはプリフィルとデコードで異なるブロックサイズを使用します。このケースに対応するため、vLLM の NIXL コネクタは論理ブロックから物理ブロックへのマッピングを追跡し、転送されなかった末尾領域をゼロ埋めします。これにより、パディングやレイアウトの隙間を通じて以前の要求からの古いデータが漏洩するのを防ぎます。
imageKimi K3 におけるプリフィル・デコード分離
*プリフィル(TEP8、8 GPU、GPU あたり約 350B パラメータ)は、KV と KDA 状態、ブロックテーブルを NIXL を介して独立したデコード層(DEP16、16 GPU、GPU あたり約 175B パラメータ)へ渡します。
imageプリフィル・デコード分離フロー
部分的なブロックキャッシュヒットと KV キャッシュオフロードの統合
Kimi K3 のプレビュー記事で説明した通り、vLLM は物理キャッシュブロックの内部で終わる細かい粒度のプリフィックスヒットをサポートしています。これにより KV オフロードに微妙な課題が生じます。具体的には、vLLM がまずローカル GPU で部分的なテールを持つヒットを検出し、その後 Mooncake などの外部ストレージからより長いプリフィックスを発見する可能性があります。
フルブロックのヒットであれば、リモートでの再利用はローカルのプリフィックスを超えてきれいに拡張されます。しかし、部分的なテールの場合はリモートの結果と重なる可能性があります。
そのため vLLM のスケジューラーは、両方の階層から得られる正確な再利用可能なトークン長を比較し、より長いプリフィックスを選択します。もしリモートヒットが勝利した場合、短いローカルテールのために予約されていたブロックを解放し、すべてのキャッシュグループを新しいプリフィックス長に整合させます。
重要なのは、この仕組みを既存の KV Connector APIs だけで構築した点です。これらの API は必要なセマンティクスをすでに提供しています。これにより、MooncakeStoreConnector や SimpleCPUOffloadConnector など他のコネクタも、モデル固有の統合パスなしでマルチティア部分プリフィックスの再利用をサポートできるようになります。
この設計は RFC で追跡されており、PR #45939、PR #46384、PR #49502 で実装されています。
エージェント型推論:より賢いキャッシュ保持ポリシー
Kimi K3 の線形アテンション層は、定数サイズの KDA 状態のみを必要とするため、長いコンテキスト長においてもメモリ効率が優れています。単一の層における KDA 状態のサイズは、数千トークン分の MLA キャッシュとほぼ同等ですが、従来の KV キャッシュとは異なり、この状態はシーケンス長の増加に伴って拡大しません。この違いが、数十万から 100 万トークンにわたるエージェントワークロードにおいて決定的な意味を持ちます。
同じ設計思想は、プレフィックスキャッシングの複雑さにもつながっています。KDA 状態はデコーディング中にインプレイスで更新されるため、vLLM は次のフォワードパスが上書きする前に、選択されたプレフィックス境界点で状態をコピーする必要があります。すべてのトークン位置でキャッシュを行うのはコストが高すぎて現実的ではありません。各 KDA チェックポイントは、1 トークンの MLA キャッシュよりもはるかに大きく、分散キャッシュプールですぐに枯渇してしまうからです。
有用なプレフィックスを維持しつつキャッシュスペースの効率を高めるため、vLLM は 2 つの補完的な保持ポリシーをサポートしています。
インターバルベースの保持
すべての KDA 状態をキャッシュするのは無駄ですが、キャッシュする間隔が広すぎると、次のリクエストで大きなサフィックスを再計算する必要が生じます。インターバルベースの保持は、特定の位置をチェックポイントとして扱うことでこれらのコストをバランスさせます。例えば、32K トークンごとに 1 つのチェックポイントを設けるような方式です。
プロンプト境界点は、さらに優れたチェックポイントとなります。エージェントワークロードでは、次のターンが通常、前回のターンのプロンプトを再生することから始まるため、そのプロンプト終了時点の状態が再利用される可能性が特に高いのです。vLLM はこれらの境界点を自動的に検出し、保持します。
ユーザーは VLLM_PREFIX_CACHE_RETENTION_INTERVAL を設定することで、定期的なチェックポイントの作成を制御できます。この値を 0 に設定すると、定期的なチェックポイントは無効化され、プロンプト終了時の状態のみが保持されます。これは多対話(マルチターン)会話が中心となるワークロードに特に適しています。一方、間隔を大きく設定すると、再計算が増える代わりにキャッシュ使用量を削減できます。
この間隔ベースの保持機能は、DeepSeek V4 およびハイブリッド・スライディングウィンドウアテンションモデル向けに PR #43447 で導入されました。その後、PR #45845 において、Kimi K3 やハイブリッド・リニアアテンションモデルへの Day-0 サポートが追加されています。

間隔ベースの KDA キャッシュ保持
*間隔ベースのキャッシュ保持では、MLA はすべてのブロックに対して KV をキャッシュしますが、KDA 状態はチェックポイント時のみ保持されます。プロンプト終了時(緑色)の状態は常に保持され、固定間隔でのチェックポイント(オレンジ色)は設定可能です。
Marconi スタイルの選択的保持
プロンプト終了時の保持は会話状態には有効ですが、貴重な共有プレフィックスがそれ以外の場所にも出現する可能性があります。システムプロンプトやリポジトリのスナップショット、ツール仕様などは、プロンプト境界と一致しなくても、多数のリクエストで再利用されることがあります。
Marconi 方式の保持(MLSys '26)は、シンプルなルールでこれらのケースを処理します。つまり、2 回目のヒット時にキャッシュに保存するのです。最初の観測でプレフィックスが存在することが確認され、2 回目でそれが実際に共有されていることが示されます。その時初めて、vLLM は KDA 状態のキャッシュ容量を使用します。
これにより、保持は需要に応じた判断へと変わります。一度きりのプレフィックスがキャッシュを圧迫することはなく、繰り返し現れるプレフィックスは自動的に優先度が高まります。ユーザーがワークロードのどの部分がホットになるかを予測する必要はありません。
選択的保持は PR #37898 で導入され、Day-0 の Kimi K3 サポートは PR #47782 で追加されました。
image選択的な KDA キャッシュ保持
*選択的キャッシュ保持。リクエスト 1 は共有プレフィックスを超えた自身のプロンプト末尾でのみ KDA 状態を保持するため、リクエスト 2 は KV ヒットを得ますが KDA ミスになります。この 2 回目の観測がプレフィックスの共有を示す証拠となるため、プレフィックス境界に状態がキャッシュされ、リクエスト 3 がそれを再利用します。
これらのポリシーは、予測可能な再利用と突発的な再利用の両方をカバーしています。間隔保持は構造的に重要な境界を記録し、Marconi 方式の保持は他のどのプレフィックスを維持する価値があるかを学習します。
パフォーマンス最適化
Kimi K3 などの大規模モデルを推論サービスする際は、その巨大なサイズゆえに特有の課題が生じます。このモデル全体は単一の NVIDIA DGX B300 に収まるか微妙なラインであり、同世代のハードウェア上で運用するには最低でも 16 枚の NVIDIA B200 または GB200 GPU を必要とします。
推論サービスでは、対話性とシステム全体の処理能力(スループット)の間でトレードオフを迫られます。テンソル並列化は応答速度に寄与しますが、有効な KV キャッシュのサイズが制限されるため全体のスループットは低くなります。一方、大規模なエキスパート並列化を採用すると、ネットワーク帯域幅のボトルネックにより、ユーザーあたりのトークン生成速度が低下する可能性があります。
ここでは、両方のケースでパフォーマンスを向上させる最適化手法を紹介します。これにより、ワークロードに応じて最適な構成を選択できます。これらの最適化の多くは、すでに当社のプレビューブログ preview blog で取り上げられています。
Attention Residuals
Kimi K3 では、Block AttnRes を採用し、最大 8 つのキャッシュされたブロック表現と現在のブロック内残差を同時に参照します。各トークンについて、vLLM は RMS 正規化されたソースからロジットを計算し、これらの深さ方向の候補全体でソフトマックスを適用して、それらの表現を集約します。
実装は FlashAttention のオンライン・ソフトマックス戦略に似ていますが、シーケンス位置ではなくモデルの深さ方向で動作し、参照するソースは最大 9 つまでです。vLLM はこの混合処理を単一の融合カーネルで行い、入力側で残差更新を組み込みつつ、必要に応じて出力に対して RMSNorm を適用します。
汎用的なパスには移植可能な Triton 実装が用いられ、Blackwell 構成のサポート対象については専用 CUDA カーネルによって高速化されます。
KDA decode
image融合された KDA デコードカーネル
*融合された KDA デコードカーネルは、因果畳み込み、再帰的更新、RMSNorm を個別のカーネル連鎖として実行するのではなく、単一の起動で統合します。*
KDA レイヤーには、入力投影、因果 1D コンボリューション、QK ノルム、ゲート計算、KDA 再帰的更新、出力ゲート付き RMSNorm など、多くの処理が含まれます。対応する設定では、vLLM はポストプロジェクションのデコードパス(因果コンボリューションからゲート付き RMSNorm まで)を単一の専用 CUDA カーネルに統合します。このカーネルは、コンボリューション状態と再帰的状態をその場で更新し、正規化された出力を直接書き出します。これにより、中間テンソルの生成や状態データの繰り返し転送、Kimi K3 の多数の KDA レイヤー間で生じる各操作ごとの起動オーバーヘッドを回避できます。対応していない設定については、移植可能な Triton のフォールバックパスが用意されています。
KDA prefill
KDA のプリフェッチ処理は、オープンソース開発が現場でどのように機能するかを示す私たちの好きな事例の一つとなりました。Moonshot AI が最初に公開した FlashKDA は、高性能な CUTLASS 実装を備えた KDA です。私たちはこれをすぐに vLLM に統合し、派手さはないものの重要な生産環境の課題に取り組んでいました。具体的には、より広範な GPU カバー範囲、メタデータのデータ型、テンソルレイアウト、そして信頼性の高いベンディングです。
その後、Shikhar Mishra が H100 向けにカーネルを最適化し、Flash-Flash-KDA を公開しました。これによりデータ転送が改善されつつも、数値の正確性は保たれています。わずか一日で、私たちは GB300 NVL72 上でこれらの改善を検証し、再帰パイプラインと同期処理を洗練させました。そしてそれらを FlashKDA の統合に組み込みました。
これは片方向の手渡しではなく、オープンなカーネルがサービングコミュニティによって拡張され、独立した貢献者によって改良され、すぐに本番環境へ持ち込まれるという継続的なループでした。
KDA メタデータビルダー
imageNsight Systems による KDA メタデータ準備最適化前後のトレーシング
Kimi K3 の DSpark 導入時に、KDA メタデータの準備が大きなオーバーヘッドの原因となっていました。当初は汎用的な GDN メタデータビルダーを流用しており、K3 が不要とする FLA メタデータを準備したり、GPU メタデータを組み立ててステージングするために小さな eager な PyTorch 演算の連鎖を使用していました。そこで、不要なパスを剪定し、それらの演算シーケンスを融合された Triton カーネルに置き換える、Kimi K3 専用の KDA メタデータビルダーを導入しました。これにより各シーケンスが単一の起動に集約され、バッチサイズ 1 ではメタデータ準備のレイテンシが 870 μs から 34 μs に 96% 短縮されました。その結果、エンドツーエンドの DSpark レイテンシも 6% 改善されています。
ローレイテンシ BF16 GEMM
バッチサイズが小さくレイテンシが敏感な設定では、いくつかの線形投影層で使われている汎用的な BF16 GEMM を、独自実装の skinnyGEMM に置き換えています。cuBLAS の汎用カーネルはより一般的な形状向けに最適化されているため、ここでは最高性能を発揮しません。このカーネルでは共有メモリを使ったデータステージングをバイパスし、活性化値と重みを直接レジスタに読み込んで CUDA Core の FMA 命令で計算を行います。これにより、最大スループットを実現するための重い TMA や Tensor Core のセットアップフェーズを回避しています。マイクロベンチマークの結果、カーネルレベルでの速度向上は 8% から 100% に及び、小バッチ設定におけるエンドツーエンドのレイテンシも約 10% 短縮されました。
低遅延の MoE タイル融合
imageLatentMoE タイル融合最適化
*LatentMoE の最適化により、2 回の全結合(all-reduce)、RMSNorm、潜在空間へのアップ投影、要素ごとの加算を 3 つのカーネルに置き換えることで計算量を削減し、通信と計算のオーバーラップを改善します。
vLLM は、超低遅延サービスにおける LatentMoE の尾部(タイル)遅延を低減する新たな戦略を採用しています。LatentMoE の末尾では、ルーティングされたエキスパートからの縮小活性化値が、共有エキスパート出力に加算される前に RMSNorm による正規化とアップ投影を受ける必要があります。通常の TP(Tensor Parallelism)構成では、これにはルーティング側と共有側のエキスパートそれぞれで 2 回の全結合が必要か、あるいは結合した状態で 1 回行う必要があり、さらにアップ投影の複製が発生します。
重複する計算を避けるため、vLLM では共有エキスパートに対しては reduce-scatter を実行し、ルーティングされたエキスパートについては活性化値の正規化が必要なため全結合を維持します。その後、複製されたルーティング側エキスパートの活性化値が、列並列形式でアップ投影行列との行列乗算を行い、すでにシャード化されている共有エキスパート出力と要素ごとの加算を行います。最後に、結果はブロードキャストによって各ランクに集約されます。このステップでは約 20% の遅延削減を達成し、全体としての速度向上は約 7%〜8% です。
品質とパフォーマンスベンチマーク
精度と正しさの評価
vLLM は、速度だけでなく精度にも同等の重きを置いています。レシピに記載された正確な設定で OpenAI 互換エンドポイント経由で Kimi K3 をエンドツーエンド検証した結果、精度評価をクリアしました。最大推論エフォートレベルでは、GSM8K で 0.976、GPQA-Diamond で 0.939、OCRBench で 0.889、MMMU Pro Vision で 0.818 のスコアを記録しています。
評価を行う際に知っておくべき注意点があります。Kimi K3 は回答する前に深く思考するため、低いスコアは「誤答」よりも「途中まで生成された回答が切り捨てられたこと」によるものです。そのため、推論エフォートを上げ、max_tokens を余裕を持って設定し、他のデバッグを行う前に生成が途中で切れていないか確認してください。
サービングパフォーマンス
imageKimi K3 のシングルユーザーデコードスループット
*GB300 NVL72 GPU(TP8 および TP16 構成)で測定した、バッチサイズ 1 における Kimi K3 のデコードスループット。
起動時、vLLM はバッチサイズ 1 で、TP8 構成ではユーザーあたり 111 トークン/秒、TP16 構成では 118 トークン/秒を達成しました。DSpark による推測デコーディングにより対話性が約 3 倍向上し、TP8 ではユーザーあたり 331 トークン/秒、TP16 では 370 トークン/秒に達します。
imageKimi K3 の GB300 NVL72 パレート曲線
また、高スループット(2,000+ TPGS)から低レイテンシ(ユーザーあたり 100+ TPS)まで幅広いシナリオにおける、GB300 NVL72 上での Kimi K3 サービングのパレートフロンティア性能の初期結果も紹介します。
ベンチマークの再現
以下に、TP8 と DSpark を用いた場合のデコードスループット数値を再現するための完全なレシピを示します。
NCCL の DMA バッファ転送を無効化し、vLLM の高速化機能を有効にするための環境変数を設定します。
export NCCL_DMABUF_ENABLE=0
export VLLM_ALLREDUCE_USE_FLASHINFER=1
export VLLM_USE_RUST_FRONTEND=1
export VLLM_ENGINE_READY_TIMEOUT_S=3600
export HEAD_ADDR=127.0.0.1 # vllm-bench が別のホストで実行される場合は変更してください。
vllm serve moonshotai/Kimi-K3 \
--enable-prefix-caching \
--tensor-parallel-size 8 \
--nnodes 2 \
--node-rank 0 \
--moe-backend auto \
--trust-remote-code \
--load-format fastsafetensors \
--max-num-seqs 512 \
--gpu-memory-utilization 0.9 \
--max-model-len auto \
--max-cudagraph-capture-size 256 \
--kv-cache-dtype fp8 \
--attention-config '{"mla_prefill_backend":"FLASHINFER","use_prefill_query_quantization":true}' \
--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"}'
バッチサイズ=1、8K/1K ランダム(推測デコーディングなし)
vllm-bench \
--backend openai \
--base-url "http://${HEAD_ADDR}:8000" \
--model moonshotai/Kimi-K3 \
--dataset-name random \
--random-input-len 8192 \
--random-output-len 1024 \
--random-range-ratio 0.8 \
--prompt-token-ids \
--ignore-eos \
--sweep-max-concurrency 1 \
--sweep-num-prompts-factor 10 \
--seed 42 \
--percentile-metrics "ttft,tpot,itl,e2el" \
--metric-percentiles "50,90,99" \
--save-result
バッチサイズ=1、SPEED Bench(推測デコーディングあり)
vllm-bench \
--backend openai \
--base-url "http://${HEAD_ADDR}:8000" \
--model moonshotai/Kimi-K3 \
--dataset-name speed-bench \
--speed-bench-config throughput_16k \
--speed-bench-max-input-len 10240 \
--speed-bench-category low_entropy \
--output-len 1536 \
--num-prompts 10 \
--no-oversample \
--max-concurrency 1 \
--temperature 1.0 \
--top-p 0.95 \
--save-result \
--save-detailed
マルチノード、エキスパート並列、ビジョン構成を含む完全なレシピは、Kimi K3 レシピで確認できます。
重要なデプロイメントのヒント
- プレフィックスキャッシュ:
--enable-prefix-cachingでプレフィックスキャッシュを有効にします。vLLM では通常デフォルトで有効になっていますが、ハイブリッドキャッシュ設計がまだ進化中のため、Kimi K3 の場合は現在デフォルトで無効になっています。必ずフラグを明示的に指定してください。
- ツール呼び出し: 本番環境で依存する前に、自社のトラフィックで検証を行ってください。K3 は時々、自身のパーサーが想定していないツール呼び出しフォーマットを出力し、
tool_callsの結果が空になるケースがあります。ただし、同じ設定でのクリーンなプローブでは正常に解析されることもあり、これは特定のプロンプトや実行環境に依存するものであり、普遍的な失敗ではありません。本番のエージェントでは、自社のスキーマに対して検証を行い、tool_callsが空の場合にはリトライまたはフォールバックを行う必要があります。また、生成時に出力文法を制約する厳格なツール呼び出しや構造化されたツール呼び出しを検討してください。
- All-to-all バックエンド:
--all2all-backendで、エキスパート並列実行時の MoE バックエンド間の通信方法を指定します。NVIDIA NVLink にはflashinfer_nvlink_one_sidedを、RDMA にはdeepep_v2を使用してください。
- MoE バックエンド: vLLM はシナリオ別に複数の MoE バックエンドを提供しています。DEP 環境では
deep_gemm_mega_moeを、TP > 1 の場合はflashinfer_trtllmを推奨します。
- Rust フロントエンド:
VLLM_USE_RUST_FRONTEND=1を設定すると、このモデルを完全にサポートする Rust フロントエンドが有効になります。
ViT パラレル処理では、--mm-encoder-tp-mode=data がデフォルトで有効になっています。K3 のビジョンエンコーダーは head_size=12 であり、TP=8 の条件下では均等にシャードできません。また、ビジョンエンコーダーのパラメータ数は 1B をわずかに超える程度ですが、バックボーンは約 2T に達するため、エンコーダーからの all-reduce オーバーヘッドを回避するために、デフォルトで ViT DP(データ並列処理)が有効化されています。
Kimi K3 vLLM FAQ
Kimi K3 をサービスするにはどのくらいの GPU が必要ですか?
少なくとも 8× B300(または GB300 NVL72)ノード 1 つが必要です。16× B200 もサポートされています。実際の運用環境では、エキスパート並列処理とデータ並列処理を組み合わせたマルチノード構成が一般的で、RDMA または NVLink を介して接続されます。
DSpark 推論加速(speculative decoding)を有効にするには?
以下を追加してください:
--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"}'
これにより、推論やコーディングのワークロードにおいて、シングルストリームのデコード性能が約 3 倍に向上します。
どの MoE および all-to-all バックエンドを使用すべきですか?
非集約型(disaggregated)またはエキスパート並列処理(DEP)のデプロイには deep_gemm_mega_moe を、TP > 1 の設定には flashinfer_trtllm を使用してください。また、ネットワーク接続に応じて all-to-all バックエンドを選択します:NVLink なら flashinfer_nvlink_one_sided、RDMA なら deepep_v2 です。
Kimi K3 はプレフィックスキャッシングをサポートしていますか?デフォルトで有効ですか?
フルアテンション KV と再帰型 KDA ステートの両方に対応していますが、デフォルトでは無効です。有効にするには --enable-prefix-caching を指定してください。
vLLM は AMD GPU 上で Kimi K3 をサポートしていますか?
はい、ROCm のサポートはローンチ時点で提供され、より広範なチューニングもロードマップに含まれています。
Kimi K3 プレビュー記事との違いは何ですか?
プレビューでは、KDA プレフィックスキャッシュやカーネルの構築方法など、アーキテクチャとカーネルの詳細な解説を行っています。一方、この記事は実用的なローンチガイドであり、vLLM が Kimi K3 にどのように適応するか、レシピ、フラグ、パフォーマンス、そして本番環境での Kimi K3 の活用事例といった具体的な資料を含んでいます。
ロードマップと今後の取り組み
- Kimi K3 に対する RL(強化学習)サポート: vLLM によるロールアウト対応は既に追加済みです。RL エコシステムプロジェクトと緊密に連携し、Kimi K3 のエンドツーエンドな RL トレーニングを支援していきます。
- 継続的なパフォーマンス向上: Day 0 以降も性能改善を続けます。
- デコード・コンテキスト並列処理(DCP): プロトタイプでは良好な速度向上が確認されており、まもなく公式へ統合予定です。初期実験では、特定のワークロードにおいて TP8 を上回る 40% のスループット向上を示しました。
- エキスパート並列負荷分散(EPLB): EPLB のパフォーマンスをさらに高めます。
- 信頼度に基づくスケジューリング: DSpark の信頼度ヘッダを活用し、検証するドラフトトークンの数を削減します。
- AMD ROCm 向けチューニングの拡充
クイックリンク
- モデル: moonshotai/Kimi-K3
- DSpark ドラフト: Inferact/Kimi-K3-DSpark
- レシピと Docker イメージ: recipes.vllm.ai/moonshotai/Kimi-K3
- Kimi K3 技術ブログ: kimi.com/blog/kimi-k3
- vLLM の K3 向け設計: プレビュー記事
謝辞
Kimi K3 のアーキテクチャをリリース前に共有し、KDA 対応キャッシングの共同設計に協力してくれた Moonshot AI に感謝します。また、vLLM へのエンドツーエンド統合とデプロイ検証を担当した Inferact チーム、融合された KDA デコード・KDA プリフェイル・Attention Residual カーネルおよび MXFP4 MoE 協力を提供した NVIDIA、ROCm の立ち上げをサポートした AMD、Alibaba Cloud、Baseten、DigitalOcean、Modal といった推論パートナー、Flash-Flash-KDA を開発した Shikhar、そして vLLM コミュニティにも深く感謝いたします。
Kimi K3 のために構築されたキャッシュ基盤は、同様のアーキテクチャを持つすべてのハイブリッドモデルに共有されるものとなりました。これから皆さんがどのような成果を生み出すか、今から楽しみです。
原文を表示
We're thrilled to announce efficient day-0 vLLM support for Kimi K3, one of the most powerful open-weight models ever released.
Last week, we previewed the production-scale integration work for Kimi K3; today, Moonshot AI's weights are public and the support is live.

Kimi K3 is a 2.8-trillion-parameter Mixture-of-Experts model (16 of 896 experts active per token) built on Kimi Delta Attention (KDA) and Attention Residuals (AttnRes), with a 1M-token context window and native vision. For us, the most exciting challenge Kimi K3 brings is making KDA, MXFP4 MoE, KV cache management, prefill/decode disaggregation, speculative decoding, and long-context deployment recipes work together in a runnable serving engine.
The preview post explained the kernel and cache architecture, in particular the challenge of prefix caching that works on recurrent state. This release post is the practical guide: how vLLM adapts to Kimi K3's architecture, the kernel work behind the numbers, and what is ready on day 0.
Quick start
The easiest way to run Kimi K3 is to use 8 NVIDIA B300 GPUs or 8 AMD MI355X GPUs with the above command.
Inferact has also trained and open-sourced a DSpark speculator for Kimi K3. Enable it by adding the following option to the serve command:
For more details, including Docker images for various platforms and deployment strategies, refer to the detailed recipes. Because of complicated dependencies, only Docker images are usable now. The Docker images depend on several pre-release dependencies, including FlashInfer.
TL;DR
- A 2.8-trillion-parameter multimodal MoE: Kimi K3 activates 16 of 896 experts per token, supports a context window of up to 1M tokens, and is built on Kimi Delta Attention, Attention Residuals, LatentMoE, and native MXFP4 (4-bit) weights.
- Up to 370 tok/s per user: vLLM serves Kimi K3 at 118 tok/s without speculative decoding and 370 tok/s (a 3.14× improvement) with DSpark on 16 NVIDIA GB300 NVL72 GPUs, powered by extensive optimizations for Kimi K3's architecture.
- Broad production feature support: vLLM supports speculative decoding, prefill/decode disaggregation, agentic KV caching with Mooncake, tool calling, reasoning output, and structured output, with NVIDIA (Hopper and Blackwell) and AMD (MI355X) support at launch.
- Open-source DSpark support: vLLM supports the state-of-the-art block-diffusion speculative decoding algorithm for Kimi K3, trained with vLLM and TorchSpec and open-sourced by Inferact.
- Hybrid prefix caching: serving Kimi K3's recurrent and full-attention design required a redesign of hybrid prefix caching over recurrent KDA state. This change now benefits every hybrid linear model.
Kimi K3's architecture, and how vLLM serves it

*Kimi K3 architecture innovations, from the original release blog post.*
Kimi K3's architecture departs from a standard Transformer in a few ways, and each one changes what a serving engine has to do. The preview post covers the internals in depth; here we recap what's new and focus on how vLLM adapts to serve it.
Kimi Delta Attention: a hybrid recurrent + full-attention stack
What's new: Most of Kimi K3's layers are KDA, a linear-attention mechanism that keeps a fixed-size recurrent state instead of a growing KV cache, interleaved with periodic full-attention layers that preserve exact global recall. That is what makes a 1M-token context affordable.
How vLLM serves it: A single hybrid KV-cache manager holds two kinds of memory side by side under one scheduler: paged KV blocks for the full-attention layers, and compact recurrent-state blocks for the KDA layers. A dedicated KDA attention backend runs FlashKDA for prefill and a fused CUDA kernel (or the Flash-Linear-Attention/Triton path when running speculative decoding) for decode.
The hardest part is prefix caching across Kimi K3's hybrid cache: full-attention layers store per-token KV, while KDA layers update recurrent and convolution state at every token but cannot afford to retain a snapshot at every possible prefix boundary. vLLM decouples the large physical KDA state blocks from fine-grained prefix matching, registering state snapshots within those blocks and copying them before extension so long shared prompts can reuse both KDA state and paged KV. This hybrid-cache machinery is new in vLLM core and now benefits every hybrid model similar to Kimi K3.

*Kimi K3 interleaves Kimi Delta Attention layers with periodic full-attention layers; vLLM's hybrid cache manages recurrent state and paged KV together.*
Attention Residuals: learned mixing of residual contributions across depth
What's new: For each token, Block AttnRes replaces ordinary residual accumulation with depth-wise attention: every Transformer sublayer uses a learned pseudo-query to weight RMS-normalized residual states from preceding layer blocks, then receives the corresponding weighted combination as its input.
How vLLM serves it: vLLM uses optimized Triton and CUDA kernels to compute the depth-wise attention logits, softmax, and hidden-state aggregation in a single fused operation. Residual updates and output RMSNorm are folded into the same kernel where supported, reducing intermediate memory traffic and kernel-launch overhead in both prefill and decode.
Stable LatentMoE: quantile-balanced latent-space experts at 16-of-896 sparsity
What's new. LatentMoE, introduced by NVIDIA, projects dispatched token activations into a narrower latent dimension for routed-expert computation, then projects the combined expert output back to the model width—reducing expert-weight bandwidth and all-to-all traffic so more experts can be used at similar inference cost. Kimi K3's Stable LatentMoE scales this design to 896 experts with 16 active per token and uses Quantile Balancing to derive expert allocation from router-score quantiles instead of heuristic balancing updates.
How vLLM serves it: Experts are sharded with expert parallelism. vLLM offers two MoE backends tuned for different topologies: TRT-LLM-Gen for tensor-parallel (TP > 1) and MegaMoE for disaggregated/expert-parallel (DEP). It also supports optional Expert-Parallel Load Balancing (EPLB) to ensure each rank has a similar amount of compute. The weights execute natively in MXFP4 on the MoE path.
Chat template: a render program, not a Jinja template
What's new: Kimi K3's chat template must encode system, user, and assistant messages, multimodal content, tool definitions, and tool results using exact control tokens. Instead of the common approach of a Jinja chat template that renders the request as text before tokenization, Kimi K3 uses a Python program to build the prompt token sequence directly. Its output likewise contains distinct regions for reasoning, answer text, and tool calls that must be parsed into an API response.
How vLLM serves it: vLLM implements both the input renderer and streaming output parser in its Python and Rust frontends, preserving control-token boundaries while treating user-supplied and tool-supplied text as ordinary content. For tool calls and structured outputs, vLLM integrates Kimi K3's format with XGrammar so structured regions are constrained during decoding and returned as separate reasoning, content, and tool-call fields.
Built for production
Serving a 2.8T hybrid MoE well means being fast for each user, efficient for many concurrent sessions, and scalable for agents. vLLM ensures Kimi K3 is ready on all three.
Ultra-low latency: speculative decoding with DSpark
To reach ultra-low latency on a 2.8T-parameter model like Kimi K3 without accuracy loss, speculative decoding is the natural choice. That is why vLLM supports DSpark, a state-of-the-art speculative decoding algorithm, from day 0—and why we trained and released a DSpark speculator for Kimi K3. The draft model is trained with vLLM using TorchSpec to achieve full numerical parity between speculator inference and training.
DSpark uses a block-diffusion backbone to generate multiple speculative tokens in one parallel pass based on Kimi K3's rich intermediate states, so drafting cost stays flat as the block deepens. A low-rank Markov head supplies the intra-block dependency, and a confidence head predicts the likelihood for each draft to be accepted. We made the draft MLA-native, mirroring Kimi K3's own attention, so draft and target share a similar KV layout to be maximally compatible with advanced KV management and P/D-disaggregated setups.

*Kimi K3 DSpark positional acceptance rates across various datasets.*
With DSpark, we achieve a 3.14× speedup on a single-user request, from 118 tok/s to 370 tok/s, measured using SPEED Bench. We also benchmarked the acceptance rate and speedups on different tasks, with the results shown above. For coding and other low-entropy tasks, we achieve around 4.73 accepted tokens per step. For high-entropy tasks such as creative writing, we achieve around 2.61 accepted tokens per step.
Confidence-based scheduling with DSpark is an ongoing effort in vLLM. Once enabled, it uses the confidence head included in the DSpark model to predict how likely each drafted token is to be accepted, prioritizing strong proposals and pruning weak ones so verification is not spent on tokens that will not survive.
Both the draft model and the inference support are open source as of this release. See the deployment guide below to enable it.

*A lightweight DSpark draft proposes candidate tokens that Kimi K3 verifies in a single parallel pass, accelerating single-stream decode.*
Sequence parallelism for TEP prefill

*Sequence parallelism shards token ownership across ranks; the attention residual is applied per shard, and one all-gather rebuilds the full batch before the next layer's QKV projection.*
For the prefill phase, we combine attention tensor parallelism with MoE expert parallelism (TEP). Compared with pure TP, TEP reduces communication overhead and keeps whole experts on each rank, yielding more efficient expert GEMM shapes.
However, the naive TEP implementation performs two all-reduce operations per layer—one after the attention output projection and one after the MoE—so every rank materializes the full batch and redundantly applies the attention residual to all of it. To address this, we implement sequence parallelism: the all-reduce after o_proj is replaced with a reduce-scatter so that each rank owns a shard of the tokens, the attention residual is applied per shard, the MoE's all-to-all performs dispatch and combine, and a single all-gather restores the full batch before the next layer's QKV projection.
This design provides two key advantages:
- Reduced communication overhead: Reduce-scatter + all-to-all dispatch + all-to-all combine + all-gather are theoretically cheaper than two all-reduces. In practice, however, NCCL's reduce-scatter and all-gather are not optimized for prefill's message sizes and yield no speedup. We therefore implement custom reduce-scatter and all-gather kernels that are 1.7×–4.5× faster than NCCL, especially at small-to-medium message sizes.
- Sharded attention residual: The attention residual stays sharded across ranks throughout the layer, so each rank computes and maintains only its shard of the tokens rather than the entire batch. This matters especially for Kimi K3, where AttnRes turns the residual stream into persistent cross-layer state with its own compute and memory footprint.
Sequence parallelism is enabled by default when appropriate: when using TP with the MegaMoE kernel, or when combining TP + DP + EP. No extra flags are needed.
Large-scale serving: prefill/decode disaggregation
For high-throughput settings, vLLM serves Kimi K3 with expert and data parallelism across nodes and with prefill/decode (PD) disaggregation, which runs prefill-heavy and decode-heavy work on separate replicas so each is sized for its own bottleneck. One of our validated topologies routes TEP8 prefill to DEP16 decode, with NIXL as the KV transfer engine.
PD disaggregation is unforgiving for a hybrid model: the recurrent KDA state, the full-attention paged KV, and the block tables all have to arrive correctly. The NIXL connector treats the shared KV-cache page as two logical views: token-level MLA cache and request-level KDA state, including convolution and recurrent state. During the handshake, it exchanges the MLA/KDA metadata, then builds separate transfer descriptors for each transfer.
Under heterogeneous TP, vLLM's hybrid allocator uses different block sizes for prefill and decode. To support that case, vLLM's NIXL connector tracks the logical-to-physical block mapping and zeroes any untransferred tail regions, preventing stale data from previous requests from leaking through padding or layout gaps.

*Prefill (TEP8, 8 GPUs, ≈350B params/GPU) hands the KV, KDA state, and block tables to a separate decode tier (DEP16, 16 GPUs, ≈175B params/GPU) over NIXL.*

Reconciling partial block cache hits and KV cache offloading
As described in the Kimi K3 preview, vLLM supports fine-grained prefix hits that may end inside a physical cache block. This introduces a subtle challenge for KV offloading: vLLM may first find a local GPU hit with a partial tail, then discover a longer prefix in an external store such as Mooncake. With full-block hits, remote reuse extends cleanly beyond the local prefix. A partial tail, however, can overlap with the remote result.
The vLLM scheduler therefore compares the exact reusable token lengths from both tiers and selects the longer prefix. If the remote hit wins, it releases the block reserved for the shorter local tail and reconciles all cache groups to the new prefix length.
Importantly, we built this mechanism entirely through the existing KV Connector APIs, which already provide all the required semantics. This allows MooncakeStoreConnector, SimpleCPUOffloadConnector, and other connectors to support multi-tier partial-prefix reuse without model-specific integration paths.
The design is tracked in the RFC and implemented across PR #45939, PR #46384, and PR #49502.
Agentic serving: smarter cache retention policies
Kimi K3's linear-attention layers require only a constant-size KDA state, making them memory-efficient at long context lengths. A single layer's KDA state is roughly equivalent to the MLA cache for a few thousand tokens. Although large, this state does not grow with sequence length, unlike a conventional KV cache. That distinction becomes significant for agentic workloads spanning hundreds of thousands to one million tokens.
The same design complicates prefix caching. KDA state is updated in place during decoding, so vLLM must copy the state at a selected prefix boundary before the next forward pass overwrites it. Caching at every token position would be prohibitively expensive: each KDA checkpoint is much larger than one token's MLA cache and would quickly exhaust even a distributed cache pool.
To improve cache-space efficiency while preserving useful prefixes, vLLM supports two complementary retention policies.
Interval-based retention
Caching every KDA state is wasteful, but caching too sparsely forces the next request to recompute a large suffix. Interval-based retention balances these costs by treating selected positions as checkpoints—for example, one every 32K tokens.
Prompt boundaries are even better checkpoints. In agentic workloads, the next turn usually begins by replaying the previous turn's prompt, so the state at the end of that prompt is especially likely to be reused. vLLM detects and retains these boundaries automatically.
Users can control periodic checkpointing with VLLM_PREFIX_CACHE_RETENTION_INTERVAL. Setting it to 0 disables periodic checkpoints and retains only prompt-end states, which is a good fit for workloads dominated by multi-turn conversations. Larger intervals trade some recomputation for lower cache usage.
Interval-based retention was introduced for DeepSeek V4 and hybrid sliding-window-attention models in PR #43447, with day-0 support for Kimi K3 and hybrid linear-attention models added in PR #45845.

*Interval-based cache retention. MLA caches KV for every block, while a KDA state is kept only at checkpoints: prompt ends (green) are always retained, and fixed-interval checkpoints (orange) are configurable.*
Marconi-style selective retention
Prompt-end retention works well for conversational state, but valuable shared prefixes can appear elsewhere. A system prompt, repository snapshot, or tool specification may be reused across many requests without aligning with a prompt boundary.
Marconi-style retention (MLSys '26) handles these cases with a simple rule: cache on the second hit. The first observation provides evidence that the prefix exists; the second shows that it is actually shared. Only then does vLLM spend cache capacity on its KDA state.
This turns retention into a demand-driven decision. One-off prefixes do not crowd the cache, while recurring prefixes are promoted automatically—without requiring users to predict which parts of their workload will become hot.
Selective retention was introduced in PR #37898, with day-0 Kimi K3 support added in PR #47782.

*Selective cache retention. Request 1 keeps a KDA state only at its own prompt end, past the shared prefix, so request 2 gets a KV hit but a KDA miss. That second sighting is evidence the prefix is shared, so a state is cached at the prefix boundary, and request 3 reuses it.*
Together, the policies cover both predictable and emergent reuse: interval retention checkpoints structurally important boundaries, while Marconi-style retention learns which other prefixes are worth keeping.
Performance optimizations
Serving large models like Kimi K3 brings its own challenges because of its size. The entire model can barely fit in a single NVIDIA DGX B300 and requires a minimum of 16 NVIDIA B200/GB200 GPUs to serve on that hardware generation. Serving must trade off interactivity against total system throughput: tensor parallelism is good for interactivity but offers low overall throughput because effective KV cache size is limited, while large-scale expert parallelism can limit per-user output-token speed because of network-bandwidth bottlenecks. Here we highlight optimizations that improve performance in both cases so users can choose the recipe that suits their workload. Many of these optimizations are already covered in our preview blog.
Attention Residuals
Kimi K3 uses Block AttnRes, attending over up to eight cached block representations plus the current within-block residual. For each token, vLLM computes logits from RMS-normalized sources, applies softmax across these depth-wise candidates, and aggregates their representations. Its implementation resembles FlashAttention's online-softmax strategy but operates across model depth rather than sequence positions and has at most nine sources. vLLM performs this mixing in a single fused kernel, incorporating the residual update at the input and optionally applying RMSNorm to the output. A portable Triton implementation covers the general path, while a specialized CUDA kernel accelerates supported Blackwell configurations.
KDA decode

*The fused KDA decode kernel folds the causal convolution, recurrent update, and RMSNorm into a single launch instead of a chain of separate kernels.*
A KDA layer involves many operations: input projections, causal 1D convolutions, QK norm, gate computation, KDA recurrent update, and output gated RMSNorm. On supported configurations, vLLM fuses the post-projection decode path—from the causal convolutions through gated RMSNorm—into a single specialized CUDA kernel. The kernel updates the convolution and recurrent states in place and writes the normalized output directly, avoiding intermediate tensors, repeated state traffic, and per-operation launch overhead across Kimi K3's many KDA layers. Portable Triton fallback paths cover unsupported configurations.
KDA prefill
KDA prefill became one of our favorite examples of open-source development in practice. Moonshot AI first released FlashKDA, a high-performance CUTLASS implementation of KDA. We quickly integrated it into vLLM and worked through less glamorous production details: broader GPU coverage, metadata dtypes, tensor layouts, and reliable vendoring. Shikhar Mishra then optimized the kernels for H100 and published Flash-Flash-KDA, improving data movement while preserving numerical correctness. Within a day, we validated the improvements on GB300 NVL72, refined the recurrence pipeline and synchronization, and folded them into our FlashKDA integration. The result was not a one-way handoff, but a continuous loop in which an open kernel was extended by the serving community, improved by an independent contributor, and quickly carried into production.
KDA metadata builder

During Kimi K3 DSpark bring-up, KDA metadata preparation emerged as a significant source of overhead. Kimi K3 initially reused the generic GDN metadata builder, which prepared FLA metadata that K3 does not consume and used sequences of small eager PyTorch operations to assemble and stage GPU metadata. We introduced a dedicated Kimi K3 KDA metadata builder that prunes the unused paths and replaces those operation sequences with fused Triton kernels, reducing each sequence to a single launch. At batch size 1, this reduced metadata-preparation latency by 96%, from 870 μs to 34 μs, and improved end-to-end DSpark latency by 6%.
Low-latency BF16 GEMM
In low-batch-size, latency-sensitive settings, we replace generic BF16 GEMM—used in several linear projection layers—with our own skinnyGEMM implementation. Generic cuBLAS kernels do not achieve the best performance here because they are optimized for more general shapes. In the kernel, we bypass shared-memory data staging, load activations and weights directly into registers, and use CUDA Core FMA instructions to perform the math. This avoids the heavy TMA and Tensor Core setup phase used to achieve maximum throughput. Our microbenchmarks show kernel-level speedups ranging from 8% to 100% and an end-to-end latency reduction of about 10% in small-batch settings.
Low-latency MoE tail fusion

*The LatentMoE tail optimization replaces two all-reduces, RMSNorm, latent up-projection, and an elementwise add with three kernels to reduce compute and better overlap communication and computation.*
vLLM uses a novel strategy to reduce latent-MoE tail latency in ultra-low-latency serving. At the end of LatentMoE, the reduced activation from routed experts must be normalized with RMSNorm and up-projected before it is added to the shared-expert output. In the normal TP case, this requires two all-reduces on the routed and shared experts—or one all-reduce with concatenation—and replicates the up-projection.
To avoid redundant compute in the replicated linear projection, vLLM instead performs reduce-scatter on the shared experts and keeps all-reduce on the routed experts because their activations need to be normalized. The replicated routed-expert activation then performs matrix multiplication with the up-projection in a column-parallel fashion and is added elementwise to the already-sharded shared-expert output. Finally, the results are all-gathered onto each rank using broadcast. We observe about a 20% latency reduction in this step and about a 7%–8% end-to-end speedup.
Quality and Performance Benchmarks
Accuracy and correctness evaluation
vLLM takes accuracy as seriously as speed. We validated Kimi K3 end to end through a served OpenAI-compatible endpoint, with exact configurations in the recipes, and it passes the accuracy evaluations cleanly. At the maximum reasoning-effort level, Kimi K3 on vLLM scores 0.976 on GSM8K, 0.939 on GPQA-Diamond, 0.889 on OCRBench, and 0.818 on MMMU Pro Vision.
One caveat worth knowing for evaluation: Kimi K3 thinks a lot before it answers. A low score is more often a truncated answer than a wrong one, so increase the reasoning effort, set max_tokens generously, and check for cut-off generations before debugging anything else.
Serving performance

*Kimi K3 decode throughput at batch size 1, measured on GB300 NVL72 GPUs in TP8 and TP16 configurations.*
At launch, vLLM achieves 111 tok/s per user on TP8 and 118 tok/s per user on TP16 at batch size 1. DSpark speculative decoding boosts interactivity by roughly 3×, reaching 331 tok/s per user on TP8 and 370 tok/s per user on TP16.

We also present initial Pareto-frontier performance results for serving Kimi K3 on GB300 NVL72 across a range of scenarios, from high-throughput serving at 2K+ TPGS to low-latency serving at 100+ TPS/user.
Reproduce our benchmark
Here are the full recipes to reproduce the decode throughput numbers above for TP8 with DSpark:
Full recipes, including multi-node, expert-parallel, and vision configurations, are in the Kimi K3 recipes.
Important Deployment Tips
- Prefix caching: --enable-prefix-caching turns prefix caching on. Prefix caching is typically enabled by default in vLLM, but it is currently disabled by default for Kimi K3 while the hybrid-cache design continues to evolve. Pass the flag explicitly.
- Tool calling: Validate on your own traffic before depending on it. We've occasionally seen K3 emit a tool-call format its own parser does not expect, yielding an empty tool_calls result, while clean probes on the same setup parse perfectly. It is prompt- and run-dependent, not a blanket failure, but production agents should validate against your schema, retry or fall back when tool_calls comes back empty, and consider strict or structured tool calling, which constrains the output grammar during generation.
- All-to-all backend: --all2all-backend determines how the MoE backend communicates during expert parallelism. Use flashinfer_nvlink_one_sided for NVIDIA NVLink and deepep_v2 for RDMA.
- MoE backend: vLLM has several MoE backends for different scenarios. We recommend deep_gemm_mega_moe for any DEP environment and flashinfer_trtllm for TP > 1.
- Rust frontend: Set VLLM_USE_RUST_FRONTEND=1 to enable the Rust frontend, which fully supports this model.
- ViT parallelism: --mm-encoder-tp-mode=data is enabled by default. K3's vision encoder has head_size=12, which cannot be sharded evenly under TP=8. Because K3's vision encoder has fewer than 1B parameters while the backbone has about 2T, we enable ViT DP by default to avoid all-reduce overhead from the encoder.
Kimi K3 vLLM FAQ
How many GPUs do I need to serve Kimi K3?
At least one 8× B300 (or GB300 NVL72) node is required; 16× B200 is also supported. Most production deployments run multi-node with expert and data parallelism, connected over RDMA or NVLink.
How do I enable DSpark speculative decoding?
Add:
It roughly triples single-stream decode on reasoning and coding workloads.
Which MoE and all-to-all backend should I use?
Use deep_gemm_mega_moe for disaggregated or expert-parallel (DEP) deployments and flashinfer_trtllm for TP > 1. Choose the all-to-all backend to match your interconnect: flashinfer_nvlink_one_sided for NVLink and deepep_v2 for RDMA.
Does Kimi K3 support prefix caching, and is it on by default?
It supports prefix caching over both full-attention KV and recurrent KDA state, but it is not enabled by default, so pass --enable-prefix-caching.
Does vLLM support Kimi K3 on AMD GPUs?
Yes. ROCm support ships at launch, with broader tuning on the roadmap.
How is this different from the Kimi K3 preview post?
The preview is the architecture and kernel deep dive, including how KDA prefix caching and the kernels are built. This post is the practical launch guide and includes the artifacts: how vLLM adapts to Kimi K3, recipes, flags, performance, and what Kimi K3 is ready for in production.
Roadmap and Future Work
- RL support for Kimi K3: vLLM rollout support has already been added. We will work closely with RL ecosystem projects to support end-to-end RL training for Kimi K3.
- Continuous performance improvement: continue improving performance after day 0.
- Decode Context Parallelism (DCP): our prototype shows good speedup, and we will soon upstream the support. Early experiments show 40% higher throughput than TP8 under selected workloads.
- Expert-Parallel Load Balancing (EPLB): improve EPLB performance.
- Confidence-based scheduling: use the confidence head in DSpark to prune the number of draft tokens to verify.
- Broader AMD ROCm tuning.
Quick links
- Model: moonshotai/Kimi-K3
- DSpark draft: Inferact/Kimi-K3-DSpark
- Recipes and Docker images: recipes.vllm.ai/moonshotai/Kimi-K3
- Kimi K3 technical blog: kimi.com/blog/kimi-k3
- vLLM design for K3: the preview post
Acknowledgements
Thank you to Moonshot AI for creating K3, sharing the architecture ahead of release, and co-designing the KDA-aware caching; to the Inferact team for the end-to-end vLLM integration and deployment validation; to NVIDIA for the fused KDA decode, KDA prefill, and Attention Residual kernels and the MXFP4 MoE collaboration; to AMD for ROCm bring-up; to our inference partners, including Alibaba Cloud, Baseten, DigitalOcean, and Modal; to Shikhar for Flash-Flash-KDA; and to the vLLM community. The cache infrastructure built for Kimi K3 now belongs to every hybrid model with a similar architecture. We can't wait to see what you serve.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み