midagedev commited on
Commit
0fb613b
·
verified ·
1 Parent(s): d7a7844

Clef-Flash GGUFs on bloomery: per-quant agreement with the BF16 release

Browse files
Files changed (1) hide show
  1. README.md +92 -0
README.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Cloudflare/clef-flash
4
+ base_model_relation: quantized
5
+ tags:
6
+ - clef
7
+ - decision-model
8
+ - systemone
9
+ - gguf
10
+ - bloomery
11
+ ---
12
+
13
+ # Clef-Flash GGUFs on bloomery: which quant to pick
14
+
15
+ This page has no weights. It shows how close each of
16
+ [bartowski's Clef-Flash GGUFs](https://huggingface.co/bartowski/Cloudflare_clef-flash-GGUF) answers to the
17
+ official BF16 model, when run with [bloomery](https://github.com/midagedev/bloomery). Use it to pick a file for your
18
+ GPU.
19
+
20
+ This is an unofficial page. It is not made by or affiliated with Cloudflare. The model is
21
+ [Cloudflare/clef-flash](https://huggingface.co/Cloudflare/clef-flash) (Apache-2.0).
22
+
23
+ ## Why bloomery
24
+
25
+ Clef is a decision model. One prompt pass gives the backbone's hidden states, and a small "joint schema head" turns
26
+ them into a probability for every allowed option. A GGUF holds only the backbone. llama.cpp has no way to run the
27
+ head. bloomery runs both and serves the release's SystemOne API (`POST /v1/systemone`).
28
+
29
+ ## Agreement with the official model
30
+
31
+ We ran 15 requests (8 English, 7 Korean; 31 questions) through Cloudflare's own Python code at BF16 and through
32
+ bloomery with each file. "Top equal" counts questions where both pick the same option. "Max |Δp|" is the largest
33
+ probability gap on the chosen option.
34
+
35
+ | File | Size | Top equal | Korean | Max \|Δp\| | Prompt, tok/s |
36
+ |---|---:|---:|---:|---:|---:|
37
+ | Q8_0 | 9.55 GB | 30/31 | 15/15 | 0.014 | 3,289 |
38
+ | Q6_K_L | 8.11 GB | 31/31 | 15/15 | 0.042 | 3,333 |
39
+ | Q6_K | 7.79 GB | 31/31 | 15/15 | 0.025 | 3,363 |
40
+ | Q6_K_S | 7.51 GB | 31/31 | 15/15 | 0.034 | 3,383 |
41
+ | Q5_K_M | 6.88 GB | 31/31 | 15/15 | 0.052 | 3,862 |
42
+ | Q5_K_S | 6.50 GB | 31/31 | 15/15 | 0.057 | 3,998 |
43
+ | Q4_K_L | 6.20 GB | 30/31 | 15/15 | 0.077 | 4,128 |
44
+ | Q4_K_M | 5.84 GB | 29/31 | 15/15 | 0.072 | 4,322 |
45
+ | Q4_K_S | 5.48 GB | 29/31 | 15/15 | 0.078 | 4,526 |
46
+ | Q3_K_L | 4.66 GB | 30/31 | 15/15 | 0.080 | 4,167 |
47
+ | Q3_K_M | 4.48 GB | 30/31 | 15/15 | 0.102 | 4,087 |
48
+ | Q3_K_S | 4.26 GB | 29/31 | 15/15 | 0.136 | 4,033 |
49
+
50
+ - Every miss is a question where the official model is itself almost a tie (0.474 against 0.471) or near 0.5
51
+ (0.512). So the top choice is stable down to Q3_K_S. The probabilities drift as the file gets smaller.
52
+ - If you use the probabilities, not only the top choice, pick Q6_K or Q5_K_M.
53
+ - Prompt speed: one RTX A6000, a 4,067-token request, one request at a time. These are functional runs, not
54
+ benchmark runs; the same file moves about 3–4 % between runs. The head runs on the CPU: a median of 22 ms per request, about 100 ms at 4,000 tokens.
55
+ - Not supported yet: the IQ files, Q2_K, Q4_0, Q4_1 and BF16. bloomery refuses them by name at load.
56
+
57
+ The full table, the requests and the scripts are in the bloomery repository:
58
+ [`tools/ref/clef/agreement.md`](https://github.com/midagedev/bloomery/blob/main/tools/ref/clef/agreement.md).
59
+
60
+ ## Run it
61
+
62
+ You need a Linux x86-64 host with an NVIDIA RTX 30-series or A-series GPU (sm_86) and the bloomery toolchain
63
+ ([build guide](https://github.com/midagedev/bloomery/blob/main/docs/BUILD.md#clef-flash)).
64
+
65
+ ```sh
66
+ hf download bartowski/Cloudflare_clef-flash-GGUF Cloudflare_clef-flash-Q5_K_M.gguf --local-dir ~/models/clef-flash
67
+ hf download Cloudflare/clef-flash joint_head.safetensors joint_head_config.json --local-dir ~/models/clef-flash/hf
68
+
69
+ cargo oxide build --arch sm_86 -- -p bloomery-gpu-gates --features clef --release --bin bloomery_serve_clef
70
+ target/release/bloomery_serve_clef --model ~/models/clef-flash/Cloudflare_clef-flash-Q5_K_M.gguf \
71
+ --head ~/models/clef-flash/hf/joint_head.safetensors --port 8091
72
+
73
+ curl -s http://127.0.0.1:8091/v1/systemone -d '{"model": "clef-flash",
74
+ "state": "User: what is the weather in Seoul tomorrow? Tools available: web_search, calculator, calendar.",
75
+ "questions": {"tool": {"type": "choice", "instructions": "Which tool should the agent call next?",
76
+ "criteria": {"web_search": "Look something up online", "calculator": "Do arithmetic",
77
+ "calendar": "Read or write events", "none": "Answer directly"}}}}'
78
+ ```
79
+
80
+ The request and response follow the release's SystemOne format. Each response also has `timings` (`prompt_n`,
81
+ `prompt_ms`, `head_ms`).
82
+
83
+ ## Limits
84
+
85
+ - Text states only (no images or video).
86
+ - One request at a time.
87
+ - sm_86 GPUs only (RTX 3090, RTX A6000).
88
+
89
+ ## Credits
90
+
91
+ Model: Cloudflare ([Clef-Flash](https://huggingface.co/Cloudflare/clef-flash), Apache-2.0). GGUFs: bartowski. Engine:
92
+ bloomery (MIT). AI assistants helped write bloomery and this page; every number above was measured.