bench: multi-provider model bake-off harness + results
prototypes/model-bench — throwaway PROTOTYPE harness (bench.py + merge.py) and measured outputs grounding map #125's model-per-surface decisions: essay + Pass 1/Pass 2 across GLM-5.3 efforts (low/high/max), flash, flashx, GPT-6-Sol x2, grok-4.7, gemini-4-argon, claude-opus/sonnet-5.5. Merged report at results/final/REPORT.md. tps computed over content tokens only — reasoning tokens live in completion_tokens and inflated earlier readings (#131 probe).
This commit is contained in:
1 parent
31c8b3f8ef
commit
b43a695563
138 files changed
+8501
No files matched your search
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env python3
|
||||
# PROTOTYPE — merge benchmark run dirs into results/final + REPORT.md (newest per slug+task wins).
|
||||
import csv, re, shutil
|
||||
from pathlib import Path
|
||||
import sys
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from bench import draft_stats
|
||||
|
||||
BASE = Path(__file__).parent / "results"
|
||||
rows = {} # (slug, task) -> (row, stamp)
|
||||
for csvf in sorted(BASE.glob("*/summary.csv")):
|
||||
stamp = csvf.parent.name
|
||||
for r in csv.DictReader(open(csvf)):
|
||||
key = (r["slug"], r["task"])
|
||||
old = rows.get(key)
|
||||
# newest clean run wins; error rows only fill empty slots / replace older errors
|
||||
if old is None or not r.get("error") or old[0].get("error"):
|
||||
rows[key] = (r, stamp)
|
||||
|
||||
final = BASE / "final"
|
||||
if final.exists():
|
||||
shutil.rmtree(final)
|
||||
for (slug, task), (r, stamp) in rows.items():
|
||||
src = BASE / stamp / slug / f"{task}.md"
|
||||
if src.exists():
|
||||
dst = final / slug / f"{task}.md"
|
||||
dst.parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy(src, dst)
|
||||
for extra in (BASE / stamp / slug).glob(f"{task}.thinking.md"):
|
||||
shutil.copy(extra, dst.with_name(f"{task}.thinking.md"))
|
||||
|
||||
def num(x):
|
||||
try: return float(x)
|
||||
except (TypeError, ValueError): return None
|
||||
|
||||
def f(x, nd=1):
|
||||
v = num(x)
|
||||
return f"{v:.{nd}f}" if v is not None else "—"
|
||||
|
||||
lines = ["# Museion model benchmark — final report", "",
|
||||
"Merged runs, newest clean run per model+task. Outputs: `results/final/<slug>/<task>.md`.",
|
||||
"Museion today = glm-5.3-max (thinking forced, effort max — z.ai default).", ""]
|
||||
for task in ("essay", "pass1", "pass2"):
|
||||
tr = [((s, t), r) for (s, t), (r, _) in rows.items() if t == task]
|
||||
if not tr: continue
|
||||
tr.sort(key=lambda kv: num(kv[1].get("total")) or 1e9)
|
||||
lines += [f"## {task}", "",
|
||||
"| model | wall s | ttft s | tok/s | in | out | think | finish |",
|
||||
"|---|---|---|---|---|---|---|---|"]
|
||||
for (slug, _), r in tr:
|
||||
if r.get("error"):
|
||||
lines.append(f"| {slug} | BLOCKED | | | | | | {r['error'][:60]} |")
|
||||
else:
|
||||
lines.append(f"| {slug} | {f(r.get('total'))} | {f(r.get('ttft'), 2)} | {f(r.get('tps'))} | "
|
||||
f"{r.get('in_tok') or '—'} | {r.get('out_tok') or '—'} | {r.get('think_tok') or '—'} | "
|
||||
f"{r.get('finish') or '—'} |")
|
||||
lines.append("")
|
||||
lines += ["## Essay DraftStats (Museion metrics: burstiness / ttr / sentvar / trigram-rep)", ""]
|
||||
for (slug, task), (r, _) in sorted(rows.items()):
|
||||
if task == "essay" and not r.get("error"):
|
||||
p = final / slug / "essay.md"
|
||||
text = re.sub(r"^<!--.*?-->\s*", "", p.read_text(), flags=re.S) if p.exists() else ""
|
||||
ds = draft_stats(text)
|
||||
wc = len(text.split())
|
||||
lines.append(f"- **{slug}**: burst {ds['burstiness']}, ttr {ds['ttr']}, sentvar {ds['sentvar']}, "
|
||||
f"trigram {ds['trigram']}, words {wc}")
|
||||
(final / "REPORT.md").parent.mkdir(parents=True, exist_ok=True)
|
||||
(final / "REPORT.md").write_text("\n".join(lines) + "\n")
|
||||
print(final / "REPORT.md")
|
||||
print("\n".join(lines))
|
||||
Reference in new issue
Block a user