Add a Mooncake installation tutorial for kv pool and update Mooncake installation tutorial (#5069)

### What this PR does / why we need it?
Add a Mooncake installation tutorial for kv pool and update Mooncake
installation tutorial

- vLLM version: v0.12.0
- vLLM main:
ad32e3e19c

Signed-off-by: liziyu <liziyu16@huawei.com>
Co-authored-by: Mengqing Cao <cmq0113@163.com>
This commit is contained in:
liziyu
2025-12-16 19:53:23 +08:00
committed by GitHub
parent 4ed2951400
commit 190ae55e9f
3 changed files with 80 additions and 18 deletions

View File

@@ -17,17 +17,63 @@
## Example of using Mooncake as a KVCache pooling backend
* Software:
* Mooncakemain branch
* Check NPU network configuration:
Installation and Compilation Guidehttps://github.com/kvcache-ai/Mooncake?tab=readme-ov-file#build-and-use-binaries
Ensure that the hccn.conf file exists in the environment. If using Docker, mount it into the container.
Make sure to build with `-DUSE_ASCEND_DIRECT` to enable ADXL engine.
```bash
cat /etc/hccn.conf
```
An example command for compiling ADXL
* Install Mooncake
`rm -rf build && mkdir -p build && cd build \ && cmake .. -DCMAKE_INSTALL_PREFIX=/opt/transfer-engine/ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DUSE_ASCEND_DIRECT=ON -DBUILD_SHARED_LIBS=ON -DBUILD_UNIT_TESTS=OFF \ && make -j \ && make install`
Mooncake is the serving platform for Kimi, a leading LLM service provided by Moonshot AI.
Installation and Compilation Guide: https://github.com/kvcache-ai/Mooncake?tab=readme-ov-file#build-and-use-binaries.
First, we need to obtain the Mooncake project. Refer to the following command:
Also, you need to set environment variables to point to them `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64/python3.11/site-packages/mooncake`, or copy the .so files to the `/usr/local/lib64` directory after compilation
```shell
git clone -b v0.3.7.post2 --depth 1 https://github.com/kvcache-ai/Mooncake.git
```
(Optional) Replace go install url if the network is poor
```shell
cd Mooncake
sed -i 's|https://go.dev/dl/|https://golang.google.cn/dl/|g' dependencies.sh
```
Install mpi
```shell
apt-get install mpich libmpich-dev -y
```
Install the relevant dependencies. The installation of Go is not required.
```shell
bash dependencies.sh -y
```
Compile and install
```shell
mkdir build
cd build
cmake .. -DUSE_ASCEND_DIRECT=ON
make -j
make install
```
Set environment variables
**Note:**
- Adjust the Python path according to your specific Python installation
- Ensure `/usr/local/lib` and `/usr/local/lib64` are in your `LD_LIBRARY_PATH`
```shell
export LD_LIBRARY_PATH=/usr/local/lib64/python3.11/site-packages/mooncake:$LD_LIBRARY_PATH
```
### Run Mooncake Master