Morrowmake/glm53-flash-cmp170hx-recipe
Sobre
GLM-5.3-Flash on 4× NVIDIA CMP 170HX with vLLM: up to 482.6 tok/s single-user, up to 943.7 tok/s at 8 users, 262K context, TP4 or PP4, one-command container install
Design e mídiaCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- 0
- em 15 dias
- +2
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalGLM-5.3-Flash on 4× NVIDIA CMP 170HX
by Morrowmake
A 320B-parameter MoE with a 262,144-token context, served on four CMP 170HX cards in two layouts. Release 1.8.0 tensor-parallel results with verified peer-to-peer at 74 SMs: 482.6 tok/s for one user and 943.7 tok/s across eight, 3,161 tok/s cold prefill and a 1,203,765-token KV pool. The weights are W4A16 and nothing else is cut: the KV cache is full precision, there is no FP8 anywhere, and nothing is offloaded to CPU or disk.
This repository installs and runs GLM-5.3-Flash on four NVIDIA CMP 170HX cards behind an OpenAI-compatible API, with tool calls, reasoning, images and video, and a DFlash2 speculative drafter. Upstream vLLM's sparse-attention path needs a Hopper GPU; the CMP 170HX is Ampere (sm_80). Our vLLM fork adds the Ampere kernels that make the model run at all, then spends the rest of its patches on making it fast and making it repeatable. It runs only as a container image, so the engine and its Python environment stay out of your system. P2P is enabled automatically after a startup content check passes; otherwise the server runs with P2P disabled.
Also on these cards: DeepSeek-V4.1-Flash on four CMP 170HX.
Quick start
One command from a fresh clone, after the one-time host setup:
git clone https://github.com/Morrowmake/glm53-flash-cmp170hx-recipe.git
cd glm53-flash-cmp170hx-recipe
./start.sh # pull the engine image, fetch the model, start, wait for /health
Then try it:
./start.sh smoke # one chat request and one tool call
curl http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model": "glm-5.3-flash",
"messages": [{"role": "user", "content": "Write a haiku about PCIe."}],
"max_tokens": 4096}'
GLM-5.3 always reasons before it answers. The reasoning comes back in the message's
reasoningfield and the answer incontent. Setmax_tokensfor the reasoning plus the answer: if the limit is reached while the model is still reasoning,contentcomes back empty withfinish_reason: "length"."chat_template_kwargs": {"enable_thinking": false}has no effect; usereasoning_effort(low,high,max) to shorten the reasoning (Talk to it).
./start.sh skips anything already done, so running it twice is safe; an
interrupted download resumes. The image ships no warm-cache seed: it starts
compile on first boot (cold), so the first start is slower; later starts reuse
the compiled kernels in ./cache.
Any OpenAI-compatible client works with base URL http://127.0.0.1:8000/v1
and model glm-5.3-flash. The API listens on this machine only and has no
API key unless you change that.
Python, streaming and tool-call clients are in examples/.
Prefer Docker Compose? The same container, also one command from a fresh clone:
docker compose up # or in the background: docker compose up -d
It downloads the checkpoints, then starts the server as the owner of the
checkout; docker compose ps shows it healthy once /health answers
(Docker Compose). Compose restarts a
crashed server up to 3 times; ./start.sh does not (run ./start.sh restart).
Use one or the other.
Both download the checkpoints at the exact Hugging Face revisions this release was validated with.
Which setups this release is for. Two layouts, one switch (
LAYOUT=tp4orLAYOUT=pp4):
- Tensor-parallel 4 (the default) is optimised for PCIe x16 links — cards with the x16 capacitor modification. It gives each request the fastest answer. On cards limited to x4 links it is bus-bound and much slower.
- Pipeline-parallel 4 passes only activations between the cards, so it needs far less link bandwidth; it is the layout for cards limited to x4 links, and for many parallel users and long prompts. Performance on x4 links has not yet been measured.
./start.shchecks your link width and suggestsLAYOUT=pp4if a card is narrower than x16.
One-time host setup
- 4× NVIDIA CMP 170HX, each exposing 64 GiB; PCIe Gen2 x16 links for tensor-parallel 4 (pipeline-parallel 4 is built for narrower links)
- Linux with NVIDIA driver 580 or newer
- Docker with the NVIDIA Container Toolkit,
usable by your user:
docker run --rm --gpus all nvidia/cuda:13.3.1-base-ubuntu24.04 nvidia-smilists all four cards - optional: a P2P-capable driver build for verified peer-to-peer (PCIe peer-to-peer); without it the server runs with P2P disabled
- for
./start.sh:git,curl,flock,setsid, Python 3 for the boot check, andjqfor the smoke test - about 180 GiB (193 GB) of disk for the two checkpoints, plus the engine image and the kernel compile caches (details)
Headline numbers
Measured 2026-10-16 on 4× CMP 170HX, 74 SMs per card, mainline cmpunlocker with P2P, recipe defaults, 262,144-token context, 180 W per card and PCIe x16 links. Decode uses the MiaAI-Lab protocol: 400 tokens, temperature 0, requests sent with thinking off (GLM-5.3 reasons regardless; reasoning tokens count); one user is the median of five runs, and two, four and eight users the median aggregate rate of three runs, each layout on one boot.
| Tensor-parallel 4 + peer-to-peer (default after verification) |
Pipeline-parallel 4 + peer-to-peer |
|
|---|---|---|
| 1 user · structured | 482.6 | 232.4 |
| 1 user · code | 442.1 | 209.9 |
| 1 user · prose | 232.1 | 100.1 |
| 2 users, total · structured | 606.5 | 343.8 |
| 2 users, total · code | 460.3 | 273.4 |
| 2 users, total · prose | 314.7 | 195.5 |
| 4 users, total · structured | 717.7 | 409.2 |
| 4 users, total · code | 618.7 | 382.8 |
| 4 users, total · prose | 501.4 | 314.2 |
| 8 users, total · structured | 943.7 | 664.1 |
| 8 users, total · code | 835.0 | 608.8 |
| 8 users, total · prose | 667.2 | 469.2 |
| Prompt reading (cold prefill) | 3,161 | 7,419 |
| KV pool (tokens) | 1,203,765 | 2,088,960 |
All rates are up-to figures in tok/s. One user is streaming speed per request; two, four and eight users are the combined rate of that many simultaneous requests. Structured output and code are drafted well, so they decode fastest; prose least. DFlash2 drafts up to 7 tokens ahead for one user and 3 under load. One-user prose varies most between runs. Both layouts were measured on PCIe x16 links. Quality on the final release build, scored on the answer after the reasoning: TP4 HumanEval 151/164 and GSM8K 1,286/1,319. Method and exact figures: Results.
Settings
Settings live in .env; see Settings
for boot checks and default reasoning effort.
Choosing a layout
Tensor-parallel 4 (tp4, the default) gives one or two interactive users the
fastest answer per request and needs x16 links. Pipeline-parallel 4 (pp4)
suits many parallel users, long prompts and x4 links, with higher cold prefill
throughput and a larger KV pool (Results). Switch with LAYOUT=pp4 ./start.sh restart (or set it
in .env); details in Choosing a layout.
Documentation
- Results: throughput, quality, decode and prefill in detail
- How to use this repo: install, settings, peer-to-peer, kill switches, day to day, updates, Docker Compose, containers
- Optional compiled Marlin: defaults, switches, building it
- How it works: what makes it fast and correct, and what runs
- Engine switches: the engine's internal switches, for troubleshooting
- Status and known limits
- Model licences: complete target-model MIT notice, drafter restrictions and method citations
- Examples: curl, Python, streaming, tool calls, layout
.envfiles - Container image and CHANGELOG.md
- Found a problem? Open an issue; the bug template asks for the version, layout, peer-to-peer setting and log lines we need
Update
./start.sh updatepulls the new release and engine image and restarts; your.envis preserved. A checkout that ran the engine natively under an earlier release moves to the container on the same.envand checkpoints (details).- With Compose:
git pull, thendocker compose up -d. - Older releases are git tags; their images may be retired.
Updating to 1.8.0 from 1.7.x:
- Size
max_tokensfor the reasoning plus the answer. GLM-5.3 always reasons; this engine returns the reasoning inreasoningand the answer incontent. A reply that hits the limit while still reasoning has an emptycontent.enable_thinking: falsehas no effect. - In
.env, delete anyVLLM_BRANCH=ampere-glm53line (that branch is retired), anyIMAGEorVLLM_COMMITline (to follow this release's image), and anEXTRA_ARGSline carryingmax_pixelsandmax_image_tokensif you added it forMM_CAP=1on 1.7.2. - Engine switches have new names: rename any old
VLLM_GLM5_*(or other renamed) line in.envordocker/container.env; old names are ignored with a warning at startup. Delete aSPEC_Nline: with DFlash2 the server refuses it. The CHANGELOG lists every renamed and retired setting. - Native installs need Docker and the NVIDIA Container Toolkit first; see the
CHANGELOG for the
.envlines to remove.
Licences
This recipe — the scripts and the documentation — is MIT, © 2026 Morrowmake. See LICENSE.
The vLLM fork is Apache-2.0.
The downloaded models have separate licences:
- Target:
canada-quant/GLM-5.3-Flash-W4A16-MTPdeclareslicense: mit(MIT), inherited from the base modelzai-org/GLM-5.3-Flash. Its card says: "Follow the base model's usage terms." - Default drafter:
incoai/GLM-5.3-Flash-DFlash2declareslicense: cc-by-nc-nd-4.0(CC BY-NC-ND 4.0). Its card says "for research and evaluation. For commercial licensing, contact [email protected]." The licence requires attribution, prohibits commercial use, and prohibits distributing modified material.
DFlash2 is the only supported speculative mode; every figure on this page uses it. Its default checkpoint does not grant commercial-use permission: commercial use requires a separate licence from incoai (Known limits). The model-licence reference preserves the target's complete inherited MIT notice and describes the separate checkpoint terms.
The benchmark prompts come from MiaAI-Lab's repository (AGPL-3.0) and their sparkDash prompt constants (MIT), used as data with attribution. No code from their repositories is included here.
Credits
If this recipe helps you, please credit Morrowmake and link this repository.
Citation metadata: CITATION.cff.
- MiaAI-Lab for publishing the benchmark prompts used in the decode tables.
- incoai for the DFlash2 drafter checkpoint and DFlash 2. The original DFlash method is by Jian Chen, Yesheng Liang and Zhijian Liu (ICML 2026).
- canada-quant for the W4A16 quantisation.
- Z.ai for GLM-5.3-Flash, and the vLLM project for the engine these patches sit on top of.
Source
The fork contains our maintained changes, inherited upstream code and the
adaptations credited below —
Morrowmake/vllm-cmp170hx @ ampere.
Acknowledgements
- Mainline cmpunlocker and its maintainer's P2P work, plus our minimal TRAP31 patch, form the basis of the P2P driver build. Ready to install: Morrowmake/cmpunlocker.
- Upstream vLLM provides the RecoverSSM implementation and fixes we build on.
- MiaAI-Lab's GLM-5.3-Flash recipe provided ideas for tool-call masking, the startup boot check, cached prompt-boundary reuse and scheduler back-off, Mamba in-flight reservation, the image layer-count guard and the default reasoning-effort setting. These are idea credits, not a claim that we imported its AGPL implementation.
- wtdcode/vllm-backport and lazymio provided the shared-expert stream-reordering implementation adapted in the engine (Apache-2.0).
- JJ48 published the acceptance/step-cost approach that informed acceptance-adaptive draft depth.
- TensorFold informed confidence-gated draft skipping; that optional engine path is disabled by this release, but remains in its source.
- kindlingai's GX10 recipe provided ideas for GLM KDA state recovery, unused-draft work and exact BF16 mHC weight storage. No code from that unlicensed recipe was used.
- The engine builds on Marlin (Elias Frantar and subsequent Neural Magic contributors), Flash Linear Attention (Songlin Yang, Yu Zhang and contributors), and DeepSeek's DeepGEMM reference implementation. Original source notices and component licences apply separately.
Explore projetos relacionados
Carregando…