knn-seq: Efficient, Extensible kNN-MT Framework
Hiroyuki Deguchi, Hayate Hirano, Tomoki Hoshino, Yuto Nishida, Justin, Vasselli, Taro Watanabe

TL;DR
knn-seq is an efficient, extensible framework for kNN-based machine translation that handles billion-scale datastores with reduced computational costs, maintaining translation quality.
Contribution
It introduces a scalable, plug-in compatible kNN-MT framework that significantly reduces construction time for large datastores while preserving translation performance.
Findings
Achieves comparable translation gains to original kNN-MT
Constructs billion-scale datastores in 2.21 hours
Runs efficiently with large-scale data
Abstract
k-nearest-neighbor machine translation (kNN-MT) boosts the translation quality of a pre-trained neural machine translation (NMT) model by utilizing translation examples during decoding. Translation examples are stored in a vector database, called a datastore, which contains one entry for each target token from the parallel data it is made from. Due to its size, it is computationally expensive both to construct and to retrieve examples from the datastore. In this paper, we present an efficient and extensible kNN-MT framework, knn-seq, for researchers and developers that is carefully designed to run efficiently, even with a billion-scale large datastore. knn-seq is developed as a plug-in on fairseq and easy to switch models and kNN indexes. Experimental results show that our implemented kNN-MT achieves a comparable gain to the original kNN-MT, and the billion-scale datastore construction…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Multimodal Machine Learning Applications
