quantprobe 1.28.2__tar.gz → 1.30.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 (39) hide show
  1. {quantprobe-1.28.2/quantprobe.egg-info → quantprobe-1.30.0}/PKG-INFO +8 -6
  2. {quantprobe-1.28.2 → quantprobe-1.30.0}/README.md +7 -5
  3. {quantprobe-1.28.2 → quantprobe-1.30.0}/pyproject.toml +1 -1
  4. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/__init__.py +1 -1
  5. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/detect.py +67 -0
  6. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/plan.py +10 -0
  7. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/probe.py +418 -413
  8. quantprobe-1.30.0/quantprobe/recipes/qwen3.6-35b.json +59 -0
  9. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/recipes.py +47 -5
  10. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/runtime.py +13 -0
  11. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/spec.py +58 -0
  12. {quantprobe-1.28.2 → quantprobe-1.30.0/quantprobe.egg-info}/PKG-INFO +8 -6
  13. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe.egg-info/SOURCES.txt +1 -0
  14. {quantprobe-1.28.2 → quantprobe-1.30.0}/LICENSE +0 -0
  15. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/__main__.py +0 -0
  16. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/auto.py +0 -0
  17. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/branding.py +0 -0
  18. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/calibrate.py +0 -0
  19. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/cli.py +0 -0
  20. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/dashboard.py +0 -0
  21. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/fetch.py +0 -0
  22. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/ollama.py +0 -0
  23. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/optimize.py +0 -0
  24. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/recipes/mistral-7b.json +0 -0
  25. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/recipes/qwen2.5-7b.json +0 -0
  26. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/recipes/qwen3-30b.json +0 -0
  27. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/recipes/qwen3.5-35b.json +0 -0
  28. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/recipes/qwen3.8-27b.json +0 -0
  29. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/report.py +0 -0
  30. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe/target.py +0 -0
  31. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe.egg-info/dependency_links.txt +0 -0
  32. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe.egg-info/entry_points.txt +0 -0
  33. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe.egg-info/requires.txt +0 -0
  34. {quantprobe-1.28.2 → quantprobe-1.30.0}/quantprobe.egg-info/top_level.txt +0 -0
  35. {quantprobe-1.28.2 → quantprobe-1.30.0}/setup.cfg +0 -0
  36. {quantprobe-1.28.2 → quantprobe-1.30.0}/tests/test_engine.py +0 -0
  37. {quantprobe-1.28.2 → quantprobe-1.30.0}/tests/test_evaluator.py +0 -0
  38. {quantprobe-1.28.2 → quantprobe-1.30.0}/tests/test_pipeline.py +0 -0
  39. {quantprobe-1.28.2 → quantprobe-1.30.0}/tests/test_transforms.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quantprobe
3
- Version: 1.28.2
3
+ Version: 1.30.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
@@ -206,12 +206,13 @@ Copyability is the whole mechanism: code answers repeat their input, prose inven
206
206
 
207
207
  | result | number |
208
208
  |---|---|
209
- | Qwen3-30B-A3B on a 2016 desktop | **20.4–22.7 tok/s** (22.69 re-measured 2026-08-03 on a normal working session, [server log](weights/data/bt_server.log); 22.94 on a scrubbed box, not quoted as the headline) |
209
+ | Qwen3-30B-A3B on a 2016 desktop | **median 20.8 tok/s**, 17.4-21.4 typical (p10-p90), best 22.3 - across **1,231 decode requests** in one live working session with a coding agent and desktop apps running ([server log](weights/data/bt_server.log)). 22.94 on a scrubbed box, not quoted as the headline. [Corrected 2026-08-18](FINDINGS.md): the previous "22.69" was the session's 16-token first reply, not a decode rate. |
210
210
  | Same config, 40 machine-checked business tasks | **40/40** ([evidence](weights/data/bt_20260803_2228_qwen30b_q2k.json)) |
211
211
  | Same model, partial expert offload | **20.62 tok/s** (+12.4%, free) |
212
212
  | Depth-aware vs uniform quant, **equal bytes** (7B @ 2-bit, staked A2A) | **-13.2% perplexity, -39.5% median KLD, +5.1 pts same-token, +6.6% tok/s** at +0.48% file size ([prereg + verdict](preregistrations/2026-08-04-a2a-depth-aware-vs-uniform.md)) |
213
- | Context window trade, measured | 22.69 tok/s at 4k ctx → **~11.7 at 16k** — KV displaces weights on a 6 GB card; run 4k for chat, open it for long chains |
213
+ | 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 |
214
214
  | Same bytes, different layers protected (Gemma 4 12B) | **byte-identical files, 2.25 ppl apart** |
215
+ | 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)) |
215
216
  | Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |
216
217
  | GLM-4.5-Air **110B** from a SATA drive, 16 GB RAM | **0.19 tok/s** (capacity demo, not usable inference) |
217
218
  | RAM overclock (XMP, 2133→3000) | dense **+52%** |
