quantprobe 1.32.0__tar.gz → 1.34.0__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.
Files changed (44) hide show
  1. {quantprobe-1.32.0 → quantprobe-1.34.0}/PKG-INFO +45 -4
  2. quantprobe-1.32.0/quantprobe.egg-info/PKG-INFO → quantprobe-1.34.0/README.md +377 -358
  3. quantprobe-1.34.0/pyproject.toml +49 -0
  4. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/__init__.py +2 -1
  5. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/__main__.py +10 -9
  6. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/auto.py +244 -86
  7. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/branding.py +89 -76
  8. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/calibrate.py +137 -51
  9. quantprobe-1.34.0/quantprobe/cli.py +458 -0
  10. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/dashboard.py +59 -23
  11. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/detect.py +706 -550
  12. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/fetch.py +44 -18
  13. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/ollama.py +428 -339
  14. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/optimize.py +116 -43
  15. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/plan.py +1231 -590
  16. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/probe.py +623 -418
  17. quantprobe-1.34.0/quantprobe/recipes/deepseek-v2-lite.json +52 -0
  18. quantprobe-1.34.0/quantprobe/recipes/qwen3.5-4b.json +53 -0
  19. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/recipes.py +140 -117
  20. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/report.py +1211 -926
  21. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/runtime.py +422 -298
  22. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/spec.py +460 -399
  23. quantprobe-1.34.0/quantprobe/target.py +162 -0
  24. quantprobe-1.32.0/README.md → quantprobe-1.34.0/quantprobe.egg-info/PKG-INFO +399 -340
  25. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe.egg-info/SOURCES.txt +2 -0
  26. quantprobe-1.32.0/pyproject.toml +0 -31
  27. quantprobe-1.32.0/quantprobe/cli.py +0 -206
  28. quantprobe-1.32.0/quantprobe/target.py +0 -91
  29. {quantprobe-1.32.0 → quantprobe-1.34.0}/LICENSE +0 -0
  30. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/recipes/mistral-7b.json +0 -0
  31. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/recipes/qwen2.5-7b.json +0 -0
  32. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/recipes/qwen3-30b.json +0 -0
  33. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/recipes/qwen3.5-35b.json +0 -0
  34. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/recipes/qwen3.6-35b.json +0 -0
  35. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe/recipes/qwen3.8-27b.json +0 -0
  36. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe.egg-info/dependency_links.txt +0 -0
  37. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe.egg-info/entry_points.txt +0 -0
  38. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe.egg-info/requires.txt +0 -0
  39. {quantprobe-1.32.0 → quantprobe-1.34.0}/quantprobe.egg-info/top_level.txt +0 -0
  40. {quantprobe-1.32.0 → quantprobe-1.34.0}/setup.cfg +0 -0
  41. {quantprobe-1.32.0 → quantprobe-1.34.0}/tests/test_engine.py +0 -0
  42. {quantprobe-1.32.0 → quantprobe-1.34.0}/tests/test_evaluator.py +0 -0
  43. {quantprobe-1.32.0 → quantprobe-1.34.0}/tests/test_pipeline.py +0 -0
  44. {quantprobe-1.32.0 → quantprobe-1.34.0}/tests/test_transforms.py +0 -0
@@ -1,15 +1,19 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quantprobe
3
- Version: 1.32.0
3
+ Version: 1.34.0
4
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
5
  Author: Federico Sciuca
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/FedericoTs/quantprobe
8
- Keywords: llm,quantization,llama.cpp,gguf,inference,moe
8
+ Keywords: gguf,inference,llama.cpp,llm,moe,quantization
9
9
  Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3 :: Only
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
11
15
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
12
- Requires-Python: >=3.9
16
+ Requires-Python: >=3.11
13
17
  Description-Content-Type: text/markdown
14
18
  License-File: LICENSE
15
19
  Requires-Dist: gguf>=0.9
