From e3e5fded6d18911ad779f61e2b0b1dec1db8982e Mon Sep 17 00:00:00 2001 From: aygea Date: Tue, 28 Jul 2026 17:20:27 -0700 Subject: [PATCH] Add Cloud-Offload Strategy panel (local backup for cloud credits) Runnability-first split: TRUSTED/VERIFY (runs clean) vs AVOID (crashes). Only 5/10 local models produce runnable code. Co-Authored-By: Claude --- generate_dashboard.py | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/generate_dashboard.py b/generate_dashboard.py index 8d8bdfa..a3e31ac 100644 --- a/generate_dashboard.py +++ b/generate_dashboard.py @@ -169,6 +169,16 @@ ul.findings-notes li:last-child{border-bottom:none} ul.findings-notes li::before{content:"▸";position:absolute;left:0;color:var(--mag)} ul.findings-notes code{background:rgba(0,255,200,0.1);color:var(--cyan);padding:1px 5px;border-radius:3px;font-family:'Fira Code',monospace;font-size:.8rem} @media(max-width:900px){.findings{grid-template-columns:repeat(2,1fr)}} +/* cloud-offload strategy */ +.offload-panel{border:1px solid rgba(0,255,200,0.18)} +.offload-intro{color:var(--ink);font-size:.86rem;line-height:1.55;margin-bottom:16px;padding:12px 14px;background:rgba(0,0,0,0.25);border-left:3px solid var(--cyan);border-radius:0 5px 5px 0} +.tiers{display:grid;grid-template-columns:1fr 1fr;gap:14px} +.tier-h{font-family:'Fira Code',monospace;font-size:.74rem;letter-spacing:.08em;text-transform:uppercase;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid currentColor} +.tier-list{display:flex;flex-direction:column;gap:6px} +.tier-list .empty{color:var(--dim);font-size:.8rem;padding:8px} +a.tr{grid-template-columns:1fr auto auto auto auto !important} +.tier-badge{font-size:.6rem;letter-spacing:.08em;padding:1px 6px;border:1px solid currentColor;border-radius:3px;font-family:'Fira Code',monospace} +@media(max-width:760px){.tiers{grid-template-columns:1fr}} footer{color:var(--dim);font-size:.74rem;margin-top:40px;border-top:1px solid rgba(255,255,255,0.06);padding-top:14px;text-align:center} @media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}} """ @@ -395,6 +405,52 @@ def render_dashboard(data): """ + # ---- Cloud-offload strategy panel (the actual goal: a backup for cloud credits) ---- + # A model is a useful offload ONLY if its code runs. Rank runnability-first. + ranked = sorted(local, key=lambda m: (-int(m.get("tests_pass", False)), -m["total_score"])) + runs = [m for m in local if m.get("tests_pass")] + crashers = [m for m in local if not m.get("tests_pass")] + fast_clean = [m for m in local if m.get("tests_pass") and m.get("tok_sec") and not m.get("speed_caveat")] + fast_clean.sort(key=lambda m: -m["tok_sec"]) + + def _tier_row(m, badge, color): + t = f"{m['tok_sec']:.0f} t/s" if m.get("tok_sec") else "—" + return (f'' + f'{esc(m["model_name"][:24])}' + f'{esc(m["quant"])}' + f'{t}' + f'{m["total_score"]}' + f'{badge}') + + tier_rows = [] + if runs: + # top runner(s) = recommended offload + for m in runs: + tier_rows.append(_tier_row(m, "TRUSTED" if m["total_score"] >= 78 else "VERIFY", verdict_meta(m["verdict"])[0])) + crash_rows = [_tier_row(m, "AVOID", "var(--red)") for m in crashers] + + offload_panel = f""" +
+

▮ CLOUD-OFFLOAD STRATEGY — what to actually run when rationing cloud credits

+
+ Goal: a trustworthy local backup for when your cloud-LLM plan runs low. A model only earns offload + duty if its code runs — a high score that crashes wastes your time and still costs a cloud call afterward. + Only {len(runs)}/{len(local)} local models produced runnable code; + {len(crashers)}/{len(local)} crashed. +
+
+
✓ RUNS — offload candidates (verify output, then ship)
+
{''.join(tier_rows) if tier_rows else '
none
'}
+
✗ CRASHES — do NOT offload (wasted cycle + cloud call anyway)
+
{''.join(crash_rows) if crash_rows else '
none
'}
+
+
    +
  • Rule of thumb: route a task to local only if the top runner above handles it; if the local output doesn't run on first try, stop and use the cloud model — debugging bad local code usually costs more than the API call you tried to save.
  • +
  • Best pure-offload picks (runs clean + fast + ≥good): {", ".join(f'{esc(m["quant"])}' for m in fast_clean[:3]) or "none yet"}.
  • +
  • Don't trust the score alone. The 4-bit Qwen is the fastest local model (83 t/s) but crashes — speed is meaningless if the code doesn't run.
  • +
+
""" + body = f""" {head_html("LLM Benchmark Suite")}
@@ -416,6 +472,7 @@ def render_dashboard(data):
Local models only — cloud baseline (DeepSeek) excluded from the speed axis. Bars flagged ⚠ have suspected GPU-offload / inference issues (not representative of the model).
{findings_panel} +{offload_panel}

▮ LEADERBOARD