SPARTA: A Sparse Ternary LLM Accelerator with Adaptive Attention and Unified Datapath for Long-Context Edge Inference
Organizations: Zhejiang University · Veloxis AI
Abstract
LLMs on edge devices are constrained by limited memory and bandwidth. Although 1.58-bit ternary weights greatly reduce model storage, long-context inference is increasingly bottlenecked by KV-cache traffic and attention. Existing accelerators also use separate datapaths for ternary linear layers and attention, incurring hardware and execution overhead. We present SPARTA, a sparse ternary LLM accelerator for efficient long-context edge inference. SPARTA integrates: (1) a phase-aware sparse dataflow exploiting heterogeneous sparsity across compute-bound prefill and memory-bound decode; (2) a unified compute fabric mapping ternary SpMM/SpMV and bit-serial attention onto shared processing elements to exploit zero-weight and zero-bit sparsity; and (3) an adaptive two-stage attention engine combining page-level Top-k selection to reduce K-cache accesses with token-level Top-p pruning to reduce V-cache traffic. SPARTA reduces KV traffic by 4.1-4.8x over full attention and 1.3-1.5x over a state-of-the-art sparse-attention scheme, with task-dependent quality loss. Compared with NVIDIA Jetson AGX Orin, SPARTA achieves 3.9x higher generation throughput and 8.3x higher end-to-end energy efficiency on average; versus AMD Ryzen 7 9700X, the gains are 5.0x and 81.7x. It also delivers 1.6-12.0x higher throughput, 2.0-4.2x higher energy efficiency, and 1.3-51.4x higher area efficiency than FIGLUT, TeLLMe, and MCBP.
Figures & tables
| Design | Precision | Linear | Attention | Efficiency | Max Seq. |
|---|---|---|---|---|---|
| MCBP [ 14 ] | W8/A8 | Sparse | Sparse (Top- ) | Medium | 8K |
| Vec-LUT [ 15 ] | W1.58/A8 | Dense | Dense | Low | - |
| TeLLMe [ 16 ] | W1.58/A8 | Dense | Dense | Low | 1K |
| TENET [ 17 ] | W1.58/A8 | Dense | Sparse (Static) | Medium | 1.5K |
| VitaLLM [ 19 ] | W1.58/A8 | Dense | Sparse (Top- ) | Medium | 4K |
| SPARTA | W1.58/A8 | Sparse | Sparse (Adaptive) | High | 32K |
| Component | Configuration |
|---|---|
| Technology and Freq. | 28 nm, 1 GHz |
| Organization | 8 Compute Slices; 16 PEs/Slice; 32 Lanes/PE |
| Selection Engines | 64-entry Top- window; 64-bin Top- histogram |
| On-chip Buffer | 144 KiB weights; 16 KiB Q tiles; 280 KiB K/V staging; 384 KiB QK scores; 256 KiB mass/scale/P-bit state; 16.25 KiB selection state |
| External Memory | HBM2, -bit HBM channels @2 GHz, 8 GB |
| Model | Config | GovR | QMS | MNw | GSM8K | MBPP | IFE | CoQA | GMean | |
|---|---|---|---|---|---|---|---|---|---|---|
| BitCPM-1B | Dense | 25.9 | 21.2 | 25.3 | 50.8 | 42.4 | 64.1 | 54.1 | 37.4 | – |
| Ours | 21.3 | 20.8 | 21.7 | 50.2 | 42.0 | 65.1 | 54.6 | 35.6 | 1.88 | |
| BitCPM-3B | Dense | 25.9 | 22.4 | 25.7 | 67.9 | 15.6 | 68.4 | 34.4 | 32.4 | – |
| Ours | 23.8 | 22.3 | 23.9 | 67.6 | 16.4 | 68.4 | 35.7 | 32.0 | 0.36 | |
| BitCPM-8B | Dense | 27.1 | 23.6 | 25.6 | 62.5 | 56.2 | 69.1 | 73.1 | 43.4 | – |
| Ours | 22.8 | 22.4 | 21.9 | 68.8 | 55.4 | 68.4 | 73.0 | 41.5 | 1.89 |
| Model | Data | Len | Full | Top- | Exact Top- | Hist. Top- | |
|---|---|---|---|---|---|---|---|
| BitCPM-3B | WT2 | 8K | 6.0% | 14.37 | 14.19 | 14.34 | 14.36 |
| 32K | 5.0% | 16.52 | 16.43 | 16.35 | 16.39 | ||
| PG19 | 8K | 7.3% | 16.93 | 17.49 | 17.64 | 17.54 | |
| 32K | 6.5% | 16.81 | 16.46 | 16.26 | 16.30 | ||
| Bonsai-4B | WT2 | 8K | 4.3% | 11.31 | 11.36 | 11.42 | 11.46 |
| 32K | 2.9% | 10.56 | 10.48 | 10.58 | 10.56 |
| Design | Tech. | Freq. | Area | Thpt. | Energy eff. | Area eff. |
| [nm] | [GHz] | [mm 2 ] | [GOPS] | [GOPS/W] | [GOPS/mm 2 ] | |
| Sparse-attention accelerators | ||||||
| Energon [ 53 ] a | 45 | 1.0 | 1.63 | 1,153 | 7,206 | 709 |
| FACT [ 52 ] | 28 | 0.5 | 6.03 | 928 | 2,754 | 154 |
| Linear-layer accelerators | ||||||
| FIGLUT [ 10 ] b | 28 | 0.1 | 7.34 | 140 | 470 | 19.1 |
AI Accelerator Inference
AI accelerator inference studies hardware and software for running neural networks faster and more efficiently across data-center, edge, and mobile devices.
See all 105 papers