Accelerating LLM Inference via Vector Index Based Output Embeddings
Abstract
Large output embedding matrices create a significant memory bandwidth bottleneck during autoregressive decoding, especially for compact LLMs with large multilingual vocabularies. We reformulate the output projection followed by top-k token selection as a maximum inner product search over token embeddings and replace the dense vocabulary projection with an HNSW-based vector index. The resulting output head retrieves only a small candidate set of high-scoring tokens and can be integrated into existing decoding pipelines by scattering retrieved logits into a sparse full-vocabulary tensor. On CPU inference with Gemma 3, Llama 3.2, and Qwen 3 models, our method substantially accelerates the output projection and improves end-to-end batch-size-one decoding throughput by up to 82% for Gemma 3 270M, while preserving generation quality under AlpacaEval evaluation. These results suggest approximate retrieval is a practical alternative to dense output projections in latency-sensitive small-batch decoding.
Create a lesson
Metadata
- Categories
- cs.CL, cs.LG
- Comments
- ICML 2026 - AdaptFM Workshop
Related papers
MINE: A Training-Free Defense against Indirect Prompt Injection via Mutual Information and Embedding Variance
Shared title terminologycs.CLTruong Phan, Ngoc-Quan Pham, Dat Quoc Nguyen
Lightweight Reasoning Transfer via Chain-of-Thought Vector Projection
Shared title terminologycs.CLYulin Qi, Shuo Xu, Shuxia Lin et al.
Verifiable but Not Predictable: What Sentence Embeddings Know About Propositional Decomposition
Shared title terminologycs.CLQingan Li, Tianxiao Wu, Xiling Cui
Focus On Facts: Stylistically Invariant and Factually Sensitive Text Embeddings
Shared title terminologycs.CLMaximus Adeola
AIChipBench: Benchmarking LLM Agents for Automated AI Accelerator Design
Shared title terminologycs.CLGuangyuan Wang, Chengran Li, Minchen Luo et al.
DKnown-Jev-2: Article-Level Answer-Evidence Classification and Efficient Inference with a Pre-trained Language Model
Shared title terminologycs.CLQi Li, Jianjun Xu, Jiu Li et al.