Steering Large Language Models for Machine Translation with Finetuning and In-Context Learning

Duarte M. Alves, Nuno M. Guerreiro, João Alves, José Pombal, Ricardo Rei +3 more
10/20/2023
cs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Large language models (LLMs) are a promising avenue for machine translation (MT). However, current LLM-based MT systems are brittle: their effectiveness highly depends on the choice of few-shot examples and they often require extra post-processing due to overgeneration. Alternatives such as finetuning on translation instructions are computationally expensive and may weaken in-context learning capabilities, due to overspecialization. In this paper, we provide a closer look at this problem. We start by showing that adapter-based finetuning with LoRA matches the performance of traditional finetuning while reducing the number of training parameters by a factor of 50. This method also outperforms few-shot prompting and eliminates the need for post-processing or in-context examples. However, we show that finetuning generally degrades few-shot performance, hindering adaptation capabilities. Finally, to obtain the best of both worlds, we propose a simple approach that incorporates few-shot examples during finetuning. Experiments on 10 language pairs show that our proposed approach recovers the original few-shot capabilities while keeping the added benefits of finetuning.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{alves2023steering,
  title  = {Steering Large Language Models for Machine Translation with Finetuning and In-Context Learning},
  author = {Duarte M. Alves and Nuno M. Guerreiro and João Alves and José Pombal and Ricardo Rei and José G. C. de Souza and Pierre Colombo and André F. T. Martins},
  year   = {2023},
  eprint = {2310.13448},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.13448v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.13448.svg)](https://codeofpaper.com/paper/2310.13448)

Discussion