@@ -230,9 +231,10 @@ That is not your machine on a normal day, and we will not pretend otherwise:
230
231
  - **All 14 rows measured faster than the previous pass** — not 13, all of them. Median **+4.6%**,
231
232
  up to +27.5%. The scrubbed box is a **ceiling**, not a typical result.
232
233
  - Because of that, **the published headline speeds above stay conservative.** Qwen3-30B-A3B measured
233
- **22.94 tok/s** on the scrubbed pass; the headline quotes 22.69, measured with a coding agent and
234
- desktop apps live, because a number you can only get by stopping services is not a number you can
235
- reproduce.
234
+ **22.94 tok/s** on the scrubbed pass; the headline quotes the **median of a live session**
235
+ (20.8 tok/s across 1,231 requests, coding agent and desktop apps running), because a number
236
+ you can only get by stopping services is not a number you can reproduce. A single fast reply
237
+ is not one either - that mistake is what C-31 corrected.
236
238
  - The median moved 9.0% → 8.4%, which is **inside our own ±1 point noise floor**, so we report it
237
239
  as *unchanged* rather than improved — even though the smaller number is the flattering one.
238
240
  - An earlier version of this section called the gemma4-12B row "untrustworthy" on a 27% spread.
@@ -188,12 +188,13 @@ Copyability is the whole mechanism: code answers repeat their input, prose inven
188
188
 
189
189
  | result | number |
190
190
  |---|---|
191
- | Qwen3-30B-A3B on a 2016 desktop | **20.4–22.7 tok/s** (22.69 re-measured 2026-08-03 on a normal working session, [server log](weights/data/bt_server.log); 22.94 on a scrubbed box, not quoted as the headline) |
191
+ | Qwen3-30B-A3B on a 2016 desktop | **median 20.8 tok/s**, 17.4-21.4 typical (p10-p90), best 22.3 - across **1,231 decode requests** in one live working session with a coding agent and desktop apps running ([server log](weights/data/bt_server.log)). 22.94 on a scrubbed box, not quoted as the headline. [Corrected 2026-08-18](FINDINGS.md): the previous "22.69" was the session's 16-token first reply, not a decode rate. |
192
192
  | Same config, 40 machine-checked business tasks | **40/40** ([evidence](weights/data/bt_20260803_2228_qwen30b_q2k.json)) |
193
193
  | Same model, partial expert offload | **20.62 tok/s** (+12.4%, free) |
194
194
  | Depth-aware vs uniform quant, **equal bytes** (7B @ 2-bit, staked A2A) | **-13.2% perplexity, -39.5% median KLD, +5.1 pts same-token, +6.6% tok/s** at +0.48% file size ([prereg + verdict](preregistrations/2026-08-04-a2a-depth-aware-vs-uniform.md)) |
195
- | Context window trade, measured | 22.69 tok/s at 4k ctx → **~11.7 at 16k** — KV displaces weights on a 6 GB card; run 4k for chat, open it for long chains |
195
+ | 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 |
196
196
  | Same bytes, different layers protected (Gemma 4 12B) | **byte-identical files, 2.25 ppl apart** |
197
+ | 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)) |
197
198
  | Gemma 4 12B depth-aware 2-bit | 1.91× → **1.45×** quality cost, ~4.5 GB resident |
198
199
  | GLM-4.5-Air **110B** from a SATA drive, 16 GB RAM | **0.19 tok/s** (capacity demo, not usable inference) |
199
200
  | RAM overclock (XMP, 2133→3000) | dense **+52%** |
@@ -212,9 +213,10 @@ That is not your machine on a normal day, and we will not pretend otherwise:
212
213
  - **All 14 rows measured faster than the previous pass** — not 13, all of them. Median **+4.6%**,
213
214
  up to +27.5%. The scrubbed box is a **ceiling**, not a typical result.
214
215
  - Because of that, **the published headline speeds above stay conservative.** Qwen3-30B-A3B measured
215
- **22.94 tok/s** on the scrubbed pass; the headline quotes 22.69, measured with a coding agent and
216
- desktop apps live, because a number you can only get by stopping services is not a number you can
217
- reproduce.
216
+ **22.94 tok/s** on the scrubbed pass; the headline quotes the **median of a live session**
217
+ (20.8 tok/s across 1,231 requests, coding agent and desktop apps running), because a number
218
+ you can only get by stopping services is not a number you can reproduce. A single fast reply
219
+ is not one either - that mistake is what C-31 corrected.
218
220
  - The median moved 9.0% → 8.4%, which is **inside our own ±1 point noise floor**, so we report it
219
221
  as *unchanged* rather than improved — even though the smaller number is the flattering one.
220
222
  - An earlier version of this section called the gemma4-12B row "untrustworthy" on a 27% spread.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "quantprobe"
7
- version = "1.28.2"
7
+ version = "1.30.0"
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.28.2"
11
+ __version__ = "1.30.0"
@@ -244,6 +244,73 @@ def ram_windows():
244
244
  return None, None, None
245
245
 
246
246
 
