BTR: Binary Token Representations for Efficient Retrieval Augmented Language Models
Qingqing Cao, Sewon Min, Yizhong Wang, Hannaneh Hajishirzi
TL;DR
This paper addresses the bottleneck of slow inference in retrieval-augmented language models by introducing Binary Token Representations (BTR), which cache 1-bit token vectors for retrieved passages and apply calibration and compression to maintain accuracy. BTR employs calibrated binarization, offline and runtime token compression, and two training objectives to preserve semantic information and salient query-related details. The approach yields 2–4x faster inference and up to 101x storage reduction across five knowledge-intensive tasks while retaining 90–95% of the original performance, and it also proves effective for encoder-only readers. The work demonstrates that aggressive token-level compression, when properly trained and calibrated, can deliver substantial practical benefits for scalable retrieval-augmented systems with broad applicability and potential for further extension.
Abstract
Retrieval augmentation addresses many critical problems in large language models such as hallucination, staleness, and privacy leaks. However, running retrieval-augmented language models (LMs) is slow and difficult to scale due to processing large amounts of retrieved text. We introduce binary token representations (BTR), which use 1-bit vectors to precompute every token in passages, significantly reducing computation during inference. Despite the potential loss of accuracy, our new calibration techniques and training objectives restore performance. Combined with offline and runtime compression, this only requires 127GB of disk space for encoding 3 billion tokens in Wikipedia. Our experiments show that on five knowledge-intensive NLP tasks, BTR accelerates state-of-the-art inference by up to 4x and reduces storage by over 100x while maintaining over 95% task performance.
