quantprobe 1.6.2__tar.gz → 1.6.4__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.6.2/quantprobe.egg-info → quantprobe-1.6.4}/PKG-INFO +1 -1
- {quantprobe-1.6.2 → quantprobe-1.6.4}/pyproject.toml +1 -1
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/__init__.py +1 -1
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/probe.py +20 -6
- {quantprobe-1.6.2 → quantprobe-1.6.4/quantprobe.egg-info}/PKG-INFO +1 -1
- {quantprobe-1.6.2 → quantprobe-1.6.4}/LICENSE +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/README.md +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/__main__.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/auto.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/cli.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/dashboard.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/detect.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/fetch.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/optimize.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/plan.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/runtime.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/spec.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe/target.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe.egg-info/SOURCES.txt +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe.egg-info/dependency_links.txt +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe.egg-info/entry_points.txt +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe.egg-info/requires.txt +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/quantprobe.egg-info/top_level.txt +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/setup.cfg +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/tests/test_engine.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/tests/test_evaluator.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/tests/test_pipeline.py +0 -0
- {quantprobe-1.6.2 → quantprobe-1.6.4}/tests/test_transforms.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantprobe
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.4
|
|
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
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "quantprobe"
|
|
7
|
-
version = "1.6.
|
|
7
|
+
version = "1.6.4"
|
|
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.6.
|
|
11
|
+
__version__ = "1.6.4"
|
|
@@ -45,14 +45,28 @@ def sh(cmd, dry, capture=False):
|
|
|
45
45
|
return ""
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
def _ppl_once(perp, gguf, eval_file, chunks, ngl):
|
|
49
|
+
p = subprocess.run([perp, "-m", gguf, "-f", eval_file, "--chunks", str(chunks), "-ngl", str(ngl)],
|
|
50
|
+
capture_output=True, text=True, errors="replace")
|
|
51
|
+
out = p.stdout + p.stderr
|
|
52
|
+
m = re.search(r"Final estimate: PPL = ([0-9.]+)", out)
|
|
53
|
+
return (float(m.group(1)) if m else None), out
|
|
54
|
+
|
|
55
|
+
|
|
48
56
|
def ppl(perp, gguf, eval_file, chunks, ngl, dry):
|
|
49
57
|
print(f" measuring perplexity on {chunks} chunks (this can take 1-3 min; llama.cpp is quiet while it works)...", flush=True)
|
|
50
58
|
if dry:
|
|
51
59
|
return None
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
val, out = _ppl_once(perp, gguf, eval_file, chunks, ngl)
|
|
61
|
+
if val is None and ngl != 0 and ("out of memory" in out.lower() or "failed to" in out.lower()):
|
|
62
|
+
# a probe intermediate (Q6_K reference, or a band left at Q6_K) can be far bigger
|
|
63
|
+
# than the source's final compressed size — retry CPU-only before giving up.
|
|
64
|
+
print(" GPU offload failed to fit (likely VRAM); retrying at -ngl 0 (CPU, slower)...", flush=True)
|
|
65
|
+
val, out = _ppl_once(perp, gguf, eval_file, chunks, 0)
|
|
66
|
+
if val is None:
|
|
67
|
+
tail = "\n".join(out.strip().splitlines()[-12:])
|
|
68
|
+
print(f" perplexity produced no parseable result. Last output lines:\n{tail}", flush=True)
|
|
69
|
+
return val
|
|
56
70
|
|
|
57
71
|
|
|
58
72
|
def run(a):
|
|
@@ -121,8 +135,8 @@ def build_depthaware(llama_dir, src, out, protect_lo, protect_hi, n_lay,
|
|
|
121
135
|
if protect_hi < n_lay - 1:
|
|
122
136
|
cmd += ["--tensor-type", f"{_band_re(protect_hi + 1, n_lay - 1)}=q2_k"]
|
|
123
137
|
cmd += ["--tensor-type", f"{_band_re(protect_lo, protect_hi)}={protect}",
|
|
124
|
-
"--tensor-type", "attn_.*=q4_k", "--
|
|
125
|
-
src, out, base, "8"]
|
|
138
|
+
"--tensor-type", "attn_.*=q4_k", "--tensor-type", "ssm_.*=q4_k",
|
|
139
|
+
"--token-embedding-type", "q4_k", src, out, base, "8"]
|
|
126
140
|
print(f"[quantprobe] building depth-aware GGUF: protect layers {protect_lo}-{protect_hi} @ {protect}")
|
|
127
141
|
print(" $ " + " ".join(cmd))
|
|
128
142
|
if dry:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantprobe
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.4
|
|
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
|
|
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
|