[Feat] EPD Mooncake Store Connector - #17
Conversation
|
cc @fake0fan PLTA again |
There was a problem hiding this comment.
Pull request overview
This PR implements a Mooncake storage connector for the Encoder Cache (EC) disaggregated architecture, enabling distributed encoder cache transfer across vLLM instances. The connector supports both regular and zero-copy transfer modes for efficient multimodal data sharing.
Key Changes:
- Introduces
ECMooncakeStorageConnectorwith support for async batch operations and zero-copy transfers using pinned memory - Adds
TensorMemoryPoolwith buddy allocation for efficient pinned memory management with FIFO eviction - Integrates synchronization mechanism (
wait_for_save()) to ensure encoder cache persistence before request completion
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
vllm/distributed/ec_transfer/ec_lookup_buffer/mooncake_store.py |
Core Mooncake store implementation with batch operations and zero-copy support |
vllm/distributed/ec_transfer/ec_connector/mooncake_storage_connector.py |
Connector interface implementation for EC transfer operations |
vllm/distributed/ec_transfer/utils/tensor_memory_pool.py |
Buddy allocator-based memory pool for pinned host memory management |
vllm/distributed/ec_transfer/ec_connector/base.py |
Added wait_for_save() interface method to base connector |
vllm/v1/worker/ec_connector_model_runner_mixin.py |
Added mixin method to wait for async save operations |
vllm/v1/worker/gpu_model_runner.py |
Integrated wait for save after multimodal encoding |
vllm/distributed/ec_transfer/ec_connector/factory.py |
Registered new Mooncake connector in factory |
tests/v1/ec_connector/unit/test_mooncake_store.py |
Comprehensive unit tests with fake Mooncake store implementation |
examples/.../mooncake_connector/disagg_1e1pd_example.sh |
Example script for 1 encoder + 1 prefill/decode setup |
examples/.../mooncake_connector/disagg_1e1p1d_example.sh |
Example script for 1 encoder + 1 prefill + 1 decode setup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Khuong Le <lemanhkhuong2611@gmail.com>
| Raises: | ||
| ValueError: If tensor is not on CUDA or allocation fails | ||
| """ | ||
| if not tensor.is_cuda: |
There was a problem hiding this comment.
Using is_cuda is incompatible with NPU. And this file is similar to distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py. Is it possible to avoid adding a separate file?
Signed-off-by: Khuong Le <lemanhkhuong2611@gmail.com>
Signed-off-by: Khuong Le <lemanhkhuong2611@gmail.com>
Purpose
Implement Mooncake storage EC connector
Test Plan
Test Result
The result of script disagg_1e1pd_example.sh on A100-40GB
rdma:
tcp:
example connector (disk):
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.