{"model": "reduced-order speculative-decoding model -- draft/target roofline latencies, geometric acceptance E[tokens]=(1-a^(g+1))/(1-a), verify memory-vs-compute crossover, optimal-gamma search (educational)", "inputs": {"gamma": 4, "alpha": 0.8, "draft_params_b": 1.0, "target_params_b": 70.0, "elem_bytes": 2.0, "hbm_bw_gb_s": 3350.0, "compute_tops": 990.0, "batch_size": 1}, "outputs": {"format": "draft 1.0B / target 70.0B bf16 | gamma=4 alpha=0.80 b=1", "expected_tokens_per_step": 3.362, "max_tokens_per_step": 5, "block_efficiency_percent": 67.2, "acceptance_percent": 80.0, "speedup_x": 3.18, "baseline_tokens_s": 23.9, "spec_tokens_s": 76.1, "target_decode_ms": 41.791, "draft_step_ms": 0.597, "draft_total_ms": 2.388, "verify_step_ms": 41.791, "spec_step_ms": 44.179, "draft_cost_ratio": 0.0143, "draft_overhead_percent": 5.4, "verify_fraction_percent": 94.6, "verify_bottleneck": "memory", "verify_mem_ms": 41.791, "verify_compute_ms": 0.707, "target_bound": "memory", "optimal_gamma": 12, "optimal_speedup_x": 4.034, "verdict": "well-tuned -- the draft is 70x cheaper than the target, alpha=0.80 keeps 3.36 of 5 speculated tokens, and the target verifies them in one still-memory-bound pass, for a 3.18x throughput gain over plain decoding (67% of the block accepted). Optimum gamma here is 12 (4.03x)"}, "profile": {"speedup_vs_gamma": [[1, 1.775], [2, 2.372], [3, 2.831], [4, 3.18], [5, 3.443], [6, 3.639], [7, 3.783], [8, 3.885], [9, 3.955], [10, 3.999], [11, 4.024], [12, 4.034], [13, 4.031], [14, 4.02], [15, 4.002], [16, 3.978]], "tokens_vs_gamma": [[1, 1.8], [2, 2.44], [3, 2.952], [4, 3.362], [5, 3.689], [6, 3.951], [7, 4.161], [8, 4.329], [9, 4.463], [10, 4.571], [11, 4.656], [12, 4.725], [13, 4.78], [14, 4.824], [15, 4.859], [16, 4.887]], "speedup_vs_alpha": [[0.1, 1.051], [0.119, 1.074], [0.138, 1.097], [0.157, 1.122], [0.176, 1.147], [0.195, 1.174], [0.214, 1.202], [0.233, 1.232], [0.251, 1.262], [0.27, 1.295], [0.289, 1.328], [0.308, 1.364], [0.327, 1.401], [0.346, 1.44], [0.365, 1.48], [0.384, 1.523], [0.403, 1.568], [0.422, 1.614], [0.441, 1.664], [0.46, 1.715], [0.479, 1.769], [0.498, 1.826], [0.517, 1.885], [0.536, 1.947], [0.554, 2.012], [0.573, 2.08], [0.592, 2.151], [0.611, 2.226], [0.63, 2.304], [0.649, 2.385], [0.668, 2.471], [0.687, 2.56], [0.706, 2.653], [0.725, 2.75], [0.744, 2.852], [0.763, 2.958], [0.782, 3.068], [0.801, 3.184], [0.82, 3.304], [0.839, 3.43], [0.857, 3.56], [0.876, 3.696], [0.895, 3.838], [0.914, 3.985], [0.933, 4.139], [0.952, 4.298], [0.971, 4.464], [0.99, 4.636]], "gamma": 4, "alpha": 0.8, "optimal_gamma": 12, "speedup_x": 3.18, "expected_tokens_per_step": 3.362, "max_tokens_per_step": 5, "draft_overhead_percent": 5.4, "verify_fraction_percent": 94.6, "draft_cost_ratio": 0.0143}, "steps": 80, "node": "ip-172-26-4-148", "compute_ms": 0.2}