GLM5.3 INT8 部署指南
更新时间:
复制 MD 格式
基于灵骏真武 810E 实例 efg.p16en 部署
SGLang v0.5.23
环境准备
镜像
docker pull egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun-tmp/sglang:v0.5.23-ppu2.2.1-20261126模型
# T-HEAD量化模型
modelscope download --model T-HEAD/GLM-5.3-Quant-W-INT8-PerChannel-A-INT8-PerToken --local_dir /path/to/your/modelModelScope 地址:https://modelscope.cn/models/T-HEAD/GLM-5.3-Quant-W-INT8-PerChannel-A-INT8-PerToken
Colocate 部署(单实例部署)
该配置为 colocate 单实例部署,无 P/D 拆分,单进程同时承担 prefill 与 decode。
$SERVING_PORT 为服务端口,请按实际环境设置;客户端直接访问 http://<host>:$SERVING_PORT,无需 router。
Colocate
export MODEL_PATH=/path/to/your/model
export SERVED_MODEL_NAME=GLM5.3
export PYTHONUNBUFFERED=1
export SGLANG_WARMUP_TIMEOUT=3600
export SGLANG_NSA_DUAL_STREAM=0
export SGLANG_ENABLE_CACHELINK=0
export SGLANG_ENABLE_JIT_DEEPGEMM=1
export SGLANG_JIT_DEEPGEMM_PRECOMPILE=1
export SGLANG_JIT_DEEPGEMM_FAST_WARMUP=0
export SGLANG_DISABLE_DSA_INDEXER_FUSION=1
export SGLANG_NSA_FLASHMLA_BACKEND_DECODE_COMPUTE_FP8=0
export SERVING_PORT=8000
sglang serve \
--model-path ${MODEL_PATH} \
--served-model-name ${SERVED_MODEL_NAME} \
--trust-remote-code \
--tp-size 16 \
--prefill-attention-backend fa3 \
--decode-attention-backend flashmla \
--quantization w8a8_int8 \
--cuda-graph-backend-prefill disabled \
--mem-fraction-static 0.9 \
--cuda-graph-max-bs-decode 256 \
--max-running-requests 256 \
--speculative-algorithm EAGLE \
--speculative-num-steps 2 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 3 \
--speculative-attention-mode decode \
--disable-custom-all-reduce \
--watchdog-timeout 24000 \
--dist-timeout 24000 \
--num-continuous-decode-steps 1 \
--disable-shared-experts-fusion \
--reasoning-parser glm45 \
--tool-call-parser glm47 \
--enforce-disable-flashinfer-allreduce-fusion \
--enable-metrics \
--enable-cache-report \
--port ${SERVING_PORT} \
--host 0.0.0.0SGLang v0.5.21
环境准备
镜像
docker pull egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun-tmp/inference-xpu-pytorch-opt:v0.5.21_1ccf267d76_20261116_175604下载模型。
# T-HEAD量化模型
modelscope download --model T-HEAD/GLM-5.3-Quant-W-INT8-PerChannel-A-INT8-PerToken --local_dir /path/to/your/model模型:https://modelscope.cn/models/T-HEAD/GLM-5.3-Quant-W-INT8-PerChannel-A-INT8-PerToken
Colocate 部署(单机合部署)
该流水线为 colocate 单机合部署,无 P/D 拆分,单进程同时承担 prefill 与 decode。
$SERVICE_PORT为服务端口,请按实际环境设置;客户端直接访问http://<host>:$SERVICE_PORT,无需 router。
Colocate
export MODEL_PATH=/path/to/your/model
export SERVED_MODEL_NAME=GLM5.3
export SGLANG_NSA_FLASHMLA_BACKEND_DECODE_COMPUTE_FP8=0
export SGLANG_NSA_DUAL_STREAM=0
export SGLANG_DISABLE_DSA_INDEXER_FUSION=1
export SGLANG_ENABLE_JIT_DEEPGEMM=1
export SGLANG_JIT_DEEPGEMM_PRECOMPILE=1
export SGLANG_JIT_DEEPGEMM_FAST_WARMUP=0
export SGLANG_WARMUP_TIMEOUT=3600
export PYTHONUNBUFFERED=1
export SGLANG_ENABLE_CACHELINK=0
sglang serve \
--model-path ${MODEL_PATH} \
--served-model-name ${SERVED_MODEL_NAME} \
--trust-remote-code \
--tp-size 16 \
--prefill-attention-backend fa3 \
--decode-attention-backend flashmla \
--quantization w8a8_int8 \
--cuda-graph-backend-prefill disabled \
--mem-fraction-static 0.9 \
--cuda-graph-max-bs-decode 256 \
--max-running-requests 256 \
--speculative-algorithm EAGLE \
--speculative-num-steps 2 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 3 \
--speculative-attention-mode decode \
--disable-custom-all-reduce \
--watchdog-timeout 24000 \
--dist-timeout 24000 \
--num-continuous-decode-steps 1 \
--disable-shared-experts-fusion \
--reasoning-parser glm45 \
--tool-call-parser glm47 \
--enforce-disable-flashinfer-allreduce-fusion \
--enable-metrics \
--enable-cache-report \
--port $SERVICE_PORT \
--host 0.0.0.0该文章对您有帮助吗?