TL;DR
EVA is a novel hardware-software co-designed architecture that accelerates the bottlenecked decoding phase of Large Language Model (LLM) inference. By recasting memory-bound matrix-vector multiplications (GEMV) into compute-bound matrix-matrix multiplications (GEMM) using vector quantization codebooks, EVA eliminates memory bank conflicts and dramatically boosts hardware utilization, achieving up to an 11.17$\times$ speedup over state-of-the-art baselines.
What Problem Does This Paper Address?
LLM inference happens in two distinct stages: prefill (processing the prompt) and decoding (generating tokens one by one). While the prefill stage is highly parallelizable and compute-bound, the decoding stage is a notorious efficiency killer. Because it generates only one token at a time, it relies on General Matrix-Vector Multiplication (GEMV).
GEMV is heavily memory-bound; the processing units sit idle waiting for massive weight matrices to be re-fetched from memory for every single token. To mitigate this, researchers use Vector Quantization (VQ) to compress weights down to 2-bit representations by grouping weights into clusters and storing them in a lookup table (a "codebook").
However, VQ introduces its own hardware headaches:
- Compute Inefficiency: It reduces memory traffic but doesn't change the underlying GEMV structure, leaving accelerator cores underutilized.
- Memory Inefficiency: When the hardware tries to dequantize weights on the fly, multiple processing elements frequently attempt to access the same codebook entries simultaneously, causing severe memory bank conflicts and serialization.
Methods
EVA solves both problems simultaneously through a clever mathematical reformulation and hardware co-design.
Instead of using the weight indices to reconstruct the full weight matrix before performing multiplication, EVA flips the order of operations:
- VQ-GEMM Recasting: It reshapes the input token vector into a matrix and multiplies it directly with the Weight Codebook (WC). This generates an intermediate Output Codebook (OC). This step effectively transforms the low-utilization GEMV operation into a dense, highly parallel GEMM operation.
- Conflict-Free Epilogue Lookup: Once the Output Codebook is computed, the final outputs are gathered by looking up values from the OC using the weight index matrix.
To support this flow in hardware, the authors designed:
- Reconfigurable Processing Elements (PEs): A systolic array that can dynamically switch between running four low-precision INT8 operations per cycle (for the prefill stage) or one high-precision FP16 operation per cycle (for the decoding stage).
- A Dedicated Epilogue Unit (EU): A lightweight, add-only hardware block that performs the final conflict-free lookups and reductions without requiring expensive multipliers.
Datasets
The authors evaluated EVA across a variety of models and datasets to prove its robustness:
- Language Modeling (Perplexity): Evaluated on the WikiText-2 dataset.
- Downstream Benchmarks: PIQA, COPA, ARC-Easy, ARC-Challenge, Winogrande, and BoolQ.
- Real-World Scenarios: Dolly (creative writing), Arxiv Summarization (long-context), and GSM8K (math word problems).
- Models Tested: LLaMA-1, LLaMA-2, LLaMA-3, and Mixture-of-Experts (MoE) models like Mixtral-8x7B and Qwen3-30B-A3B.
Key Insights and Ideas
- Skipping Dequantization Entirely: The core "aha!" moment is realizing that explicit weight reconstruction is unnecessary. Because every weight vector originates from a small codebook, multiplying the input by the codebook first bounds the total number of possible intermediate product values.
- Implicit Bank Distribution: By calculating the Output Codebook first, the matrix multiplication naturally distributes data across different memory banks. When the final lookups occur, parallel threads naturally hit different banks, completely bypassing the memory contention that plagues traditional lookup-table architectures.
- Dimension Collapse: One Epilogue Unit accumulation implicitly replaces 8 Multiply-Accumulate (MAC) operations. This collapse reduces both SRAM storage and bandwidth demands by 8$\times$ under identical bank configurations.
Key Results
EVA was evaluated against several baseline architectures, including standard Systolic Arrays and specialized lookup-based accelerators like FIGLUT.
- Speedup: For single-batch decoding, EVA-A16W2 (16-bit activation, 2-bit weight) achieves a 31.56$\times$ speedup over a standard systolic array and an 11.17$\times$ speedup over FIGLUT.
- Energy Efficiency: EVA delivers up to 7.17$\times$ higher energy efficiency compared to FIGLUT.
- Accuracy Preservation: Unlike standard scalar quantization methods which collapse at 2-bit precision, the VQ algorithms supported by EVA maintain high accuracy. For example, on Mixtral-8x7B, EVA's 2-bit configuration outperforms the non-analytic GPTQ method by a massive 19 percentage points on average.
Limitations and Future Work
- Batch Size Scaling Limits: EVA's advantages are most pronounced at small batch sizes (e.g., batch size = 1 to 8). As the batch size scales up to 32 or 64, the workload naturally shifts from GEMV to GEMM anyway, meaning standard non-VQ architectures catch up to EVA in terms of hardware utilization.
- Spurious Computations: If the codebook size ($2^n$) is larger than the model's output dimension ($N$), EVA might calculate intermediate centroids that are never actually referenced by the output channels, leading to wasted computation. However, the authors note that for typical LLM layers, $N \gg 2^n$, making this overhead negligible in practice.
Summary updated