Mooncake Transfer Engine is a Python binding (using pybind11) for the core data transfer component of the Mooncake project. Mooncake itself is a KVCache-centric disaggregated architecture designed to optimize Large Language Model (LLM) inference. The Transfer Engine provides a high-performance, unified interface for batched data movement across various storage devices and network links, supporting protocols like TCP, RDMA, CXL/shared-memory, and NVMe over Fabric. It is actively maintained with frequent updates and integrations into LLM serving frameworks like SGLang and vLLM.
pip install mooncake-transfer-engineVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the basic initialization of the Mooncake Transfer Engine. It creates an instance of `TransferEngine` and initializes it with network configuration, then allocates a NumPy buffer. In a real distributed setting, you would typically run a receiver and a sender, with `METADATA_SERVER` pointing to an actual coordination service like etcd. The `protocol` should be set to 'rdma' for high-performance RDMA-capable networks.
Ensure your CUDA toolkit version is 12.1 or newer. If not, consider building from source with specific CUDA versions or install `mooncake-transfer-engine-non-cuda`.
Ensure RDMA drivers and `nvidia_peermem` are correctly installed and loaded. Run applications with `sudo` if permission errors persist. Consider `NIXL` as an alternative to `nvidia_peermem` if issues arise.
When upgrading an inference engine that integrates Mooncake, ensure the `mooncake-transfer-engine` package is updated simultaneously to maintain compatibility.
Monitor accuracy closely when deploying applications using batch transfer APIs with `mooncake-transfer-engine` in multi-node NVLink configurations.