This is the code to replicate the Source-primed Multi-turn Translation in the paper Source-primed Multi-turn Conversation Helps Large Language Models Translate Documents. [cite]
bash scripts/start_vllm.shWe get and parse the data from the WMT24 dataset (https://www2.statmt.org/wmt24/translation-task.html), you can also directly use our parsed data in wmt24_processed.
If you need to use gpt models to translate the data, you should first set your OPENAI_API_KEY:
export OPENAI_API_KEY=your_api_keyThen you can run the following command to translate the data:
bash scripts/run_gpt.shIf you don't need to use gpt models, you can run the following command to translate the data:
bash scripts/run.sh'mturn_icl_context' means our source-primed multi-turn translation, 'mturn_icl' and 'mturn' is multi-turn without source-primed.
If you need to evaluate through dBLEU, run the following command:
bash eval/eval.shIf you need to evaluate through Comet, run the following command:
bash eval/eval_comet.shPlease consider citing us if you use our materials.
@misc{hu2025sourceprimedmultiturnconversationhelps,
title={Source-primed Multi-turn Conversation Helps Large Language Models Translate Documents},
author={Hanxu Hu and Jannis Vamvas and Rico Sennrich},
year={2025},
eprint={2503.10494},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2503.10494},
}