EAGLE-Pangu: Accelerator-Safe Tree Speculative Decoding on Ascend NPUs
Organizations: College of Computer Science, Chongqing University
Abstract
Autoregressive decoding remains a primary bottleneck in large language model (LLM) serving, motivating speculative decoding methods that reduce expensive teacher-model invocations by verifying multiple candidate tokens per step. Tree-structured speculation further increases parallelism, but is often brittle when ported across heterogeneous backends and accelerator stacks, where attention masking, KV-cache layouts, and indexing semantics are not interchangeable. We present EAGLE-Pangu, a reproducible system that ports EAGLE-3-style tree speculative decoding to a Pangu teacher backend on Ascend NPUs. EAGLE-Pangu contributes (i) an explicit branch/commit cache manager built on the Cache API, (ii) accelerator-safe tree tensorization that removes undefined negative indices by construction and validates structural invariants, and (iii) a fused-kernel-compatible teacher verification path with a debuggable eager fallback. On 240 turns from MT-Bench and HumanEval-style prompts, EAGLE-Pangu improves end-to-end decoding throughput by 1.27x on average, up to 2.46x at p99, over teacher-only greedy decoding in the fused-kernel performance path. We also provide a fused-kernel-free reference path with structured traces and invariant checks to support reproducible debugging and ablation across execution modes and tree budgets.
Figures & tables
| Metric | mean | p50 | p90 | p99 |
|---|---|---|---|---|
| Baseline Tok/s | 17.65 | 17.72 | 18.69 | 19.37 |
| EA Tok/s | 22.42 | 21.72 | 31.65 | 42.09 |
| Speedup ( ) | 1.27 | 1.21 | 1.84 | 2.46 |
| accept_L ( ) | 3.17 | 3 | 6 | 8 |
| Sweep | Setting | EA Tok/s (mean) | Speedup (mean) |
|---|---|---|---|
| Scan (fixed ) | 27.35 | 1.48 | |
| 19.54 | 1.06 | ||
| 21.44 | 1.17 | ||
| 22.74 | 1.24 | ||
| 22.95 | 1.25 | ||
| Scan (fixed ) | 19.58 | 1.06 |
| Window | EA Tok/s (mean) | Speedup (mean) | accept_L mean | accept_L p90 |
|---|---|---|---|---|
| none | 19.93 | 1.15 | 3.17 | 6 |
| 128 | 11.97 | 0.69 | 1.48 | 3 |
| 256 | 13.22 | 0.76 | 1.68 | 4 |
| 512 | 15.14 | 0.87 | 1.99 | 4 |
Speculative Decoding
Speculative decoding accelerates generation by drafting multiple tokens and verifying them in parallel with a larger target model.
See all 291 papers