Nearest Neighbor Speculative Decoding for LLM Generation and Attribution
Li, Minghan, Chen, Xilun, Holtzman, Ari, Chen, Beidi, Lin, Jimmy, Yih, Wen-tau, Lin, Xi Victoria
–arXiv.org Artificial Intelligence
Large language models (LLMs) often hallucinate and lack the ability to provide attribution for their generations. Semi-parametric LMs, such as kNN-LM, approach these limitations by refining the output of an LM for a given prompt using its nearest neighbor matches in a non-parametric data store. However, these models often exhibit slow inference speeds and produce non-fluent texts. In this paper, we introduce Nearest Neighbor Speculative Decoding (NEST), a novel semi-parametric language modeling approach that is capable of incorporating real-world text spans of arbitrary length into the LM generations and providing attribution to their sources. NEST performs token-level retrieval at each inference step to compute a semi-parametric mixture distribution and identify promising span continuations in a corpus. It then uses an approximate speculative decoding procedure that accepts a prefix of the retrieved span or generates a new token. NEST significantly enhances the generation quality and attribution rate of the base LM across a variety of knowledge-intensive tasks, surpassing the conventional kNN-LM method and performing competitively with in-context retrieval augmentation. In addition, NEST substantially improves the generation speed, achieving a 1.8x speedup in inference time when applied to Llama-2-Chat 70B.
arXiv.org Artificial Intelligence
May-30-2024
- Country:
- South America > Colombia
- Meta Department > Villavicencio (0.04)
- North America
- Dominican Republic (0.04)
- United States
- New Jersey (0.04)
- Washington > King County
- Seattle (0.04)
- New York > New York County
- New York City (0.04)
- Illinois > Cook County
- Chicago (0.04)
- Canada
- Ontario > Toronto (0.04)
- British Columbia > Metro Vancouver Regional District
- Vancouver (0.04)
- Europe
- Spain > Catalonia
- Barcelona Province > Barcelona (0.04)
- Norway > Western Norway
- Italy > Calabria
- Catanzaro Province > Catanzaro (0.04)
- Ireland > Leinster
- County Dublin > Dublin (0.04)
- Germany > Bremen
- Bremen (0.14)
- Belgium > Brussels-Capital Region
- Brussels (0.04)
- Spain > Catalonia
- Asia
- Singapore (0.04)
- North Korea (0.04)
- Indonesia > Bali (0.04)
- China > Jilin Province (0.04)
- Myanmar > Tanintharyi Region
- Dawei (0.04)
- Middle East
- Jordan (0.04)
- Israel (0.04)
- UAE > Abu Dhabi Emirate
- Abu Dhabi (0.04)
- Malaysia > Sarawak
- Kuching (0.04)
- Japan > Honshū
- Chūbu > Toyama Prefecture > Toyama (0.04)
- Africa > Zambia
- Southern Province > Choma (0.04)
- South America > Colombia
- Genre:
- Research Report (0.50)
- Industry:
- Leisure & Entertainment (1.00)
- Government > Military (0.93)
- Energy (0.67)
- Media > Film (0.67)
- Health & Medicine > Therapeutic Area
- Neurology (0.67)
- Technology: