TeLLMe v2: An Efficient End-to-End Ternary LLM Prefill and Decode Accelerator with Table-Lookup Matmul on Edge FPGAs
Ye Qiao, Zhiheng Chen, Yifan Zhang, Yian Wang, Sitao Huang
TL;DR
TeLLMe tackles the challenge of end-to-end LLM inference on edge FPGAs by co-designing a table-lookup-based ternary MatMul engine with URAM-aware buffering and streaming dataflow to support both prefill and decoding. The core ideas include a TLMM that uses online precomputation and grouped activations, fused element-wise operations around mixed-precision paths, and specialized attention units (reversed prefill and decoding) that minimize off-chip traffic. Experimental results on a KV260 platform show up to $143$ tokens/s for prefill and $25$ tokens/s for decoding under a $5$ W budget, with favorable energy efficiency metrics such as Intelligence/J. The significance lies in delivering end-to-end edge inference for ternary LLMs with strong energy efficiency, enabling practical privacy-preserving generative AI on small devices. The work establishes a strong baseline for implementing low-bit quantized LLMs on edge FPGAs via LUT-based TLMM and memory-hierarchy optimizations.
Abstract
With the emergence of wearable devices and other embedded systems, deploying large language models (LLMs) on edge platforms has become an urgent need. However, this is challenging because of their high computational and memory demands. Although recent low-bit quantization methods (e.g., BitNet, DeepSeek) compress weights to as low as 1.58~bits with minimal accuracy loss, edge deployment is still constrained by limited on-chip resources, power budgets, and the often-neglected long latency of the prefill stage. We present \textbf{TeLLMe}, the first table-lookup-based ternary LLM accelerator for low-power edge FPGAs that fully supports both prefill and autoregressive decoding using 1.58-bit weights and 8-bit activations. TeLLMe incorporates several novel techniques, including (1) a table-lookup-based ternary matrix multiplication (TLMM) engine utilizing grouped activations and online precomputation for low resource utilization and high throughput; (2) a fine-grained analytic URAM-based weight buffer management scheme for efficient loading and compute engine access; (3) a streaming dataflow architecture that fuses floating-point element-wise operations with linear computations to hide latency; (4) a reversed-reordered prefill stage attention with fused attention operations for high memory efficiency; and (5) a resource-efficient specialized decoding stage attention. Under a 5~W power budget, TeLLMe delivers up to 25~tokens/s decoding throughput and 0.45--0.96~s time-to-first-token (TTFT) for 64--128 token prompts, marking a significant energy-efficiency advancement in LLM inference on edge FPGAs.
