biaofuxmu/EAST

Python

8

3 commits

updated Jul 11, 2025

See the code

README

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/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/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}, 
}

biaofuxmu/EAST

Python

8

3 commits

updated Jul 11, 2025

See the code

README

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/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/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}, 
}