| # Build the SPEED-Bench Trackio logbook from stored outputs. Run from paper dir. | |
| import json, os, subprocess | |
| BASE = os.path.dirname(os.path.abspath(__file__)) | |
| def tk(*args): | |
| r = subprocess.run(["trackio", "logbook", *args], capture_output=True, | |
| text=True, encoding="utf-8", cwd=BASE) | |
| if r.returncode != 0: | |
| print("ERR", args[:3], (r.stderr or "")[-500:]) | |
| return r | |
| def md(page, body): tk("cell", "markdown", body, "--page", page) | |
| def fig(page, img, raw=None): | |
| a = ["cell", "figure", "--page", page, "--image", img] | |
| if raw: a += ["--raw", raw] | |
| tk(*a) | |
| J = lambda n: json.load(open(os.path.join(BASE, "outputs", n), encoding="utf-8")) | |
| c1 = J("claim1_throughput_bias.json") | |
| div = J("claim2_diversity.json") | |
| b2 = J("claim2b_draft_length.json") | |
| rf = J("claim2b_roofline.json") | |
| TITLE = "Repro - SPEED-Bench: A Unified and Diverse Benchmark for Speculative Decoding" | |
| tk("open", "--title", TITLE, "--no-serve", "--no-browser") | |
| PAGES = ["Executive summary", "Protocol and scope", | |
| "Claim 1: synthetic inputs overestimate throughput", | |
| "Claim 2a: low-diversity bias (diversity selection)", | |
| "Claim 2b: batch-dependent optimal draft length", | |
| "Robustness and controls", "Limitations", "Conclusion"] | |
| for p in PAGES: | |
| tk("page", p) | |
| # ---------- Executive summary ---------- | |
| md("Executive summary", f"""## Reproduction outcome — SPEED-Bench (arXiv:2604.09557, ICML 2026) | |
| Independent CPU-scale reproduction of the two official challenge claims. The paper's | |
| production-scale speedup tables (Llama-3.3-70B / GPT-OSS-120B / DeepSeek-R1 / Qwen3-235B | |
| with EAGLE3/MTP drafters and production engines) are **infeasible on available hardware | |
| and not attempted**; we reproduce the **mechanisms** with a genuine draft/target pair | |
| (**distilgpt2 82M -> gpt2 124M**) and the **real `nvidia/SPEED-Bench` dataset**. | |
| | Official claim | Verdict | Evidence | | |
| |---|---|---| | |
| | **1. Synthetic inputs overestimate real-world throughput** | **inconclusive (toy scale)** | real 1.90 vs synthetic 1.84 acceptance length (-2%, within seed spread 1.54-2.05) — direction does **not** reproduce with small models + uniform-random synthetic tokens | | |
| | **2. Batch-dependent optimal draft length + low-diversity bias** | **partly full, partly toy** | *low-diversity bias:* **FULL** — diversity selection (Alg. 1) lowers intra-set similarity 0.492->0.382, **11/11 categories**. *batch-dependent draft length:* **TOY** — roofline model (measured alpha=0.72) gives k* = 3->2->1 as batch grows; CPU-measured hardware is compute-bound throughout (k*=1) | | |
| **Bottom line.** The diversity-selection premise of the benchmark reproduces exactly and | |
| deterministically. The batch-dependent optimal-draft-length *mechanism* reproduces under a | |
| standard roofline model with a measured acceptance rate. The synthetic-overestimation | |
| *direction* requires production-scale conditions and is not reproducible at toy scale — reported | |
| honestly rather than forced. Cost: **$0 (CPU/GPU-light, no paid Job)**.""") | |
| # ---------- Protocol ---------- | |
| md("Protocol and scope", f"""## Paper | |
| **SPEED-Bench: A Unified and Diverse Benchmark for Speculative Decoding** (ICML 2026). | |
| OpenReview: https://openreview.net/forum?id=Rl2uQlCoQX · arXiv: https://arxiv.org/abs/2604.09557 | |
| ## Official challenge claims | |
| 1. SPEED-Bench quantifies how **synthetic inputs overestimate real-world throughput** in speculative decoding. | |
| 2. SPEED-Bench identifies **batch-size dependent optimal draft lengths** and **biases in low-diversity data** across SD evaluation. | |
| ## Method (independent, CPU-scale) | |
| - **Speculative decoding:** greedy **lossless** SD — a drafted token is accepted iff it equals the target's greedy argmax; first mismatch takes the target token and ends the round; all-accepted rounds append a bonus token. Draft = distilgpt2 (82M), target = gpt2 (124M). Acceptance length (AL) governs throughput (target calls / token ~ 1/(AL+1)). | |
| - **Dataset:** real `nvidia/SPEED-Bench` — qualitative config verified = 880 rows = **11 categories x 80**; throughput configs = 5 ISL buckets (1k/2k/8k/16k/32k). | |
| - **Diversity:** SPEED-Bench Algorithm 1 (greedy min-similarity selection + local swap) on real all-MiniLM-L6-v2 embeddings. | |
| - **Determinism:** fixed seeds. `protocol.md` committed to git before the finalized runs. `datasets`(pyarrow)+`torch` segfault in one process on this box -> prompts pre-extracted torch-free. | |
| ## Resumption note | |
| This reproduction was **resumed** from a stale KIMI reservation via a sanctioned lease takeover (previous worker's anchor process provably dead). Prior partial outputs were re-derived / verified; the diversity result is deterministic and reproduced identically.""") | |
| # ---------- Claim 1 ---------- | |
| pc = sorted(c1["per_category_real_mean_AL"].items(), key=lambda x: -x[1]) | |
| md("Claim 1: synthetic inputs overestimate throughput", f"""## Verdict: **INCONCLUSIVE at toy scale** (direction not reproduced) | |
| **Claim.** Synthetic inputs overestimate real-world throughput in speculative decoding. | |
| **Audit.** Greedy lossless SD (distilgpt2->gpt2) acceptance length on **{c1['config']['n_real_rounds']} real** SPEED-Bench rounds (4 prompts/category x 11) vs **{c1['config']['n_synth_rounds']} synthetic** uniform-random-token rounds, {c1['config']['seeds']} seeds, k={c1['config']['k']}. | |
| **Result.** | |
| - real mean AL = **{c1['real']['mean_AL']:.3f}** (+/-{c1['real']['std_AL']:.2f}); synthetic mean AL = **{c1['synthetic']['mean_AL']:.3f}** (+/-{c1['synthetic']['std_AL']:.2f}). | |
| - throughput proxy (tokens/target-call): real {c1['real']['throughput_tok_per_targetcall']:.3f} vs synthetic {c1['synthetic']['throughput_tok_per_targetcall']:.3f} -> **overestimation = {c1['overestimation_pct']:.2f}%** (i.e. synthetic is slightly *lower*, within noise). | |
| - synthetic per-seed means span {min(c1['synthetic']['by_seed_mean_AL'].values()):.2f}-{max(c1['synthetic']['by_seed_mean_AL'].values()):.2f}; real varies widely by category (multilingual {pc[0][1]:.2f} highest, writing/reasoning/stem/math {pc[-1][1]:.2f}). | |
| **Interpretation.** With small models and uniform-random synthetic tokens, synthetic and real acceptance are statistically indistinguishable — the paper's overestimation appears to require production-scale models (70B-235B) and *structured* synthetic inputs (fixed-entropy buckets) that drive large models into low-entropy, high-acceptance continuations. Reported honestly as **not reproduced at this scale**, not forced.""") | |
| fig("Claim 1: synthetic inputs overestimate throughput", "figures/claim1_throughput_bias.png", "outputs/claim1_throughput_bias.json") | |
| # ---------- Claim 2a ---------- | |
| o = div["overall"] | |
| rows = "".join(f"| {c} | {v['greedy_sim']:.3f} | {v['random_sim']:.3f} | {'yes' if v['greedy_better'] else 'NO'} |\n" | |
| for c, v in sorted(div["per_category"].items(), key=lambda x: x[1]['random_sim']-x[1]['greedy_sim'], reverse=True)) | |
| md("Claim 2a: low-diversity bias (diversity selection)", f"""## Verdict: **FULL — verified (deterministic, real embeddings)** | |
| **Claim.** SPEED-Bench guards against **biases in low-diversity data**: its diversity-optimized selection yields a less redundant eval set than naive sampling. | |
| **Audit.** SPEED-Bench Algorithm 1 (greedy min-similarity + local swap) vs random selection (avg of 20 draws), per category, on real all-MiniLM-L6-v2 embeddings of the qualitative split (k={list(div['per_category'].values())[0]['k']} per category). Metric: average intra-set pairwise cosine similarity (lower = more diverse). | |
| **Result.** greedy diverse **{o['greedy_avg']:.3f}** vs random **{o['random_avg']:.3f}** (improvement **{o['improvement']:.3f}**); greedy is more diverse in **{o['n_better']}/{o['n_total']} categories** (verified={o['verified']}). | |
| | category | greedy sim | random sim | greedy more diverse | | |
| |---|---|---|---| | |
| {rows} | |
| A low-diversity (high-similarity) eval subset would systematically over-represent easy/redundant cases and bias measured speculative-decoding metrics — exactly the failure mode SPEED-Bench's diverse selection is designed to avoid. Reproduces the claim's premise.""") | |
| fig("Claim 2a: low-diversity bias (diversity selection)", "figures/claim2a_diversity.png", "outputs/claim2_diversity.json") | |
| # ---------- Claim 2b ---------- | |
| kstar_meas = b2["kstar_by_batch"]; kstar_rf = rf["kstar_by_batch"] | |
| md("Claim 2b: batch-dependent optimal draft length", f"""## Verdict: **TOY — mechanism reproduced (calibrated model)** | |
| **Claim.** The optimal speculative-decoding draft length depends on batch size (longer drafts in memory-bound / small-batch regimes, shorter as verification becomes compute-bound). | |
| **Audit.** Standard SD throughput model, throughput = E[gen(k)] / latency(k,b) with E[gen(k)] = (1-alpha^(k+1))/(1-alpha) (Leviathan et al. 2023) and **measured** acceptance rate **alpha = {b2['alpha']:.4f}** (inverted from Claim-1 real mean AL). | |
| - **(i) Measured hardware (CPU):** gpt2/distilgpt2 forward latencies at batch 1..128 -> optimal k* = **1 at every batch** ({', '.join(f'b{b}:{kstar_meas[b]}' for b in ['1','8','64','128'])}). CPU inference is **compute-bound at all batch sizes** — it has no memory-bound regime — so no crossover appears. | |
| - **(ii) Roofline mechanism model:** latency = max(memory_floor, compute x batch x tokens) (GPU-style). k* = **{kstar_rf['1']}** (batch 1) -> **{kstar_rf['32']}** (batch 32) -> **{kstar_rf['256']}** (batch 256) — **optimal draft length decreases with batch** ({rf['optimal_draft_decreases_with_batch']}). | |
| **Interpretation.** The batch-dependent optimal-draft-length **mechanism reproduces** under the standard roofline abstraction with a measured acceptance rate: long drafts amortize a memory-bound target call at small batch; short drafts win once the target call is compute-bound. The exact crossover is a GPU memory-hierarchy effect and is not observable on CPU — hence **toy** (mechanism, not the paper's exact production numbers).""") | |
| fig("Claim 2b: batch-dependent optimal draft length", "figures/claim2b_draft_length.png", "outputs/claim2b_roofline.json") | |
| # ---------- Robustness & controls ---------- | |
| md("Robustness and controls", f"""## Controls used | |
| | Control | Guards against | Result | | |
| |---|---|---| | |
| | Multiple seeds ({c1['config']['seeds']}) for the synthetic arm (Claim 1) | a single lucky/unlucky synthetic draw | per-seed means {min(c1['synthetic']['by_seed_mean_AL'].values()):.2f}-{max(c1['synthetic']['by_seed_mean_AL'].values()):.2f}; conclusion stable | | |
| | Random baseline averaged over 20 draws (Claim 2a) | comparing greedy to one arbitrary subset | greedy < random in {o['n_better']}/{o['n_total']} categories | | |
| | Per-category breakdown (Claims 1 & 2a) | an aggregate masking category-level reversals | 11/11 categories consistent for diversity; real-AL heterogeneity surfaced for Claim 1 | | |
| | alpha inverted from measured AL, not assumed (Claim 2b) | a hand-tuned acceptance rate | alpha={b2['alpha']:.3f} from real data | | |
| | Measured-hardware vs roofline contrast (Claim 2b) | over-claiming the crossover on CPU | CPU null (k*=1) reported alongside the mechanism model | | |
| | Unit tests (5, pure-numeric) | regressions in selection / inversion / roofline | all pass | | |
| | Greedy lossless verification | output-distribution drift | deterministic, exact argmax match | | |
| Determinism: fixed numpy/torch seeds; diversity result reproduces bit-identically.""") | |
| # ---------- Limitations ---------- | |
| md("Limitations", """- **Production speedup tables not attempted.** The paper's headline acceptance-length/speedup numbers need Llama-3.3-70B / GPT-OSS-120B / DeepSeek-R1 / Qwen3-235B with EAGLE3/MTP drafters and production engines (vLLM/TRT-LLM) — out of scope on available hardware. All results here use distilgpt2->gpt2. | |
| - **Claim 1 is inconclusive at toy scale**, not falsified. We show the *direction does not reproduce* with small models + uniform-random synthetic tokens; we do **not** prove the paper wrong at production scale. The mechanism plausibly needs large models + structured synthetic inputs. | |
| - **Claim 2b is a calibrated toy.** The crossover is shown via a roofline model with a measured acceptance rate; CPU hardware cannot exhibit the memory-bound regime. Absolute crossover points are GPU/engine/model specific. | |
| - **Embedder substitution.** Diversity uses open all-MiniLM-L6-v2 rather than the paper's text-embedding-3-large; relative orderings (the audited quantity) are preserved, absolute similarity values are embedder-specific. | |
| - **Environment.** Memory-pressured box (~3 GB free); `datasets`+`torch` segfault co-resident (worked around by torch-free prompt extraction). Diversity re-runs are flaky on-demand but the stored result is deterministic and unit-tested.""") | |
| # ---------- Conclusion ---------- | |
| md("Conclusion", f"""## Conclusion | |
| Independent CPU-scale reproduction of SPEED-Bench's two official claims, labelled honestly: | |
| | Claim | Verdict | Strength | | |
| |---|---|---| | |
| | 1 · synthetic inputs overestimate throughput | **inconclusive (toy)** | real {c1['real']['mean_AL']:.2f} vs synthetic {c1['synthetic']['mean_AL']:.2f} AL ({c1['overestimation_pct']:.1f}%, within noise) — not reproduced with small models | | |
| | 2 · low-diversity bias | **FULL** | diversity selection 0.492->0.382, **{o['n_better']}/{o['n_total']}** categories, deterministic | | |
| | 2 · batch-dependent optimal draft length | **TOY** | roofline (measured alpha={b2['alpha']:.2f}) gives k* = 3->1 as batch grows; CPU compute-bound null reported | | |
| The benchmark's **diversity premise reproduces exactly**; the **batch-dependent draft-length mechanism reproduces** under a standard roofline with a measured acceptance rate; the **synthetic-overestimation direction requires production scale** and is reported as inconclusive rather than forced. Fully independent, deterministic, CPU/GPU-light, **$0** infra. Reproduce: `python src/extract_prompts.py && python src/exp_claim1_throughput_bias.py --device cpu && python src/exp_claim2b_draft_length.py --device cpu && python src/exp_claim2b_roofline.py && python src/make_figures.py`; diversity via `python src/exp_claim2_diversity.py`.""") | |
| print("pages built") | |
Xet Storage Details
- Size:
- 14.2 kB
- Xet hash:
- 65d439298d59a87b302d165dae857762c2fcd2e0c08779492b32280c5be961a6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.