Efficient Nearest Neighbor Language Models

By Junxian He, Graham Neubig, Taylor Berg-Kirkpatrick. 2021

124 citations recorded by the source corpus.

Non-parametric neural language models (NLMs) learn predictive distributions of text utilizing an external datastore, which allows them to learn through explicitly memorizing the training datapoints. While effective, these models often require retrieval from a large datastore at test time, significantly increasing the inference overhead and thus limiting the deployment of non-parametric NLMs in practical applications. In this paper, we take the recently proposed k-nearest neighbors language model as an example, exploring methods to improve its efficiency along various dimensions. Experiments on the standard WikiText-103 benchmark and domain-adaptation datasets show that our methods are able to achieve up to a 6x speed-up in inference speed while retaining comparable performance. The empirical analysis we present may provide guidelines for future research seeking to develop or deploy more efficient non-parametric NLMs.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Natural Language Processing, Efficiency & Compression

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Hannaneh Hajishirzi
  2. Luke S. Zettlemoyer
  3. Mohit Bansal
  4. Noah A. Smith
  5. Percy Liang
  6. Yejin Choi
  7. Danqi Chen
  8. Jonathan Berant

In Computer Vision and Pattern Recognition

  1. Hannaneh Hajishirzi
  2. Luc Van Gool
  3. Dacheng Tao
  4. Luke S. Zettlemoyer
  5. Cordelia Schmid
  6. Trevor Darrell
  7. Xiaogang Wang
  8. Jitendra Malik

In Natural Language Processing

  1. Hannaneh Hajishirzi
  2. Luke S. Zettlemoyer
  3. Mohit Bansal
  4. Yulia Tsvetkov
  5. Noah A. Smith
  6. Percy Liang
  7. Jonathan Berant
  8. Yejin Choi

In Efficiency & Compression

  1. Yi Tay
  2. Noah A. Smith
  3. Mostafa Dehghani
  4. Eric Wallace
  5. Yulia Tsvetkov
  6. Daniel Khashabi
  7. Luke S. Zettlemoyer
  8. Hannaneh Hajishirzi

Citations in the corpus