[Feature] Integrate Mooncake Transfer Engine with TurboMind for PD disaggregation and remote KV

オープン
#4,443 コメント 5 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cpp, python

調査の方向性

まず lmdeploy/pytorch/disagg/backend/mooncake.py と config.py を読み、次に TurboMind の SequenceManager.、BlockManager.、src/turbomind/engine/engine.cc、および request/scheduling コードを調査します。作業を、提案された CMake 依存関係、メタデータ/RPC、メモリ転送フック、2 台のマシンによる検証の各フェーズに分けます。完了の条件は、互換性のあるメタデータと KV の動作を維持しながら、Mooncake の PD ディスアグリゲーションが TurboMind でエンドツーエンドに機能することです。

索引モデルが issue の本文から書いたものです。

説明

Motivation

Motivation

LMDeploy already provides PD disaggregation (DistServe) on the PyTorch engine via lmdeploy/pytorch/disagg/, with Mooncake as an optional KV migration backend (MooncakeBackend, using the Python mooncake.engine.TransferEngine).

TurboMind (C++) remains a high-performance path, but it is not integrated with Mooncake today, so Prefill/Decode split deployments cannot reuse TurboMind's paged KV and kernel stack for cross-node KV.

We would like to integrate Mooncake's Transfer Engine (or an equivalent C++ SDK) into TurboMind's C++ layer to:

  • Align block lifecycle with SequenceManager / BlockManager (including optional prefix caching and consistent KV quantization layout);
  • Asynchronously export KV after prefill on the prefill side, asynchronously pull on the decode side, and overlap transfer with compute;
  • Align or stay compatible with Conductor / metadata protocols used on the PyTorch side to avoid diverging semantics.

Goal: enable end-to-end Mooncake-based PD disaggregation on TurboMind with minimal impact on throughput.

Related resources

  • In-repo: lmdeploy/pytorch/disagg/backend/mooncake.py, lmdeploy/pytorch/disagg/config.py (MooncakeEngineConfig, MigrationBackend)
  • Mooncake: https://github.com/kvcache-ai/Mooncake
  • TurboMind pointers: src/turbomind/models/llama/SequenceManager., BlockManager., src/turbomind/engine/engine.cc and request/scheduling code

Additional context

  • Current state: Mooncake PD disaggregation is implemented for PyTorch; TurboMind has no Mooncake / disagg integration.
  • Challenges: block/chunk mapping between TurboMind and Mooncake, KV sharding under attn_tp / attn_cp, and scheduling/state machine when waiting for remote KV.
  • Suggested phases: optional CMake dependency -> metadata/RPC -> memory transfer hooks -> two-machine e2e validation.

One-liner

PyTorch engine supports PD disaggregation and KV migration via Mooncake (and DLSlime); TurboMind does not yet support Mooncake-based PD disaggregation.

Related resources

No response

Additional context

No response

主要言語
Python
スター
8.2k
フォーク
797
平均マージ
3日 15時間
マージ済み PR(30日)
52

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

InternLM/lmdeploy のほかの issue

InternLM/lmdeploy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。