CLSep 9, 2021

Efficient Nearest Neighbor Language Models

arXiv:2109.04212v3684 citations
Originality Synthesis-oriented
AI Analysis

This work addresses efficiency limitations for deploying non-parametric language models in practical applications, representing an incremental improvement.

The paper tackled the high inference overhead of non-parametric neural language models by improving the efficiency of the k-nearest neighbors language model, achieving up to a 6x speed-up in inference speed while maintaining comparable performance on benchmarks like WikiText-103.

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 (Khandelwal et al., 2020) 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.

Code Implementations2 repos
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes