westwaters commited on
Commit
b4995d8
·
verified ·
1 Parent(s): d079563

Add README.md

Browse files
Files changed (1) hide show
  1. README.md +160 -142
README.md CHANGED
@@ -1,142 +1,160 @@
1
- ---
2
- license: apache-2.0
3
- base_model: Cloudflare/clef-flash
4
- base_model_relation: quantized
5
- quantized_by: PollardWeights
6
- pipeline_tag: text-classification
7
- language:
8
- - en
9
- tags:
10
- - pollard-weights
11
- - pollard
12
- - gguf
13
- - llama.cpp
14
- - imatrix
15
- - qwen3_5
16
- - clef
17
- - decision-model
18
- - systemone
19
- - structured-output
20
- - classification
21
- - quantized
22
- - mixed-precision
23
- ---
24
-
25
- # clef-flash -- Pollard
26
-
27
- > ### Pollard shrank this model: **18.15 GB (f16) -> 3.36 GB** -- **81% smaller, 5.4x down**.
28
- > The smallest rung here; larger, higher-fidelity rungs are listed below.
29
- >
30
- > | format | this model's size |
31
- > |---|---:|
32
- > | f16 | 18.15 GB |
33
- > | Q8_0 | ~9.62 GB |
34
- > | Q6_K | 7.46 GB |
35
- > | Q4_K_M | ~5.26 GB |
36
- > | **Pollard IQ2_XXS (this repo's smallest)** | **3.36 GB** |
37
-
38
- Pollard builds of [Cloudflare/clef-flash](https://huggingface.co/Cloudflare/clef-flash) made with [Pollard Weights](https://github.com/WestWaters/pollard-weights) -- a ladder of imatrix-calibrated, role-aware mixed-precision quants, each measured on decisions against the f16.
39
-
40
- **Standard GGUF, but you need a recent llama.cpp.** This model's architecture (`clef`) is implemented upstream, so any build new enough to carry it runs these files -- llama.cpp itself, and Ollama or LM Studio once they ship a runtime with it. An older build will refuse them with `unknown model architecture`. The quants are ordinary K-quants.
41
-
42
- ## Model details
43
-
44
- | | |
45
- |---|---|
46
- | Parameter count | ~9.1B |
47
- | Architecture | `clef` |
48
- | Input support | text (the source also does image -- build the projector with --mmproj to ship it) |
49
- | imatrix | **yes** -- see [calibration](#imatrix-calibration) |
50
- | Measured | **decision fidelity vs f16** via `/v1/systemone` -- [table below](#decision-fidelity) (perplexity does not apply: Clef has no text output) |
51
-
52
- ## Which file should I choose?
53
-
54
- Every rung is the **same weights**, sized to a different RAM budget by the measured allocation. Pick the largest one that fits your machine with room for context:
55
-
56
- - **~9.5 GB RAM / VRAM** -> **`Q6_K`** (7.46 GB). *(needs a current llama.cpp)* largest · decision agreement 100% · option KL 0.00005
57
- - **~7.4 GB RAM / VRAM** -> **`IQ4_XS`** (5.40 GB). *(needs a current llama.cpp)* decision agreement 100% · option KL 0.0005
58
- - **~6.6 GB RAM / VRAM** -> **`IQ3_S`** (4.58 GB). *(needs a current llama.cpp)* decision agreement 100% · option KL 0.0033
59
- - **~5.4 GB RAM / VRAM** -> **`IQ2_XXS`** (3.36 GB). *(needs a current llama.cpp)* smallest · decision agreement 100% · option KL 0.032
60
-
61
- ## Available files
62
-
63
- | file | size | notes |
64
- |---|---:|---|
65
- | `clef-flash-Pollard-IQ2_XXS.gguf` | 3.36 GB | smallest · decision agreement 100% · option KL 0.032 |
66
- | `clef-flash-Pollard-IQ3_S.gguf` | 4.58 GB | decision agreement 100% · option KL 0.0033 |
67
- | `clef-flash-Pollard-IQ4_XS.gguf` | 5.40 GB | decision agreement 100% · option KL 0.0005 |
68
- | `clef-flash-Pollard-Q6_K.gguf` | 7.46 GB | largest · decision agreement 100% · option KL 0.00005 |
69
-
70
- ## Decision fidelity
71
-
72
- Clef is a decision model: a joint-schema head on the final hidden states answers typed questions with a probability per option. It does not generate text, so perplexity is not its metric. Each rung was measured on what the model is used for: the same 20 typed questions (routing, sentiment, urgency, spam, language, agent actions, true/false, code, categories) asked of the rung and of the f16 through llama-server's `/v1/systemone`, comparing the option probabilities.
73
-
74
- | file | size | agrees with f16 | option KL vs f16 | mean prob. drift | accuracy |
75
- |---|---:|---:|---:|---:|---:|
76
- | `clef-flash-Pollard-Q6_K.gguf` | 7.46 GB | 100% | 0.00005 | 0.0008 | 100% |
77
- | `clef-flash-Pollard-IQ4_XS.gguf` | 5.40 GB | 100% | 0.0005 | 0.0023 | 100% |
78
- | `clef-flash-Pollard-IQ3_S.gguf` | 4.58 GB | 100% | 0.0033 | 0.0065 | 100% |
79
- | `clef-flash-Pollard-IQ2_XXS.gguf` | 3.36 GB | 100% | 0.032 | 0.033 | 100% |
80
-
81
- The decision head (`dec.*`, the cross-attention stack that produces the answers) is held at Q6_K in every rung; the compression is in the Qwen3.5 body.
82
-
83
- ## Running a decision model
84
-
85
- llama.cpp serves Clef on `/v1/systemone` only (no chat or completions). It needs a llama.cpp build that includes the `clef` architecture (ggml-org/llama.cpp#29831, October 2026).
86
-
87
- ```bash
88
- llama-server -m clef-flash-Pollard-IQ4_XS.gguf --port 8080
89
- curl http://127.0.0.1:8080/v1/systemone -H "Content-Type: application/json" -d '{
90
- "state": "Customer message: I was charged twice for my order last week and nobody has replied.",
91
- "questions": {
92
- "route": {"type": "choice", "instructions": "Which team should handle this?",
93
- "criteria": {"billing": null, "shipping": null, "technical": null}},
94
- "angry": {"type": "noul", "instructions": "Is the customer angry?"},
95
- "urgency": {"type": "score", "instructions": "How urgent is this?",
96
- "criteria": ["can wait", "this week", "today", "right now"]}
97
- }
98
- }'
99
- ```
100
-
101
- The whole prompt is evaluated in one batch, so it must fit in `--ubatch-size` (raise it for long states). These files are text-only.
102
-
103
- ## Download a specific file
104
-
105
- ```bash
106
- pip install -U "huggingface_hub[cli]"
107
- hf download PollardWeights/clef-flash-Pollard \
108
- --include "clef-flash-Pollard-IQ2_XXS.gguf" --local-dir ./
109
- ```
110
-
111
- ## How to run
112
-
113
- This model's architecture (`clef`) needs a llama.cpp new enough to carry it, so build or update from upstream first. A Clef server answers `/v1/systemone` only -- see [Running a decision model](#running-a-decision-model) for a request.
114
-
115
- ```bash
116
- llama-server -m clef-flash-Pollard-IQ4_XS.gguf -ngl 99
117
- ```
118
-
119
- Ollama and LM Studio will run these once their bundled llama.cpp carries `clef` and the decision endpoint.
120
-
121
- ## imatrix (calibration)
122
-
123
- The importance matrix (`clef-flash-Pollard.imatrix`, included) was computed on a mixed-domain corpus so the matrix sees every register the model serves.
124
-
125
- ## ARM / AVX
126
-
127
- llama.cpp repacks weights into an interleaved layout at load time for faster inference on ARM and AVX machines -- no special file needed, online repacking covers these quants. The old `Q4_0_4_4/4_8/8_8` variants are not required.
128
-
129
- ## Errata
130
-
131
- - `general.architecture` is `clef`, which upstream llama.cpp added recently. A build older than that support refuses these files with `unknown model architecture` -- update llama.cpp rather than looking for a different quant. Checked with `pollard-ggufcheck`, which reads the architecture and the tensor types out of the header and asks upstream what it implements.
132
- - Allocation: imatrix-calibrated, uniform across layers within each role (no per-layer sensitivity profile for this model). The decision head and any tensor the imatrix does not cover are held at Q6_K.
133
- - Single machine; replication invited.
134
-
135
- ## Credits & license
136
-
137
- - Base model: [`Cloudflare/clef-flash`](https://huggingface.co/Cloudflare/clef-flash)
138
- - Quantization tooling: [llama.cpp](https://github.com/ggml-org/llama.cpp) (ggml-org)
139
- - Method + tooling: [Pollard Weights](https://github.com/WestWaters/pollard-weights) -- *measure first, no claim before a number.*
140
- - License: `apache-2.0`, inherited from the base model.
141
-
142
- *Built with [Pollard Weights](https://github.com/WestWaters/pollard-weights) -- frontier models, small hardware, no compromise.*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Cloudflare/clef-flash
4
+ base_model_relation: quantized
5
+ quantized_by: PollardWeights
6
+ pipeline_tag: text-classification
7
+ language:
8
+ - en
9
+ tags:
10
+ - pollard-weights
11
+ - pollard
12
+ - gguf
13
+ - llama.cpp
14
+ - imatrix
15
+ - qwen3_5
16
+ - quantized
17
+ - mixed-precision
18
+ - measured-allocation
19
+ - decision-model
20
+ - systemone
21
+ - structured-output
22
+ ---
23
+
24
+ # clef-flash -- Pollard
25
+
26
+ > ### Pollard shrank this model: **18.15 GB (f16) -> 3.35 GB** -- **82% smaller, 5.4x down**.
27
+ > The smallest rung here; larger, higher-fidelity rungs are listed below.
28
+ >
29
+ > | format | this model's size |
30
+ > |---|---:|
31
+ > | f16 | 18.15 GB |
32
+ > | Q8_0 | ~9.62 GB |
33
+ > | Q6_K | 7.46 GB |
34
+ > | Q4_K_M | ~5.26 GB |
35
+ > | **PollardMix (this repo's IQ2_XXS)** | **3.35 GB** |
36
+
37
+ Pollard builds of [Cloudflare/clef-flash](https://huggingface.co/Cloudflare/clef-flash) made with [Pollard Weights](https://github.com/WestWaters/pollard-weights) -- a ladder of **measured-allocation** quants (bits placed by per-layer sensitivity, not a uniform crush).
38
+
39
+ **Standard GGUF, but you need a recent llama.cpp.** This model's architecture (`clef`) is implemented upstream, so any build new enough to carry it runs these files -- llama.cpp itself, and Ollama or LM Studio once they ship a runtime with it. An older build will refuse them with `unknown model architecture`. The quants are ordinary K-quants.
40
+
41
+ ## Model details
42
+
43
+ | | |
44
+ |---|---|
45
+ | Parameter count | ~9.1B |
46
+ | Architecture | `clef` |
47
+ | Input support | text, image |
48
+ | imatrix | **yes** -- see [calibration](#imatrix-calibration) |
49
+ | Measured | **decision fidelity vs f16** through `/v1/systemone` -- [table below](#decision-fidelity) (perplexity does not apply: a decision model answers with probabilities, not text) |
50
+
51
+ ## Which file should I choose?
52
+
53
+ Every rung is the **same weights**, sized to a different RAM budget by the measured allocation. Pick the largest one that fits your machine with room for context:
54
+
55
+ - **~9.5 GB RAM / VRAM** -> **`Uniform-Q6_K`** (7.46 GB). *(needs a current llama.cpp)* uniform allocation
56
+ - **~9.5 GB RAM / VRAM** -> **`Q6_K`** (7.46 GB). *(needs a current llama.cpp)* measured allocation
57
+ - **~7.4 GB RAM / VRAM** -> **`IQ4_XS`** (5.43 GB). *(needs a current llama.cpp)* measured allocation
58
+ - **~7.4 GB RAM / VRAM** -> **`Uniform-IQ4_XS`** (5.40 GB). *(needs a current llama.cpp)* uniform allocation
59
+ - **~6.6 GB RAM / VRAM** -> **`Uniform-IQ3_S`** (4.58 GB). *(needs a current llama.cpp)* uniform allocation
60
+ - **~6.5 GB RAM / VRAM** -> **`IQ3_S`** (4.48 GB). *(needs a current llama.cpp)* measured allocation
61
+ - **~5.4 GB RAM / VRAM** -> **`Uniform-IQ2_XXS`** (3.36 GB). *(needs a current llama.cpp)* uniform allocation
62
+ - **~5.3 GB RAM / VRAM** -> **`IQ2_XXS`** (3.35 GB). *(needs a current llama.cpp)* measured allocation
63
+
64
+ ## Available files
65
+
66
+ | file | size | agrees with f16 | option KL | notes |
67
+ |---|---:|---:|---:|---|
68
+ | `clef-flash-Pollard-IQ2_XXS.gguf` | 3.35 GB | 100% | 0.030 | measured allocation |
69
+ | `clef-flash-Pollard-Uniform-IQ2_XXS.gguf` | 3.36 GB | 100% | 0.032 | uniform allocation |
70
+ | `clef-flash-Pollard-IQ3_S.gguf` | 4.48 GB | 100% | 0.0082 | measured allocation |
71
+ | `clef-flash-Pollard-Uniform-IQ3_S.gguf` | 4.58 GB | 100% | 0.0033 | uniform allocation |
72
+ | `clef-flash-Pollard-Uniform-IQ4_XS.gguf` | 5.40 GB | 100% | 0.00048 | uniform allocation |
73
+ | `clef-flash-Pollard-IQ4_XS.gguf` | 5.43 GB | 100% | 0.0019 | measured allocation |
74
+ | `clef-flash-Pollard-Uniform-Q6_K.gguf` | 7.46 GB | 100% | 4.5e-05 | uniform allocation |
75
+ | `clef-flash-Pollard-Q6_K.gguf` | 7.46 GB | 100% | 6.2e-05 | measured allocation |
76
+
77
+ ## Decision fidelity
78
+
79
+ This is a **decision model**: it answers typed questions (choice / score / yes-no) with a probability per option, so it is measured on its decisions, not on text. Each rung and the f16 answered the same 20 typed questions through llama-server's `/v1/systemone`, read the same way ([pollard-decision](https://github.com/WestWaters/pollard-weights)).
80
+
81
+ | file | size | agrees with f16 | option KL vs f16 | mean prob. drift | accuracy |
82
+ |---|---:|---:|---:|---:|---:|
83
+ | `clef-flash-Pollard-Uniform-Q6_K.gguf` | 7.46 GB | 100% | 4.5e-05 | 0.0007 | 100% |
84
+ | `clef-flash-Pollard-Q6_K.gguf` | 7.46 GB | 100% | 6.2e-05 | 0.0009 | 100% |
85
+ | `clef-flash-Pollard-IQ4_XS.gguf` | 5.43 GB | 100% | 0.0019 | 0.0037 | 100% |
86
+ | `clef-flash-Pollard-Uniform-IQ4_XS.gguf` | 5.40 GB | 100% | 0.00048 | 0.0023 | 100% |
87
+ | `clef-flash-Pollard-Uniform-IQ3_S.gguf` | 4.58 GB | 100% | 0.0033 | 0.0065 | 100% |
88
+ | `clef-flash-Pollard-IQ3_S.gguf` | 4.48 GB | 100% | 0.0082 | 0.0114 | 100% |
89
+ | `clef-flash-Pollard-Uniform-IQ2_XXS.gguf` | 3.36 GB | 100% | 0.032 | 0.0330 | 100% |
90
+ | `clef-flash-Pollard-IQ2_XXS.gguf` | 3.35 GB | 100% | 0.030 | 0.0343 | 100% |
91
+
92
+ _Agrees = the rung picks the same option as the f16. Option KL = how far its option probabilities moved from the f16's (0 = identical); it is the number that separates the rungs._
93
+
94
+ ## Two sets: measured and uniform
95
+
96
+ This repo ships the same four sizes built two ways.
97
+
98
+ - **`clef-flash-Pollard-<rung>.gguf` -- measured allocation (the Pollard build).** A sensitivity profile was measured on the original weights (every one of the 32 layers, including the 24 Gated DeltaNet linear-attention layers), and bits were placed by it: the layers the model is most sensitive to keep more precision, the rest carry the compression. imatrix over the full Calib 3.0 corpus. Profile included: `clef-flash-Pollard.sensitivity.json`, imatrix `clef-flash-Pollard.imatrix`.
99
+ - **`clef-flash-Pollard-Uniform-<rung>.gguf` -- uniform allocation.** Same rung types, same imatrix-calibrated quants, one precision per role across all layers (no sensitivity profile; imatrix from a 200-chunk slice of the same corpus, `clef-flash-Pollard-Uniform.imatrix`). Shipped as a second option and as the baseline the measured set is compared against.
100
+
101
+ In both sets the decision head (`dec.*`, the stack that produces the answers) is held at Q6_K. Both are measured the same way in the tables above.
102
+
103
+ ## Multimodal
104
+
105
+ Vision needs the projector shipped alongside: **`mmproj-clef-flash-BF16.gguf`** -- download it too and pass it with `--mmproj`. It is **not quantized**; it is small and the text ladder is where the size lives.
106
+
107
+ ```bash
108
+ llama-server -m clef-flash-Pollard-IQ2_XXS.gguf --mmproj mmproj-clef-flash-BF16.gguf -ngl 99
109
+ ```
110
+
111
+ ## Download a specific file
112
+
113
+ ```bash
114
+ pip install -U "huggingface_hub[cli]"
115
+ hf download PollardWeights/clef-flash-Pollard \
116
+ --include "clef-flash-Pollard-IQ2_XXS.gguf" --local-dir ./
117
+ ```
118
+
119
+ ## How to run
120
+
121
+ This model's architecture (`clef`) needs a llama.cpp new enough to carry it. A decision model is served on **`/v1/systemone`** (no chat or completions):
122
+
123
+ ```bash
124
+ llama-server -m clef-flash-Pollard-IQ2_XXS.gguf -ngl 99 --port 8080
125
+ curl http://127.0.0.1:8080/v1/systemone -H "Content-Type: application/json" -d '{
126
+ "state": "Customer message: I was charged twice for my order last week and nobody has replied.",
127
+ "questions": {
128
+ "route": {"type": "choice", "instructions": "Which team should handle this?",
129
+ "criteria": {"billing": null, "shipping": null, "technical": null}},
130
+ "angry": {"type": "noul", "instructions": "Is the customer angry?"},
131
+ "urgency": {"type": "score", "instructions": "How urgent is this?",
132
+ "criteria": ["can wait", "this week", "today", "right now"]}
133
+ }
134
+ }'
135
+ ```
136
+
137
+ Each answer carries the probability of every option. Some decision models evaluate the whole prompt in one batch, so a long `state` may need a larger `--ubatch-size`.
138
+
139
+ ## imatrix (calibration)
140
+
141
+ The importance matrix (`clef-flash-Pollard.imatrix`, included) was computed on a mixed-domain corpus so the matrix sees every register the model serves.
142
+
143
+ ## ARM / AVX
144
+
145
+ llama.cpp repacks weights into an interleaved layout at load time for faster inference on ARM and AVX machines -- no special file needed, online repacking covers these quants. The old `Q4_0_4_4/4_8/8_8` variants are not required.
146
+
147
+ ## Errata
148
+
149
+ - `general.architecture` is `clef`, which upstream llama.cpp added recently. A build older than that support refuses these files with `unknown model architecture` -- update llama.cpp rather than looking for a different quant. Checked with `pollard-ggufcheck`, which reads the architecture and the tensor types out of the header and asks upstream what it implements.
150
+ - Measured allocation places bits by per-layer sensitivity under a size budget.
151
+ - Single machine; replication invited.
152
+
153
+ ## Credits & license
154
+
155
+ - Base model: [`Cloudflare/clef-flash`](https://huggingface.co/Cloudflare/clef-flash)
156
+ - Quantization tooling: [llama.cpp](https://github.com/ggml-org/llama.cpp) (ggml-org)
157
+ - Method + tooling: [Pollard Weights](https://github.com/WestWaters/pollard-weights) -- *measure first, no claim before a number.*
158
+ - License: `apache-2.0`, inherited from the base model.
159
+
160
+ *Built with [Pollard Weights](https://github.com/WestWaters/pollard-weights) -- frontier models, small hardware, no compromise.*