Buckets:
| """Report figures drawn by hand: the system diagram and the run timeline. Run with the report venv.""" | |
| import json | |
| import os | |
| from datetime import datetime | |
| import matplotlib | |
| matplotlib.use("Agg") | |
| import matplotlib.pyplot as plt | |
| from matplotlib.patches import FancyArrowPatch, FancyBboxPatch | |
| OUT = "/workspace/decision-reasoner/results/report_figs" | |
| os.makedirs(OUT, exist_ok=True) | |
| plt.rcParams.update({"font.family": "DejaVu Sans", "font.size": 9, "axes.titlesize": 10.5, "axes.spines.top": False, | |
| "axes.spines.right": False}) | |
| BLUE, G1, G2, G3, AMBER = "#2563eb", "#9ca3af", "#6b7280", "#374151", "#d97706" | |
| manifest = [] | |
| def system(): | |
| fig, ax = plt.subplots(figsize=(6.5, 2.6)) | |
| ax.set_xlim(0, 100); ax.set_ylim(0, 40); ax.axis("off") | |
| def box(x, y, w, h, title, sub, edge=G2, face="white"): | |
| ax.add_patch(FancyBboxPatch((x, y), w, h, boxstyle="round,pad=0.3,rounding_size=1.2", lw=1.1, ec=edge, fc=face)) | |
| ax.text(x + w / 2, y + h * 0.7, title, ha="center", va="center", fontsize=8.6, weight="bold", color=G3) | |
| ax.text(x + w / 2, y + h * 0.32, sub, ha="center", va="center", fontsize=7, color=G2, linespacing=1.3) | |
| def arrow(x0, y0, x1, y1, text=None, tx=0, ty=0, color=G2): | |
| ax.add_patch(FancyArrowPatch((x0, y0), (x1, y1), arrowstyle="-|>", mutation_scale=10, lw=1.1, color=color)) | |
| if text: | |
| ax.text((x0 + x1) / 2 + tx, (y0 + y1) / 2 + ty, text, ha="center", va="center", fontsize=7, color=color) | |
| box(0.5, 13, 18, 13, "Typed question", "evidence, criterion,\nlettered options") | |
| box(25, 13, 20, 13, "Fast readout", "one forward pass,\nletter probabilities", edge=BLUE, face="#eff6ff") | |
| box(51.5, 13, 17, 13, "Router", "margin =\ntop-1 minus top-2") | |
| box(78, 24.5, 21.5, 13, "Answer now", "~70% of questions,\n~40 ms each") | |
| box(78, 1.5, 21.5, 13, "Thinking mode", "chain, then the letter\nreadout after it", edge=AMBER, face="#fffbeb") | |
| arrow(19.2, 19.5, 24.3, 19.5) | |
| arrow(45.7, 19.5, 50.8, 19.5) | |
| arrow(69.2, 22.5, 77.3, 30, "sure", tx=-1.5, ty=2.6) | |
| arrow(69.2, 16.5, 77.3, 8, "least sure 30%", tx=-7.5, ty=-1.5, color=AMBER) | |
| fig.savefig(f"{OUT}/system.png", dpi=200, bbox_inches="tight"); plt.close(fig) | |
| manifest.append({"slug": "system", "title": "System", "caption": "The deployed system. Every question gets the fast readout; the " | |
| "share with the smallest margin between the top two options is answered by thinking mode instead. " | |
| "One model and one LoRA serve both modes."}) | |
| def timeline(): | |
| T = lambda s: datetime.strptime(s, "%m-%d %H:%M") | |
| rows = [ # (phase, stage, start, end) | |
| ("v1", "Probe + untrained baseline", "10-31 00:49", "10-31 02:53"), | |
| ("v1", "Own chains for 3,169 questions", "10-31 02:51", "10-31 06:03"), | |
| ("v1", "Training + ablations", "10-31 06:03", "10-31 07:23"), | |
| ("v1", "Eval + report", "10-31 07:23", "10-31 09:57"), | |
| ("V2", "Chains for the 42K pool", "10-31 10:09", "10-31 13:31"), | |
| ("V2", "Speed benchmark + LR sweep", "10-31 13:32", "10-31 13:59"), | |
| ("V2", "Joint training, 47.8M tokens", "10-31 14:02", "10-31 16:48"), | |
| ("V2", "Ablations + eval", "10-31 16:50", "10-31 18:58"), | |
| ("RL", "GRPO steps 1-40 (1e-5)", "10-31 19:12", "10-31 21:39"), | |
| ("RL", "GRPO steps 41-60 (2.5e-5)", "10-31 21:39", "10-31 22:47"), | |
| ("RL", "Evals (step 60, step 40)", "10-31 22:49", "10-31 23:23"), | |
| ("2B", "Probes, sweep, V2 recipe", "10-31 23:59", "11-01 02:13"), | |
| ("2B", "Evals, readout-only run", "11-01 02:15", "11-01 05:28"), | |
| ("Evals", "Jevals (fast, thinking)", "10-31 23:23", "10-31 23:59"), | |
| ("Evals", "S1MB, 5 models", "11-01 07:11", "11-01 08:06"), | |
| ("Evals", "S1MB routed to thinking", "11-01 08:28", "11-01 11:17"), | |
| ] | |
| extra = [("RL", "Evals (step 60, step 40)", "11-01 06:13", "11-01 07:05"), ("Evals", "Jevals (fast, thinking)", "11-01 05:30", "11-01 06:13")] | |
| col = {"v1": G1, "V2": BLUE, "RL": BLUE, "2B": G2, "Evals": AMBER} | |
| t0 = T("10-31 00:00") | |
| hours = lambda s: (T(s) - t0).total_seconds() / 3600 | |
| labels = [r[1] for r in rows] | |
| fig, ax = plt.subplots(figsize=(6.5, 4.0)) | |
| for k, (ph, lab, a, b) in enumerate(rows + extra): | |
| y = len(rows) - 1 - labels.index(lab) | |
| ax.barh(y, hours(b) - hours(a), left=hours(a), height=0.62, color=col[ph], alpha=0.9) | |
| ax.set_yticks(range(len(rows))) | |
| ax.set_yticklabels([f"{r[0]}: {r[1]}" for r in rows][::-1], fontsize=7.6) | |
| ax.tick_params(axis="y", length=0) | |
| ax.spines["left"].set_visible(False) | |
| ticks = list(range(0, 37, 3)) | |
| ax.set_xticks(ticks) | |
| ax.set_xticklabels([f"{(t % 24):02d}:00" + ("\nOct 31" if t == 0 else "\nNov 1" if t == 24 else "") for t in ticks], fontsize=7.4) | |
| ax.set_xlim(0, 36); ax.grid(axis="x", color="#e5e7eb", lw=0.6); ax.set_axisbelow(True) | |
| ax.set_title("36 hours on one A100", loc="left", fontsize=10.5) | |
| ax.set_xlabel("UTC") | |
| fig.savefig(f"{OUT}/timeline.png", dpi=200, bbox_inches="tight"); plt.close(fig) | |
| manifest.append({"slug": "timeline", "title": "Timeline", "caption": "What ran when on the single A100 (UTC; logs/v2_timeline.jsonl and " | |
| "the notebook). Not shown: setup and data preparation on Oct 30, and the CPU-only analysis and report work afterwards."}) | |
| system() | |
| timeline() | |
| json.dump(manifest, open(f"{OUT}/manifest_mine.json", "w"), indent=1) | |
| print("ok", [m["slug"] for m in manifest]) | |
Xet Storage Details
- Size:
- 5.5 kB
- Xet hash:
- c85fb1a96f7eddc431379a82a4f961f61eb368b34733749b087f951262a32e16
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.