LightRetriever: A LLM-based Text Retrieval Architecture with Extremely Faster Query Inference
Guangyuan Ma, Yongliang Ma, Xuanrui Gou, Zhenpeng Su, Ming Zhou, Songlin Hu
TL;DR
LightRetriever introduces an asymmetric LLM-based retrieval framework that keeps a full document encoder while replacing the query encoder with a lightweight, cacheable embedding lookup. By training dense and sparse components with instruction-guided prompts and using caching to precompute token embeddings, it achieves extreme online query efficiency (up to >1000x faster query encoding) and substantial end-to-end throughput gains (>$10x$) without large losses in retrieval performance (averaging around 95% of full symmetric baselines). The approach is validated on BeIR and CMTEB benchmarks across multiple LLM backbones, demonstrating broad generalization and practical viability for latency-critical retrieval tasks. Ablation studies show the necessity of deep document-side modeling, the value of hybrid dense+sparse signals, and controllable index/embedding sizes via Matryoshka representations, enabling deployment in resource-constrained environments.
Abstract
Large Language Models (LLMs)-based text retrieval retrieves documents relevant to search queries based on vector similarities. Documents are pre-encoded offline, while queries arrive in real-time, necessitating an efficient online query encoder. Although LLMs significantly enhance retrieval capabilities, serving deeply parameterized LLMs slows down query inference throughput and increases demands for online deployment resources. In this paper, we propose LightRetriever, a novel LLM-based retriever with extremely lightweight query encoders. Our method retains a full-sized LLM for document encoding, but reduces the workload of query encoding to no more than an embedding lookup. Compared to serving a full LLM on an A800 GPU, our method achieves over 1000x speedup in query encoding and over 10x increase in end-to-end retrieval throughput. Extensive experiments on large-scale retrieval benchmarks show that LightRetriever generalizes well across diverse tasks, maintaining an average of 95% retrieval performance.
