arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2403.04510cs.CLcs.AI
收藏

大语言模型中的上下文翻译发生在何处

Where does In-context Translation Happen in Large Language Models

Johns Hopkins University(约翰斯·霍普金斯大学)

Suzanna Sia, David Mueller, Kevin Duh

AI总结:

该研究通过逐层上下文掩码与微调实验,定位大语言模型上下文翻译的任务识别层,发现其与性能下降层对应,可利用冗余节省计算,且翻译微调关键层即任务识别层。

摘要:

自监督大语言模型已展现出通过上下文学习执行机器翻译(MT)的能力,但人们对模型在提示指令和示范示例的作用下执行该任务的具体位置知之甚少。本研究中,我们试图刻画大语言模型从上下文学习者转变为翻译模型的区域。通过在GPTNeo2.7B、Bloom3B、Llama7b和Llama7b-chat上开展的一系列逐层上下文掩码实验,我们找到了“任务识别”点的证据:此时翻译任务已被编码到输入表示中,不再需要对上下文的注意力。我们进一步观察到,掩码整层时的低性能与任务识别层之间存在对应关系。利用这种冗余性,当使用5个示例进行提示时可节省45%的计算量,且任务识别在第14/32层完成。我们的逐层微调实验表明,机器翻译微调最有效的层正是对任务识别至关重要的层。

英文摘要:

Self-supervised large language models have demonstrated the ability to perform Machine Translation (MT) via in-context learning, but little is known about where the model performs the task with respect to prompt instructions and demonstration examples. In this work, we attempt to characterize the region where large language models transition from in-context learners to translation models. Through a series of layer-wise context-masking experiments on \textsc{GPTNeo2.7B}, \textsc{Bloom3B}, \textsc{Llama7b} and \textsc{Llama7b-chat}, we demonstrate evidence of a "task recognition" point where the translation task is encoded into the input representations and attention to context is no longer necessary. We further observe correspondence between the low performance when masking out entire layers, and the task recognition layers. Taking advantage of this redundancy results in 45\% computational savings when prompting with 5 examples, and task recognition achieved at layer 14 / 32. Our layer-wise fine-tuning experiments indicate that the most effective layers for MT fine-tuning are the layers critical to task recognition.

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

↑