用大模型当编码器,翻译速度提升6倍还省内存。
Beyond Decoder-only: Large Language Models Can be Good Encoders for Machine Translation
- 让大模型做编码器,保持原有解码器不变
- 翻译质量媲美甚至超越基线,推理快2.4到6.5倍
- 适合追求高效部署的机器翻译研究者
神经机器翻译领域随着大语言模型(LLM)的发展而变化。近年来,自然语言处理多聚焦于使用单一预训练Transformer解码器建模翻译等任务,而早期主流的编码器-解码器架构则较少受关注。本文探索一种通用、高效且易于优化的翻译模型,将大语言模型与机器翻译结合:将LLM用于编码,保留原有的NMT解码器,并提出方法使LLM更好地适配该解码器。此外,构建了一个包含多任务的新数据集,评估系统在多种翻译任务中的泛化能力。在WMT及自建数据集上的实验表明,该方法在翻译质量上达到或超过多个基线,同时实现2.4~6.5倍的推理加速和75%的KV缓存内存压缩,且在多种翻译相关任务中表现出强泛化能力。
原文摘要 · Abstract (English)
The field of neural machine translation (NMT) has changed with the advent of large language models (LLMs). Much of the recent emphasis in natural language processing (NLP) has been on modeling machine translation and many other problems using a single pre-trained Transformer decoder, while encoder-decoder architectures, which were the standard in earlier NMT models, have received relatively less attention. In this paper, we explore translation models that are universal, efficient, and easy to optimize, by marrying the world of LLMs with the world of NMT. We apply LLMs to NMT encoding and leave the NMT decoder unchanged. We also develop methods for adapting LLMs to work better with the NMT decoder. Furthermore, we construct a new dataset involving multiple tasks to assess how well the machine translation system generalizes across various tasks. Evaluations on the WMT and our datasets show that results using our method match or surpass a range of baselines in terms of translation quality, but achieve $2.4 \sim 6.5 \times$ inference speedups and a $75\%$ reduction in the memory footprint of the KV cache. It also demonstrates strong generalization across a variety of translation-related tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。