quantprobe 1.9.0__tar.gz → 1.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quantprobe-1.9.2/PKG-INFO +164 -0
- quantprobe-1.9.2/README.md +146 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/pyproject.toml +1 -1
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/__init__.py +1 -1
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/plan.py +5 -1
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/runtime.py +8 -0
- quantprobe-1.9.2/quantprobe.egg-info/PKG-INFO +164 -0
- quantprobe-1.9.0/PKG-INFO +0 -151
- quantprobe-1.9.0/README.md +0 -133
- quantprobe-1.9.0/quantprobe.egg-info/PKG-INFO +0 -151
- {quantprobe-1.9.0 → quantprobe-1.9.2}/LICENSE +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/__main__.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/auto.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/cli.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/dashboard.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/detect.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/fetch.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/optimize.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/probe.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/spec.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe/target.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe.egg-info/SOURCES.txt +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe.egg-info/dependency_links.txt +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe.egg-info/entry_points.txt +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe.egg-info/requires.txt +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/quantprobe.egg-info/top_level.txt +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/setup.cfg +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/tests/test_engine.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/tests/test_evaluator.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/tests/test_pipeline.py +0 -0
- {quantprobe-1.9.0 → quantprobe-1.9.2}/tests/test_transforms.py +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quantprobe
|
|
3
|
+
Version: 1.9.2
|
|
4
|
+
Summary: Probe-then-quantize for LLMs: measure a model's fragility curve, plan bit/tier placement by the tiered decode law, and emit ready-to-run llama.cpp recipes.
|
|
5
|
+
Author: Federico Sciuca
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/FedericoTs/quantprobe
|
|
8
|
+
Keywords: llm,quantization,llama.cpp,gguf,inference,moe
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: gguf>=0.9
|
|
16
|
+
Requires-Dist: requests>=2.28
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# quantprobe
|
|
20
|
+
|
|
21
|
+
### How fast will this model run on *my* machine — and how do I make it faster?
|
|
22
|
+
|
|
23
|
+
**Answers both before you download anything. Then hands you the exact command.** Every number measured on one 2016 desktop (GTX 1060 6 GB · 16 GB DDR4 · SATA SSD), and every claim published as a prediction *made before the measurement*.
|
|
24
|
+
|
|
25
|
+
    [](https://x.com/federico_sciuca)
|
|
26
|
+
|
|
27
|
+
<p align="center"><img src="weights/data/hero_placement.png" width="880" alt="Placement across memory tiers: disk 2-bit cold experts, RAM 2-bit experts + probed fragile band at 4-bit, VRAM 4-bit attention — one law ties them"></p>
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Start here
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install quantprobe
|
|
35
|
+
quantprobe auto
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That's it — it detects your machine, asks which model you want, and gets you running. No flags to learn.
|
|
39
|
+
|
|
40
|
+
**Just want the number first?** `quantprobe plan --gguf model.gguf` prints your predicted tok/s, whether it fits, and the launch command. Downloads nothing, takes a second. There's also a [browser version](https://federicots.github.io/quantprobe/) with nothing to install.
|
|
41
|
+
|
|
42
|
+
## The two ways to run a model
|
|
43
|
+
|
|
44
|
+
| | **Fast** — `quantprobe auto qwen3-30b` | **Custom** — `quantprobe auto qwen3-30b --custom` |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| what it does | picks the best existing quant for *your* machine, downloads it | measures which layers of *your* model break under compression, then builds a version tailored to it |
|
|
47
|
+
| time | minutes (mostly download) | **~50 min for a 7B, ~10 h for a 35B** — it tells you before starting |
|
|
48
|
+
| disk | one file | source + working files, 3–4× bigger |
|
|
49
|
+
| **speed** | full | **identical** — speed comes from placement, not from the build |
|
|
50
|
+
| **quality** | whatever the community published | **−9% perplexity at the same file size** ([measured](preregistrations/2026-07-25-recipe-upgrade-shexp-imatrix.md)) |
|
|
51
|
+
|
|
52
|
+
**Most people want Fast.** Above ~3 bits per weight, community quants are already near-lossless — so `--custom` *refuses to run* on machines that don't need it and explains why. The tool declines to sell you its own product.
|
|
53
|
+
|
|
54
|
+
**Use Custom when** you're squeezing a model that barely fits (under ~3 bits, where ordinary compression falls off a cliff), you have your own fine-tune nobody has published, or you need maximum quality at a fixed size.
|
|
55
|
+
|
|
56
|
+
## The free speed you probably already have
|
|
57
|
+
|
|
58
|
+
Most guides put *all* of a mixture-of-experts model's experts in system RAM and leave your graphics card half empty. Keeping the first N expert layers on the GPU instead — same file, different flags — measured on the reference box:
|
|
59
|
+
|
|
60
|
+
| | all experts → RAM | **partial offload** |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| generation | 15.18 tok/s | **20.44 tok/s** (+34.7%) |
|
|
63
|
+
| prompt reading | 88 tok/s | **~238 tok/s** (2–3×) |
|
|
64
|
+
|
|
65
|
+
`plan` and `run` now compute the cutoff from your *free* VRAM and emit the exact flags. It costs nothing and needs no new download. ([pre-registration #13](preregistrations/2026-07-26-moe-partial-expert-offload.md) — staked before measuring, including the non-ship condition.)
|
|
66
|
+
|
|
67
|
+
## Measured results
|
|
68
|
+
|
|
69
|
+
| result | number |
|
|
70
|
+
|---|---|
|
|
71
|
+
| Qwen3-30B-A3B on the 2016 desktop | **19.3 tok/s** — *predicted 19 before measuring* |
|
|
72
|
+
| Same model, partial expert offload | **20.44 tok/s**, +34.7% for free |
|
|
73
|
+
| Same bytes, different layers (Gemma 4 12B) | **byte-identical files, 2.25 ppl apart** |
|
|
74
|
+
| Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |
|
|
75
|
+
| GLM-4.5-Air **110B** from a SATA drive, 16 GB RAM | 0.19 tok/s — inside the pre-registered 0.2–0.3 band |
|
|
76
|
+
| RAM overclock (XMP, 2133→3000) | dense **+52%**, pre-registered ×1.41+ |
|
|
77
|
+
|
|
78
|
+
<p align="center"><img src="weights/data/validation_19tok/live_run_20tps.png" width="880" alt="One frame: Task Manager showing 16 GB DDR4-3000 and the GTX 1060 6GB beside llama.cpp chatting Qwen3-30B-A3B live at 20.4 tok/s generation"></p>
|
|
79
|
+
<p align="center"><em>One frame, no cuts: Task Manager beside llama.cpp chatting Qwen3-30B-A3B at <b>20.4 tok/s</b> — above the pre-registered 19. Raw logs + GGUF SHA256: <a href="weights/data/validation_19tok/EVIDENCE.txt">EVIDENCE.txt</a>.</em></p>
|
|
80
|
+
|
|
81
|
+
## Why you can trust the numbers
|
|
82
|
+
|
|
83
|
+
Most benchmark posts report what happened. **I write the prediction down first, publish it, then run the hardware** — and publish the misses just as loudly.
|
|
84
|
+
|
|
85
|
+
| predicted (first) | measured (after) |
|
|
86
|
+
|---|---|
|
|
87
|
+
| 110B streamed from SATA: **0.2–0.3 tok/s** | **0.19** |
|
|
88
|
+
| RAM overclock scales decode **×1.41+** | **×1.52** |
|
|
89
|
+
| 30B hybrid placement: **~19 tok/s** | **19.30 ± 0.88** |
|
|
90
|
+
| a day-old 118B streamed from SATA: **0.2–0.4** | **0.38 ± 0.17** |
|
|
91
|
+
|
|
92
|
+
**The misses are the point.** A few that are published in full:
|
|
93
|
+
|
|
94
|
+
- **I benchmarked my recipe against a competitor's and lost** ([#11](preregistrations/2026-07-25-apex-vs-probe-depthaware.md), +8.9% worse). It exposed two real bugs in mine. Fixed them ([#12](preregistrations/2026-07-25-recipe-upgrade-shexp-imatrix.md)), then ran a *fair* rematch on data neither side calibrated for — [predicting I'd lose again](preregistrations/2026-07-26-apex-rematch-ood-kl.md). I won: 26% better KL divergence. Two of four stakes missed **in my favour**, still recorded as misses.
|
|
95
|
+
- **I retracted a headline finding within the hour** when my own audit showed it was a measurement artifact — then reproduced the artifact deliberately to prove the cause ([Law 5 ledger](weights/LAW5_PROTOCOL.md)).
|
|
96
|
+
- **This tool told users a probe takes "30–60 minutes."** It takes 5h40m on a 35 GB model. That was my unmeasured claim, and [v1.9.0](CHANGELOG.md) replaced it with a derived estimate, a live ETA, and a confirmation prompt.
|
|
97
|
+
|
|
98
|
+
Plus a **byte-identical control** (two same-size files, 2.25 ppl apart — only placement differs), a full claim → script → log manifest, and **documented dead ends** (dynamic top-k, semantic paging, self-speculation — all measured-dead, because a law you only confirm is a law you haven't tested).
|
|
99
|
+
|
|
100
|
+
## The four laws, in one line each
|
|
101
|
+
|
|
102
|
+
Full statements with measurements and falsifiable predictions in **[LAWS.md](LAWS.md)**.
|
|
103
|
+
|
|
104
|
+
1. **Rotation is rank-conditional.** The standard trick behind modern quantization helps full-rank tensors and destroys low-rank bottlenecks — a ~270,000× swing.
|
|
105
|
+
2. **Trained networks are dense everywhere.** No free lunch left in the weights: **2-bit is the data-free floor.**
|
|
106
|
+
3. **Fragility is measurable, not predictable.** Gemma breaks late, Mistral breaks early — architectural near-twins pointing opposite ways. Only a functional probe decides.
|
|
107
|
+
4. **The tiered decode law.** `tok/s = η(tier) × bandwidth ÷ active-bytes-per-token`. This is the equation that predicts your speed before you download.
|
|
108
|
+
|
|
109
|
+
<p align="center"><img src="weights/data/x_chart_E_scalinglaw.png" width="700" alt="One scaling law, 7B to 744B, predicted vs measured"></p>
|
|
110
|
+
|
|
111
|
+
## All eleven commands
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
quantprobe auto # interactive: detects, asks, decides, runs
|
|
115
|
+
quantprobe auto qwen3-30b --custom --run # the full custom pipeline, end to end
|
|
116
|
+
quantprobe hw # what the law sees on THIS machine
|
|
117
|
+
quantprobe plan --gguf model.gguf # predicted tok/s + placement + launch command
|
|
118
|
+
quantprobe optimize --tps 20 # cheapest path to a speed target, Pareto-ranked
|
|
119
|
+
quantprobe target --tps 5 --ladder # inverse: target -> smartest model that fits
|
|
120
|
+
quantprobe fetch qwen3-30b ./models # robust, resumable download
|
|
121
|
+
quantprobe quantize --gguf f16.gguf --out 2bit.gguf # build a depth-aware quant
|
|
122
|
+
quantprobe probe --gguf f16.gguf --eval wiki.test.raw # measure YOUR model's fragile band
|
|
123
|
+
quantprobe run --gguf 2bit.gguf # plan the placement, then launch chat
|
|
124
|
+
quantprobe bench --gguf 2bit.gguf --contribute # predicted vs measured; opt-in datapoint
|
|
125
|
+
quantprobe dashboard --gguf 2bit.gguf # the law live, every reply scored vs prediction
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`hw`/`plan`/`target`/`optimize` need nothing but Python. The weight-touching commands drive stock [llama.cpp](https://github.com/ggml-org/llama.cpp/releases) — point at it with `--llama-dir`, `QUANTPROBE_LLAMA_DIR`, or `PATH`, and preview anything with `--dry`. 16 machine presets ship in (`--machine`); multi-GPU and RAID aggregate with comma lists (`--vram 24,24`).
|
|
129
|
+
|
|
130
|
+
> **Windows: `'quantprobe' is not recognized`?** pip put it in a folder that isn't on your PATH. Use `python -m quantprobe ...` — identical, always works.
|
|
131
|
+
|
|
132
|
+
## Help grow the law
|
|
133
|
+
|
|
134
|
+
`quantprobe bench --contribute` prints exactly what would be shared plus a pre-filled issue link — **you review and submit; nothing is ever sent automatically.** Points that land *outside* the predicted bands are the most valuable ones. Open predictions anyone can settle: [preregistrations/](preregistrations/).
|
|
135
|
+
|
|
136
|
+
## Deep dives
|
|
137
|
+
|
|
138
|
+
| | |
|
|
139
|
+
|---|---|
|
|
140
|
+
| [QUICKSTART.md](QUICKSTART.md) | get running, three levels; recipes for fine-tunes, coding agents, hardware buying |
|
|
141
|
+
| [LAWS.md](LAWS.md) | the four laws — statements, measurements, falsifiable predictions |
|
|
142
|
+
| [docs/EXAMPLES.md](docs/EXAMPLES.md) | worked examples with real output, including the ×5.4 optimizer A/B |
|
|
143
|
+
| [docs/HARDWARE.md](docs/HARDWARE.md) | the 2016 box: exact specs, measured bandwidths, what the next euro buys |
|
|
144
|
+
| [preregistrations/](preregistrations/) | every staked prediction with its verdict — hits **and** misses |
|
|
145
|
+
| [weights/LAW5_PROTOCOL.md](weights/LAW5_PROTOCOL.md) | the live Law-5 research ledger, including the retraction |
|
|
146
|
+
| [CHANGELOG.md](CHANGELOG.md) | every release |
|
|
147
|
+
|
|
148
|
+
## Honest limitations
|
|
149
|
+
|
|
150
|
+
- Perplexity and KL divergence are my metrics; I haven't run task-level evals (MMLU/HellaSwag) yet.
|
|
151
|
+
- The fragility atlas covers four model families — enough to *disprove* universality, not to chart every architecture.
|
|
152
|
+
- 0.19 tok/s for a 110B is a **capacity demonstration, not usable inference.**
|
|
153
|
+
- Speed numbers are single-stream decode on one machine (±25% across environments); the η values are fitted, not derived.
|
|
154
|
+
- No custom runtime: everything rides stock llama.cpp.
|
|
155
|
+
|
|
156
|
+
## Credits
|
|
157
|
+
|
|
158
|
+
[colibri](https://github.com/JustVugg/colibri) (744B on 25 GB, pure C) inspired the tier-streaming exploration. The quantization stack builds on [llama.cpp](https://github.com/ggml-org/llama.cpp) and the QTIP/QuIP# incoherence codecs — whose central tool our first law bounds. Independent research by Federico Sciuca, AI-supported, on one desktop.
|
|
159
|
+
|
|
160
|
+
Two community contributions changed the tool measurably: **u/RogerAI--fyi** (Reddit) observed that the Law 4 formulation omitted per-token KV reads — measured, confirmed, shipped within a day. **u/MoneroApe** pointed me at [apex-quant](https://github.com/localai-org/apex-quant) and TurboQuant, and testing against **mudler's APEX** exposed two real gaps in my recipe: unprotected always-active tensors (their kurtosis argument, adopted here) and no importance-matrix calibration at all. The head-to-head and its scope limits are published in full, loss first.
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
MIT — see [LICENSE](LICENSE). © 2026 Federico Sciuca.
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# quantprobe
|
|
2
|
+
|
|
3
|
+
### How fast will this model run on *my* machine — and how do I make it faster?
|
|
4
|
+
|
|
5
|
+
**Answers both before you download anything. Then hands you the exact command.** Every number measured on one 2016 desktop (GTX 1060 6 GB · 16 GB DDR4 · SATA SSD), and every claim published as a prediction *made before the measurement*.
|
|
6
|
+
|
|
7
|
+
    [](https://x.com/federico_sciuca)
|
|
8
|
+
|
|
9
|
+
<p align="center"><img src="weights/data/hero_placement.png" width="880" alt="Placement across memory tiers: disk 2-bit cold experts, RAM 2-bit experts + probed fragile band at 4-bit, VRAM 4-bit attention — one law ties them"></p>
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Start here
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install quantprobe
|
|
17
|
+
quantprobe auto
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
That's it — it detects your machine, asks which model you want, and gets you running. No flags to learn.
|
|
21
|
+
|
|
22
|
+
**Just want the number first?** `quantprobe plan --gguf model.gguf` prints your predicted tok/s, whether it fits, and the launch command. Downloads nothing, takes a second. There's also a [browser version](https://federicots.github.io/quantprobe/) with nothing to install.
|
|
23
|
+
|
|
24
|
+
## The two ways to run a model
|
|
25
|
+
|
|
26
|
+
| | **Fast** — `quantprobe auto qwen3-30b` | **Custom** — `quantprobe auto qwen3-30b --custom` |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| what it does | picks the best existing quant for *your* machine, downloads it | measures which layers of *your* model break under compression, then builds a version tailored to it |
|
|
29
|
+
| time | minutes (mostly download) | **~50 min for a 7B, ~10 h for a 35B** — it tells you before starting |
|
|
30
|
+
| disk | one file | source + working files, 3–4× bigger |
|
|
31
|
+
| **speed** | full | **identical** — speed comes from placement, not from the build |
|
|
32
|
+
| **quality** | whatever the community published | **−9% perplexity at the same file size** ([measured](preregistrations/2026-07-25-recipe-upgrade-shexp-imatrix.md)) |
|
|
33
|
+
|
|
34
|
+
**Most people want Fast.** Above ~3 bits per weight, community quants are already near-lossless — so `--custom` *refuses to run* on machines that don't need it and explains why. The tool declines to sell you its own product.
|
|
35
|
+
|
|
36
|
+
**Use Custom when** you're squeezing a model that barely fits (under ~3 bits, where ordinary compression falls off a cliff), you have your own fine-tune nobody has published, or you need maximum quality at a fixed size.
|
|
37
|
+
|
|
38
|
+
## The free speed you probably already have
|
|
39
|
+
|
|
40
|
+
Most guides put *all* of a mixture-of-experts model's experts in system RAM and leave your graphics card half empty. Keeping the first N expert layers on the GPU instead — same file, different flags — measured on the reference box:
|
|
41
|
+
|
|
42
|
+
| | all experts → RAM | **partial offload** |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| generation | 15.18 tok/s | **20.44 tok/s** (+34.7%) |
|
|
45
|
+
| prompt reading | 88 tok/s | **~238 tok/s** (2–3×) |
|
|
46
|
+
|
|
47
|
+
`plan` and `run` now compute the cutoff from your *free* VRAM and emit the exact flags. It costs nothing and needs no new download. ([pre-registration #13](preregistrations/2026-07-26-moe-partial-expert-offload.md) — staked before measuring, including the non-ship condition.)
|
|
48
|
+
|
|
49
|
+
## Measured results
|
|
50
|
+
|
|
51
|
+
| result | number |
|
|
52
|
+
|---|---|
|
|
53
|
+
| Qwen3-30B-A3B on the 2016 desktop | **19.3 tok/s** — *predicted 19 before measuring* |
|
|
54
|
+
| Same model, partial expert offload | **20.44 tok/s**, +34.7% for free |
|
|
55
|
+
| Same bytes, different layers (Gemma 4 12B) | **byte-identical files, 2.25 ppl apart** |
|
|
56
|
+
| Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |
|
|
57
|
+
| GLM-4.5-Air **110B** from a SATA drive, 16 GB RAM | 0.19 tok/s — inside the pre-registered 0.2–0.3 band |
|
|
58
|
+
| RAM overclock (XMP, 2133→3000) | dense **+52%**, pre-registered ×1.41+ |
|
|
59
|
+
|
|
60
|
+
<p align="center"><img src="weights/data/validation_19tok/live_run_20tps.png" width="880" alt="One frame: Task Manager showing 16 GB DDR4-3000 and the GTX 1060 6GB beside llama.cpp chatting Qwen3-30B-A3B live at 20.4 tok/s generation"></p>
|
|
61
|
+
<p align="center"><em>One frame, no cuts: Task Manager beside llama.cpp chatting Qwen3-30B-A3B at <b>20.4 tok/s</b> — above the pre-registered 19. Raw logs + GGUF SHA256: <a href="weights/data/validation_19tok/EVIDENCE.txt">EVIDENCE.txt</a>.</em></p>
|
|
62
|
+
|
|
63
|
+
## Why you can trust the numbers
|
|
64
|
+
|
|
65
|
+
Most benchmark posts report what happened. **I write the prediction down first, publish it, then run the hardware** — and publish the misses just as loudly.
|
|
66
|
+
|
|
67
|
+
| predicted (first) | measured (after) |
|
|
68
|
+
|---|---|
|
|
69
|
+
| 110B streamed from SATA: **0.2–0.3 tok/s** | **0.19** |
|
|
70
|
+
| RAM overclock scales decode **×1.41+** | **×1.52** |
|
|
71
|
+
| 30B hybrid placement: **~19 tok/s** | **19.30 ± 0.88** |
|
|
72
|
+
| a day-old 118B streamed from SATA: **0.2–0.4** | **0.38 ± 0.17** |
|
|
73
|
+
|
|
74
|
+
**The misses are the point.** A few that are published in full:
|
|
75
|
+
|
|
76
|
+
- **I benchmarked my recipe against a competitor's and lost** ([#11](preregistrations/2026-07-25-apex-vs-probe-depthaware.md), +8.9% worse). It exposed two real bugs in mine. Fixed them ([#12](preregistrations/2026-07-25-recipe-upgrade-shexp-imatrix.md)), then ran a *fair* rematch on data neither side calibrated for — [predicting I'd lose again](preregistrations/2026-07-26-apex-rematch-ood-kl.md). I won: 26% better KL divergence. Two of four stakes missed **in my favour**, still recorded as misses.
|
|
77
|
+
- **I retracted a headline finding within the hour** when my own audit showed it was a measurement artifact — then reproduced the artifact deliberately to prove the cause ([Law 5 ledger](weights/LAW5_PROTOCOL.md)).
|
|
78
|
+
- **This tool told users a probe takes "30–60 minutes."** It takes 5h40m on a 35 GB model. That was my unmeasured claim, and [v1.9.0](CHANGELOG.md) replaced it with a derived estimate, a live ETA, and a confirmation prompt.
|
|
79
|
+
|
|
80
|
+
Plus a **byte-identical control** (two same-size files, 2.25 ppl apart — only placement differs), a full claim → script → log manifest, and **documented dead ends** (dynamic top-k, semantic paging, self-speculation — all measured-dead, because a law you only confirm is a law you haven't tested).
|
|
81
|
+
|
|
82
|
+
## The four laws, in one line each
|
|
83
|
+
|
|
84
|
+
Full statements with measurements and falsifiable predictions in **[LAWS.md](LAWS.md)**.
|
|
85
|
+
|
|
86
|
+
1. **Rotation is rank-conditional.** The standard trick behind modern quantization helps full-rank tensors and destroys low-rank bottlenecks — a ~270,000× swing.
|
|
87
|
+
2. **Trained networks are dense everywhere.** No free lunch left in the weights: **2-bit is the data-free floor.**
|
|
88
|
+
3. **Fragility is measurable, not predictable.** Gemma breaks late, Mistral breaks early — architectural near-twins pointing opposite ways. Only a functional probe decides.
|
|
89
|
+
4. **The tiered decode law.** `tok/s = η(tier) × bandwidth ÷ active-bytes-per-token`. This is the equation that predicts your speed before you download.
|
|
90
|
+
|
|
91
|
+
<p align="center"><img src="weights/data/x_chart_E_scalinglaw.png" width="700" alt="One scaling law, 7B to 744B, predicted vs measured"></p>
|
|
92
|
+
|
|
93
|
+
## All eleven commands
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
quantprobe auto # interactive: detects, asks, decides, runs
|
|
97
|
+
quantprobe auto qwen3-30b --custom --run # the full custom pipeline, end to end
|
|
98
|
+
quantprobe hw # what the law sees on THIS machine
|
|
99
|
+
quantprobe plan --gguf model.gguf # predicted tok/s + placement + launch command
|
|
100
|
+
quantprobe optimize --tps 20 # cheapest path to a speed target, Pareto-ranked
|
|
101
|
+
quantprobe target --tps 5 --ladder # inverse: target -> smartest model that fits
|
|
102
|
+
quantprobe fetch qwen3-30b ./models # robust, resumable download
|
|
103
|
+
quantprobe quantize --gguf f16.gguf --out 2bit.gguf # build a depth-aware quant
|
|
104
|
+
quantprobe probe --gguf f16.gguf --eval wiki.test.raw # measure YOUR model's fragile band
|
|
105
|
+
quantprobe run --gguf 2bit.gguf # plan the placement, then launch chat
|
|
106
|
+
quantprobe bench --gguf 2bit.gguf --contribute # predicted vs measured; opt-in datapoint
|
|
107
|
+
quantprobe dashboard --gguf 2bit.gguf # the law live, every reply scored vs prediction
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`hw`/`plan`/`target`/`optimize` need nothing but Python. The weight-touching commands drive stock [llama.cpp](https://github.com/ggml-org/llama.cpp/releases) — point at it with `--llama-dir`, `QUANTPROBE_LLAMA_DIR`, or `PATH`, and preview anything with `--dry`. 16 machine presets ship in (`--machine`); multi-GPU and RAID aggregate with comma lists (`--vram 24,24`).
|
|
111
|
+
|
|
112
|
+
> **Windows: `'quantprobe' is not recognized`?** pip put it in a folder that isn't on your PATH. Use `python -m quantprobe ...` — identical, always works.
|
|
113
|
+
|
|
114
|
+
## Help grow the law
|
|
115
|
+
|
|
116
|
+
`quantprobe bench --contribute` prints exactly what would be shared plus a pre-filled issue link — **you review and submit; nothing is ever sent automatically.** Points that land *outside* the predicted bands are the most valuable ones. Open predictions anyone can settle: [preregistrations/](preregistrations/).
|
|
117
|
+
|
|
118
|
+
## Deep dives
|
|
119
|
+
|
|
120
|
+
| | |
|
|
121
|
+
|---|---|
|
|
122
|
+
| [QUICKSTART.md](QUICKSTART.md) | get running, three levels; recipes for fine-tunes, coding agents, hardware buying |
|
|
123
|
+
| [LAWS.md](LAWS.md) | the four laws — statements, measurements, falsifiable predictions |
|
|
124
|
+
| [docs/EXAMPLES.md](docs/EXAMPLES.md) | worked examples with real output, including the ×5.4 optimizer A/B |
|
|
125
|
+
| [docs/HARDWARE.md](docs/HARDWARE.md) | the 2016 box: exact specs, measured bandwidths, what the next euro buys |
|
|
126
|
+
| [preregistrations/](preregistrations/) | every staked prediction with its verdict — hits **and** misses |
|
|
127
|
+
| [weights/LAW5_PROTOCOL.md](weights/LAW5_PROTOCOL.md) | the live Law-5 research ledger, including the retraction |
|
|
128
|
+
| [CHANGELOG.md](CHANGELOG.md) | every release |
|
|
129
|
+
|
|
130
|
+
## Honest limitations
|
|
131
|
+
|
|
132
|
+
- Perplexity and KL divergence are my metrics; I haven't run task-level evals (MMLU/HellaSwag) yet.
|
|
133
|
+
- The fragility atlas covers four model families — enough to *disprove* universality, not to chart every architecture.
|
|
134
|
+
- 0.19 tok/s for a 110B is a **capacity demonstration, not usable inference.**
|
|
135
|
+
- Speed numbers are single-stream decode on one machine (±25% across environments); the η values are fitted, not derived.
|
|
136
|
+
- No custom runtime: everything rides stock llama.cpp.
|
|
137
|
+
|
|
138
|
+
## Credits
|
|
139
|
+
|
|
140
|
+
[colibri](https://github.com/JustVugg/colibri) (744B on 25 GB, pure C) inspired the tier-streaming exploration. The quantization stack builds on [llama.cpp](https://github.com/ggml-org/llama.cpp) and the QTIP/QuIP# incoherence codecs — whose central tool our first law bounds. Independent research by Federico Sciuca, AI-supported, on one desktop.
|
|
141
|
+
|
|
142
|
+
Two community contributions changed the tool measurably: **u/RogerAI--fyi** (Reddit) observed that the Law 4 formulation omitted per-token KV reads — measured, confirmed, shipped within a day. **u/MoneroApe** pointed me at [apex-quant](https://github.com/localai-org/apex-quant) and TurboQuant, and testing against **mudler's APEX** exposed two real gaps in my recipe: unprotected always-active tensors (their kurtosis argument, adopted here) and no importance-matrix calibration at all. The head-to-head and its scope limits are published in full, loss first.
|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
MIT — see [LICENSE](LICENSE). © 2026 Federico Sciuca.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "quantprobe"
|
|
7
|
-
version = "1.9.
|
|
7
|
+
version = "1.9.2"
|
|
8
8
|
description = "Probe-then-quantize for LLMs: measure a model's fragility curve, plan bit/tier placement by the tiered decode law, and emit ready-to-run llama.cpp recipes."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -8,4 +8,4 @@ Three commands, all grounded in measured laws (see LAWS.md in the repo):
|
|
|
8
8
|
Every constant in `plan` is fitted from measurements published in the repo, including two
|
|
9
9
|
pre-registered hardware predictions confirmed within 8%.
|
|
10
10
|
"""
|
|
11
|
-
__version__ = "1.9.
|
|
11
|
+
__version__ = "1.9.2"
|
|
@@ -88,7 +88,11 @@ def moe_split_flags(frac, n_layer):
|
|
|
88
88
|
if not n_layer or frac <= 0:
|
|
89
89
|
return None
|
|
90
90
|
k = max(1, min(n_layer - 1, int(frac * n_layer)))
|
|
91
|
-
|
|
91
|
+
# --no-mmap for the same reason the all-experts row carries it: llama.cpp itself warns that
|
|
92
|
+
# tensor overrides to CPU with mmap enabled cost performance. Measured 2026-07-26 on this
|
|
93
|
+
# split placement: 16.45 tok/s with mmap vs 18.70 without (+13.7%).
|
|
94
|
+
return ('-ngl 99 -ot "blk\\.(%s)\\.ffn_.*_exps\\.=CPU" --no-mmap'
|
|
95
|
+
% "|".join(str(i) for i in range(k, n_layer)))
|
|
92
96
|
|
|
93
97
|
|
|
94
98
|
def evaluate(t, a, ne, moe, bits, vc, vb, rc, rb, db, geta, act_scale=1.0, gl=None, ctx=0, kvp=0.0,
|
|
@@ -133,6 +133,14 @@ def bench(a):
|
|
|
133
133
|
delta = (meas / best[1] - 1) * 100 if best[1] else 0
|
|
134
134
|
print(f"\n[quantprobe] measured: {meas:.2f} +/- {err:.2f} tok/s "
|
|
135
135
|
f"(predicted {best[1]:.1f}, {delta:+.0f}%)")
|
|
136
|
+
# A run whose own error bar is huge is not a measurement - saying so beats letting
|
|
137
|
+
# someone quote a cold-cache artifact. (Seen 2026-07-26: 4.01 +/- 2.16 on a first
|
|
138
|
+
# read from disk, where the warm number was 18.7.)
|
|
139
|
+
if err > meas * 0.15:
|
|
140
|
+
print(f"[quantprobe] WARNING: +/-{err/meas*100:.0f}% spread - this number is not "
|
|
141
|
+
f"reliable. Usually a cold file cache on the first read.\n"
|
|
142
|
+
f" Re-run it: the second run reads from RAM and is the real number.")
|
|
143
|
+
return
|
|
136
144
|
if getattr(a, "contribute", False):
|
|
137
145
|
_emit_contribution(a, best, meas, err, delta)
|
|
138
146
|
else:
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quantprobe
|
|
3
|
+
Version: 1.9.2
|
|
4
|
+
Summary: Probe-then-quantize for LLMs: measure a model's fragility curve, plan bit/tier placement by the tiered decode law, and emit ready-to-run llama.cpp recipes.
|
|
5
|
+
Author: Federico Sciuca
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/FedericoTs/quantprobe
|
|
8
|
+
Keywords: llm,quantization,llama.cpp,gguf,inference,moe
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: gguf>=0.9
|
|
16
|
+
Requires-Dist: requests>=2.28
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# quantprobe
|
|
20
|
+
|
|
21
|
+
### How fast will this model run on *my* machine — and how do I make it faster?
|
|
22
|
+
|
|
23
|
+
**Answers both before you download anything. Then hands you the exact command.** Every number measured on one 2016 desktop (GTX 1060 6 GB · 16 GB DDR4 · SATA SSD), and every claim published as a prediction *made before the measurement*.
|
|
24
|
+
|
|
25
|
+
    [](https://x.com/federico_sciuca)
|
|
26
|
+
|
|
27
|
+
<p align="center"><img src="weights/data/hero_placement.png" width="880" alt="Placement across memory tiers: disk 2-bit cold experts, RAM 2-bit experts + probed fragile band at 4-bit, VRAM 4-bit attention — one law ties them"></p>
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Start here
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install quantprobe
|
|
35
|
+
quantprobe auto
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That's it — it detects your machine, asks which model you want, and gets you running. No flags to learn.
|
|
39
|
+
|
|
40
|
+
**Just want the number first?** `quantprobe plan --gguf model.gguf` prints your predicted tok/s, whether it fits, and the launch command. Downloads nothing, takes a second. There's also a [browser version](https://federicots.github.io/quantprobe/) with nothing to install.
|
|
41
|
+
|
|
42
|
+
## The two ways to run a model
|
|
43
|
+
|
|
44
|
+
| | **Fast** — `quantprobe auto qwen3-30b` | **Custom** — `quantprobe auto qwen3-30b --custom` |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| what it does | picks the best existing quant for *your* machine, downloads it | measures which layers of *your* model break under compression, then builds a version tailored to it |
|
|
47
|
+
| time | minutes (mostly download) | **~50 min for a 7B, ~10 h for a 35B** — it tells you before starting |
|
|
48
|
+
| disk | one file | source + working files, 3–4× bigger |
|
|
49
|
+
| **speed** | full | **identical** — speed comes from placement, not from the build |
|
|
50
|
+
| **quality** | whatever the community published | **−9% perplexity at the same file size** ([measured](preregistrations/2026-07-25-recipe-upgrade-shexp-imatrix.md)) |
|
|
51
|
+
|
|
52
|
+
**Most people want Fast.** Above ~3 bits per weight, community quants are already near-lossless — so `--custom` *refuses to run* on machines that don't need it and explains why. The tool declines to sell you its own product.
|
|
53
|
+
|
|
54
|
+
**Use Custom when** you're squeezing a model that barely fits (under ~3 bits, where ordinary compression falls off a cliff), you have your own fine-tune nobody has published, or you need maximum quality at a fixed size.
|
|
55
|
+
|
|
56
|
+
## The free speed you probably already have
|
|
57
|
+
|
|
58
|
+
Most guides put *all* of a mixture-of-experts model's experts in system RAM and leave your graphics card half empty. Keeping the first N expert layers on the GPU instead — same file, different flags — measured on the reference box:
|
|
59
|
+
|
|
60
|
+
| | all experts → RAM | **partial offload** |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| generation | 15.18 tok/s | **20.44 tok/s** (+34.7%) |
|
|
63
|
+
| prompt reading | 88 tok/s | **~238 tok/s** (2–3×) |
|
|
64
|
+
|
|
65
|
+
`plan` and `run` now compute the cutoff from your *free* VRAM and emit the exact flags. It costs nothing and needs no new download. ([pre-registration #13](preregistrations/2026-07-26-moe-partial-expert-offload.md) — staked before measuring, including the non-ship condition.)
|
|
66
|
+
|
|
67
|
+
## Measured results
|
|
68
|
+
|
|
69
|
+
| result | number |
|
|
70
|
+
|---|---|
|
|
71
|
+
| Qwen3-30B-A3B on the 2016 desktop | **19.3 tok/s** — *predicted 19 before measuring* |
|
|
72
|
+
| Same model, partial expert offload | **20.44 tok/s**, +34.7% for free |
|
|
73
|
+
| Same bytes, different layers (Gemma 4 12B) | **byte-identical files, 2.25 ppl apart** |
|
|
74
|
+
| Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |
|
|
75
|
+
| GLM-4.5-Air **110B** from a SATA drive, 16 GB RAM | 0.19 tok/s — inside the pre-registered 0.2–0.3 band |
|
|
76
|
+
| RAM overclock (XMP, 2133→3000) | dense **+52%**, pre-registered ×1.41+ |
|
|
77
|
+
|
|
78
|
+
<p align="center"><img src="weights/data/validation_19tok/live_run_20tps.png" width="880" alt="One frame: Task Manager showing 16 GB DDR4-3000 and the GTX 1060 6GB beside llama.cpp chatting Qwen3-30B-A3B live at 20.4 tok/s generation"></p>
|
|
79
|
+
<p align="center"><em>One frame, no cuts: Task Manager beside llama.cpp chatting Qwen3-30B-A3B at <b>20.4 tok/s</b> — above the pre-registered 19. Raw logs + GGUF SHA256: <a href="weights/data/validation_19tok/EVIDENCE.txt">EVIDENCE.txt</a>.</em></p>
|
|
80
|
+
|
|
81
|
+
## Why you can trust the numbers
|
|
82
|
+
|
|
83
|
+
Most benchmark posts report what happened. **I write the prediction down first, publish it, then run the hardware** — and publish the misses just as loudly.
|
|
84
|
+
|
|
85
|
+
| predicted (first) | measured (after) |
|
|
86
|
+
|---|---|
|
|
87
|
+
| 110B streamed from SATA: **0.2–0.3 tok/s** | **0.19** |
|
|
88
|
+
| RAM overclock scales decode **×1.41+** | **×1.52** |
|
|
89
|
+
| 30B hybrid placement: **~19 tok/s** | **19.30 ± 0.88** |
|
|
90
|
+
| a day-old 118B streamed from SATA: **0.2–0.4** | **0.38 ± 0.17** |
|
|
91
|
+
|
|
92
|
+
**The misses are the point.** A few that are published in full:
|
|
93
|
+
|
|
94
|
+
- **I benchmarked my recipe against a competitor's and lost** ([#11](preregistrations/2026-07-25-apex-vs-probe-depthaware.md), +8.9% worse). It exposed two real bugs in mine. Fixed them ([#12](preregistrations/2026-07-25-recipe-upgrade-shexp-imatrix.md)), then ran a *fair* rematch on data neither side calibrated for — [predicting I'd lose again](preregistrations/2026-07-26-apex-rematch-ood-kl.md). I won: 26% better KL divergence. Two of four stakes missed **in my favour**, still recorded as misses.
|
|
95
|
+
- **I retracted a headline finding within the hour** when my own audit showed it was a measurement artifact — then reproduced the artifact deliberately to prove the cause ([Law 5 ledger](weights/LAW5_PROTOCOL.md)).
|
|
96
|
+
- **This tool told users a probe takes "30–60 minutes."** It takes 5h40m on a 35 GB model. That was my unmeasured claim, and [v1.9.0](CHANGELOG.md) replaced it with a derived estimate, a live ETA, and a confirmation prompt.
|
|
97
|
+
|
|
98
|
+
Plus a **byte-identical control** (two same-size files, 2.25 ppl apart — only placement differs), a full claim → script → log manifest, and **documented dead ends** (dynamic top-k, semantic paging, self-speculation — all measured-dead, because a law you only confirm is a law you haven't tested).
|
|
99
|
+
|
|
100
|
+
## The four laws, in one line each
|
|
101
|
+
|
|
102
|
+
Full statements with measurements and falsifiable predictions in **[LAWS.md](LAWS.md)**.
|
|
103
|
+
|
|
104
|
+
1. **Rotation is rank-conditional.** The standard trick behind modern quantization helps full-rank tensors and destroys low-rank bottlenecks — a ~270,000× swing.
|
|
105
|
+
2. **Trained networks are dense everywhere.** No free lunch left in the weights: **2-bit is the data-free floor.**
|
|
106
|
+
3. **Fragility is measurable, not predictable.** Gemma breaks late, Mistral breaks early — architectural near-twins pointing opposite ways. Only a functional probe decides.
|
|
107
|
+
4. **The tiered decode law.** `tok/s = η(tier) × bandwidth ÷ active-bytes-per-token`. This is the equation that predicts your speed before you download.
|
|
108
|
+
|
|
109
|
+
<p align="center"><img src="weights/data/x_chart_E_scalinglaw.png" width="700" alt="One scaling law, 7B to 744B, predicted vs measured"></p>
|
|
110
|
+
|
|
111
|
+
## All eleven commands
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
quantprobe auto # interactive: detects, asks, decides, runs
|
|
115
|
+
quantprobe auto qwen3-30b --custom --run # the full custom pipeline, end to end
|
|
116
|
+
quantprobe hw # what the law sees on THIS machine
|
|
117
|
+
quantprobe plan --gguf model.gguf # predicted tok/s + placement + launch command
|
|
118
|
+
quantprobe optimize --tps 20 # cheapest path to a speed target, Pareto-ranked
|
|
119
|
+
quantprobe target --tps 5 --ladder # inverse: target -> smartest model that fits
|
|
120
|
+
quantprobe fetch qwen3-30b ./models # robust, resumable download
|
|
121
|
+
quantprobe quantize --gguf f16.gguf --out 2bit.gguf # build a depth-aware quant
|
|
122
|
+
quantprobe probe --gguf f16.gguf --eval wiki.test.raw # measure YOUR model's fragile band
|
|
123
|
+
quantprobe run --gguf 2bit.gguf # plan the placement, then launch chat
|
|
124
|
+
quantprobe bench --gguf 2bit.gguf --contribute # predicted vs measured; opt-in datapoint
|
|
125
|
+
quantprobe dashboard --gguf 2bit.gguf # the law live, every reply scored vs prediction
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`hw`/`plan`/`target`/`optimize` need nothing but Python. The weight-touching commands drive stock [llama.cpp](https://github.com/ggml-org/llama.cpp/releases) — point at it with `--llama-dir`, `QUANTPROBE_LLAMA_DIR`, or `PATH`, and preview anything with `--dry`. 16 machine presets ship in (`--machine`); multi-GPU and RAID aggregate with comma lists (`--vram 24,24`).
|
|
129
|
+
|
|
130
|
+
> **Windows: `'quantprobe' is not recognized`?** pip put it in a folder that isn't on your PATH. Use `python -m quantprobe ...` — identical, always works.
|
|
131
|
+
|
|
132
|
+
## Help grow the law
|
|
133
|
+
|
|
134
|
+
`quantprobe bench --contribute` prints exactly what would be shared plus a pre-filled issue link — **you review and submit; nothing is ever sent automatically.** Points that land *outside* the predicted bands are the most valuable ones. Open predictions anyone can settle: [preregistrations/](preregistrations/).
|
|
135
|
+
|
|
136
|
+
## Deep dives
|
|
137
|
+
|
|
138
|
+
| | |
|
|
139
|
+
|---|---|
|
|
140
|
+
| [QUICKSTART.md](QUICKSTART.md) | get running, three levels; recipes for fine-tunes, coding agents, hardware buying |
|
|
141
|
+
| [LAWS.md](LAWS.md) | the four laws — statements, measurements, falsifiable predictions |
|
|
142
|
+
| [docs/EXAMPLES.md](docs/EXAMPLES.md) | worked examples with real output, including the ×5.4 optimizer A/B |
|
|
143
|
+
| [docs/HARDWARE.md](docs/HARDWARE.md) | the 2016 box: exact specs, measured bandwidths, what the next euro buys |
|
|
144
|
+
| [preregistrations/](preregistrations/) | every staked prediction with its verdict — hits **and** misses |
|
|
145
|
+
| [weights/LAW5_PROTOCOL.md](weights/LAW5_PROTOCOL.md) | the live Law-5 research ledger, including the retraction |
|
|
146
|
+
| [CHANGELOG.md](CHANGELOG.md) | every release |
|
|
147
|
+
|
|
148
|
+
## Honest limitations
|
|
149
|
+
|
|
150
|
+
- Perplexity and KL divergence are my metrics; I haven't run task-level evals (MMLU/HellaSwag) yet.
|
|
151
|
+
- The fragility atlas covers four model families — enough to *disprove* universality, not to chart every architecture.
|
|
152
|
+
- 0.19 tok/s for a 110B is a **capacity demonstration, not usable inference.**
|
|
153
|
+
- Speed numbers are single-stream decode on one machine (±25% across environments); the η values are fitted, not derived.
|
|
154
|
+
- No custom runtime: everything rides stock llama.cpp.
|
|
155
|
+
|
|
156
|
+
## Credits
|
|
157
|
+
|
|
158
|
+
[colibri](https://github.com/JustVugg/colibri) (744B on 25 GB, pure C) inspired the tier-streaming exploration. The quantization stack builds on [llama.cpp](https://github.com/ggml-org/llama.cpp) and the QTIP/QuIP# incoherence codecs — whose central tool our first law bounds. Independent research by Federico Sciuca, AI-supported, on one desktop.
|
|
159
|
+
|
|
160
|
+
Two community contributions changed the tool measurably: **u/RogerAI--fyi** (Reddit) observed that the Law 4 formulation omitted per-token KV reads — measured, confirmed, shipped within a day. **u/MoneroApe** pointed me at [apex-quant](https://github.com/localai-org/apex-quant) and TurboQuant, and testing against **mudler's APEX** exposed two real gaps in my recipe: unprotected always-active tensors (their kurtosis argument, adopted here) and no importance-matrix calibration at all. The head-to-head and its scope limits are published in full, loss first.
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
MIT — see [LICENSE](LICENSE). © 2026 Federico Sciuca.
|
quantprobe-1.9.0/PKG-INFO
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: quantprobe
|
|
3
|
-
Version: 1.9.0
|
|
4
|
-
Summary: Probe-then-quantize for LLMs: measure a model's fragility curve, plan bit/tier placement by the tiered decode law, and emit ready-to-run llama.cpp recipes.
|
|
5
|
-
Author: Federico Sciuca
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/FedericoTs/quantprobe
|
|
8
|
-
Keywords: llm,quantization,llama.cpp,gguf,inference,moe
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
-
Requires-Python: >=3.9
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE
|
|
15
|
-
Requires-Dist: gguf>=0.9
|
|
16
|
-
Requires-Dist: requests>=2.28
|
|
17
|
-
Dynamic: license-file
|
|
18
|
-
|
|
19
|
-
# quantprobe
|
|
20
|
-
|
|
21
|
-
### Placement beats budget
|
|
22
|
-
|
|
23
|
-
**Where your bits sit — which layers, which memory tier — matters more than how many you have. Four falsification-tested laws for running big LLMs on hardware you already own, every number measured on one 2016 desktop (GTX 1060 6 GB · 16 GB DDR4 · SATA SSD).**
|
|
24
|
-
|
|
25
|
-
     [](https://x.com/federico_sciuca)
|
|
26
|
-
|
|
27
|
-
<p align="center"><img src="weights/data/hero_placement.png" width="880" alt="Placement across memory tiers: disk 2-bit cold experts, RAM 2-bit experts + probed fragile band at 4-bit, VRAM 4-bit attention — one law ties them"></p>
|
|
28
|
-
|
|
29
|
-
> **▶ Try the interactive calculator: [Will it run — and how fast?](https://federicots.github.io/quantprobe/)**
|
|
30
|
-
> Pick any model + your machine → predicted tok/s, memory fit, quality cost, and your cheapest next upgrade — from the law below, with your config plotted against every validated measurement.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**New here? → [QUICKSTART.md](QUICKSTART.md) gets you running in 60 seconds — or just `pip install quantprobe && quantprobe auto qwen3-coder --run`.** The calculators (`hw`/`plan`/`target`/`optimize`) need nothing installed; the weight-touching commands drive [llama.cpp](https://github.com/ggml-org/llama.cpp/releases) (point quantprobe at it with `--llama-dir`, `QUANTPROBE_LLAMA_DIR`, or `PATH`; preview anything with `--dry`). 16 machine presets ship in (`--machine`): GTX 1060 → RTX 5090, Apple `mac-m2/m3/m4-*`, DGX Spark, Epyc — or pass raw specs. Multi-GPU / RAID? Comma lists aggregate: `--vram 24,24 --disk-bw 14,14`. Big-VRAM + disk-streaming rigs get the three-tier expert-cache row (v1.3).
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## What this is
|
|
39
|
-
|
|
40
|
-
My 2016 desktop can't run frontier models the way a datacenter does — so instead of brute force, I asked *where* every bit and byte should go, and answered it by measurement. Months of experiments later, the result is four laws, a 30-minute probe tool, copy-paste llama.cpp recipes, and one equation that predicts decode speed from 7B to 744B — validated against my own pre-registered predictions and against [colibri](https://github.com/JustVugg/colibri)'s independently published 744B numbers.
|
|
41
|
-
|
|
42
|
-
## Headline results
|
|
43
|
-
|
|
44
|
-
| result | number |
|
|
45
|
-
|---|---|
|
|
46
|
-
| 16B MoE, 2-bit, **data-free**, resident on a 6 GB card | ppl 6.31 → 6.96 (**1.10×**) — beats calibrated SOTA's gap-ratio |
|
|
47
|
-
| Same bytes, different layers (Gemma 4 12B, stock llama.cpp) | **byte-identical files, 2.25 ppl apart** (12.27 vs 10.02) |
|
|
48
|
-
| Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |
|
|
49
|
-
| Qwen3-30B-A3B on the 2016 desktop | **19.3 tok/s** — hybrid placement, *predicted 19 before measuring* |
|
|
50
|
-
| GLM-4.5-Air **110B** from a SATA drive, 16 GB RAM | 0.19 tok/s — inside the law's pre-registered 0.2–0.3 band |
|
|
51
|
-
| RAM overclock (XMP, 2133→3000) | dense **+52%**, pre-registered ×1.41+ |
|
|
52
|
-
|
|
53
|
-
## Why the evidence is unusually strong
|
|
54
|
-
|
|
55
|
-
Most benchmark posts report what happened. I report what I **predicted before it happened** — I wrote the number down, then ran the hardware, and this is the strongest form of empirical evidence I know how to produce:
|
|
56
|
-
|
|
57
|
-
| prediction (made first) | measured (after) |
|
|
58
|
-
|---|---|
|
|
59
|
-
| 110B streamed from SATA: **0.2–0.3 tok/s** | **0.19** |
|
|
60
|
-
| RAM overclock scales in-RAM decode **×1.41+** | **×1.52** |
|
|
61
|
-
| 30B hybrid placement: **~19 tok/s** | **19.30 ± 0.88** |
|
|
62
|
-
| a day-old 118B (Laguna S 2.1) streamed from this SATA drive: **0.2–0.4** ([staked pre-download](preregistrations/2026-07-23-laguna-s-2.1-on-2016-desktop.md)) | **0.38 ± 0.17** |
|
|
63
|
-
| colibri's own 128 GB / 25 GB tiers, from our η bands | land **inside** the bands |
|
|
64
|
-
|
|
65
|
-
Add to that: a **byte-identical control** (two GGUFs the same size, 2.25 ppl apart — only placement differs), a full **claim → script → log manifest** (every number reproducible in-tree), and a set of **documented dead ends** (dynamic top-k, semantic paging, self-speculation — all measured-dead, because a law you only confirm is a law you haven't tested).
|
|
66
|
-
|
|
67
|
-
<p align="center"><img src="weights/data/validation_19tok/live_run_20tps.png" width="880" alt="One frame: Task Manager showing 16 GB DDR4-3000 and the GTX 1060 6GB beside llama.cpp chatting Qwen3-30B-A3B live at 20.4 tok/s generation"></p>
|
|
68
|
-
<p align="center"><em>One frame, no cuts: Task Manager (16 GB @ 3000 MT/s, GTX 1060 6 GB, RAM at 91% — the hybrid placement using the whole machine) beside llama.cpp chatting Qwen3-30B-A3B at <b>20.4 tok/s generation</b> — above the pre-registered 19. Raw logs, hardware attestation + GGUF SHA256: <a href="weights/data/validation_19tok/EVIDENCE.txt">EVIDENCE.txt</a>. Third bench run: 19.26 ± 0.45 (series 19.30 → 19.55 → 19.26).</em></p>
|
|
69
|
-
|
|
70
|
-
**Open pre-registrations** — predictions staked publicly *before* measurement: [colibri v1.1, five falsifiable predictions (2026-07-23)](preregistrations/2026-07-23-colibri-v1.1.md) — dual-SSD scaling, int3 speedup, lattice-vs-scalar, AVX-512 tier-scoping, MTP×MoE antagonism — plus open bands on the CPU-only context slope and expert-pruning decode ([all verdicts](preregistrations/)).
|
|
71
|
-
|
|
72
|
-
**Recipe head-to-head, published in full:** [#11](preregistrations/2026-07-25-apex-vs-probe-depthaware.md) tested my depth-aware build against mudler's APEX at matched bytes and **I lost** (+8.9%); [#12](preregistrations/2026-07-25-recipe-upgrade-shexp-imatrix.md) fixed what it exposed and won the rematch by 1.1% — with the calibration caveat stated *before* measuring, because the win is in-domain and does not generalize as published. Both are scored in the open, loss first.
|
|
73
|
-
|
|
74
|
-
**Live research track — Law 5 (prefill):** protocol-first and scored same-day in [weights/LAW5_PROTOCOL.md](weights/LAW5_PROTOCOL.md) — 6 staked hits, 4 published misses, and one self-caught retraction corrected in public within the hour, including the measured recipe that cuts an agent's 8k-context turn cost from ~75 s to ~0.5 s. Next up, staked before launch: [Law 6 — speculation economics](preregistrations/2026-07-24-law6-speculation-economics.md), scoring in public the week of 2026-07-27.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
## The four placement laws
|
|
78
|
-
|
|
79
|
-
Full statements, each with its establishing measurement and a falsifiable prediction, in **[LAWS.md](LAWS.md)**.
|
|
80
|
-
|
|
81
|
-
1. **Rotation is rank-conditional.** Incoherence rotation (QuIP#/QTIP/QuaRot) helps full-rank tensors (+0.006 ppl) and destroys low-rank bottlenecks (+1623 ppl) — a ~270,000× swing on effective rank alone.
|
|
82
|
-
2. **Trained networks are dense everywhere.** Experts sit *exactly* at the rate-distortion floor; routing is flat (even across domains — Jaccard 1.00 prose vs code); activations are diffuse. **2-bit is the floor.**
|
|
83
|
-
3. **Fragility is measurable, not predictable.** Gemma late-fragile 4×, Mistral **early-fragile 25×** — architectural near-twins pointing opposite ways. Weight statistics mislead. **Only a 30-minute functional probe decides.**
|
|
84
|
-
4. **The tiered decode law.** `tok/s = η(tier)·BW ÷ active-bytes`, η collapsing per tier across 7B→744B and both projects' hardware. **v1.1 adds the context term**: each generated token also re-reads the whole KV cache from *its* tier — `--ctx` prices it, `bench --depth` measures it (measured here: 20.02 → 16.12 tok/s at 16k depth).
|
|
85
|
-
|
|
86
|
-
<p align="center"><img src="weights/data/x_chart_E_scalinglaw.png" width="700" alt="One scaling law, 7B to 744B, predicted vs measured, including colibri's published tiers"></p>
|
|
87
|
-
|
|
88
|
-
<p align="center"><img src="weights/data/x_chart_D_placement.png" width="700" alt="Byte-identical GGUF files, 2.25 perplexity apart — placement is worth twice the byte budget"></p>
|
|
89
|
-
<p align="center"><img src="weights/data/x_chart_I_kvdepth.png" width="700" alt="Decode speed versus context depth: measured 20.02 tok/s at depth zero falling to 16.12 at 16384, on the Law 4 v2 curve with eta_kv 0.70"></p>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
## Install — and the eleven commands
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
pip install quantprobe
|
|
96
|
-
quantprobe auto qwen3-coder --tps 15 --run # empty machine -> optimal quant chosen, fetched, chatting
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**Zero-config on your own box**: `quantprobe plan --gguf model.gguf` auto-detects the machine and reads the model from the file. Presets/flags estimate any *other* machine. `hw`/`plan`/`target`/`optimize` need nothing else installed (`auto` needs network for the fetch); the rest drive stock [llama.cpp](https://github.com/ggml-org/llama.cpp/releases) (point at it with `--llama-dir`/`QUANTPROBE_LLAMA_DIR`/`PATH`; preview any command with `--dry`).
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
quantprobe auto qwen3-30b --tps 15 # ONE command: optimizer picks bits, closest quant fetched, run command printed
|
|
103
|
-
quantprobe auto qwen3-30b --custom --run # THE PRODUCT: probe YOUR model, build its personalized depth-aware GGUF, launch it
|
|
104
|
-
quantprobe hw # what the law sees on THIS machine (every value source-tagged)
|
|
105
|
-
quantprobe plan --gguf model.gguf # zero-config prediction: placement + tok/s + the launch command
|
|
106
|
-
quantprobe optimize --tps 20 # CHEAPEST PATH to a target: bits x placement x hardware, Pareto-ranked
|
|
107
|
-
quantprobe target --tps 5 --machine gaming --ladder # inverse: target -> smartest model + speed-intelligence ladder
|
|
108
|
-
quantprobe fetch qwen3-30b ./models # robust, resumable download
|
|
109
|
-
quantprobe quantize --gguf f16.gguf --out 2bit.gguf # COMPRESS: depth-aware ~2-bit GGUF (verified: loads + generates)
|
|
110
|
-
quantprobe probe --gguf f16.gguf --eval wiki.test.raw # measure YOUR model's fragile band (~30 min); --apply builds it
|
|
111
|
-
quantprobe run --gguf 2bit.gguf # plan the placement, then LAUNCH llama.cpp chat
|
|
112
|
-
quantprobe bench --gguf 2bit.gguf --contribute # predicted vs measured on your box; opt-in datapoint
|
|
113
|
-
quantprobe dashboard --gguf 2bit.gguf # the law LIVE: neuron galaxy + thinking toggle, every reply scored vs prediction
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
The loop is self-validating: `plan` predicted 17.5 for a file we then measured at **18.32 ± 0.17**; the config months of research converged to is what `optimize` picks blind. A measured example of what that's worth: the same model, mis-specified vs law-routed, is **3.38 vs 18.32 tok/s (×5.4)** — [worked examples](docs/EXAMPLES.md).
|
|
117
|
-
|
|
118
|
-
## Help grow the law
|
|
119
|
-
|
|
120
|
-
`quantprobe bench --contribute` prints exactly what would be shared (hardware label, model, predicted-vs-measured) plus a pre-filled issue link — **you review and submit; nothing is ever sent automatically**. Contributed points land on the law chart; the ones *outside* the bands are the most valuable. Open falsifiable predictions anyone can settle: [preregistrations/](preregistrations/).
|
|
121
|
-
|
|
122
|
-
## Deep dives
|
|
123
|
-
|
|
124
|
-
| | |
|
|
125
|
-
|---|---|
|
|
126
|
-
| [QUICKSTART.md](QUICKSTART.md) | 60-second start, three levels; recipes (own fine-tune, coding agents, hardware buying); Ollama interop |
|
|
127
|
-
| [LAWS.md](LAWS.md) | the four laws — statements, measurements, falsifiable predictions, the general form |
|
|
128
|
-
| [docs/EXAMPLES.md](docs/EXAMPLES.md) | worked examples with real outputs: zero-config, the ×5.4 optimizer A/B, probe walkthrough, troubleshooting |
|
|
129
|
-
| [docs/HARDWARE.md](docs/HARDWARE.md) | the 2016 box: exact specs, measured bandwidths, what the next euro buys |
|
|
130
|
-
| [docs/DEEP-DIVE.md](docs/DEEP-DIVE.md) | what's new vs. what's built-on, parity tables, the 744B-at-home projection, repository map |
|
|
131
|
-
| [preregistrations/](preregistrations/) | every staked prediction with its verdict — hits, the near-miss, and the honest miss |
|
|
132
|
-
| [weights/LAW5_PROTOCOL.md](weights/LAW5_PROTOCOL.md) | the live Law-5 research ledger — conventions, stakes, scores, and the retraction |
|
|
133
|
-
| [papers/arxiv/](papers/arxiv/) | the paper (submission-ready LaTeX) |
|
|
134
|
-
| [CHANGELOG.md](CHANGELOG.md) | v1.0 → v1.5, every release |
|
|
135
|
-
|
|
136
|
-
## Honest limitations
|
|
137
|
-
|
|
138
|
-
- Perplexity on WikiText-2 is my primary metric; I haven't run task-level evals (MMLU/HellaSwag) yet.
|
|
139
|
-
- My fragility atlas covers four model families — enough to *disprove* universality, not to chart every architecture.
|
|
140
|
-
- 0.19 tok/s for a 110B is a **capacity demonstration, not usable inference** — the honest speed only arrives with faster storage.
|
|
141
|
-
- Speed numbers are single-stream decode on one machine (±25% across environments); the tiered-decode η values are fitted, not derived.
|
|
142
|
-
- No custom runtime: everything rides stock llama.cpp and streaming eval harnesses. The one CUDA kernel is verified in reference, not built.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
## Credits
|
|
146
|
-
|
|
147
|
-
[colibri](https://github.com/JustVugg/colibri) (744B on 25 GB, pure C) inspired the tier-streaming exploration. The quantization stack builds on [llama.cpp](https://github.com/ggml-org/llama.cpp) and the QTIP/QuIP# incoherence codecs — whose central tool our first law bounds. Independent research by Federico Sciuca, AI-supported, on one desktop; every claim is measured, and every negative that redirected the work is documented. The Law 4 context term (v1.1) was prompted by **u/RogerAI--fyi** (Reddit), who correctly observed the original formulation omitted per-token KV reads — measured, confirmed, and shipped within a day. The v1.7 recipe upgrade came the same way: **u/MoneroApe** (Reddit) pointed me at [apex-quant](https://github.com/localai-org/apex-quant) and TurboQuant, and testing my recipe against **mudler's APEX** exposed two real gaps in mine — unprotected always-active tensors (their kurtosis argument, adopted here) and no importance-matrix calibration at all. Their work made this tool measurably better; the head-to-head and its scope limits are published in full.
|
|
148
|
-
|
|
149
|
-
## License
|
|
150
|
-
|
|
151
|
-
MIT — see [LICENSE](LICENSE). © 2026 Federico Sciuca.
|
quantprobe-1.9.0/README.md
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
# quantprobe
|
|
2
|
-
|
|
3
|
-
### Placement beats budget
|
|
4
|
-
|
|
5
|
-
**Where your bits sit — which layers, which memory tier — matters more than how many you have. Four falsification-tested laws for running big LLMs on hardware you already own, every number measured on one 2016 desktop (GTX 1060 6 GB · 16 GB DDR4 · SATA SSD).**
|
|
6
|
-
|
|
7
|
-
     [](https://x.com/federico_sciuca)
|
|
8
|
-
|
|
9
|
-
<p align="center"><img src="weights/data/hero_placement.png" width="880" alt="Placement across memory tiers: disk 2-bit cold experts, RAM 2-bit experts + probed fragile band at 4-bit, VRAM 4-bit attention — one law ties them"></p>
|
|
10
|
-
|
|
11
|
-
> **▶ Try the interactive calculator: [Will it run — and how fast?](https://federicots.github.io/quantprobe/)**
|
|
12
|
-
> Pick any model + your machine → predicted tok/s, memory fit, quality cost, and your cheapest next upgrade — from the law below, with your config plotted against every validated measurement.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
**New here? → [QUICKSTART.md](QUICKSTART.md) gets you running in 60 seconds — or just `pip install quantprobe && quantprobe auto qwen3-coder --run`.** The calculators (`hw`/`plan`/`target`/`optimize`) need nothing installed; the weight-touching commands drive [llama.cpp](https://github.com/ggml-org/llama.cpp/releases) (point quantprobe at it with `--llama-dir`, `QUANTPROBE_LLAMA_DIR`, or `PATH`; preview anything with `--dry`). 16 machine presets ship in (`--machine`): GTX 1060 → RTX 5090, Apple `mac-m2/m3/m4-*`, DGX Spark, Epyc — or pass raw specs. Multi-GPU / RAID? Comma lists aggregate: `--vram 24,24 --disk-bw 14,14`. Big-VRAM + disk-streaming rigs get the three-tier expert-cache row (v1.3).
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## What this is
|
|
21
|
-
|
|
22
|
-
My 2016 desktop can't run frontier models the way a datacenter does — so instead of brute force, I asked *where* every bit and byte should go, and answered it by measurement. Months of experiments later, the result is four laws, a 30-minute probe tool, copy-paste llama.cpp recipes, and one equation that predicts decode speed from 7B to 744B — validated against my own pre-registered predictions and against [colibri](https://github.com/JustVugg/colibri)'s independently published 744B numbers.
|
|
23
|
-
|
|
24
|
-
## Headline results
|
|
25
|
-
|
|
26
|
-
| result | number |
|
|
27
|
-
|---|---|
|
|
28
|
-
| 16B MoE, 2-bit, **data-free**, resident on a 6 GB card | ppl 6.31 → 6.96 (**1.10×**) — beats calibrated SOTA's gap-ratio |
|
|
29
|
-
| Same bytes, different layers (Gemma 4 12B, stock llama.cpp) | **byte-identical files, 2.25 ppl apart** (12.27 vs 10.02) |
|
|
30
|
-
| Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |
|
|
31
|
-
| Qwen3-30B-A3B on the 2016 desktop | **19.3 tok/s** — hybrid placement, *predicted 19 before measuring* |
|
|
32
|
-
| GLM-4.5-Air **110B** from a SATA drive, 16 GB RAM | 0.19 tok/s — inside the law's pre-registered 0.2–0.3 band |
|
|
33
|
-
| RAM overclock (XMP, 2133→3000) | dense **+52%**, pre-registered ×1.41+ |
|
|
34
|
-
|
|
35
|
-
## Why the evidence is unusually strong
|
|
36
|
-
|
|
37
|
-
Most benchmark posts report what happened. I report what I **predicted before it happened** — I wrote the number down, then ran the hardware, and this is the strongest form of empirical evidence I know how to produce:
|
|
38
|
-
|
|
39
|
-
| prediction (made first) | measured (after) |
|
|
40
|
-
|---|---|
|
|
41
|
-
| 110B streamed from SATA: **0.2–0.3 tok/s** | **0.19** |
|
|
42
|
-
| RAM overclock scales in-RAM decode **×1.41+** | **×1.52** |
|
|
43
|
-
| 30B hybrid placement: **~19 tok/s** | **19.30 ± 0.88** |
|
|
44
|
-
| a day-old 118B (Laguna S 2.1) streamed from this SATA drive: **0.2–0.4** ([staked pre-download](preregistrations/2026-07-23-laguna-s-2.1-on-2016-desktop.md)) | **0.38 ± 0.17** |
|
|
45
|
-
| colibri's own 128 GB / 25 GB tiers, from our η bands | land **inside** the bands |
|
|
46
|
-
|
|
47
|
-
Add to that: a **byte-identical control** (two GGUFs the same size, 2.25 ppl apart — only placement differs), a full **claim → script → log manifest** (every number reproducible in-tree), and a set of **documented dead ends** (dynamic top-k, semantic paging, self-speculation — all measured-dead, because a law you only confirm is a law you haven't tested).
|
|
48
|
-
|
|
49
|
-
<p align="center"><img src="weights/data/validation_19tok/live_run_20tps.png" width="880" alt="One frame: Task Manager showing 16 GB DDR4-3000 and the GTX 1060 6GB beside llama.cpp chatting Qwen3-30B-A3B live at 20.4 tok/s generation"></p>
|
|
50
|
-
<p align="center"><em>One frame, no cuts: Task Manager (16 GB @ 3000 MT/s, GTX 1060 6 GB, RAM at 91% — the hybrid placement using the whole machine) beside llama.cpp chatting Qwen3-30B-A3B at <b>20.4 tok/s generation</b> — above the pre-registered 19. Raw logs, hardware attestation + GGUF SHA256: <a href="weights/data/validation_19tok/EVIDENCE.txt">EVIDENCE.txt</a>. Third bench run: 19.26 ± 0.45 (series 19.30 → 19.55 → 19.26).</em></p>
|
|
51
|
-
|
|
52
|
-
**Open pre-registrations** — predictions staked publicly *before* measurement: [colibri v1.1, five falsifiable predictions (2026-07-23)](preregistrations/2026-07-23-colibri-v1.1.md) — dual-SSD scaling, int3 speedup, lattice-vs-scalar, AVX-512 tier-scoping, MTP×MoE antagonism — plus open bands on the CPU-only context slope and expert-pruning decode ([all verdicts](preregistrations/)).
|
|
53
|
-
|
|
54
|
-
**Recipe head-to-head, published in full:** [#11](preregistrations/2026-07-25-apex-vs-probe-depthaware.md) tested my depth-aware build against mudler's APEX at matched bytes and **I lost** (+8.9%); [#12](preregistrations/2026-07-25-recipe-upgrade-shexp-imatrix.md) fixed what it exposed and won the rematch by 1.1% — with the calibration caveat stated *before* measuring, because the win is in-domain and does not generalize as published. Both are scored in the open, loss first.
|
|
55
|
-
|
|
56
|
-
**Live research track — Law 5 (prefill):** protocol-first and scored same-day in [weights/LAW5_PROTOCOL.md](weights/LAW5_PROTOCOL.md) — 6 staked hits, 4 published misses, and one self-caught retraction corrected in public within the hour, including the measured recipe that cuts an agent's 8k-context turn cost from ~75 s to ~0.5 s. Next up, staked before launch: [Law 6 — speculation economics](preregistrations/2026-07-24-law6-speculation-economics.md), scoring in public the week of 2026-07-27.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## The four placement laws
|
|
60
|
-
|
|
61
|
-
Full statements, each with its establishing measurement and a falsifiable prediction, in **[LAWS.md](LAWS.md)**.
|
|
62
|
-
|
|
63
|
-
1. **Rotation is rank-conditional.** Incoherence rotation (QuIP#/QTIP/QuaRot) helps full-rank tensors (+0.006 ppl) and destroys low-rank bottlenecks (+1623 ppl) — a ~270,000× swing on effective rank alone.
|
|
64
|
-
2. **Trained networks are dense everywhere.** Experts sit *exactly* at the rate-distortion floor; routing is flat (even across domains — Jaccard 1.00 prose vs code); activations are diffuse. **2-bit is the floor.**
|
|
65
|
-
3. **Fragility is measurable, not predictable.** Gemma late-fragile 4×, Mistral **early-fragile 25×** — architectural near-twins pointing opposite ways. Weight statistics mislead. **Only a 30-minute functional probe decides.**
|
|
66
|
-
4. **The tiered decode law.** `tok/s = η(tier)·BW ÷ active-bytes`, η collapsing per tier across 7B→744B and both projects' hardware. **v1.1 adds the context term**: each generated token also re-reads the whole KV cache from *its* tier — `--ctx` prices it, `bench --depth` measures it (measured here: 20.02 → 16.12 tok/s at 16k depth).
|
|
67
|
-
|
|
68
|
-
<p align="center"><img src="weights/data/x_chart_E_scalinglaw.png" width="700" alt="One scaling law, 7B to 744B, predicted vs measured, including colibri's published tiers"></p>
|
|
69
|
-
|
|
70
|
-
<p align="center"><img src="weights/data/x_chart_D_placement.png" width="700" alt="Byte-identical GGUF files, 2.25 perplexity apart — placement is worth twice the byte budget"></p>
|
|
71
|
-
<p align="center"><img src="weights/data/x_chart_I_kvdepth.png" width="700" alt="Decode speed versus context depth: measured 20.02 tok/s at depth zero falling to 16.12 at 16384, on the Law 4 v2 curve with eta_kv 0.70"></p>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## Install — and the eleven commands
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
pip install quantprobe
|
|
78
|
-
quantprobe auto qwen3-coder --tps 15 --run # empty machine -> optimal quant chosen, fetched, chatting
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Zero-config on your own box**: `quantprobe plan --gguf model.gguf` auto-detects the machine and reads the model from the file. Presets/flags estimate any *other* machine. `hw`/`plan`/`target`/`optimize` need nothing else installed (`auto` needs network for the fetch); the rest drive stock [llama.cpp](https://github.com/ggml-org/llama.cpp/releases) (point at it with `--llama-dir`/`QUANTPROBE_LLAMA_DIR`/`PATH`; preview any command with `--dry`).
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
quantprobe auto qwen3-30b --tps 15 # ONE command: optimizer picks bits, closest quant fetched, run command printed
|
|
85
|
-
quantprobe auto qwen3-30b --custom --run # THE PRODUCT: probe YOUR model, build its personalized depth-aware GGUF, launch it
|
|
86
|
-
quantprobe hw # what the law sees on THIS machine (every value source-tagged)
|
|
87
|
-
quantprobe plan --gguf model.gguf # zero-config prediction: placement + tok/s + the launch command
|
|
88
|
-
quantprobe optimize --tps 20 # CHEAPEST PATH to a target: bits x placement x hardware, Pareto-ranked
|
|
89
|
-
quantprobe target --tps 5 --machine gaming --ladder # inverse: target -> smartest model + speed-intelligence ladder
|
|
90
|
-
quantprobe fetch qwen3-30b ./models # robust, resumable download
|
|
91
|
-
quantprobe quantize --gguf f16.gguf --out 2bit.gguf # COMPRESS: depth-aware ~2-bit GGUF (verified: loads + generates)
|
|
92
|
-
quantprobe probe --gguf f16.gguf --eval wiki.test.raw # measure YOUR model's fragile band (~30 min); --apply builds it
|
|
93
|
-
quantprobe run --gguf 2bit.gguf # plan the placement, then LAUNCH llama.cpp chat
|
|
94
|
-
quantprobe bench --gguf 2bit.gguf --contribute # predicted vs measured on your box; opt-in datapoint
|
|
95
|
-
quantprobe dashboard --gguf 2bit.gguf # the law LIVE: neuron galaxy + thinking toggle, every reply scored vs prediction
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
The loop is self-validating: `plan` predicted 17.5 for a file we then measured at **18.32 ± 0.17**; the config months of research converged to is what `optimize` picks blind. A measured example of what that's worth: the same model, mis-specified vs law-routed, is **3.38 vs 18.32 tok/s (×5.4)** — [worked examples](docs/EXAMPLES.md).
|
|
99
|
-
|
|
100
|
-
## Help grow the law
|
|
101
|
-
|
|
102
|
-
`quantprobe bench --contribute` prints exactly what would be shared (hardware label, model, predicted-vs-measured) plus a pre-filled issue link — **you review and submit; nothing is ever sent automatically**. Contributed points land on the law chart; the ones *outside* the bands are the most valuable. Open falsifiable predictions anyone can settle: [preregistrations/](preregistrations/).
|
|
103
|
-
|
|
104
|
-
## Deep dives
|
|
105
|
-
|
|
106
|
-
| | |
|
|
107
|
-
|---|---|
|
|
108
|
-
| [QUICKSTART.md](QUICKSTART.md) | 60-second start, three levels; recipes (own fine-tune, coding agents, hardware buying); Ollama interop |
|
|
109
|
-
| [LAWS.md](LAWS.md) | the four laws — statements, measurements, falsifiable predictions, the general form |
|
|
110
|
-
| [docs/EXAMPLES.md](docs/EXAMPLES.md) | worked examples with real outputs: zero-config, the ×5.4 optimizer A/B, probe walkthrough, troubleshooting |
|
|
111
|
-
| [docs/HARDWARE.md](docs/HARDWARE.md) | the 2016 box: exact specs, measured bandwidths, what the next euro buys |
|
|
112
|
-
| [docs/DEEP-DIVE.md](docs/DEEP-DIVE.md) | what's new vs. what's built-on, parity tables, the 744B-at-home projection, repository map |
|
|
113
|
-
| [preregistrations/](preregistrations/) | every staked prediction with its verdict — hits, the near-miss, and the honest miss |
|
|
114
|
-
| [weights/LAW5_PROTOCOL.md](weights/LAW5_PROTOCOL.md) | the live Law-5 research ledger — conventions, stakes, scores, and the retraction |
|
|
115
|
-
| [papers/arxiv/](papers/arxiv/) | the paper (submission-ready LaTeX) |
|
|
116
|
-
| [CHANGELOG.md](CHANGELOG.md) | v1.0 → v1.5, every release |
|
|
117
|
-
|
|
118
|
-
## Honest limitations
|
|
119
|
-
|
|
120
|
-
- Perplexity on WikiText-2 is my primary metric; I haven't run task-level evals (MMLU/HellaSwag) yet.
|
|
121
|
-
- My fragility atlas covers four model families — enough to *disprove* universality, not to chart every architecture.
|
|
122
|
-
- 0.19 tok/s for a 110B is a **capacity demonstration, not usable inference** — the honest speed only arrives with faster storage.
|
|
123
|
-
- Speed numbers are single-stream decode on one machine (±25% across environments); the tiered-decode η values are fitted, not derived.
|
|
124
|
-
- No custom runtime: everything rides stock llama.cpp and streaming eval harnesses. The one CUDA kernel is verified in reference, not built.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
## Credits
|
|
128
|
-
|
|
129
|
-
[colibri](https://github.com/JustVugg/colibri) (744B on 25 GB, pure C) inspired the tier-streaming exploration. The quantization stack builds on [llama.cpp](https://github.com/ggml-org/llama.cpp) and the QTIP/QuIP# incoherence codecs — whose central tool our first law bounds. Independent research by Federico Sciuca, AI-supported, on one desktop; every claim is measured, and every negative that redirected the work is documented. The Law 4 context term (v1.1) was prompted by **u/RogerAI--fyi** (Reddit), who correctly observed the original formulation omitted per-token KV reads — measured, confirmed, and shipped within a day. The v1.7 recipe upgrade came the same way: **u/MoneroApe** (Reddit) pointed me at [apex-quant](https://github.com/localai-org/apex-quant) and TurboQuant, and testing my recipe against **mudler's APEX** exposed two real gaps in mine — unprotected always-active tensors (their kurtosis argument, adopted here) and no importance-matrix calibration at all. Their work made this tool measurably better; the head-to-head and its scope limits are published in full.
|
|
130
|
-
|
|
131
|
-
## License
|
|
132
|
-
|
|
133
|
-
MIT — see [LICENSE](LICENSE). © 2026 Federico Sciuca.
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: quantprobe
|
|
3
|
-
Version: 1.9.0
|
|
4
|
-
Summary: Probe-then-quantize for LLMs: measure a model's fragility curve, plan bit/tier placement by the tiered decode law, and emit ready-to-run llama.cpp recipes.
|
|
5
|
-
Author: Federico Sciuca
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/FedericoTs/quantprobe
|
|
8
|
-
Keywords: llm,quantization,llama.cpp,gguf,inference,moe
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
-
Requires-Python: >=3.9
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE
|
|
15
|
-
Requires-Dist: gguf>=0.9
|
|
16
|
-
Requires-Dist: requests>=2.28
|
|
17
|
-
Dynamic: license-file
|
|
18
|
-
|
|
19
|
-
# quantprobe
|
|
20
|
-
|
|
21
|
-
### Placement beats budget
|
|
22
|
-
|
|
23
|
-
**Where your bits sit — which layers, which memory tier — matters more than how many you have. Four falsification-tested laws for running big LLMs on hardware you already own, every number measured on one 2016 desktop (GTX 1060 6 GB · 16 GB DDR4 · SATA SSD).**
|
|
24
|
-
|
|
25
|
-
     [](https://x.com/federico_sciuca)
|
|
26
|
-
|
|
27
|
-
<p align="center"><img src="weights/data/hero_placement.png" width="880" alt="Placement across memory tiers: disk 2-bit cold experts, RAM 2-bit experts + probed fragile band at 4-bit, VRAM 4-bit attention — one law ties them"></p>
|
|
28
|
-
|
|
29
|
-
> **▶ Try the interactive calculator: [Will it run — and how fast?](https://federicots.github.io/quantprobe/)**
|
|
30
|
-
> Pick any model + your machine → predicted tok/s, memory fit, quality cost, and your cheapest next upgrade — from the law below, with your config plotted against every validated measurement.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**New here? → [QUICKSTART.md](QUICKSTART.md) gets you running in 60 seconds — or just `pip install quantprobe && quantprobe auto qwen3-coder --run`.** The calculators (`hw`/`plan`/`target`/`optimize`) need nothing installed; the weight-touching commands drive [llama.cpp](https://github.com/ggml-org/llama.cpp/releases) (point quantprobe at it with `--llama-dir`, `QUANTPROBE_LLAMA_DIR`, or `PATH`; preview anything with `--dry`). 16 machine presets ship in (`--machine`): GTX 1060 → RTX 5090, Apple `mac-m2/m3/m4-*`, DGX Spark, Epyc — or pass raw specs. Multi-GPU / RAID? Comma lists aggregate: `--vram 24,24 --disk-bw 14,14`. Big-VRAM + disk-streaming rigs get the three-tier expert-cache row (v1.3).
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## What this is
|
|
39
|
-
|
|
40
|
-
My 2016 desktop can't run frontier models the way a datacenter does — so instead of brute force, I asked *where* every bit and byte should go, and answered it by measurement. Months of experiments later, the result is four laws, a 30-minute probe tool, copy-paste llama.cpp recipes, and one equation that predicts decode speed from 7B to 744B — validated against my own pre-registered predictions and against [colibri](https://github.com/JustVugg/colibri)'s independently published 744B numbers.
|
|
41
|
-
|
|
42
|
-
## Headline results
|
|
43
|
-
|
|
44
|
-
| result | number |
|
|
45
|
-
|---|---|
|
|
46
|
-
| 16B MoE, 2-bit, **data-free**, resident on a 6 GB card | ppl 6.31 → 6.96 (**1.10×**) — beats calibrated SOTA's gap-ratio |
|
|
47
|
-
| Same bytes, different layers (Gemma 4 12B, stock llama.cpp) | **byte-identical files, 2.25 ppl apart** (12.27 vs 10.02) |
|
|
48
|
-
| Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |
|
|
49
|
-
| Qwen3-30B-A3B on the 2016 desktop | **19.3 tok/s** — hybrid placement, *predicted 19 before measuring* |
|
|
50
|
-
| GLM-4.5-Air **110B** from a SATA drive, 16 GB RAM | 0.19 tok/s — inside the law's pre-registered 0.2–0.3 band |
|
|
51
|
-
| RAM overclock (XMP, 2133→3000) | dense **+52%**, pre-registered ×1.41+ |
|
|
52
|
-
|
|
53
|
-
## Why the evidence is unusually strong
|
|
54
|
-
|
|
55
|
-
Most benchmark posts report what happened. I report what I **predicted before it happened** — I wrote the number down, then ran the hardware, and this is the strongest form of empirical evidence I know how to produce:
|
|
56
|
-
|
|
57
|
-
| prediction (made first) | measured (after) |
|
|
58
|
-
|---|---|
|
|
59
|
-
| 110B streamed from SATA: **0.2–0.3 tok/s** | **0.19** |
|
|
60
|
-
| RAM overclock scales in-RAM decode **×1.41+** | **×1.52** |
|
|
61
|
-
| 30B hybrid placement: **~19 tok/s** | **19.30 ± 0.88** |
|
|
62
|
-
| a day-old 118B (Laguna S 2.1) streamed from this SATA drive: **0.2–0.4** ([staked pre-download](preregistrations/2026-07-23-laguna-s-2.1-on-2016-desktop.md)) | **0.38 ± 0.17** |
|
|
63
|
-
| colibri's own 128 GB / 25 GB tiers, from our η bands | land **inside** the bands |
|
|
64
|
-
|
|
65
|
-
Add to that: a **byte-identical control** (two GGUFs the same size, 2.25 ppl apart — only placement differs), a full **claim → script → log manifest** (every number reproducible in-tree), and a set of **documented dead ends** (dynamic top-k, semantic paging, self-speculation — all measured-dead, because a law you only confirm is a law you haven't tested).
|
|
66
|
-
|
|
67
|
-
<p align="center"><img src="weights/data/validation_19tok/live_run_20tps.png" width="880" alt="One frame: Task Manager showing 16 GB DDR4-3000 and the GTX 1060 6GB beside llama.cpp chatting Qwen3-30B-A3B live at 20.4 tok/s generation"></p>
|
|
68
|
-
<p align="center"><em>One frame, no cuts: Task Manager (16 GB @ 3000 MT/s, GTX 1060 6 GB, RAM at 91% — the hybrid placement using the whole machine) beside llama.cpp chatting Qwen3-30B-A3B at <b>20.4 tok/s generation</b> — above the pre-registered 19. Raw logs, hardware attestation + GGUF SHA256: <a href="weights/data/validation_19tok/EVIDENCE.txt">EVIDENCE.txt</a>. Third bench run: 19.26 ± 0.45 (series 19.30 → 19.55 → 19.26).</em></p>
|
|
69
|
-
|
|
70
|
-
**Open pre-registrations** — predictions staked publicly *before* measurement: [colibri v1.1, five falsifiable predictions (2026-07-23)](preregistrations/2026-07-23-colibri-v1.1.md) — dual-SSD scaling, int3 speedup, lattice-vs-scalar, AVX-512 tier-scoping, MTP×MoE antagonism — plus open bands on the CPU-only context slope and expert-pruning decode ([all verdicts](preregistrations/)).
|
|
71
|
-
|
|
72
|
-
**Recipe head-to-head, published in full:** [#11](preregistrations/2026-07-25-apex-vs-probe-depthaware.md) tested my depth-aware build against mudler's APEX at matched bytes and **I lost** (+8.9%); [#12](preregistrations/2026-07-25-recipe-upgrade-shexp-imatrix.md) fixed what it exposed and won the rematch by 1.1% — with the calibration caveat stated *before* measuring, because the win is in-domain and does not generalize as published. Both are scored in the open, loss first.
|
|
73
|
-
|
|
74
|
-
**Live research track — Law 5 (prefill):** protocol-first and scored same-day in [weights/LAW5_PROTOCOL.md](weights/LAW5_PROTOCOL.md) — 6 staked hits, 4 published misses, and one self-caught retraction corrected in public within the hour, including the measured recipe that cuts an agent's 8k-context turn cost from ~75 s to ~0.5 s. Next up, staked before launch: [Law 6 — speculation economics](preregistrations/2026-07-24-law6-speculation-economics.md), scoring in public the week of 2026-07-27.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
## The four placement laws
|
|
78
|
-
|
|
79
|
-
Full statements, each with its establishing measurement and a falsifiable prediction, in **[LAWS.md](LAWS.md)**.
|
|
80
|
-
|
|
81
|
-
1. **Rotation is rank-conditional.** Incoherence rotation (QuIP#/QTIP/QuaRot) helps full-rank tensors (+0.006 ppl) and destroys low-rank bottlenecks (+1623 ppl) — a ~270,000× swing on effective rank alone.
|
|
82
|
-
2. **Trained networks are dense everywhere.** Experts sit *exactly* at the rate-distortion floor; routing is flat (even across domains — Jaccard 1.00 prose vs code); activations are diffuse. **2-bit is the floor.**
|
|
83
|
-
3. **Fragility is measurable, not predictable.** Gemma late-fragile 4×, Mistral **early-fragile 25×** — architectural near-twins pointing opposite ways. Weight statistics mislead. **Only a 30-minute functional probe decides.**
|
|
84
|
-
4. **The tiered decode law.** `tok/s = η(tier)·BW ÷ active-bytes`, η collapsing per tier across 7B→744B and both projects' hardware. **v1.1 adds the context term**: each generated token also re-reads the whole KV cache from *its* tier — `--ctx` prices it, `bench --depth` measures it (measured here: 20.02 → 16.12 tok/s at 16k depth).
|
|
85
|
-
|
|
86
|
-
<p align="center"><img src="weights/data/x_chart_E_scalinglaw.png" width="700" alt="One scaling law, 7B to 744B, predicted vs measured, including colibri's published tiers"></p>
|
|
87
|
-
|
|
88
|
-
<p align="center"><img src="weights/data/x_chart_D_placement.png" width="700" alt="Byte-identical GGUF files, 2.25 perplexity apart — placement is worth twice the byte budget"></p>
|
|
89
|
-
<p align="center"><img src="weights/data/x_chart_I_kvdepth.png" width="700" alt="Decode speed versus context depth: measured 20.02 tok/s at depth zero falling to 16.12 at 16384, on the Law 4 v2 curve with eta_kv 0.70"></p>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
## Install — and the eleven commands
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
pip install quantprobe
|
|
96
|
-
quantprobe auto qwen3-coder --tps 15 --run # empty machine -> optimal quant chosen, fetched, chatting
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**Zero-config on your own box**: `quantprobe plan --gguf model.gguf` auto-detects the machine and reads the model from the file. Presets/flags estimate any *other* machine. `hw`/`plan`/`target`/`optimize` need nothing else installed (`auto` needs network for the fetch); the rest drive stock [llama.cpp](https://github.com/ggml-org/llama.cpp/releases) (point at it with `--llama-dir`/`QUANTPROBE_LLAMA_DIR`/`PATH`; preview any command with `--dry`).
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
quantprobe auto qwen3-30b --tps 15 # ONE command: optimizer picks bits, closest quant fetched, run command printed
|
|
103
|
-
quantprobe auto qwen3-30b --custom --run # THE PRODUCT: probe YOUR model, build its personalized depth-aware GGUF, launch it
|
|
104
|
-
quantprobe hw # what the law sees on THIS machine (every value source-tagged)
|
|
105
|
-
quantprobe plan --gguf model.gguf # zero-config prediction: placement + tok/s + the launch command
|
|
106
|
-
quantprobe optimize --tps 20 # CHEAPEST PATH to a target: bits x placement x hardware, Pareto-ranked
|
|
107
|
-
quantprobe target --tps 5 --machine gaming --ladder # inverse: target -> smartest model + speed-intelligence ladder
|
|
108
|
-
quantprobe fetch qwen3-30b ./models # robust, resumable download
|
|
109
|
-
quantprobe quantize --gguf f16.gguf --out 2bit.gguf # COMPRESS: depth-aware ~2-bit GGUF (verified: loads + generates)
|
|
110
|
-
quantprobe probe --gguf f16.gguf --eval wiki.test.raw # measure YOUR model's fragile band (~30 min); --apply builds it
|
|
111
|
-
quantprobe run --gguf 2bit.gguf # plan the placement, then LAUNCH llama.cpp chat
|
|
112
|
-
quantprobe bench --gguf 2bit.gguf --contribute # predicted vs measured on your box; opt-in datapoint
|
|
113
|
-
quantprobe dashboard --gguf 2bit.gguf # the law LIVE: neuron galaxy + thinking toggle, every reply scored vs prediction
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
The loop is self-validating: `plan` predicted 17.5 for a file we then measured at **18.32 ± 0.17**; the config months of research converged to is what `optimize` picks blind. A measured example of what that's worth: the same model, mis-specified vs law-routed, is **3.38 vs 18.32 tok/s (×5.4)** — [worked examples](docs/EXAMPLES.md).
|
|
117
|
-
|
|
118
|
-
## Help grow the law
|
|
119
|
-
|
|
120
|
-
`quantprobe bench --contribute` prints exactly what would be shared (hardware label, model, predicted-vs-measured) plus a pre-filled issue link — **you review and submit; nothing is ever sent automatically**. Contributed points land on the law chart; the ones *outside* the bands are the most valuable. Open falsifiable predictions anyone can settle: [preregistrations/](preregistrations/).
|
|
121
|
-
|
|
122
|
-
## Deep dives
|
|
123
|
-
|
|
124
|
-
| | |
|
|
125
|
-
|---|---|
|
|
126
|
-
| [QUICKSTART.md](QUICKSTART.md) | 60-second start, three levels; recipes (own fine-tune, coding agents, hardware buying); Ollama interop |
|
|
127
|
-
| [LAWS.md](LAWS.md) | the four laws — statements, measurements, falsifiable predictions, the general form |
|
|
128
|
-
| [docs/EXAMPLES.md](docs/EXAMPLES.md) | worked examples with real outputs: zero-config, the ×5.4 optimizer A/B, probe walkthrough, troubleshooting |
|
|
129
|
-
| [docs/HARDWARE.md](docs/HARDWARE.md) | the 2016 box: exact specs, measured bandwidths, what the next euro buys |
|
|
130
|
-
| [docs/DEEP-DIVE.md](docs/DEEP-DIVE.md) | what's new vs. what's built-on, parity tables, the 744B-at-home projection, repository map |
|
|
131
|
-
| [preregistrations/](preregistrations/) | every staked prediction with its verdict — hits, the near-miss, and the honest miss |
|
|
132
|
-
| [weights/LAW5_PROTOCOL.md](weights/LAW5_PROTOCOL.md) | the live Law-5 research ledger — conventions, stakes, scores, and the retraction |
|
|
133
|
-
| [papers/arxiv/](papers/arxiv/) | the paper (submission-ready LaTeX) |
|
|
134
|
-
| [CHANGELOG.md](CHANGELOG.md) | v1.0 → v1.5, every release |
|
|
135
|
-
|
|
136
|
-
## Honest limitations
|
|
137
|
-
|
|
138
|
-
- Perplexity on WikiText-2 is my primary metric; I haven't run task-level evals (MMLU/HellaSwag) yet.
|
|
139
|
-
- My fragility atlas covers four model families — enough to *disprove* universality, not to chart every architecture.
|
|
140
|
-
- 0.19 tok/s for a 110B is a **capacity demonstration, not usable inference** — the honest speed only arrives with faster storage.
|
|
141
|
-
- Speed numbers are single-stream decode on one machine (±25% across environments); the tiered-decode η values are fitted, not derived.
|
|
142
|
-
- No custom runtime: everything rides stock llama.cpp and streaming eval harnesses. The one CUDA kernel is verified in reference, not built.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
## Credits
|
|
146
|
-
|
|
147
|
-
[colibri](https://github.com/JustVugg/colibri) (744B on 25 GB, pure C) inspired the tier-streaming exploration. The quantization stack builds on [llama.cpp](https://github.com/ggml-org/llama.cpp) and the QTIP/QuIP# incoherence codecs — whose central tool our first law bounds. Independent research by Federico Sciuca, AI-supported, on one desktop; every claim is measured, and every negative that redirected the work is documented. The Law 4 context term (v1.1) was prompted by **u/RogerAI--fyi** (Reddit), who correctly observed the original formulation omitted per-token KV reads — measured, confirmed, and shipped within a day. The v1.7 recipe upgrade came the same way: **u/MoneroApe** (Reddit) pointed me at [apex-quant](https://github.com/localai-org/apex-quant) and TurboQuant, and testing my recipe against **mudler's APEX** exposed two real gaps in mine — unprotected always-active tensors (their kurtosis argument, adopted here) and no importance-matrix calibration at all. Their work made this tool measurably better; the head-to-head and its scope limits are published in full.
|
|
148
|
-
|
|
149
|
-
## License
|
|
150
|
-
|
|
151
|
-
MIT — see [LICENSE](LICENSE). © 2026 Federico Sciuca.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|