QuangMinhPhan23/simultaneous-machine-translation

Python

0

10 commits

updated Aug 16, 2026

See the code

README

About this repository

This is a fork of EAST (Fu et al., XMU, biaofuxmu/EAST), a framework for simultaneous machine translation. I extended it with two projects of my own. The original EAST README follows below.

The base framework (not written by me): src/, examples/, and the demo files in data/ are the upstream EAST code. My work builds on top of it. I removed the parts of the upstream repo this project never uses (the ceval/cmmlu/mmlu benchmark data and the LLaMA-Factory utility scripts).

My contribution. Each folder has one README for instructions and one for results:

east_scripts/ is the bigger project, so it is split into data/ (build the training data), train/ (fine-tune), eval/ (score the result) and jobs/ (cluster job scripts). word_order_study/ is small enough to stay flat. The datasets and model weights are not in this repo because they are too large: the data is rebuilt by the scripts, and the trained models are on Hugging Face.


LLMs Can Achieve High-quality Simultaneous Machine Translation as Efficiently as Offline

Source code for the paper: LLMs Can Achieve High-quality Simultaneous Machine Translation as Efficiently as Offline

Contents

Requirements and Installation

  • torch==2.1.0
  • transformers==4.44.2
  • deepspeed==0.14.0
  • peft==0.11.1
  • To install llamafactory and develop locally:
pip install -e ./

Preparation

Training data

The training data used in the paper can be downloaded:

Preprocessing training data:

python east_scripts/data/prepare_train_data.py

Then, add the following content to data/dataset_info.json

  "simt_de_en_660k": {
    "file_name": "mt_data/train_data/SiMT-De-En-660K.json"
  },
  "simt_multi_90k": {
    "file_name": "mt_data/train_data/SiMT-Multi-90K.json"
  },

Test data

Preprocessing wmt test data or your data:

python east_scripts/data/prepare_mt_test_data.py

Training

1. Stage I: Full Fine-Tuning

sh east_scripts/train_simulmt_full_sft_stage1.sh

2. Stage II: LoRA Fine-Tuning

sh east_scripts/train_simumt_lora_sft_stage2.sh

3. Merge Lora Weights to Base Model

sh east_scripts/merge_lora.sh

Evaluation

sh east_scripts/simul_eval.sh

Checkpoints

Our models are released here:

Acknowledgement

This repo benefits from LLaMA-Factory. Thanks for their wonderful works.

Citation

If you find this repo useful for your research, please consider citing the paper:

@misc{fu2025llmsachievehighqualitysimultaneous,
      title={LLMs Can Achieve High-quality Simultaneous Machine Translation as Efficiently as Offline}, 
      author={Biao Fu and Minpeng Liao and Kai Fan and Chengxi Li and Liang Zhang and Yidong Chen and Xiaodong Shi},
      year={2025},
      eprint={2504.09570},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2504.09570}, 
}

QuangMinhPhan23/simultaneous-machine-translation

Python

0

10 commits

updated Aug 16, 2026

See the code

README

About this repository

This is a fork of EAST (Fu et al., XMU, biaofuxmu/EAST), a framework for simultaneous machine translation. I extended it with two projects of my own. The original EAST README follows below.

The base framework (not written by me): src/, examples/, and the demo files in data/ are the upstream EAST code. My work builds on top of it. I removed the parts of the upstream repo this project never uses (the ceval/cmmlu/mmlu benchmark data and the LLaMA-Factory utility scripts).

My contribution. Each folder has one README for instructions and one for results:

east_scripts/ is the bigger project, so it is split into data/ (build the training data), train/ (fine-tune), eval/ (score the result) and jobs/ (cluster job scripts). word_order_study/ is small enough to stay flat. The datasets and model weights are not in this repo because they are too large: the data is rebuilt by the scripts, and the trained models are on Hugging Face.


LLMs Can Achieve High-quality Simultaneous Machine Translation as Efficiently as Offline

Source code for the paper: LLMs Can Achieve High-quality Simultaneous Machine Translation as Efficiently as Offline

Contents

Requirements and Installation

  • torch==2.1.0
  • transformers==4.44.2
  • deepspeed==0.14.0
  • peft==0.11.1
  • To install llamafactory and develop locally:
pip install -e ./

Preparation

Training data

The training data used in the paper can be downloaded:

Preprocessing training data:

python east_scripts/data/prepare_train_data.py

Then, add the following content to data/dataset_info.json

  "simt_de_en_660k": {
    "file_name": "mt_data/train_data/SiMT-De-En-660K.json"
  },
  "simt_multi_90k": {
    "file_name": "mt_data/train_data/SiMT-Multi-90K.json"
  },

Test data

Preprocessing wmt test data or your data:

python east_scripts/data/prepare_mt_test_data.py

Training

1. Stage I: Full Fine-Tuning

sh east_scripts/train_simulmt_full_sft_stage1.sh

2. Stage II: LoRA Fine-Tuning

sh east_scripts/train_simumt_lora_sft_stage2.sh

3. Merge Lora Weights to Base Model

sh east_scripts/merge_lora.sh

Evaluation

sh east_scripts/simul_eval.sh

Checkpoints

Our models are released here:

Acknowledgement

This repo benefits from LLaMA-Factory. Thanks for their wonderful works.

Citation

If you find this repo useful for your research, please consider citing the paper:

@misc{fu2025llmsachievehighqualitysimultaneous,
      title={LLMs Can Achieve High-quality Simultaneous Machine Translation as Efficiently as Offline}, 
      author={Biao Fu and Minpeng Liao and Kai Fan and Chengxi Li and Liang Zhang and Yidong Chen and Xiaodong Shi},
      year={2025},
      eprint={2504.09570},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2504.09570}, 
}