TIM: Teaching Large Language Models to Translate with Comparison

Jiali Zeng, Fandong Meng, Yongjing Yin, Jie Zhou
7/10/2023
cs.CL

Official code: lemon0830/TIM (39 stars, last commit 2023-12-15).

Abstract

Open-sourced large language models (LLMs) have demonstrated remarkable efficacy in various tasks with instruction tuning. However, these models can sometimes struggle with tasks that require more specialized knowledge such as translation. One possible reason for such deficiency is that instruction tuning aims to generate fluent and coherent text that continues from a given instruction without being constrained by any task-specific requirements. Moreover, it can be more challenging for tuning smaller LLMs with lower-quality training data. To address this issue, we propose a novel framework using examples in comparison to teach LLMs to learn translation. Our approach involves presenting the model with examples of correct and incorrect translations and using a preference loss to guide the model's learning. We evaluate our method on WMT2022 test sets and show that it outperforms existing methods. Our findings offer a new perspective on fine-tuning LLMs for translation tasks and provide a promising solution for generating high-quality translations. Please refer to Github for more details: https://github.com/lemon0830/TIM.

View on arXivView PDF

Code Implementations(1)

lemon0830/TIMOfficial100%

code for Teaching LM to Translate with Comparison

396Shell, PythonJul 7, 20232 years ago

Similar Papers

Cite this paper

@article{zeng2023tim,
  title  = {TIM: Teaching Large Language Models to Translate with Comparison},
  author = {Jiali Zeng and Fandong Meng and Yongjing Yin and Jie Zhou},
  year   = {2023},
  eprint = {2307.04408},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.04408v3}
}

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/2307.04408.svg)](https://codeofpaper.com/paper/2307.04408)

Discussion