Junxian He, Graham Neubig, Taylor Berg-Kirkpatrick
We lifted 3 functions out of this paper's own repositories and ran 2 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| jxhe/efficient-knnlm | canonical | 2 of 3 |
| Function | Status | Where it lives |
|---|---|---|
| interpolation | Ran | jxhe/efficient-knnlm/ef_knnlm/adaptive_retrieval/adaptive_retrieval.py code served (permissive licence) · get_code("0fb204a7e30e1277") |
| parse_retrieve_fname | Ran | jxhe/efficient-knnlm/ef_knnlm/dstore_compression/greedy_merge.py code served (permissive licence) · get_code("47692827a1965ca0") |
| moe_interpolation | Not yet run | jxhe/efficient-knnlm/ef_knnlm/adaptive_retrieval/adaptive_retrieval.py code served (permissive licence) · get_code("092769e9322f56fa") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
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., 2019) 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. 1
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2109.04212")
get_code_for_paper("2109.04212")
have("2109.04212")
Connect an agent — have() is free.