@@ -206,6 +210,34 @@ byte-identical output: 48.2 → **88.5** in one step, up to **132.1 tok/s (5.8×
206
210
 
207
211
  Copyability is the whole mechanism: code answers repeat their input, prose invents. The 1.03× row is the *full* expert-offload arm only — on the expert-split placement the quickstart recommends, **tuned** ngram (`--spec-ngram-simple-size-m 384 --spec-ngram-simple-size-n 4`) measured **4.7×** decode at ~3-bit (21.3 → 98.8 tok/s), shrinking with bit-width (3.4× at Q3_K_M) because the verify round is compute-bound (V-04; preregs #28/#36/#37/#40). Turn it on whenever your output copies its context, on any placement except full expert-offload; on novel generation it drafts nothing and changes nothing.
208
212
 
213
+ ## Your benchmark may be measuring the run before it
214
+
215
+ We ran the **same command five times** and got **11.3 to 70.7 tok/s**. Nothing changed between runs — except which config we'd benchmarked *just before*.
216
+
217
+ <p align="center"><img src="media/neighbour_effect.png" width="820" alt="Five runs of one unchanged command ranging 11.3 to 70.7 tok/s. The three whose predecessor used the same config cluster at 1.8 percent spread; the two whose predecessor differed are the far outliers."></p>
218
+
219
+ If your model is **bigger than your free RAM**, the page cache carries the previous run's working set into the next process. Arms whose predecessor matched spread **0.8–1.8%**; the same arms whose predecessor differed spread **21–72%** — a **6.3× span from run order alone**. Back-to-back A/B in that regime compares cache states as much as configurations, which quietly invalidates a lot of published local-LLM benchmarking.
220
+
221
+ **The fix is free:** interleave your arms and repeat them, and compare only readings whose predecessor matched. Three passes put every arm inside 2%. Since v1.31 `bench` tells you when you're in that regime instead of letting you find out later:
222
+
223
+ ```
224
+ RESIDENCY: free RAM 12.2 GiB vs model 13.1 GiB - THE MODEL DOES NOT FIT IN FREE RAM.
225
+ COMPARING CONFIGURATIONS? In this regime a run is contaminated by the one before it.
226
+ ```
227
+
228
+ We found this while measuring something else, and it cost us our own headline: a published **14.86 tok/s** returned **11.0** days later on the same box, because nothing recorded free RAM next to the number. That correction is [C-32](FINDINGS.md); the law is L-29/L-31. ([the whole arc, misses and voids included →](https://claude.ai/code/artifact/983fa798-9be4-4e06-92e0-cf414453e537))
229
+
230
+ ## The MoE speed dial that isn't free
231
+
232
+ Turning `expert_used_count` down is traded as free speed for mixture-of-experts models. **It's bounded, and the bound is readable off your file before you run anything.** On Qwen3.6-35B-A3B the routed experts own **22% of the active bytes** — so even at one expert of 256, 96.5% of the bytes are still read and the knob cannot beat **~1.24×**. Law 4 predicted the curve to within 2% (k=4: 1.146× measured vs 1.125 predicted).
233
+
234
+ And it is never free: halving the experts cost **+1.51 perplexity**, and k=1 destroys the model (PPL 2277). Prefill is the one place it pays — 3.77× at k=2, because quantization shrinks bytes but not compute — and it carries the same quality bill. `plan` prints both ceilings for your own file, so you can skip the afternoon:
235
+
236
+ ```
237
+ experts routed experts are 22% of the active bytes, so lowering expert_used_count
238
+ buys at most ~1.24x DECODE even at k=1 - and quality falls long before that
239
+ ```
240
+
209
241
  ## Measured results
210
242
 
211
243
  | result | number |
@@ -217,6 +249,8 @@ Copyability is the whole mechanism: code answers repeat their input, prose inven
217
249
  | Context window trade, measured | median **20.8 tok/s at 4k ctx → 11.2 at 16k** (**1.86x**), from 1,231 and 634 decode requests in two live sessions — KV displaces weights on a 6 GB card; run 4k for chat, open it for long chains |
218
250
  | Same bytes, different layers protected (Gemma 4 12B) | **byte-identical files, 2.25 ppl apart** |
219
251
  | Same bytes, different layers protected (Qwen3.6-35B-A3B, hybrid MoE) | **29.2% less quality loss** - 5.7796 vs 5.9088 PPL at 14,115,658,720 bytes *each*, decode unchanged ([prereg #104](preregistrations/2026-08-18-qwen36-recipe-vs-naive.md), [the build](https://huggingface.co/FedericoSciuca/Qwen3.6-35B-A3B-depthaware-GGUF)) |
252
+ | Benchmark contamination, model > free RAM | **6.3× span from run order alone** - one unchanged command returned 11.3-70.7 tok/s; arms whose predecessor matched spread 0.8-1.8%, arms whose predecessor differed 21-72% ([prereg #108](preregistrations/2026-08-19-is-the-expert-dial-a-prefill-lever.md), L-31) |
253
+ | MoE expert dial, predicted from the file *before* measuring | ceiling **1.24×** decode (routed experts = 22% of active bytes); measured k=4 **1.146×** vs **1.125 predicted** (+1.9%), k=2 1.175× vs 1.200 (-2.1%) - and halving the experts costs **+1.51 PPL** ([prereg #107](preregistrations/2026-08-18-the-k-lever-is-bounded-by-the-always-active-floor.md), L-30) |
220
254
  | Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |
221
255
  | GLM-4.5-Air **110B** from a SATA drive, 16 GB RAM | **0.19 tok/s** (capacity demo, not usable inference) |
222
256
  | RAM overclock (XMP, 2133→3000) | dense **+52%** |
@@ -326,8 +360,15 @@ Then the placements, the binding constraint with its per-lever ceilings ("faster
326
360
 
327
361
  ## Docs
328
362
 
363
+ **Seeing an id like `L-30`, `C-17` or `U-23` in the output?** Every one resolves in
364
+ [FINDINGS.md](FINDINGS.md) — the register of everything this project has measured, refuted, or
365
+ left untried. The tool cites it rather than asserting, so any claim it prints at you can be
366
+ traced to the measurement behind it. (CI fails if the tool ever prints an id the register does
367
+ not contain.)
368
+
329
369
  | | |
330
370
  |---|---|
371
+ | [FINDINGS.md](FINDINGS.md) | **the register** — every law, lever, dead end, contradiction and untried idea, with its evidence. Where the ids in the output resolve |
331
372
  | [QUICKSTART.md](QUICKSTART.md) | get running, three levels; recipes for fine-tunes, coding agents, hardware buying |
332
373
  | [LAWS.md](LAWS.md) | the four laws — statements, measurements, falsifiable predictions |
333
374
  | [docs/MATRIX.md](docs/MATRIX.md) | **what to run on what** — 11 machines × 11 models, every cell priced by the shipped engine, scored against third-party reports |