pipenetwork commited on
Commit
99a39b8
·
verified ·
1 Parent(s): 373bc44

Unified measured-quantization table across all tiers

Browse files
Files changed (1) hide show
  1. README.md +22 -30
README.md CHANGED
@@ -94,38 +94,31 @@ prompt = apply_chat_template(processor, config, "Describe this image.", num_imag
94
  print(generate(model, processor, prompt, ["your_image.jpg"], max_tokens=512, verbose=False))
95
  ```
96
 
97
- ## Quantizations
98
-
99
- | Repo | Bits | Size |
100
- |---|---|---|
101
- | [...-MLX-4bit](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-4bit) | 4 | 6.0 GB |
102
- | [...-MLX-3bit](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-3bit) | 3 | 4.5 GB |
103
- | [...-MLX-6bit](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-6bit) | 6 | 7.7 GB |
104
- | [...-MLX-8bit](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-8bit) | 8 | 9.7 GB |
105
- | [...-MLX-bf16](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-bf16) | 16 | 18.8 GB |
106
-
107
- Group size 64, `affine` mode. The vision tower is left unquantized (mlx-vlm's default for multimodal projector/patch-embed modules), so the size delta between tiers comes from the language model.
108
-
109
- ## Measured quantization quality
110
-
111
- Against the bf16 reference these were converted from 65,536 tokens of wikitext-2 test
112
- at 1024 context, identical token ids through mlx-lm, on an M3 Ultra. KL is measured
113
- against bf16's own output distribution, so lower means closer to the original model.
114
-
115
- | model | lang. weights | ppl | Δppl | KL(bf16‖quant) | top-1 vs bf16 | decode |
116
- |---|---|---|---|---|---|---|
117
- | bf16 reference | 17.91 GB | 8.1273 | — | — | — | 38.6 t/s |
118
- | 8bit | 9.51 GB | 8.1277 | +0.00% | 0.00124 | 98.24% | 66.9 t/s |
119
- | 6bit | 7.28 GB | 8.1426 | +0.19% | 0.00523 | 96.20% | 80.3 t/s |
120
- | 5bit | 6.16 GB | 8.2012 | +0.91% | 0.01845 | 93.24% | 91.5 t/s |
121
- | **4bit** (this repo) | 5.04 GB | 8.5816 | +5.59% | 0.07330 | 87.06% | 108.6 t/s |
122
- | 3bit | 3.92 GB | 10.8167 | +33.09% | 0.32843 | 73.44% | 124.9 t/s |
123
- | [nightmedia mxfp4](https://huggingface.co/nightmedia/Qwen3.5-9B-DS9-USS-Defiant-mxfp4-mlx) | 4.76 GB | 8.9443 | +10.05% | 0.11328 | 82.34% | 113.5 t/s |
124
 
125
  Reading it:
126
 
127
  - **8bit is effectively free** — bf16 perplexity to four decimals at 47% of the footprint.
128
- - **5bit is the best quality-per-GB**: under 1% perplexity for 6.2 GB.
129
  - **The usable floor is 4bit.** 3bit still answers factual questions correctly but costs
130
  +33% perplexity; treat it as a tight-memory fallback.
131
  - **No 2-bit tier is published.** Pure 2-bit collapses (ppl 214.5, 28% top-1) and MLX's
@@ -134,10 +127,9 @@ Reading it:
134
  - At the 4-bit tier this affine group-64 quant loses about half the perplexity MXFP4 does,
135
  costing 4.5 vs 4.25 bits/weight.
136
 
137
- All tiers are quantizations of the same weights, so this isolates the quantization scheme.
138
  Reproduce with [`bench.py`](https://github.com/PipeNetwork/defiant-fable-mlx).
139
 
140
- ## Sampling## Sampling
141
 
142
  DavidAU's notes for this model, which carry over:
143
 
 
94
  print(generate(model, processor, prompt, ["your_image.jpg"], max_tokens=512, verbose=False))
95
  ```
96
 
97
+ ## All quantizations, measured
98
+
99
+ Every tier below quantizes the *identical* bf16 weights, so bf16 is exact ground truth and
100
+ the quantization scheme is the only variable. Measured on 65,536 tokens of wikitext-2 test
101
+ at 1024 context, all models fed the same token ids through mlx-lm, on an M3 Ultra. KL is
102
+ against bf16's own output distribution lower means closer to the original model.
103
+
104
+ | Repo | Size | Bits/w | ppl | Δppl | KL(bf16‖q) | top-1 | decode | verdict |
105
+ |---|---|---|---|---|---|---|---|---|
106
+ | [bf16](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-bf16) | 18.8 GB | 16 | 8.1273 | — | — | — | 38.6 t/s | exact reference |
107
+ | [8bit](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-8bit) | 10.4 GB | 8.86 | 8.1277 | +0.00% | 0.00124 | 98.24% | 66.9 t/s | free no reason to run bf16 |
108
+ | [6bit](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-6bit) | 8.2 GB | 6.96 | 8.1426 | +0.19% | 0.00523 | 96.20% | 80.3 t/s | near-lossless |
109
+ | [5bit](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-5bit) | 7.1 GB | 6.01 | 8.2012 | +0.91% | 0.01845 | 93.24% | 91.5 t/s | **best quality-per-GB** |
110
+ | **[4bit](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-4bit)** ← this repo | 6.0 GB | 5.06 | 8.5816 | +5.59% | 0.07330 | 87.06% | 108.6 t/s | usable floor; common default |
111
+ | [3bit](https://huggingface.co/pipenetwork/Qwen3.5-9B-The-Defiant-Fable-Uncensored-Heretic-MLX-3bit) | 4.8 GB | 4.11 | 10.8167 | +33.09% | 0.32843 | 73.44% | 124.9 t/s | tight-memory fallback only |
112
+ | [nightmedia mxfp4](https://huggingface.co/nightmedia/Qwen3.5-9B-DS9-USS-Defiant-mxfp4-mlx) | 5.6 GB | 4.25 | 8.9443 | +10.05% | 0.11328 | 82.34% | 113.5 t/s | for comparison |
113
+
114
+ Sizes are the full repo; `Bits/w` is the whole-model average, which sits above the nominal
115
+ width because the vision tower stays bf16 (0.91 GB) in every tier. All tiers are group size
116
+ 64, `affine` mode.
 
 
 
 
 
 
 
117
 
118
  Reading it:
119
 
120
  - **8bit is effectively free** — bf16 perplexity to four decimals at 47% of the footprint.
121
+ - **5bit is the best quality-per-GB**: under 1% perplexity.
122
  - **The usable floor is 4bit.** 3bit still answers factual questions correctly but costs
123
  +33% perplexity; treat it as a tight-memory fallback.
124
  - **No 2-bit tier is published.** Pure 2-bit collapses (ppl 214.5, 28% top-1) and MLX's
 
127
  - At the 4-bit tier this affine group-64 quant loses about half the perplexity MXFP4 does,
128
  costing 4.5 vs 4.25 bits/weight.
129
 
 
130
  Reproduce with [`bench.py`](https://github.com/PipeNetwork/defiant-fable-mlx).
131
 
132
+ ## Sampling
133
 
134
  DavidAU's notes for this model, which carry over:
135