H20部署GLM5.2-FP8实战:SGLang Docker命令与投机解码参数配置

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

<!--more-->

docker run -d \
--name glm-5.2 \
--gpus all \
--shm-size 32g \
-p 8000:8000 \
-v /models:/models \
-e NCCL_DEBUG=INFO \
-e NCCL_IB_DISABLE=1 \
-e NCCL_P2P_DISABLE=0 \
-e PYTHONUNBUFFERED=1 \
sglang:v0.5.13.post1-cu130 \
sglang serve \
--model-path /models/GLM-5.2-FP8 \
--served-model-name ZV/GLM-5.2 \
--tp 8 \
--mem-fraction-static 0.88 \
--trust-remote-code \
--enable-metrics \
--tool-call-parser glm47 \
--reasoning-parser glm45 \
--chunked-prefill-size 8192 \
--context-length 128000 \
--api-key 032a87e3e383fee677c06e822c11e252 \
--host 0.0.0.0 \
--port 8000

其它参数

参数说明
--speculative-algorithm EAGLE启用 EAGLE 投机解码,用轻量 draft 模型预测多个 token,再由主模型一次性验证,降低延迟
--speculative-num-steps 5draft 模型连续运行 5 步,每步生成候选 token,步数越多每轮预测越长,但验证失败代价也越高
--speculative-eagle-topk 1每步只取 top-1 候选,即贪心选择,树宽最窄,延迟最低,适合多样性文本
--speculative-num-draft-tokens 6每次投机最多生成 6 个 draft token 交给主模型验证
本文结束 感谢您的阅读