sskj/deploy/profiles/pro6000/kimi3_pro6000_pd_decode.env
shishi d72dbff689 feat(pro6000): Kimi-K3 PD 分离部署(MoonCake RDMA)- 8 节点 P/D 双 profile + deploy_pd.sh 编排 + 文档
- 新增 P 组(prefill)/D 组(decode) deploy profiles(mooncake RDMA + 计算网 mlx5_0~3)
- 新增 experiments/pro6000/kimi3_pro6000_pd_rdma/ 编排脚本(mc-master+P+D+router)
- 关键修复: 必须关闭 PYTORCH_CUDA_ALLOC_CONF=expandable_segments
  (mooncake RDMA 注册 expandable GPU 段报 Bad address,GitHub #2511)
- 容器内升级 mooncake 0.3.12.post1(含 dmabuf 修复 #2035)
- docs/KIMI_K3_DEPLOY.md 新增附录 B,README 更新实验索引
2026-08-11 10:36:09 +08:00

55 lines
3.0 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Kimi-K3 PD 分离 - D 组 (decode) deployment profile (4x RTX 6000D).
# Nodes: 174.1.60.5~8 (rank 0~3), 32x NVIDIA RTX 6000D (85GB, sm_120).
#
# 这是 PD (Prefill/Decode) 分离部署的 D 组 (decode) 端 profile。
# 配套 P 组 profile: kimi3_pro6000_pd_prefill.env
# 配套编排脚本: experiments/pro6000/kimi3_pro6000_pd_rdma/deploy_pd.sh
#
# 与 P 组相同的传输/网络配置mooncake RDMA + 计算网),区别仅在:
# - 节点是 174.1.60.5~8
# - --disaggregation-mode decode --port 30000
# - dist-init-addr 174.1.60.5:20000
# - 必须 D 组在 P 组之后启动(见 deploy_pd.sh
#
# Model-team only. Ops only run benchmark against the served router URL.
PLATFORM=pro6000
EXPERIMENT=kimi3_pro6000_pd_decode
MODEL_NAME=Kimi-K3
ENGINE=sglang
RUNTIME=docker
DOCKER_IMAGE=lmsysorg/sglang:kimi-k3
CONTAINER_NAME=${EXPERIMENT}_node${NODE_RANK}
MODEL_PATH=/data/hf_models/Kimi-K3
SERVED_MODEL_NAME=kimi-k3
PORT=30000
HEALTH_PATH=/health
HEALTH_HOST=174.1.60.5
HEALTH_WAIT_S=2400
CONTAINER_PYTHON=python3
# ---- 并行度(固定,勿改)----
TP=32
DP=1
EP_SIZE=32
# ---- Multi-node topology (D 组 = decode 4 节点) ----
NNODES=4
NODE_HOSTS="174.1.60.5 174.1.60.6 174.1.60.7 174.1.60.8"
NODE_SSH_USER=root
LOCAL_NODE_RANK=0
MASTER_IP=174.1.60.5
DIST_PORT=20000
DEVICE_VARS="CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7"
ENGINE_ENV="MOONCAKE_MASTER=174.1.60.1:50051 MOONCAKE_PROTOCOL=rdma NCCL_SOCKET_IFNAME=bond1 GLOO_SOCKET_IFNAME=bond1 NCCL_IB_HCA=mlx5_0,mlx5_1,mlx5_2,mlx5_3 NCCL_IB_GID_INDEX=3 NCCL_IB_TIMEOUT=22 NCCL_IB_RETRY_CNT=7 NCCL_CUMEM_ENABLE=1 SGLANG_ENABLE_TP_MEMORY_INBALANCE_CHECK=0 SGLANG_MOE_FUSED_GATE_RADIX=1 SGLANG_ENABLE_REQUEST_HEADER_OVERRIDES=1"
DOCKER_FLAGS="--gpus all --network host --ipc=host --ulimit memlock=-1 --device /dev/infiniband --shm-size 32g --entrypoint ''"
VOLUMES="${MODEL_PATH}:${MODEL_PATH}:ro"
PATCH_MOUNTS="/tmp/patch_k3_sm120.py:/tmp/patch_k3_sm120.py:ro /data/flashkda_deploy/wheels:/mc_wheels:ro"
# BOOTSTRAP: 打补丁 → 装 flashkda + mooncake wheel → 按 rank 设 SGLANG_HOST_IP → 启动 decode。
BOOTSTRAP="python3 /tmp/patch_k3_sm120.py && pip install /flash_kda-0.0.1-cp312-cp312-linux_x86_64.whl --no-deps -q && pip install /mc_wheels/mooncake_transfer_engine_cuda13-0.3.12.post1-cp312-cp312-manylinux_2_28_x86_64.whl --no-deps -q && export SGLANG_HOST_IP=\"174.1.60.$((5 + ${NODE_RANK}))\" && exec python3 -m sglang.launch_server ${LAUNCH_ARGS}"
LAUNCH_ARGS="--model-path ${MODEL_PATH} --served-model-name ${SERVED_MODEL_NAME} --tp-size ${TP} --ep-size 32 --nnodes ${NNODES} --node-rank ${NODE_RANK} --dist-init-addr ${MASTER_IP}:${DIST_PORT} --trust-remote-code --moe-runner-backend marlin --mem-fraction-static 0.88 --cuda-graph-max-bs-decode 16 --mamba-radix-cache-strategy extra_buffer --dist-timeout 3600 --mamba-full-memory-ratio 0.36 --disaggregation-transfer-backend mooncake --disaggregation-bootstrap-port 28800 --disaggregation-ib-device mlx5_0,mlx5_1,mlx5_2,mlx5_3 --disaggregation-mode decode --host 0.0.0.0 --port ${PORT}"