kvcache-ai/Mooncake
Mooncake is the serving platform for Kimi, a leading LLM service provided by Moonshot AI.
What it solves
Mooncake addresses the efficiency bottlenecks in large-scale LLM serving, specifically the high cost of KVCache management and the performance gaps in data movement across heterogeneous hardware. It solves the problem of underutilized CPU, DRAM, and SSD resources in GPU clusters by creating a disaggregated KV cache pool, allowing prefill and decode clusters to be separated to improve throughput and reduce latency.
How it works
Mooncake employs a KVCache-centric disaggregated architecture. It consists of three primary components:
- Transfer Engine (TE): A high-performance framework that provides a unified interface for batched data movement across diverse networks (TCP, RDMA, AWS EFA) and accelerators (CUDA, ROCm, Ascend, etc.), utilizing topology-aware routing and multi-NIC bandwidth aggregation.
- Mooncake Store: A distributed key-value storage engine that manages reusable KV caches and model weights across clusters. It uses a multi-tier cache hierarchy (DRAM and SSD/NVMe) and supports zero-copy data transfer to maximize bandwidth.
- Mooncake EP & PG: A fault-tolerant distributed execution layer for MoE (Mixture-of-Experts) inference, providing expert-parallel dispatch and a PyTorch-compatible process-group backend that can recover failed ranks without restarting the entire service.
Who it’s for
It is designed for developers and operators of large-scale LLM inference and training infrastructures, particularly those deploying massive models (like MoE models) across multi-node GPU clusters who need to maximize hardware utilization and maintain strict service-level objectives (SLOs).
Highlights
- High-Bandwidth Data Transfer: Delivers up to 190 GB/s in 8x400 Gbps RoCE networks, significantly faster than standard TCP.
- Disaggregated Storage: Decouples KVCache storage from inference engines, allowing storage nodes to be scaled independently of engine restarts or upgrades.
- Fault-Tolerant MoE Serving: Enables MoE inference to route around failed ranks and recover processes elastically.
- Broad Ecosystem Integration: Deeply integrated with vLLM, SGLang, TensorRT-LLM, and the PyTorch ecosystem.
Related
- Dispatch
- Project
- Project
- Project