Tree Speculative Decoding with In-Call KV Repair on a Commercial Static-Graph NPU
Organizations: Korea University.
Abstract
Tree speculative decoding verifies many draft branches in one target call, but common implementations assume dynamic query shapes and direct control over the KV cache. Static-graph NPUs offer neither: each compiled graph fixes its query length, and the runtime owns the physical KV layout. We propose a tree verifier for this setting that packs repair rows and tree rows into one fixed 32-row call. Per-token rotary tables and an ancestor mask express the tree, and an exact-watermark rule re-scores accepted tokens whose KV is out of canonical order inside the next call, so no separate cache-movement call is needed. On the Rebellions ATOM+ NPU with the DFlash drafter, removing chunk-boundary replay first raises the linear baseline from 59.3 to 92.3 tokens/s. In a pre-specified study on 120 GSM8K questions, the tree verifier with a grouped 32-row projection head beats the fastest linear baseline by 12.2% on Qwen3-4B (95% CI 10.7-13.8%) and by 13.2% on Qwen3-8B (CI 12.1-14.4%), and it cuts board energy per token by 10.0% and 11.1%. Changing the compiled verification shape also changes floating-point outputs on 55 of 120 questions for 4B and 9 for 8B, and a matched-prefix diagnostic traces the one lost 4B answer to the query-shape change alone.
Figures & tables
| Configuration | tok/s | Time (s) | Correct | Target calls |
|---|---|---|---|---|
| L64: =64, replay | 64.85 | 304.7 | 58/60 | 4563 |
| R16: =16, replay | 59.31 | 318.8 | 59/60 | 6549 |
| D16: =16, direct | 92.29 | 204.9 | 59/60 | 3556 |
| Model (placement) | Arm | tok/s | Time (s) | Tokens | Correct (each repeat) | J/token | Changed outputs |
|---|---|---|---|---|---|---|---|
| Qwen3-4B (1 card) | D16-H16 | 94.71 | 1173.1 | 111,108 | 104 | 0.590 | – |
| D16-H32 | 93.77 | 1181.7 | 110,808 | 104 | 0.593 | 20/120 | |
| T32-H32 | 106.24 | 1046.3 | 111,156 | 103 | 0.531 | 55/120 | |
| Qwen3-8B (TP2 + 1) | D16-H16 | 79.11 | 1433.4 | 113,391 | 104 | 1.694 | – |
| D16-H32 | 78.22 | 1449.7 | 113,391 | 104 | 1.713 | 0/120 | |
| T32-H32 | 89.56 | 1269.2 | 113,673 | 105 | 1.507 | 9/120 |
Speculative Decoding
Speculative decoding accelerates generation by drafting multiple tokens and verifying them in parallel with a larger target model.
See all 378 papers