quantprobe 1.37.0__tar.gz → 1.38.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 (41) hide show
  1. {quantprobe-1.37.0 → quantprobe-1.38.0}/PKG-INFO +9 -5
  2. quantprobe-1.37.0/quantprobe.egg-info/PKG-INFO → quantprobe-1.38.0/README.md +401 -419
  3. {quantprobe-1.37.0 → quantprobe-1.38.0}/pyproject.toml +1 -1
  4. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/__init__.py +1 -1
  5. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/dashboard.py +4 -0
  6. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/plan.py +31 -11
  7. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/recipes/qwen3.8-27b.json +7 -1
  8. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/runtime.py +502 -422
  9. quantprobe-1.37.0/README.md → quantprobe-1.38.0/quantprobe.egg-info/PKG-INFO +423 -397
  10. {quantprobe-1.37.0 → quantprobe-1.38.0}/LICENSE +0 -0
  11. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/__main__.py +0 -0
  12. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/auto.py +0 -0
  13. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/branding.py +0 -0
  14. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/calibrate.py +0 -0
  15. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/cli.py +0 -0
  16. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/detect.py +0 -0
  17. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/fetch.py +0 -0
  18. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/ollama.py +0 -0
  19. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/optimize.py +0 -0
  20. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/probe.py +0 -0
  21. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/recipes/deepseek-v2-lite.json +0 -0
  22. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/recipes/mistral-7b.json +0 -0
  23. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/recipes/qwen2.5-7b.json +0 -0
  24. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/recipes/qwen3-30b.json +0 -0
  25. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/recipes/qwen3.5-35b.json +0 -0
  26. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/recipes/qwen3.5-4b.json +0 -0
  27. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/recipes/qwen3.6-35b.json +0 -0
  28. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/recipes.py +0 -0
  29. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/report.py +0 -0
  30. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/spec.py +0 -0
  31. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe/target.py +0 -0
  32. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe.egg-info/SOURCES.txt +0 -0
  33. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe.egg-info/dependency_links.txt +0 -0
  34. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe.egg-info/entry_points.txt +0 -0
  35. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe.egg-info/requires.txt +0 -0
  36. {quantprobe-1.37.0 → quantprobe-1.38.0}/quantprobe.egg-info/top_level.txt +0 -0
  37. {quantprobe-1.37.0 → quantprobe-1.38.0}/setup.cfg +0 -0
  38. {quantprobe-1.37.0 → quantprobe-1.38.0}/tests/test_engine.py +0 -0
  39. {quantprobe-1.37.0 → quantprobe-1.38.0}/tests/test_evaluator.py +0 -0
  40. {quantprobe-1.37.0 → quantprobe-1.38.0}/tests/test_pipeline.py +0 -0
  41. {quantprobe-1.37.0 → quantprobe-1.38.0}/tests/test_transforms.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quantprobe
3
- Version: 1.37.0
3
+ Version: 1.38.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
@@ -40,7 +40,7 @@ Most tools help you pick a quantization someone else built. This one **measures
40
40
 