247
+ def ram_free_gb():
248
+ """FREE physical RAM right now - not installed capacity. None if it cannot be read.
249
+
250
+ Installed capacity is a property of the machine. Free RAM is a property of the MINUTE, and it
251
+ is the one that decides whether a model's weights stay resident in page cache between decode
252
+ passes. C-32: we published 14.86 +/- 0.36 tok/s for a 13.15 GiB file, and could not reproduce
253
+ it days later on the same box with the same command, because nothing recorded that free RAM
254
+ was 12.24 GB - less than the file. A tight error bar said nothing about it; the run was
255
+ internally consistent and externally unrepeatable."""
256
+ try:
257
+ if os.name == "nt":
258
+ import ctypes
259
+
260
+ class _MS(ctypes.Structure):
261
+ _fields_ = [("dwLength", ctypes.c_ulong), ("dwMemoryLoad", ctypes.c_ulong),
262
+ ("ullTotalPhys", ctypes.c_ulonglong),
263
+ ("ullAvailPhys", ctypes.c_ulonglong),
264
+ ("ullTotalPageFile", ctypes.c_ulonglong),
265
+ ("ullAvailPageFile", ctypes.c_ulonglong),
266
+ ("ullTotalVirtual", ctypes.c_ulonglong),
267
+ ("ullAvailVirtual", ctypes.c_ulonglong),
268
+ ("ullAvailExtendedVirtual", ctypes.c_ulonglong)]
269
+
270
+ m = _MS()
271
+ m.dwLength = ctypes.sizeof(m)
272
+ if not ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(m)):
273
+ return None
274
+ return round(m.ullAvailPhys / 2**30, 2)
275
+ # Linux: MemAvailable is the kernel's own estimate of what a new allocation can get.
276
+ # MemFree is not the same thing and is routinely near zero on a healthy box.
277
+ with open("/proc/meminfo", encoding="utf-8") as f:
278
+ for line in f:
279
+ if line.startswith("MemAvailable:"):
280
+ return round(int(line.split()[1]) / 2**20, 2)
281
+ except Exception:
282
+ return None
283
+ return None
284
+
285
+
286
+ def residency(model_bytes, free_gb=None):
287
+ """Can this model's weights stay page-cache resident? -> (fits, note).
288
+
289
+ Law 4 prices bytes streaming from RAM. When the file is larger than free RAM, part of every
290
+ decode pass comes off disk instead - a different resource, an order of magnitude slower, and
291
+ one that changes minute to minute with whatever else the machine is doing. That is not a
292
+ prediction that came out wrong; it is a regime the prediction does not cover, and the honest
293
+ move is to say so rather than absorb it into an error bar.
294
+
295
+ `fits` is None when free RAM could not be read - unknown is not the same as fine."""
296
+ if not model_bytes:
297
+ return None, None
298
+ gb = ram_free_gb() if free_gb is None else free_gb
299
+ if gb is None:
300
+ return None, "free RAM: unreadable - residency unknown, so treat any tok/s as one sample"
301
+ m = model_bytes / 2**30
302
+ if m <= gb:
303
+ return True, (f"free RAM {gb:.1f} GiB vs model {m:.1f} GiB - the weights fit, so this "
304
+ f"number should repeat")
305
+ return False, (
306
+ f"free RAM {gb:.1f} GiB vs model {m:.1f} GiB - THE MODEL DOES NOT FIT IN FREE RAM.\n"
307
+ f" Part of every pass streams from disk, so this figure describes this "
308
+ f"minute's\n"
309
+ f" machine state, not the file. Expect it to move when something else is "
310
+ f"running,\n"
311
+ f" and do not publish it without the free-RAM number beside it (C-32).")
312
+
313
+
247
314
  WIDE_CPU = ("threadripper", "epyc", "xeon w-3", "xeon(r) w9", "xeon(r) w7", "xeon gold",
248
315
  "xeon platinum", "xeon silver")
249
316
 
@@ -2022,6 +2022,16 @@ def run(args):
2022
2022
  print()
2023
2023
  for line in rep:
2024
2024
  print(" " + line)
2025
+ # L-30 / prereg #107: the expert-count dial is a bounded lever, and the bound is arithmetic
2026
+ # on THIS file. Printing the ceiling is the useful output; offering the dial is not, because
2027
+ # every measured point on the curve costs more quality than the speed is worth. Only shown
2028
+ # when a real GGUF was scanned - a preset has no expert byte split to read.
2029
+ _sp = getattr(args, "_spec", None)
2030
+ if isinstance(_sp, dict) and _sp.get("moe"):
2031
+ from . import spec as _specmod
2032
+ _note = _specmod.expert_ceiling_note(_sp)
2033
+ if _note:
2034
+ print(_note)
2025
2035
  # Speculation reality, TOP-LINE (first external replication, u/MoneroApe: the buried version
2026
2036
  # of this note cost him a debugging session - the drafter silently produced 0 drafts on a
2027
2037
  # novel prompt, exactly as D-10 measured, and the warning was ten paragraphs down).