TransLLaMa: LLM-based Simultaneous Translation System

Roman Koshkin, Katsuhito Sudoh, Satoshi Nakamura · DOI

Abstract

TransLLaMa is a novel approach to simultaneous machine translation (SiMT) that leverages off-the-shelf, decoder-only Large Language Models (LLMs) such as Llama-2. Unlike traditional SiMT systems that require separate policy agents to manage the timing of translations, TransLLaMa integrates decision-making directly into the model. By fine-tuning on "causally aligned" data and introducing a specialized <WAIT> token, the system learns to autonomously balance translation quality and latency. Our evaluation on MuST-C and a novel TED-TST-2023 dataset demonstrates that TransLLaMa achieves performance competitive with state-of-the-art baselines.

Introduction

Simultaneous Machine Translation (SiMT) involves translating speech or text in real-time, a task that requires a delicate balance between quality and delay. Translating too early leads to errors due to lack of context, while waiting too long results in unacceptable latency for the listener. Conventional SiMT architectures typically employ an encoder-decoder framework governed by an external policy—often a heuristic or a reinforcement learning agent—to decide when to READ more input or WRITE a translation.

With the rise of powerful decoder-only LLMs, a new question arises: can these models handle the SiMT policy internally? TransLLaMa addresses this by treating the "when to translate" decision as a sequence generation task, reducing system complexity while maintaining high translation standards.

Methodology

Causal Alignment

A primary challenge in training LLMs for SiMT is that standard parallel corpora consist of full sentence pairs, which allow the model to "see" the entire source sentence during training. To simulate real-time constraints, we employ Causal Alignment. Using word-alignment tools, we restructure training sequences so that target words only appear after their corresponding source words have been introduced. This ensures the model learns to generate translations based only on the available prefix.

Causal alignment compared to original sentence pairs, ensuring the target sequence respects the temporal flow of the source.

The <WAIT> Token and Inference Logic

To enable the model to signal a need for more context, we repurposed the <UNK> token in the Llama-2 tokenizer to serve as a <WAIT> signal. During Supervised Fine-Tuning (SFT) with LoRA, the model is taught to output <WAIT> whenever the current source prefix is insufficient to determine the next target word.

During inference, TransLLaMa operates in a continuous loop. It is prompted with the partial source and the translation generated so far. The model generates tokens until it produces either a complete word (triggering a WRITE action) or a <WAIT> token (triggering a READ action to fetch more input from the ASR system).

The TransLLaMa system architecture and inference loop, showing the interaction between the ASR component and the LLM.

Datasets and Evaluation

The system was evaluated on the MuST-C v2.0 corpus for English-to-German and English-to-Russian translation. To test for generalization and avoid data leakage from the LLM's pre-training, we also curated TED-TST-2023, a dataset of 102 pairs from TED talks published after the Llama-2 training cutoff in February 2023.

Results and Discussion

TransLLaMa demonstrates competitive translation quality across both text and speech modalities. For English-to-German speech-to-text translation, the fine-tuned Llama-2 70B model achieved a BLEU score of 18.41. Notably, GPT-4 showed strong zero-shot capabilities, reaching a BLEU of 21.82, although it occasionally struggled with strict formatting constraints.

Key insights from our analysis include:

  • Agential Behavior: LLMs can effectively learn to manage information flow, deciding when they have sufficient context to proceed.
  • Strategic Waiting: The model tends to generate <WAIT> tokens after function words (e.g., "the", "of"), waiting for content-heavy nouns or verbs to arrive before committing to a translation.
  • Latency Control: By adjusting the initial wait parameter ($k$), we can precisely navigate the quality-latency tradeoff.
  • Ablation Studies: Removing the <WAIT> capability significantly degrades BLEU scores, confirming that the model's ability to pause is essential for accuracy.

Conclusion and Future Work

TransLLaMa proves that decoder-only LLMs can serve as effective, policy-free SiMT systems. Future work will focus on reducing the computational overhead of long system prompts and improving tokenizer efficiency for non-English languages. Additionally, moving toward an end-to-end architecture that accepts audio embeddings directly could further minimize latency and improve robustness against ASR errors.

Summary updated

BibTeX
@inproceedings{koshkin2024transllama,
  author = {Roman Koshkin and Katsuhito Sudoh and Satoshi Nakamura},
  title = {{TransLLaMa: LLM-based Simultaneous Translation System}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.27},
}
Figure