41
41
  [**Quickstart**](#quickstart) · [**Browser version**](https://federicots.github.io/quantprobe/) · [**What runs on what**](docs/MATRIX.md) · [**Commands**](#commands) · [**The laws**](LAWS.md) · [**When it won't help**](#when-quantprobe-wont-help-you)
42
42
 
43
- ![smoke](https://github.com/FedericoTs/quantprobe/actions/workflows/smoke.yml/badge.svg) ![pypi](https://img.shields.io/pypi/v/quantprobe?color=0f766e) ![license](https://img.shields.io/badge/license-MIT-0f766e) ![models](https://img.shields.io/badge/validated-7B_→_744B-378add) [![x](https://img.shields.io/badge/author-@federico__sciuca-14181f)](https://x.com/federico_sciuca)
43
+ ![smoke](https://github.com/FedericoTs/quantprobe/actions/workflows/smoke.yml/badge.svg) ![pypi](https://img.shields.io/pypi/v/quantprobe?color=0f766e) ![license](https://img.shields.io/badge/license-MIT-0f766e) ![models](https://img.shields.io/badge/measured-7B_→_118B-378add) [![x](https://img.shields.io/badge/author-@federico__sciuca-14181f)](https://x.com/federico_sciuca)
44
44
 
45
45
  **Validated, not vibes.** 14-model ladder at **8.4% median error** on measured hardware · every printed all-in-VRAM number a documented **floor** (real speed ≥0.90× on 13/13 benchmarks, typically 1.1–1.8× higher) · retrodicts third-party results it never trained on ([airllm's 30× spread, DGX Spark reports, a 1.56 TB Kimi rig](docs/MATRIX.md)) · **every prediction staked before measuring, and the misses published at the same size as the hits.**
46
46
 
@@ -72,7 +72,8 @@ quantprobe plan - Qwen3-30B-A3B @ 2.5-bit on THIS machine [auto-detected]
72
72
  binding constraint: BANDWIDTH-BOUND (system RAM bandwidth) - 51% of every decode token is spent there.
73
73
  validation derived from the law, not confirmed by variance attribution (prereg #95 - …)
74
74
 
75
- run it: llama-server -m model.gguf -ngl 99 -ot "blk\.(16|17|…|47)\.ffn_.*_exps\.=CPU" --no-mmap -b 1024 -ub 1024 --threads 4
75
+ run it: llama-server -m model.gguf -ngl 99 -ot "blk\.(16|17|…|47)\.ffn_.*_exps\.=CPU" -lm none -b 1024 -ub 1024 --threads 4
76
+ (llama.cpp older than b10875 (Sep 2026) spells `-lm none` as `--no-mmap`; newer builds reject the old flag. run/bench detect this for you.)
76
77
  ```
77
78
 
78
79
  The first line is what a fresh install prints. The `calibration applied` and `anchored:` lines appear after you run `quantprobe calibrate` once — measured constants and your own anchor runs, not spec sheets. The **binding constraint** line is the part most tools never tell you: *3 tok/s, disk-bound* means buy RAM; *3 tok/s, bandwidth-bound* means don't bother. And it now carries its own scope label, because we tested it the hard way: [prereg #95](preregistrations/2026-08-07-doe-flag-screening.md)'s variance-attribution arm did **not** confirm the flag-level mapping (the placement lever carried the variance, decided 1000/1000) — so every classification prints *"derived from the law, not confirmed by variance attribution"* until a re-derivation earns the confirmation. The time decomposition itself is untouched arithmetic; the label prices exactly what isn't measured.
@@ -115,7 +116,7 @@ One pipeline, end to end — most tools ship the first line only:
115
116
  - **Anchors predictions to *your* machine** — run `quantprobe calibrate` once and two benchmark runs on your own GGUF scale every prediction. That path passed the gate it pre-registered before any number existed (prereg #64): leave-one-out median error **19% → 5.8%** across 5 arms; ~12% median on the full ladder, misses erring low. `--no-anchors` restores the plain law.
116
117
  - **Emits the exact command**, including the `-ot` regex most guides get wrong.
117
118
  - **Finds free speed in what you already have** — [partial expert offload](#free-speed-you-probably-already-have) and [prompt-lookup speculation](#free-speed-part-two-if-you-write-code) need no new download.
118
- - **Builds layer-aware quantizations** — measures which layers of *your* model break under compression, then protects them (−9% perplexity at the same file size). [Why a recipe cannot be reused ↓](#why-your-model-needs-its-own-recipe)
119
+ - **Builds layer-aware quantizations** — measures which layers of *your* model break under compression, then protects them (−13.2% perplexity on a 7B, and 43.3% less excess loss on a dense 27B, at the same file size). [Why a recipe cannot be reused ↓](#why-your-model-needs-its-own-recipe)
119
120
  - **Audits a running Ollama install** — `quantprobe audit-ollama` reads the placement Ollama actually chose, prices it against the planner's, and refuses to compare while VRAM is contended (a measurement discipline most benchmarks skip).
120
121
  - **Proves quality, not just speed** — perplexity *and* full-distribution KL divergence via llama.cpp's own `--kl-divergence`, because we measured perplexity moving 23% while the model changed its chosen token on 27% of positions.
121
122
  - **Tells you when to stop** — it declines the expensive path on machines that don't need it.
@@ -137,6 +138,8 @@ And the payoff, at **equal file size** (+0.48%, inside the staked ±2% gate):
137
138
 
138
139
  Bytes are the budget; *where the protection goes* is the treatment. The speed panel carries a **staked miss** — we predicted decode would be unchanged (±3%) and it came in +6.6% faster, which is a good outcome and a failed prediction, published at the same size as the wins. Full stake and verdict: [prereg 2026-08-04](preregistrations/2026-08-04-a2a-depth-aware-vs-uniform.md).
139
140
 
141
+ **It is not a mixture-of-experts trick.** Every equal-bytes result above was measured on an MoE, where most of a layer's weight sits in routed experts that move between tiers independently — a structure dense models don't have. So we tested a **dense** 27B and staked, in advance, that the effect would be *weaker* there. It was **1.5× stronger**: 43.3% of the control's excess loss removed against 29.2% on the MoE, with the two arms **byte-identical at 12,483,292,128 bytes** — in a dense stack every block has the same FFN dimensions, so swapping which thirteen are protected changes placement and nothing else. The prediction was wrong in the direction that matters, and it is published as a miss: [prereg #112](preregistrations/2026-08-24-does-depth-aware-pay-on-a-dense-27b.md), [L-34](FINDINGS.md). One dense model is one dense model — a Gemma or Llama arm is the next honest test.
142
+
140
143
  ## Does the cheap quant actually do the work?
141
144
 
142
145
  Speed numbers are worthless if the model can't do the job. So we staked a bar **before generating a single output** — ≥80% of machine-checked tasks or the config is business-useful; under 60% and every tok/s figure we publish gets qualified — and ran the recommended 2.5-bit 30B through **40 auto-scored business tasks**: JSON extraction with exact values, arithmetic to the cent, single-label classification, code that must execute and pass assertions, summaries where **any number not present in the source fails a deterministic hallucination check**.
@@ -193,7 +196,7 @@ recommends (U-38 overturned our own prior "2× ceiling"; U-39 confirmed the MoE
193
196
  | time | minutes (mostly download) | **~50 min for a 7B, ~10 h for a 35B** — it tells you before starting |
194
197
  | disk | one file | source + working files, 3–4× bigger |
195
198
  | **speed** | full | **identical** — speed comes from placement, not from the build |
196
- | **quality** | whatever the community published | **−9% ppl** (Gemma-12B) · **−13.2% ppl / −39.5% KLD** (Qwen2.5-7B, byte-matched, [staked](preregistrations/2026-08-04-a2a-depth-aware-vs-uniform.md)) |
199
+ | **quality** | whatever the community published | **43.3% less excess loss** (Qwen3.8-27B, byte-identical, [prereg #112](preregistrations/2026-08-24-does-depth-aware-pay-on-a-dense-27b.md)) · **−13.2% ppl / −39.5% KLD** (Qwen2.5-7B, byte-matched, [staked](preregistrations/2026-08-04-a2a-depth-aware-vs-uniform.md)) · both measured with no imatrix in either arm |
197
200
 
198
201
  **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 says why. Reach for Custom when you're squeezing a model that barely fits (under ~3 bits, where ordinary compression falls off a cliff), when you have a fine-tune nobody has published, or when you need maximum quality at a fixed size.
199
202
 
@@ -269,6 +272,7 @@ experts routed experts are 22% of the active bytes, so lowering expert_used_cou
269
272
  | 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 |
270
273
  | Same bytes, different layers protected (Gemma 4 12B) | **byte-identical files, 2.25 ppl apart** |
271
274
  | 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)) |
275
+ | Same bytes, different layers protected (Qwen3.8-27B, **dense**) | **43.3% less quality loss** - 6.0590 vs 6.4136 PPL at 12,483,292,128 bytes *each* (identical, not merely close). We predicted dense would be **weaker** than MoE and it was **1.5x stronger** ([prereg #112](preregistrations/2026-08-24-does-depth-aware-pay-on-a-dense-27b.md), L-34) |
272
276
  | 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) |
273
277
  | 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) |
274
278
  | Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |