quantprobe 1.31.0__tar.gz → 1.32.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.
- {quantprobe-1.31.0/quantprobe.egg-info → quantprobe-1.32.0}/PKG-INFO +6 -2
- {quantprobe-1.31.0 → quantprobe-1.32.0}/README.md +5 -1
- {quantprobe-1.31.0 → quantprobe-1.32.0}/pyproject.toml +1 -1
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/__init__.py +1 -1
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/cli.py +4 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/ollama.py +2 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/plan.py +23 -1
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/report.py +2 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/runtime.py +5 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0/quantprobe.egg-info}/PKG-INFO +6 -2
- {quantprobe-1.31.0 → quantprobe-1.32.0}/LICENSE +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/__main__.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/auto.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/branding.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/calibrate.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/dashboard.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/detect.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/fetch.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/optimize.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/probe.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/recipes/mistral-7b.json +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/recipes/qwen2.5-7b.json +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/recipes/qwen3-30b.json +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/recipes/qwen3.5-35b.json +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/recipes/qwen3.6-35b.json +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/recipes/qwen3.8-27b.json +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/recipes.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/spec.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe/target.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe.egg-info/SOURCES.txt +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe.egg-info/dependency_links.txt +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe.egg-info/entry_points.txt +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe.egg-info/requires.txt +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/quantprobe.egg-info/top_level.txt +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/setup.cfg +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/tests/test_engine.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/tests/test_evaluator.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/tests/test_pipeline.py +0 -0
- {quantprobe-1.31.0 → quantprobe-1.32.0}/tests/test_transforms.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantprobe
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.32.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
|
|
@@ -186,7 +186,11 @@ Most guides put *all* of a mixture-of-experts model's experts in system RAM and
|
|
|
186
186
|
|
|
187
187
|
## Free speed, part two: if you write code
|
|
188
188
|
|
|
189
|
-
`--spec-type ngram-simple` drafts tokens by finding repeated spans in your own context, then verifies them — output is **identical
|
|
189
|
+
llama.cpp's `--spec-type ngram-simple` drafts tokens by finding repeated spans in your own context, then verifies them — output is **identical** and nothing is downloaded. It is a **llama.cpp** flag, so `quantprobe run` forwards it (and picks the placement for you):
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
quantprobe run --gguf model.gguf --extra "--spec-type ngram-simple --spec-ngram-simple-size-m 384 --spec-ngram-simple-size-n 4"
|
|
193
|
+
```
|
|
190
194
|
|
|
191
195
|
<p align="center"><img src="weights/data/chart_kpi_draft_cliff.svg" width="760" alt="Decode speed against speculation draft length: drafts of 4 to 7 sit near 50 tok/s in the slow kernel, then jump to 88.5 at draft 8 and climb to 132 at draft 24"></p>
|
|
192
196
|
|
|
@@ -168,7 +168,11 @@ Most guides put *all* of a mixture-of-experts model's experts in system RAM and
|
|
|
168
168
|
|
|
169
169
|
## Free speed, part two: if you write code
|
|
170
170
|
|
|
171
|
-
`--spec-type ngram-simple` drafts tokens by finding repeated spans in your own context, then verifies them — output is **identical
|
|
171
|
+
llama.cpp's `--spec-type ngram-simple` drafts tokens by finding repeated spans in your own context, then verifies them — output is **identical** and nothing is downloaded. It is a **llama.cpp** flag, so `quantprobe run` forwards it (and picks the placement for you):
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
quantprobe run --gguf model.gguf --extra "--spec-type ngram-simple --spec-ngram-simple-size-m 384 --spec-ngram-simple-size-n 4"
|
|
175
|
+
```
|
|
172
176
|
|
|
173
177
|
<p align="center"><img src="weights/data/chart_kpi_draft_cliff.svg" width="760" alt="Decode speed against speculation draft length: drafts of 4 to 7 sit near 50 tok/s in the slow kernel, then jump to 88.5 at draft 8 and climb to 132 at draft 24"></p>
|
|
174
178
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "quantprobe"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.32.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.
|
|
11
|
+
__version__ = "1.32.0"
|
|
@@ -11,10 +11,14 @@ def main():
|
|
|
11
11
|
sys.stdout.reconfigure(errors="replace")
|
|
12
12
|
except Exception:
|
|
13
13
|
pass
|
|
14
|
+
from . import __version__
|
|
14
15
|
ap = argparse.ArgumentParser(
|
|
15
16
|
prog="quantprobe",
|
|
16
17
|
description="Probe-then-quantize for LLMs: fragility curves, placement plans, recipes. "
|
|
17
18
|
"Laws + evidence: github.com/FedericoTs/quantprobe")
|
|
19
|
+
# Packagers and bug reports expect `--version`; before this it errored with
|
|
20
|
+
# `unrecognized arguments` and the number was only visible in the no-args banner.
|
|
21
|
+
ap.add_argument("--version", action="version", version=f"quantprobe {__version__}")
|
|
18
22
|
sub = ap.add_subparsers(dest="cmd") # not required: bare `quantprobe` shows the banner + help
|
|
19
23
|
|
|
20
24
|
p = sub.add_parser("probe", help="measure a GGUF's depth-fragility curve, emit the recipe (Law 3)")
|
|
@@ -235,6 +235,8 @@ def unload(name, need_free_mib=4500, tries=20):
|
|
|
235
235
|
|
|
236
236
|
def run(a):
|
|
237
237
|
from . import plan as planmod, spec as specmod
|
|
238
|
+
planmod.check_presets(a) # audit-ollama prices every stored model against --machine; a typo'd
|
|
239
|
+
# preset must refuse, not silently price them for the auto box
|
|
238
240
|
root = store_root(getattr(a, "store", None))
|
|
239
241
|
models = installed(root)
|
|
240
242
|
print(f"quantprobe audit-ollama - store: {root}")
|
|
@@ -1405,7 +1405,14 @@ def qual_of(moe, bits):
|
|
|
1405
1405
|
|
|
1406
1406
|
|
|
1407
1407
|
def check_presets(args):
|
|
1408
|
-
"""Refuse unknown preset names LOUDLY
|
|
1408
|
+
"""Refuse unknown preset names LOUDLY, and never predict from a silently-fabricated model.
|
|
1409
|
+
|
|
1410
|
+
The whole product is a trustworthy number, so every prediction entry point calls this -
|
|
1411
|
+
plan/optimize/target AND run/bench/report/dashboard/audit-ollama. It refuses a typo'd
|
|
1412
|
+
--machine/--model that used to quietly predict for the WRONG box or model (e.g.
|
|
1413
|
+
`--machine rtx4090` for `rtx-4090` fell through to auto-detect and nobody said so). The
|
|
1414
|
+
companion warn_if_no_model() labels the separate generic-13B fallback for the commands that
|
|
1415
|
+
actually reach it."""
|
|
1409
1416
|
mdl = getattr(args, "model", None)
|
|
1410
1417
|
if mdl and mdl not in MODELS and not getattr(args, "total", None):
|
|
1411
1418
|
raise SystemExit(
|
|
@@ -1421,6 +1428,20 @@ def check_presets(args):
|
|
|
1421
1428
|
" or pass flags: --vram/--vram-bw/--ram/--ram-bw/--disk-bw (no flags = auto-detect this box)" % (mac, ", ".join(sorted(MACHINES))))
|
|
1422
1429
|
|
|
1423
1430
|
|
|
1431
|
+
def warn_if_no_model(args):
|
|
1432
|
+
"""Label the generic-13B assumption, unmissably, when the user described no model at all.
|
|
1433
|
+
|
|
1434
|
+
Separate from check_presets because only the commands that actually FALL BACK to 13B should
|
|
1435
|
+
say so: `plan` can (no required --gguf), but audit-ollama prices real stored models and
|
|
1436
|
+
run/bench/dashboard require --gguf, so none of them assume 13B and none should print this."""
|
|
1437
|
+
if not (getattr(args, "model", None) or getattr(args, "total", None)
|
|
1438
|
+
or getattr(args, "gguf", None)):
|
|
1439
|
+
print("[quantprobe] NO MODEL GIVEN - assuming a generic 13B DENSE model. This number is "
|
|
1440
|
+
"illustrative, not about your model.\n"
|
|
1441
|
+
" Pass --gguf model.gguf (exact, read from the file), --model <preset>, "
|
|
1442
|
+
"or --total <B> for yours.")
|
|
1443
|
+
|
|
1444
|
+
|
|
1424
1445
|
CAL_COMPONENTS = (("RAM stream", "ram_bw_measured"), ("disk", "disk_bw_measured"),
|
|
1425
1446
|
("decode anchors", "anchors"))
|
|
1426
1447
|
|
|
@@ -1931,6 +1952,7 @@ def build_rows(args):
|
|
|
1931
1952
|
from . import spec as specmod
|
|
1932
1953
|
specmod.apply(args)
|
|
1933
1954
|
check_presets(args)
|
|
1955
|
+
warn_if_no_model(args)
|
|
1934
1956
|
if getattr(args, "bits", None) is None:
|
|
1935
1957
|
args.bits = 2.5
|
|
1936
1958
|
m = dict(MODELS[args.model]) if args.model in MODELS else {}
|
|
@@ -870,6 +870,8 @@ def run(args):
|
|
|
870
870
|
raise SystemExit(f"report needs the file it is about: --gguf {g or '<missing>'} "
|
|
871
871
|
f"not found.\nA preset-only report is a v2 item "
|
|
872
872
|
f"(docs/DESIGN_REPORT_CMD.md section 6).")
|
|
873
|
+
planmod.check_presets(args) # a typo'd --machine must refuse here too, not report a number
|
|
874
|
+
# for the wrong box (the report is the forwardable artifact)
|
|
873
875
|
# Snapshot what the USER passed before build_rows lets autospec fill the gaps in place -
|
|
874
876
|
# the Reproduce section echoes the invocation, not the resolved state.
|
|
875
877
|
snap = {attr: getattr(args, attr, None) for _f, attr in _RECON_FLAGS}
|
|
@@ -30,6 +30,11 @@ def best_flags(a):
|
|
|
30
30
|
"""Run the planner, return (best_config, flags_list) for the winning placement."""
|
|
31
31
|
from . import spec as specmod
|
|
32
32
|
from_file = specmod.apply(a) # True when the spec came from the GGUF itself
|
|
33
|
+
# A typo'd --machine used to fall through to auto-detect here (line ~40) and quietly predict
|
|
34
|
+
# for the wrong box. run / bench / dashboard all route through best_flags, so one guard here
|
|
35
|
+
# gives them the same loud refusal plan/optimize/target already have. Runs AFTER apply so a
|
|
36
|
+
# --gguf has already filled the spec.
|
|
37
|
+
planmod.check_presets(a)
|
|
33
38
|
if getattr(a, "bits", None) is None:
|
|
34
39
|
a.bits = 2.5
|
|
35
40
|
m = dict(planmod.MODELS[a.model]) if getattr(a, "model", None) in planmod.MODELS else {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantprobe
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.32.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
|
|
@@ -186,7 +186,11 @@ Most guides put *all* of a mixture-of-experts model's experts in system RAM and
|
|
|
186
186
|
|
|
187
187
|
## Free speed, part two: if you write code
|
|
188
188
|
|
|
189
|
-
`--spec-type ngram-simple` drafts tokens by finding repeated spans in your own context, then verifies them — output is **identical
|
|
189
|
+
llama.cpp's `--spec-type ngram-simple` drafts tokens by finding repeated spans in your own context, then verifies them — output is **identical** and nothing is downloaded. It is a **llama.cpp** flag, so `quantprobe run` forwards it (and picks the placement for you):
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
quantprobe run --gguf model.gguf --extra "--spec-type ngram-simple --spec-ngram-simple-size-m 384 --spec-ngram-simple-size-n 4"
|
|
193
|
+
```
|
|
190
194
|
|
|
191
195
|
<p align="center"><img src="weights/data/chart_kpi_draft_cliff.svg" width="760" alt="Decode speed against speculation draft length: drafts of 4 to 7 sit near 50 tok/s in the slow kernel, then jump to 88.5 at draft 8 and climb to 132 at draft 24"></p>
|
|
192
196
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|