westwaters commited on
Commit
afc43dc
Β·
verified Β·
1 Parent(s): 8f61394

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +86 -30
README.md CHANGED
@@ -18,12 +18,25 @@ tags:
18
  - conversational
19
  ---
20
 
21
- # Ling-3.0-tiny β€” Pollard Weights
22
 
23
- **Measured-sensitivity** GGUF quantization of
24
- [`inclusionAI/Ling-3.0-tiny`](https://huggingface.co/inclusionAI/Ling-3.0-tiny)
25
- (7.9B-total / ~1.7B-active MoE, `bailingmoe3`), built with
26
- **[Pollard Weights](https://github.com/WestWaters/pollard-weights)**.
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  Uniform quants spend the same bits on every layer. Pollard **measures** how much
29
  crushing each tensor group actually costs β€” KL-divergence, per layer β€” then a
@@ -32,18 +45,24 @@ fewer on the ones that don't care. Same weights, smarter bit allocation.
32
 
33
  ## Why this over a uniform quant
34
 
35
- Held-out KL-divergence vs a Q6_K reference (lower = closer to the full model):
 
36
 
37
  | build | size | mean KL | vs uniform |
38
  |---|---|---|---|
39
  | **Ling-3.0-tiny Pollard** | **3.83 GB** | **0.1875** | β€” |
40
  | uniform IQ3 (interpolated to 3.83 GB) | 3.83 GB | β‰ˆ 0.204 | **β‰ˆ 8% higher KL** |
 
 
 
41
 
42
- At matched size the measured allocation sits **below** the uniform size↔KL curve β€”
43
- sensitive layers get `iq4_xs`, most get `iq3_s`, the least-sensitive get `iq2_s`;
 
44
  embeddings/output stay `q6_K`; imatrix-uncovered MoE tensors are pinned so the
45
- aggressive base can't crash. (ffn sensitivity spread 6Γ—, attn spread 16Γ— across the
46
- 24 layers β€” that variance is exactly what uniform quants waste.)
 
47
 
48
  ## Prompt format
49
 
@@ -53,53 +72,90 @@ detailed thinking on<|role_end|><role>HUMAN</role>{prompt}<|role_end|><role>ASSI
53
  <think>
54
  ```
55
 
 
 
 
 
 
 
 
 
 
 
 
56
  ## Available files
57
 
58
- | Filename | Base preset | Size | Description |
59
  |---|---|---|---|
60
- | [Ling-3.0-tiny-Pollard-fit4GB.gguf](https://huggingface.co/PollardWeights/Ling-3.0-tiny-Pollard/blob/main/Ling-3.0-tiny-Pollard-fit4GB.gguf) | IQ3_S (measured mix) | 3.83 GB | Fits an ~8 GB machine. Beats same-size uniform IQ3 (above). Recommended. |
 
 
 
61
 
62
- ## Download with the Hugging Face CLI
63
 
64
  ```bash
65
  pip install -U "huggingface_hub[cli]"
66
- hf download PollardWeights/Ling-3.0-tiny-Pollard Ling-3.0-tiny-Pollard-fit4GB.gguf --local-dir ./
 
67
  ```
68
 
69
  ## How to run
70
 
71
- Needs a recent **llama.cpp** with `bailingmoe3` support (PR #26608, merged
72
- 2026‑08‑17, or newer):
 
 
 
 
 
 
73
 
74
  ```bash
75
- llama-cli -m Ling-3.0-tiny-Pollard-fit4GB.gguf -ngl 99 -p "Explain MoE routing simply."
76
- llama-server -m Ling-3.0-tiny-Pollard-fit4GB.gguf -ngl 99 # OpenAI-compatible API
77
  ```
78
 
 
 
 
 
79
  ## imatrix (calibration)
80
 
81
- The importance matrix was computed on a **mixed-domain corpus** (~245K tokens:
82
- encyclopedic prose, narrative prose, and code) so the matrix sees every register the
83
- model serves. The imatrix guides IQ-quant *quality*; it does **not** decide the
84
- allocation β€” the measured KL sensitivity profile does.
 
85
 
86
- ## Which file should I choose
 
 
 
87
 
88
- - **~8 GB RAM / VRAM** β†’ `fit4GB` (this file). Full model in ~3.8 GB with room for
89
- context.
90
- - Want it even smaller? Pollard *loses* to uniform at the extreme IQ2 floor for this
91
- model (the weights are too crushed for reallocation to help), so we don't ship one β€”
92
- measure first, no claim before a number.
93
- - More sizes (a Q5-class `fit6GB`) may be added as they're measured to win.
 
 
 
 
 
 
94
 
95
  ## Notes
96
 
97
  - **License:** MIT, inherited from the base model.
98
  - KL was measured against a **Q6_K reference** on a held-out set (a memory-fit
99
- reference; the reported number is the *relative* win vs a same-size uniform quant).
 
100
  - **Quantized, not fine-tuned** β€” identical weights, better bit allocation.
101
 
102
  ## Credits
103
 
104
  - Base model: [`inclusionAI/Ling-3.0-tiny`](https://huggingface.co/inclusionAI/Ling-3.0-tiny) (Ant Group / inclusionAI)
 
105
  - Method + tooling: [Pollard Weights](https://github.com/WestWaters/pollard-weights) β€” *measure first, no claim before a number.*
 
18
  - conversational
19
  ---
20
 
21
+ # Pollard measured-sensitivity quantizations of Ling-3.0-tiny by inclusionAI
22
 
23
+ Built with **[Pollard Weights](https://github.com/WestWaters/pollard-weights)** on
24
+ **llama.cpp** build `b10360` (`48d22e295`) β€” the first build line with `bailingmoe3`
25
+ support ([PR #26608](https://github.com/ggml-org/llama.cpp/pull/26608), merged
26
+ 2026‑08‑17). Use that build or newer to run these.
27
+
28
+ Original model: https://huggingface.co/inclusionAI/Ling-3.0-tiny
29
+
30
+ ## Model details
31
+
32
+ | | |
33
+ |---|---|
34
+ | Parameter count | ~7.9B total / ~1.7B active (MoE) β€” listed as 8B |
35
+ | Architecture | `bailingmoe3` (128 experts/layer, top‑8 + 1 shared, 24 layers) |
36
+ | Input support | text |
37
+ | Speculative decoding | no |
38
+ | imatrix | **yes** β€” [details below](#imatrix-calibration), corpus + matrix included in this repo |
39
+ | Perplexity / KLD measured | **yes** β€” this is the whole point (see next section) |
40
 
41
  Uniform quants spend the same bits on every layer. Pollard **measures** how much
42
  crushing each tensor group actually costs β€” KL-divergence, per layer β€” then a
 
45
 
46
  ## Why this over a uniform quant
47
 
48
+ Held-out KL-divergence vs a Q6_K reference (lower = closer to the full model),
49
+ measured on the same held-out set for every build:
50
 
51
  | build | size | mean KL | vs uniform |
52
  |---|---|---|---|
53
  | **Ling-3.0-tiny Pollard** | **3.83 GB** | **0.1875** | β€” |
54
  | uniform IQ3 (interpolated to 3.83 GB) | 3.83 GB | β‰ˆ 0.204 | **β‰ˆ 8% higher KL** |
55
+ | uniform IQ3_S | 3.51 GB | 0.2821 | reference points |
56
+ | uniform IQ3_M | 3.56 GB | 0.2469 | (bracket the curve) |
57
+ | uniform IQ4_XS | 4.29 GB | 0.1312 | (bracket the curve) |
58
 
59
+ At matched size the measured allocation sits **below** the uniform size↔KL curve.
60
+ The measured mix: sensitive early layers get `iq4_xs`, most get `iq3_s`, the
61
+ least-sensitive get `iq2_s`; every attention block stays `q6_K`/`q5_K`;
62
  embeddings/output stay `q6_K`; imatrix-uncovered MoE tensors are pinned so the
63
+ aggressive base can't crash. (ffn sensitivity spread ~6Γ—, attn spread ~16Γ— across
64
+ the 24 layers β€” that variance is exactly what a uniform quant wastes. The full
65
+ per-tensor map is in [`Ling-3.0-tiny-Pollard.tensor-types.txt`](https://huggingface.co/PollardWeights/Ling-3.0-tiny-Pollard/blob/main/Ling-3.0-tiny-Pollard.tensor-types.txt).)
66
 
67
  ## Prompt format
68
 
 
72
  <think>
73
  ```
74
 
75
+ ## Which file should I choose?
76
+
77
+ Grab **`Ling-3.0-tiny-Pollard-fit4GB.gguf`** β€” it fits an ~8 GB machine with room for
78
+ context and beats the same-size uniform IQ3 (table above).
79
+
80
+ - **~8 GB RAM / VRAM** β†’ `fit4GB` (this file). Full model in ~3.8 GB.
81
+ - Want it even smaller? Pollard *loses* to uniform at the extreme IQ2 floor for this
82
+ model (the weights are too crushed for reallocation to help), so we don't ship one β€”
83
+ *measure first, no claim before a number.*
84
+ - A Q5-class `fit6GB` will be added once it's measured to win.
85
+
86
  ## Available files
87
 
88
+ | Filename | Type | Size | Description |
89
  |---|---|---|---|
90
+ | [Ling-3.0-tiny-Pollard-fit4GB.gguf](https://huggingface.co/PollardWeights/Ling-3.0-tiny-Pollard/blob/main/Ling-3.0-tiny-Pollard-fit4GB.gguf) | measured mix (IQ2_S→IQ4_XS, q6_K embed/attn) | 3.83 GB | Fits ~8 GB. Beats same-size uniform IQ3. **Recommended.** |
91
+ | [Ling-3.0-tiny-Pollard.imatrix](https://huggingface.co/PollardWeights/Ling-3.0-tiny-Pollard/blob/main/Ling-3.0-tiny-Pollard.imatrix) | importance matrix | 44 MB | The imatrix used, for anyone re-quantizing. |
92
+ | [Ling-3.0-tiny-Pollard-calibration.txt](https://huggingface.co/PollardWeights/Ling-3.0-tiny-Pollard/blob/main/Ling-3.0-tiny-Pollard-calibration.txt) | calibration corpus | ~1 MB | The exact corpus the imatrix was computed on. |
93
+ | [Ling-3.0-tiny-Pollard.tensor-types.txt](https://huggingface.co/PollardWeights/Ling-3.0-tiny-Pollard/blob/main/Ling-3.0-tiny-Pollard.tensor-types.txt) | allocation map | 3 KB | The measured per-tensor bit assignment. |
94
 
95
+ ## Download a specific file
96
 
97
  ```bash
98
  pip install -U "huggingface_hub[cli]"
99
+ hf download PollardWeights/Ling-3.0-tiny-Pollard \
100
+ --include "Ling-3.0-tiny-Pollard-fit4GB.gguf" --local-dir ./
101
  ```
102
 
103
  ## How to run
104
 
105
+ These are standard GGUF and run with **llama.cpp** β€” one-line install:
106
+
107
+ ```bash
108
+ curl -LsSf https://llama.app/install.sh | sh
109
+ llama-server -hf PollardWeights/Ling-3.0-tiny-Pollard:fit4GB
110
+ ```
111
+
112
+ or with a local file:
113
 
114
  ```bash
115
+ llama-cli -m Ling-3.0-tiny-Pollard-fit4GB.gguf -ngl 99 -p "Explain MoE routing simply."
116
+ llama-server -m Ling-3.0-tiny-Pollard-fit4GB.gguf -ngl 99 # OpenAI-compatible API + web UI at :8080
117
  ```
118
 
119
+ They also work in anything built on llama.cpp β€” **LM Studio, koboldcpp, ramalama,
120
+ Jan, Text Generation WebUI, LoLLMs** β€” provided the build is recent enough to carry
121
+ `bailingmoe3` support (see top). If the app ships an older llama.cpp, update it first.
122
+
123
  ## imatrix (calibration)
124
 
125
+ The importance matrix ([`Ling-3.0-tiny-Pollard.imatrix`](https://huggingface.co/PollardWeights/Ling-3.0-tiny-Pollard/blob/main/Ling-3.0-tiny-Pollard.imatrix),
126
+ included) was computed on a **mixed-domain corpus** (~245K tokens: encyclopedic
127
+ prose, narrative prose, and source code) so the matrix sees every register the model
128
+ serves. The exact corpus is included as
129
+ [`Ling-3.0-tiny-Pollard-calibration.txt`](https://huggingface.co/PollardWeights/Ling-3.0-tiny-Pollard/blob/main/Ling-3.0-tiny-Pollard-calibration.txt).
130
 
131
+ The imatrix guides IQ-quant *quality*; it does **not** decide the allocation β€” the
132
+ measured KL sensitivity profile does. That two-step separation (imatrix for quality,
133
+ measured KL for where the bits go) is what Pollard adds on top of a standard imatrix
134
+ quant.
135
 
136
+ ## Embed / output weights
137
+
138
+ Token-embedding and output tensors stay at **`q6_K`**, and every attention block is
139
+ kept at `q6_K`/`q5_K` rather than dropped to the IQ base β€” measured sensitivity says
140
+ those tensors don't tolerate crushing, so the bits are spent there and clawed back
141
+ from the least-sensitive FFN experts.
142
+
143
+ ## ARM / AVX
144
+
145
+ llama.cpp "repacks" weights into an interleaved layout at load time for faster
146
+ inference on ARM and AVX machines β€” no special file needed, online repacking covers
147
+ these quants. The old `Q4_0_4_4/4_8/8_8` variants are not required.
148
 
149
  ## Notes
150
 
151
  - **License:** MIT, inherited from the base model.
152
  - KL was measured against a **Q6_K reference** on a held-out set (a memory-fit
153
+ reference on a 16 GB machine; the reported number is the *relative* win vs a
154
+ same-size uniform quant, which is what matters here).
155
  - **Quantized, not fine-tuned** β€” identical weights, better bit allocation.
156
 
157
  ## Credits
158
 
159
  - Base model: [`inclusionAI/Ling-3.0-tiny`](https://huggingface.co/inclusionAI/Ling-3.0-tiny) (Ant Group / inclusionAI)
160
+ - Quantization tooling: [llama.cpp](https://github.com/ggml-org/llama.cpp) (ggml-org)
161
  - Method + tooling: [Pollard Weights](https://github.com/WestWaters/pollard-weights) β€” *measure first, no claim before a number.*