arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.12352cs.CL
收藏

knn-seq:高效、可扩展的kNN-MT框架

knn-seq: Efficient, Extensible kNN-MT Framework

Nara Institute of Science and Technology(奈良先端科学技术大学院大学);HAKUHODO Technologies Inc.(博报堂科技株式会社);National Institute of Information and Communications Technology(日本信息通信研究机构)

Hiroyuki Deguchi, Hayate Hirano, Tomoki Hoshino, Yuto Nishida, Justin Vasselli, Taro Watanabe

AI总结:

本文提出高效可扩展的kNN-MT框架knn-seq,作为fairseq插件支持十亿级数据存储库的快速构建与检索,在WMT'19德译英任务中2.21小时完成构建且保持与原始方法相当的增益。

摘要:

k近邻机器翻译(kNN-MT)通过在解码时利用翻译示例,提升了预训练神经机器翻译(NMT)模型的翻译质量。翻译示例存储在一个称为数据存储库的向量数据库中,该库为构成其的平行数据中的每个目标词元包含一个条目。由于其规模庞大,构建数据存储库和从中检索示例在计算上代价高昂。在本文中,我们提出了一个高效且可扩展的kNN-MT框架knn-seq,面向研究人员和开发者,经过精心设计,即使在十亿级大型数据存储库上也能高效运行。knn-seq作为fairseq上的插件开发,易于切换模型和kNN索引。实验结果表明,我们实现的kNN-MT获得了与原始kNN-MT相当的增益,并且在WMT'19德译英翻译任务中,十亿级数据存储库的构建耗时2.21小时。我们将knn-seq作为MIT许可的开源项目发布,代码可在https://github.com/naist-nlp/knn-seq获取。演示视频可在https://youtu.be/zTDzEOq80m0观看。

英文摘要:

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 took 2.21 hours in the WMT'19 German-to-English translation task. We publish our knn-seq as an MIT-licensed open-source project and the code is available on https://github.com/naist-nlp/knn-seq . The demo video is available on https://youtu.be/zTDzEOq80m0 .

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