kvcache-ai / kvcache-ai/ktransformers
glm5.2 slow on 4*H100
- Dominant language
- Python
- Stars
- 19.5k
- Forks
- 1.6k
- Avg merge
- 19h 32m
- Merged PRs (30d)
- 27
Description
### Reminder
- [x] I have read the above rules and searched the existing issues.
### System Info
==================================================
SGLang + KTransformers 硬件检测
==================================================
[1/4] CPU 架构 & 指令集支持检测
--------------------------------------------------
CPU 型号:
物理插槽数 (Sockets):
单插槽核心数 (Cores per Socket):
物理 NUMA 节点数:
AMX 支持情况: 支持 (Intel AMX)
AVX-512 支持情况: 支持 (AVX-512)
[2/4] NUMA 内存节点拓扑
--------------------------------------------------
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 0 size: 515651 MB
node 0 free: 350731 MB
node 1 cpus: 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
node 1 size: 516074 MB
node 1 free: 262974 MB
node 2 cpus: 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
[3/4] 系统内存与物理插槽状况
--------------------------------------------------
total used free shared buff/cache available
内存: 2.0Ti 33Gi 602Gi 1.8Gi 1.3Ti 1.9Ti
交换: 182Gi 2.4Gi 179Gi
正在检测物理内存通道与频率 (可能需要 sudo 权限)...
提示: 请使用 'sudo bash check_hardware.sh' 运行以获取准确的内存通道与插槽信息。
[4/4] GPU 拓扑与插槽带宽检测
--------------------------------------------------
index, name, pci.bus_id, pcie.link.gen.max, pcie.link.width.max
0, NVIDIA H100 PCIe, 00000000:1B:00.0, 5, 16
1, NVIDIA H100 PCIe, 00000000:1C:00.0, 5, 16
2, NVIDIA H100 PCIe, 00000000:2B:00.0, 5, 16
3, NVIDIA H100 PCIe, 00000000:2D:00.0, 5, 16
4, NVIDIA H100 PCIe, 00000000:9A:00.0, 5, 16
5, NVIDIA H100 PCIe, 00000000:9B:00.0, 5, 16
6, NVIDIA RTX 6000 Ada Generation, 00000000:AC:00.0, 4, 16
GPU 间拓扑连接 (NVLink vs PCIe):
GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 GPU6 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X NV12 NODE NODE SYS SYS SYS 0-31,128-159 0N/A
GPU1 NV12 X NODE NODE SYS SYS SYS 0-31,128-159 0N/A
GPU2 NODE NODE X NV12 SYS SYS SYS 0-31,128-159 0N/A
GPU3 NODE NODE NV12 X SYS SYS SYS 0-31,128-159 0N/A
GPU4 SYS SYS SYS SYS X NV12 NODE 64-95,192-223 2N/A
GPU5 SYS SYS SYS SYS NV12 X NODE 64-95,192-223 2N/A
GPU6 SYS SYS SYS SYS NODE NODE X 64-95,192-223 2N/A
Legend:
X = Self
SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX = Connection traversing at most a single PCIe bridge
NV# = Connection traversing a bonded set of # NVLinks
### Reproduction
conda activate ktEnv
# 限制可见显卡为 GPU 0, 1, 2, 3
export CUDA_DEVICE_ORDER=PCI_BUS_ID
export CUDA_VISIBLE_DEVICES=0,1,2,3
# 启动服务
python -m sglang.launch_server \
--model-path /media/user/LVM/LLM/GLM-5.2-FP8 \
--kt-weight-path /media/user/LVM/LLM/GLM-5.2-CPU-INT4 \
--kt-method AMXINT4 \
--kt-numa-nodes 0 1 \
--kt-threadpool-count 2 \
--kt-cpuinfer 64 \
--kt-num-gpu-experts 64 \
--kt-gpu-prefill-token-threshold 1024 \
--kt-enable-dynamic-expert-update \
--kt-expert-placement-strategy uniform \
--tp-size 4 \
--trust-remote-code \
--host 0.0.0.0 \
--port 30000 \
--mem-fraction-static 0.70 \
--kv-cache-dtype fp8_e4m3 \
--max-total-tokens 262144 \
--context-length 262144 \
--max-running-requests 1 \
--attention-backend nsa \
--fp8-gemm-backend cutlass \
--disable-shared-experts-fusion \
--disable-custom-all-reduce \
--allow-auto-truncate \
--skip-server-warmup \
--tool-call-parser glm47 \
--reasoning-parser glm45 \
--served-model-name GLM5.2
### Others
使用ktransformer量化为INT4的GLM5.2-FP8,在4*H100 PCIE上运行后只有14t/s,这正常吗,是否有加速的方式?
Contributor guide
Research direction
Start by reproducing the provided sglang.launch_server command with CUDA_VISIBLE_DEVICES=0,1,2,3 and record the 14 t/s result. Inspect the KTransformers AMXINT4, NUMA, CPU inference, expert placement, and GPU prefill settings used in the command. Done means identifying the limiting configuration or implementation path and documenting a verified throughput improvement or an evidence-based explanation of the observed speed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100