- 实例 A profile 加 --disable-radix-cache(bench 测量纯净) - 新增实例 B profile(kimi3_pro6000_sglang_tp32ep32_instB,.1-.4) - 新增 deploy_dp2.sh 编排脚本(A + B + router --worker-urls) - 新增 README
63 lines
2.8 KiB
Markdown
63 lines
2.8 KiB
Markdown
# Kimi-K3 DP=2 部署(两个独立 TP32×EP32 实例 + router 负载均衡)
|
||
|
||
RTX 6000D 8 节点上 Kimi-K3 的 **DP=2** 部署:方案 B——**两个完全独立的 TP32×EP32 实例**,前面用 sglang_router 负载均衡。实例间零通信。
|
||
|
||
## 架构
|
||
|
||
```
|
||
┌───────────────────────────────┐
|
||
client ──32000──▶ │ router (sglang_router) .5 │ --worker-urls
|
||
│ http://174.1.60.1:30000 │ ──▶ 实例 B (.1-.4, TP32×EP32)
|
||
│ http://174.1.60.5:30000 │ ──▶ 实例 A (.5-.8, TP32×EP32)
|
||
└───────────────────────────────┘
|
||
```
|
||
|
||
- 实例 A:174.1.60.5~8,profile `kimi3_pro6000_sglang_tp32ep32`(现有)
|
||
- 实例 B:174.1.60.1~4,profile `kimi3_pro6000_sglang_tp32ep32_instB`(新增)
|
||
- router:`sglang_router.launch_router --worker-urls`(Rust Router 普通模式),对外 `.5:32000`
|
||
|
||
## 使用
|
||
|
||
```bash
|
||
cd /data/yy/sskj/experiments/pro6000/kimi3_pro6000_dp2
|
||
bash deploy_dp2.sh start # 实例 A → 实例 B → router(约 15 分钟)
|
||
bash deploy_dp2.sh status
|
||
bash deploy_dp2.sh stop
|
||
bash deploy_dp2.sh restart
|
||
```
|
||
|
||
## 验证
|
||
|
||
```bash
|
||
# router 入口(自动负载均衡到两个实例)
|
||
curl -s http://174.1.60.5:32000/generate -H "Content-Type: application/json" \
|
||
-d '{"text":"What is 23*47?","sampling_params":{"max_new_tokens":16}}'
|
||
|
||
# 两个实例的 head 分别可直连
|
||
curl -s http://174.1.60.1:30000/health
|
||
curl -s http://174.1.60.5:30000/health
|
||
```
|
||
|
||
## 关键配置
|
||
|
||
- 两个实例都是 **TP32×EP32**,`--disable-radix-cache`(bench 测量纯净)
|
||
- 网络:NCCL/GLOO 走 bond0(管理网)?不——实例 A/B 各自 **NCCL_IB_HCA=mlx5_0..3**(计算网),`NCCL_SOCKET_IFNAME=bond0`
|
||
- 每个实例的容器名:`kimi3_pro6000_sglang_tp32ep32_node{0-3}` / `..._instB_node{0-3}`
|
||
- 部署从各自 master 执行:实例 A 从 .5(LOCAL_NODE_RANK=0 本地起 rank0)、实例 B 从 .1
|
||
|
||
## 前置条件
|
||
|
||
1. 8 节点镜像 `lmsysorg/sglang:kimi-k3`、`/tmp/patch_k3_sm120.py` 就位
|
||
2. .5 与 .1 都有 sskj 仓库(`/data/yy/sskj`,deploy 层在各自 master 本地执行)
|
||
3. 各节点 docker 权限、.5 可 ssh .1、.1 可 ssh .2/.3/.4
|
||
4. 部署前需释放 GPU(如之前跑着 PD,先 `bash deploy_pd.sh stop`)
|
||
|
||
## 与 PD 分离的区别
|
||
|
||
| 维度 | PD 分离(MoonCake RDMA) | DP=2(方案 B) |
|
||
|---|---|---|
|
||
| 实例数 | 2 角色(prefill/decode) | 2 相同实例 |
|
||
| 实例间通信 | 有(KV 经 MoonCake RDMA) | 无(零通信) |
|
||
| 传输后端 | mooncake rdma | 无 |
|
||
| router | PD 模式(--prefill/--decode) | 普通模式(--worker-urls) |
|
||
| 用途 | 长上下文、KV 复用 | 横向扩容、吞吐 | |