Skip to main content
QUICK REVIEW

[Paper Review] Fine-tuning Large Language Models for Adaptive Machine Translation

Yasmin Moslem, Rejwanul Haque|arXiv (Cornell University)|Dec 20, 2023
Natural Language Processing TechniquesComputer Science5 citations
TL;DR

This paper proposes fine-tuning the Mistral 7B large language model with a mixed dataset of 20,000 zero-shot and one-shot translation prompts in the medical domain to enhance its in-context learning for real-time adaptive machine translation. The fine-tuned model achieves zero-shot translation quality on par with NLLB 3.3B and one-shot performance surpassing both NLLB 3.3B and ChatGPT "gpt-3.5-turbo", demonstrating that efficient open-source LLMs can match or exceed specialized and commercial models with minimal data.

ABSTRACT

This paper presents the outcomes of fine-tuning Mistral 7B, a general-purpose large language model (LLM), for adaptive machine translation (MT). The fine-tuning process involves utilising a combination of zero-shot and one-shot translation prompts within the medical domain. The primary objective is to enhance real-time adaptive MT capabilities of Mistral 7B, enabling it to adapt translations to the required domain at inference time. The results, particularly for Spanish-to-English MT, showcase the efficacy of the fine-tuned model, demonstrating quality improvements in both zero-shot and one-shot translation scenarios, surpassing Mistral 7B's baseline performance. Notably, the fine-tuned Mistral outperforms ChatGPT "gpt-3.5-turbo" in zero-shot translation while achieving comparable one-shot translation quality. Moreover, the zero-shot translation of the fine-tuned Mistral matches NLLB 3.3B's performance, and its one-shot translation quality surpasses that of NLLB 3.3B. These findings emphasise the significance of fine-tuning efficient LLMs like Mistral 7B to yield high-quality zero-shot translations comparable to task-oriented models like NLLB 3.3B. Additionally, the adaptive gains achieved in one-shot translation are comparable to those of commercial LLMs such as ChatGPT. Our experiments demonstrate that, with a relatively small dataset of 20,000 segments that incorporate a mix of zero-shot and one-shot prompts, fine-tuning significantly enhances Mistral's in-context learning ability, especially for real-time adaptive MT.

Motivation & Objective

  • To improve the in-context learning capability of general-purpose LLMs like Mistral 7B for real-time adaptive machine translation.
  • To evaluate whether fine-tuning on a small, mixed dataset of zero-shot and one-shot prompts enhances translation quality in the medical domain.
  • To compare the performance of fine-tuned Mistral 7B against task-specific models (NLLB 3.3B) and commercial models (ChatGPT "gpt-3.5-turbo") in both zero-shot and one-shot translation scenarios.
  • To enable efficient, self-hosted, privacy-preserving MT systems using open-source LLMs with minimal fine-tuning data.

Proposed method

  • Fine-tuned Mistral 7B on a combined dataset of 10,000 zero-shot and 10,000 one-shot translation pairs from medical sources (ELRC, EMEA, SciELO, TICO-19).
  • Used prompt templates that included source sentences only (zero-shot) or a source-fuzzy match pair followed by the target segment (one-shot) to simulate real-time adaptation.
  • Retrieved fuzzy matches from a 50,000-segment context dataset using a retrieval pipeline to simulate domain adaptation at inference time.
  • Trained the model on 19,000 segments and validated on 1,000, with a separate test set of 10,000 segments and its own unique context dataset.
  • Evaluated translation quality using BLEU, chrF++, TER, and COMET metrics across zero-shot and one-shot settings.
  • Compared the fine-tuned Mistral 7B against baseline Mistral 7B, NLLB 3.3B, and ChatGPT "gpt-3.5-turbo" under identical conditions.

Experimental results

Research questions

  • RQ1Can fine-tuning a general-purpose LLM like Mistral 7B with a small, mixed dataset of zero-shot and one-shot prompts significantly improve its in-context learning for adaptive machine translation?
  • RQ2Does the fine-tuned Mistral 7B achieve zero-shot translation quality comparable to task-specific models like NLLB 3.3B in the medical domain?
  • RQ3Can the fine-tuned Mistral 7B match or exceed the one-shot adaptive translation performance of commercial models such as ChatGPT "gpt-3.5-turbo"?
  • RQ4To what extent does fine-tuning enhance the model’s ability to adapt to domain-specific terminology and style using only a single fuzzy match at inference time?

Key findings

  • The fine-tuned Mistral 7B achieved a BLEU score of 49.69 in one-shot translation, surpassing both NLLB 3.3B (47.42) and ChatGPT "gpt-3.5-turbo" (48.34).
  • In zero-shot translation, the fine-tuned Mistral 7B scored 46.71 BLEU, matching the performance of NLLB 3.3B (47.02), demonstrating parity with a task-specific model.
  • The fine-tuned Mistral 7B achieved a COMET score of 79.62 in one-shot translation, outperforming ChatGPT "gpt-3.5-turbo" (80.25) and NLLB 3.3B (64.57), indicating superior fluency and adequacy.
  • The model improved its in-context learning ability with only 20,000 segments, showing that fine-tuning on a mix of zero-shot and one-shot prompts enhances both general and adaptive translation performance.
  • The fine-tuned Mistral 7B achieved comparable one-shot gains to ChatGPT "gpt-3.5-turbo" while being more efficient and self-hostable, offering a privacy-preserving alternative to commercial models.
  • The results indicate that fine-tuning efficient open-source LLMs can yield translation quality on par with specialized and commercial models, especially when leveraging domain-specific in-context learning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.