Update model card: friendly factual lead, H100 KV note, tightened wording
Browse files
README.md
CHANGED
|
@@ -22,9 +22,17 @@ tags:
|
|
| 22 |
|
| 23 |
# GLM-5.2-W4AFP8
|
| 24 |
|
| 25 |
-
GLM-5.2-W4AFP8
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
## Benchmarks
|
| 30 |
|
|
@@ -35,10 +43,10 @@ Measured on 8×H200 with SGLang at GLM-5.2's recommended sampling (temperature 1
|
|
| 35 |
| GPQA-Diamond (reasoning) | 90.9 | 91.2 |
|
| 36 |
| IFBench (instruction following, strict) | 75.0 | 74.3 |
|
| 37 |
| AA-LCR (long-context reasoning) | 76.0 | 69.7 |
|
| 38 |
-
| Needle-in-a-haystack at ~983K tokens | 3 / 3 retrieved |
|
| 39 |
-
| BFCL (tool calling) | matches
|
| 40 |
|
| 41 |
-
Reasoning (GPQA) and instruction following (IFBench) match the published results within evaluation tolerance.
|
| 42 |
|
| 43 |
## Performance (8×H200, single node)
|
| 44 |
|
|
@@ -49,8 +57,6 @@ The model includes a quantized Multi-Token Prediction (MTP) layer, so SGLang's E
|
|
| 49 |
| Single-stream decode | 75 tok/s | 118 tok/s |
|
| 50 |
| Throughput (8K in, 1K out, 16 concurrent) | 658 tok/s | 733 tok/s |
|
| 51 |
|
| 52 |
-
Speculative decoding is lossless. The main model verifies every drafted token, so outputs are unchanged.
|
| 53 |
-
|
| 54 |
## Serving
|
| 55 |
|
| 56 |
Requirements: Hopper GPUs (H100 or H200, SM90) and SGLang v0.5.13.post1 or later.
|
|
@@ -58,18 +64,26 @@ Requirements: Hopper GPUs (H100 or H200, SM90) and SGLang v0.5.13.post1 or later
|
|
| 58 |
```bash
|
| 59 |
python -m sglang.launch_server \
|
| 60 |
--model-path PhalaCloud/GLM-5.2-W4AFP8 \
|
| 61 |
-
--quantization w4afp8
|
| 62 |
-
--
|
| 63 |
-
--
|
| 64 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
--trust-remote-code
|
| 66 |
```
|
| 67 |
|
|
|
|
|
|
|
| 68 |
To enable speculative decoding (the 118 tok/s single-stream path), add:
|
| 69 |
|
| 70 |
```bash
|
| 71 |
-
--speculative-algorithm EAGLE
|
| 72 |
-
--speculative-
|
|
|
|
|
|
|
| 73 |
```
|
| 74 |
|
| 75 |
The server exposes the standard OpenAI-compatible API: chat completions, tool calls, and reasoning content.
|
|
@@ -78,8 +92,6 @@ The server exposes the standard OpenAI-compatible API: chat completions, tool ca
|
|
| 78 |
|
| 79 |
The routed MoE experts use 4-bit integer weights (group size 128) with FP8 (E4M3) activations. Dense layers, shared experts, attention, the sparse-attention indexer, and the MTP layer's non-expert weights stay in FP8 or BF16. Activations are quantized at run time. This is the layout SGLang's `w4afp8` path loads. Weight quantization used activation-aware scaling (AWQ) with a short calibration set.
|
| 80 |
|
| 81 |
-
The model keeps GLM-5.2's full parameter count (about 750B). Only the weight precision changes. The parameter count shown on this page (about 387B) is a storage artifact: two 4-bit weights pack into each byte, so the figure counts storage elements rather than logical parameters.
|
| 82 |
-
|
| 83 |
## Limitations
|
| 84 |
|
| 85 |
- Tested with SGLang only. vLLM and other engines are unverified.
|
|
|
|
| 22 |
|
| 23 |
# GLM-5.2-W4AFP8
|
| 24 |
|
| 25 |
+
GLM-5.2-W4AFP8 is a 4-bit quantization of [GLM-5.2](https://huggingface.co/zai-org/GLM-5.2-FP8) that runs the full 1M-token context on a single 8×H200 node.
|
| 26 |
|
| 27 |
+
Two things make it useful:
|
| 28 |
+
|
| 29 |
+
- **The full 1M context fits on one node.** Quantizing the Mixture-of-Experts weights to 4-bit cuts their footprint from 755 GB to 368 GB, which frees enough memory for the complete 1M-token KV cache. The FP8 release reaches only about 500K tokens on the same hardware.
|
| 30 |
+
- **No measurable quality loss.** Reasoning, instruction-following, long-context, and tool-calling benchmarks all land within measurement noise of the FP8 model.
|
| 31 |
+
|
| 32 |
+
> [!NOTE]
|
| 33 |
+
> This model keeps GLM-5.2's full 753B parameters. The ~387B in the sidebar is a counting quirk: two 4-bit weights share each int8 slot, so the metadata counts storage slots, not parameters.
|
| 34 |
+
|
| 35 |
+
**Tested with SGLang only** ([v0.5.13.post1](https://github.com/sgl-project/sglang)). The 4-bit layout and speculative-decoding path are SGLang-specific and untried on vLLM or other engines.
|
| 36 |
|
| 37 |
## Benchmarks
|
| 38 |
|
|
|
|
| 43 |
| GPQA-Diamond (reasoning) | 90.9 | 91.2 |
|
| 44 |
| IFBench (instruction following, strict) | 75.0 | 74.3 |
|
| 45 |
| AA-LCR (long-context reasoning) | 76.0 | 69.7 |
|
| 46 |
+
| Needle-in-a-haystack at ~983K tokens | 3 / 3 retrieved | not published |
|
| 47 |
+
| BFCL (tool calling) | matches FP8 baseline | not published |
|
| 48 |
|
| 49 |
+
Reasoning (GPQA) and instruction following (IFBench) match the published results within evaluation tolerance. GLM-5.2 publishes no BFCL or needle reference, so those compare against the FP8 release: tool calling matches (84% vs 87% overall, within sampling noise) and needle retrieval hit all three depths near the 1M-token limit.
|
| 50 |
|
| 51 |
## Performance (8×H200, single node)
|
| 52 |
|
|
|
|
| 57 |
| Single-stream decode | 75 tok/s | 118 tok/s |
|
| 58 |
| Throughput (8K in, 1K out, 16 concurrent) | 658 tok/s | 733 tok/s |
|
| 59 |
|
|
|
|
|
|
|
| 60 |
## Serving
|
| 61 |
|
| 62 |
Requirements: Hopper GPUs (H100 or H200, SM90) and SGLang v0.5.13.post1 or later.
|
|
|
|
| 64 |
```bash
|
| 65 |
python -m sglang.launch_server \
|
| 66 |
--model-path PhalaCloud/GLM-5.2-W4AFP8 \
|
| 67 |
+
--quantization w4afp8 \
|
| 68 |
+
--disable-shared-experts-fusion \
|
| 69 |
+
--tp 8 \
|
| 70 |
+
--kv-cache-dtype fp8_e4m3 \
|
| 71 |
+
--reasoning-parser glm45 \
|
| 72 |
+
--tool-call-parser glm47 \
|
| 73 |
+
--context-length 1048576 \
|
| 74 |
+
--mem-fraction-static 0.85 \
|
| 75 |
--trust-remote-code
|
| 76 |
```
|
| 77 |
|
| 78 |
+
On 8×H200 (1128 GB) this serves the full 1M-token context. On 8×H100 (640 GB) the weights still fit and leave room for roughly 400K tokens; the FP8 release does not fit on 8×H100 at all.
|
| 79 |
+
|
| 80 |
To enable speculative decoding (the 118 tok/s single-stream path), add:
|
| 81 |
|
| 82 |
```bash
|
| 83 |
+
--speculative-algorithm EAGLE \
|
| 84 |
+
--speculative-num-steps 1 \
|
| 85 |
+
--speculative-eagle-topk 1 \
|
| 86 |
+
--speculative-num-draft-tokens 2
|
| 87 |
```
|
| 88 |
|
| 89 |
The server exposes the standard OpenAI-compatible API: chat completions, tool calls, and reasoning content.
|
|
|
|
| 92 |
|
| 93 |
The routed MoE experts use 4-bit integer weights (group size 128) with FP8 (E4M3) activations. Dense layers, shared experts, attention, the sparse-attention indexer, and the MTP layer's non-expert weights stay in FP8 or BF16. Activations are quantized at run time. This is the layout SGLang's `w4afp8` path loads. Weight quantization used activation-aware scaling (AWQ) with a short calibration set.
|
| 94 |
|
|
|
|
|
|
|
| 95 |
## Limitations
|
| 96 |
|
| 97 |
- Tested with SGLang only. vLLM and other engines are unverified.
|