Install the necessary dependencies by running the following command.
pip install -r requirements.txt
Install the SimulEval toolkit with the following commands.
git clone https://github.com/facebookresearch/SimulEval.git
cd SimulEval
pip install -e .
The filtering scripts for the en-de and en-zh language pairs of the OpenSubtitles dataset are provided in the data_filter
folder.
The dataset for the en-de filtered Open Subtitles dataset: en-de
The dataset for the en-zh filtered Open Subtitles dataset: en-zh
Provided below is an example fine-tuning script
python {REPO_ROOT_PATH}/finetune/finetune.py \
--model google/gemma-3-12b-it \
--training-set raffelm/iwslt25-filtered-mem \
--validation-set agostinvic/opensubtitles.2018.paired.en-de.dev_augmented \
--source-lang en --target-lang de \
--lora-alpha 16 --lora-dropout 0.1 --lora-r 64 \
--use-4bit --bnb-4bit-compute-dtype bfloat16 --bnb-4bit-quant-type nf4 --bnb --peft \
--bsz 4 --update-freq 16 \
--optim paged_adamw_32bit --lr 2e-4 --lr-scheduler inverse_sqrt --weight-decay 0.1 \
--warmup-ratio 0.03 --max-grad-norm 1 --save-strategy epoch --num-train-epochs 1 \
--evaluation-strategy steps --eval-interval 1000 --log-interval 1000 \
--max-seq-length 256 \
--output-dir ${OUTPUT_DIR} \
Provided below is an example evaluation script
simuleval \
--agent ${REPO_ROOT_PATH}/inference/agents/agent_vad.py \
--source-segment-size 100 \
--source ${REPO_ROOT_PATH}/src.txt \
--target ${REPO_ROOT_PATH}/tgt.txt\
--step-length $step_length \
--whisper-model large-v2 \
--translation-model google/gemma-3-12b-it \
--output $output_dir \
--device cuda \
--translation-language de \
--translation-la-policy $translation_la_policy \
--transcript-context $transcript_context \
--translation-max-num-chunk $translation_max_num_chunk \
--voice-threshold $voice_threshold \
--max-unvoiced-length $max_unvoiced_length \
--computation-aware \
--adapter-path ${ADAPTER_PATH}
When employing or extending this code, please consider citing us as:
@inproceedings{
}