Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -22,6 +22,10 @@ itself an abliterated derivative of `Qwen/Qwen3.8-27B`.
|
|
| 22 |
|
| 23 |
Produced and verified on **2x AMD MI210 (gfx90a / CDNA2)**.
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
## Scheme
|
| 26 |
|
| 27 |
Weights 8-bit, **group size 128**, symmetric. Activations are **not** quantized (`pack-quantized`), so this is weight-only int8.
|
|
@@ -29,6 +33,72 @@ Weights 8-bit, **group size 128**, symmetric. Activations are **not** quantized
|
|
| 29 |
Quantized with `llm-compressor` 0.12.1a20260701, `QuantizationModifier`
|
| 30 |
(round-to-nearest). **No calibration data was used** and none is needed: the scheme is weight-only, so scales come straight from the weights.
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
## What is quantized — and what deliberately is not
|
| 33 |
|
| 34 |
Qwen3.8-27B is a **hybrid**: `layer_types` is 48 `linear_attention` (GDN) layers
|
|
@@ -47,16 +117,11 @@ Of 985 modules, **256 are quantized** and 729 are left at BF16:
|
|
| 47 |
| `re:.*linear_attn.*` | 384 | all 48 GDN layers, incl. `conv1d` / `in_proj_*` / `out_proj` |
|
| 48 |
| `re:.*visual.*` | 167 | vision tower |
|
| 49 |
| `re:.*norm.*` | 271 | norms |
|
| 50 |
-
| `re:^mtp\..*` | 15 | MTP draft head
|
| 51 |
| `lm_head`, `embed_tokens` | 2 | |
|
| 52 |
|
| 53 |
-
MLPs dominate parameter count, so quantizing them captures most of the
|
| 54 |
-
while the sensitive linear-attention path stays untouched.
|
| 55 |
-
|
| 56 |
-
## MTP is intact
|
| 57 |
-
|
| 58 |
-
The 15 `mtp.*` tensors are preserved at BF16. Note they live in the **top-level**
|
| 59 |
-
`mtp.` namespace, not under `model.`, so naive ignore patterns miss them.
|
| 60 |
|
| 61 |
## Loading gotcha
|
| 62 |
|
|
@@ -85,13 +150,11 @@ gate rejects (it accepts only 64 or 128).
|
|
| 85 |
## Verified
|
| 86 |
|
| 87 |
- Loads under vLLM `0.27.2rc0+mi210.1`, TP=2 on 2x MI210
|
| 88 |
-
-
|
| 89 |
-
- Correct at temperature 0: `17*23` -> `391`; 2:15pm–6:40pm -> `265` minutes;
|
| 90 |
string-reverse one-liner -> `s = s[::-1]`
|
| 91 |
|
| 92 |
-
**Not measured:**
|
| 93 |
-
|
| 94 |
-
spot checks above.
|
| 95 |
|
| 96 |
## Note
|
| 97 |
|
|
|
|
| 22 |
|
| 23 |
Produced and verified on **2x AMD MI210 (gfx90a / CDNA2)**.
|
| 24 |
|
| 25 |
+
> **On this hardware int8 is SLOWER than BF16** — roughly half the decode rate —
|
| 26 |
+
> and MTP speculative decoding does not work. Both are measured below. Use these
|
| 27 |
+
> only if you need the smaller memory footprint.
|
| 28 |
+
|
| 29 |
## Scheme
|
| 30 |
|
| 31 |
Weights 8-bit, **group size 128**, symmetric. Activations are **not** quantized (`pack-quantized`), so this is weight-only int8.
|
|
|
|
| 33 |
Quantized with `llm-compressor` 0.12.1a20260701, `QuantizationModifier`
|
| 34 |
(round-to-nearest). **No calibration data was used** and none is needed: the scheme is weight-only, so scales come straight from the weights.
|
| 35 |
|
| 36 |
+
## Measured performance — read this before choosing int8
|
| 37 |
+
|
| 38 |
+
Benchmarked on 2x AMD MI210 (gfx90a), vLLM `0.27.2rc0+mi210.1`, TP=2,
|
| 39 |
+
**prefix caching disabled** (leaving it on inflates decode, because the
|
| 40 |
+
harness derives decode time by subtracting a prefill that the second, cached
|
| 41 |
+
request never performs).
|
| 42 |
+
|
| 43 |
+
Decode, tokens/s, at three context depths:
|
| 44 |
+
|
| 45 |
+
| config | @0 | @8k | @32k | weights |
|
| 46 |
+
|---|---|---|---|---|
|
| 47 |
+
| **BF16 + MTP** | **54.1** | **33.3** | **16.0** | 52 GB |
|
| 48 |
+
| BF16 | 31.3 | 17.5 | 7.7 | 52 GB |
|
| 49 |
+
| **W8A8** (this family) | 17.3 | 12.0 | 6.4 | 34 GB |
|
| 50 |
+
| **W8A16** (this family) | 16.1 | 11.3 | 6.2 | 34 GB |
|
| 51 |
+
|
| 52 |
+
**INT8 is roughly half the decode rate of BF16 on this hardware, not faster.**
|
| 53 |
+
|
| 54 |
+
gfx90a has no fused dequantization path and its INT8 peak equals its BF16 peak
|
| 55 |
+
(181 TOPS vs 181 TFLOP/s), so every quantized weight is converted to bf16 before
|
| 56 |
+
the MFMA units can use it, and there is no compute headroom to recover that cost
|
| 57 |
+
from. The same pattern held for int8 activations and for an int8 KV cache, which
|
| 58 |
+
lost 38-48% of throughput at depth.
|
| 59 |
+
|
| 60 |
+
What int8 does buy is **memory**: 34 GB against 52 GB, and roughly 830k KV
|
| 61 |
+
tokens against 578k at 64K context (12.7x vs 8.8x concurrency). If you are
|
| 62 |
+
capacity-bound rather than latency-bound, that is the trade on offer.
|
| 63 |
+
|
| 64 |
+
Of the two, **W8A8 is the faster** — about 6% on decode and 36% on prefill —
|
| 65 |
+
despite quantizing more. Prefer it over W8A16 unless you specifically need
|
| 66 |
+
weight-only.
|
| 67 |
+
|
| 68 |
+
On a CUDA GPU with real INT8 tensor-core paths the picture is likely different;
|
| 69 |
+
none of the above should be read as a claim about other hardware.
|
| 70 |
+
|
| 71 |
+
## MTP does not work on these quants
|
| 72 |
+
|
| 73 |
+
The base model ships an MTP draft head and `mtp_num_hidden_layers: 1`, and vLLM
|
| 74 |
+
registers `qwen3_5_mtp` as a speculative method. On BF16 it is a large win —
|
| 75 |
+
**86-100% draft acceptance, ~2x decode**.
|
| 76 |
+
|
| 77 |
+
On any compressed-tensors quantization of this model it produces **0.0%
|
| 78 |
+
acceptance**: the draft runs every step and every token is rejected, so it is
|
| 79 |
+
pure overhead and leaves you slower than not using it.
|
| 80 |
+
|
| 81 |
+
Isolated by elimination, all on the same hardware and vLLM build:
|
| 82 |
+
|
| 83 |
+
| target | acceptance |
|
| 84 |
+
|---|---|
|
| 85 |
+
| official BF16 | 86-100% |
|
| 86 |
+
| abliterated BF16 | 83.8% |
|
| 87 |
+
| W8A8, `mtp.*` kept BF16 | 0.0% |
|
| 88 |
+
| W8A8, `mtp.*` also quantized | 0.0% |
|
| 89 |
+
| W8A16 (weight-only) | 0.0% |
|
| 90 |
+
| W8A8 target, draft pointed at a BF16 checkpoint | 0.0% |
|
| 91 |
+
|
| 92 |
+
So it is not abliteration, not the quantization scheme, not how the MTP head
|
| 93 |
+
itself is treated, and not the draft checkpoint path — vLLM reads `mtp.*` from
|
| 94 |
+
the target regardless. Exactly 0.0% rather than a degraded rate points to
|
| 95 |
+
something structurally broken rather than quality loss.
|
| 96 |
+
|
| 97 |
+
Possibly relevant: vLLM copies the target's quantization into the draft config
|
| 98 |
+
for the `dspark` method and has no equivalent for MTP.
|
| 99 |
+
|
| 100 |
+
**Do not pass `--speculative-config` with these checkpoints.**
|
| 101 |
+
|
| 102 |
## What is quantized — and what deliberately is not
|
| 103 |
|
| 104 |
Qwen3.8-27B is a **hybrid**: `layer_types` is 48 `linear_attention` (GDN) layers
|
|
|
|
| 117 |
| `re:.*linear_attn.*` | 384 | all 48 GDN layers, incl. `conv1d` / `in_proj_*` / `out_proj` |
|
| 118 |
| `re:.*visual.*` | 167 | vision tower |
|
| 119 |
| `re:.*norm.*` | 271 | norms |
|
| 120 |
+
| `re:^mtp\..*` | 15 | MTP draft head |
|
| 121 |
| `lm_head`, `embed_tokens` | 2 | |
|
| 122 |
|
| 123 |
+
MLPs dominate parameter count, so quantizing them captures most of the footprint
|
| 124 |
+
reduction while the sensitive linear-attention path stays untouched.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
## Loading gotcha
|
| 127 |
|
|
|
|
| 150 |
## Verified
|
| 151 |
|
| 152 |
- Loads under vLLM `0.27.2rc0+mi210.1`, TP=2 on 2x MI210
|
| 153 |
+
- Correct at temperature 0: `17*23` -> `391`; 2:15pm-6:40pm -> `265` minutes;
|
|
|
|
| 154 |
string-reverse one-liner -> `s = s[::-1]`
|
| 155 |
|
| 156 |
+
**Not measured:** perplexity, and no benchmark suite has been run. Quality claims
|
| 157 |
+
beyond the spot checks above are unverified.
|
|
|
|
| 158 |
|
| 159 |
## Note
|
| 160 |
|