Download make_board_overlay.py from SlayerLab/gollem-v5-ckpts: direct link, hf CLI and curl.
- Browser
- Download file 2.61 kB
-
https://huggingface.co/SlayerLab/gollem-v5-ckpts/resolve/437a1d431ea63562ee5c4bbf065b22b14616aaaf/make_board_overlay.py
- Command line
-
hf download hf://SlayerLab/gollem-v5-ckpts@437a1d431ea63562ee5c4bbf065b22b14616aaaf/make_board_overlay.py
-
curl -L -o make_board_overlay.py https://huggingface.co/SlayerLab/gollem-v5-ckpts/resolve/437a1d431ea63562ee5c4bbf065b22b14616aaaf/make_board_overlay.py
2.61 kB
| #!/usr/bin/env python3 | |
| """GoLLeM-v5 vs Glint board (74 models) — where are our models? ARC / WikiText / efficiency vs params.""" | |
| import json, matplotlib | |
| matplotlib.use("Agg") | |
| import matplotlib.pyplot as plt | |
| D = json.load(open(r"C:/Projekty/Slayer/gollem-v5-en-staging/board_eff_vs_params.json", encoding="utf-8")) | |
| board, ours = D["board"], D["ours"] | |
| def xs(rows, k): return [r["params_M"] for r in rows], [r[k] for r in rows] | |
| fig, ax = plt.subplots(1, 3, figsize=(16, 4.8), dpi=130) | |
| panels = [("arc", "ARC-Easy (higher=better)", False), | |
| ("wiki", "WikiText-2 byte_ppl (lower=better)", True), | |
| ("eff", "Efficiency = score x size-bonus (board rank metric)", False)] | |
| for a, (key, title, low_better) in zip(ax, panels): | |
| bx, by = xs(board, key) | |
| a.scatter(bx, by, s=42, c="#9aa0a6", alpha=.65, edgecolor="none", label="Glint board (74)") | |
| for r in ours: | |
| a.scatter([r["params_M"]], [r[key]], s=300, marker="*", c="#e03131", | |
| edgecolor="k", zorder=6, label="GoLLeM-v5 (ours)" if r is ours[0] else None) | |
| tag = "16M" if "16M" in r["name"] else "32M" | |
| a.annotate(f'{tag}\n{r[key]:.1f}', (r["params_M"], r[key]), textcoords="offset points", | |
| xytext=(8, 6 if not low_better else -18), fontsize=8, color="#e03131", fontweight="bold") | |
| a.set_xscale("log"); a.set_xlabel("parameters (M, log)"); a.set_ylabel(key) | |
| if key == "wiki": a.set_ylim(0, 75) # clip a broken board outlier (~4e6) to match board view | |
| a.set_title(title, fontsize=10); a.grid(alpha=.3, which="both") | |
| a.legend(fontsize=8, loc="upper left" if not low_better else "upper right") | |
| # efficiency panel: mark frontier + note | |
| axe = ax[2] | |
| best = max(board, key=lambda r: r["eff"]) | |
| axe.annotate(f'#1 {best["name"][:16]}\neff {best["eff"]:.1f}', (best["params_M"], best["eff"]), | |
| textcoords="offset points", xytext=(-10, -28), fontsize=7, color="#1864ab") | |
| axe.axhline(ours[0]["eff"], color="#e03131", ls=":", lw=.8, alpha=.5) | |
| axe.annotate("16M > 32M on eff\n(size-bonus penalty > ARC gain)\n-> 16M optimal for THIS bench", | |
| (0.5, 0.04), xycoords="axes fraction", fontsize=7.5, ha="center", color="#555") | |
| fig.suptitle("GoLLeM-v5 vs Glint Tiny-ML board — our models (red stars) among 74 entries", fontsize=13, y=1.03) | |
| fig.tight_layout() | |
| out = "C:/Projekty/datasets/gollem-v5-models/board_overlay_v5.png" | |
| fig.savefig(out, bbox_inches="tight") | |
| print("saved", out, "| board n=", len(board), "| ours=", [o["name"] for o in ours]) | |
| print("eff range board:", round(min(r["eff"] for r in board),2), "-", round(max(r["eff"] for r in board),2)) | |