Skip to main content
QUICK REVIEW

[Paper Review] PersianMind: A Cross-Lingual Persian-English Large Language Model

Pedram Rostami, Ali Salemi|arXiv (Cornell University)|Jan 12, 2024
Natural Language Processing TechniquesComputer Science3 citations
TL;DR

PersianMind is an open-source bilingual Persian-English large language model built by expanding LLaMa2's vocabulary with 10,000 Persian subwords and fine-tuning it on 2 billion tokens of Persian text using LoRA. It achieves performance comparable to GPT-3.5-turbo on Persian reading comprehension and outperforms existing models in sentence embedding quality and cross-lingual transfer.

ABSTRACT

Large language models demonstrate remarkable proficiency in various linguistic tasks and have extensive knowledge across various domains. Although they perform best in English, their ability in other languages is notable too. In contrast, open-source models, such as LLaMa, are primarily trained on English datasets, resulting in poor performance in non-English languages. In this paper, we introduce PersianMind, an open-source bilingual large language model which demonstrates comparable performance to closed-source GPT-3.5-turbo in the Persian language. By expanding LLaMa2's vocabulary with 10,000 Persian tokens and training it on a dataset comprising nearly 2 billion Persian tokens, we show that our approach preserves the model's English knowledge and employs transfer learning to excel at transferring task knowledge from one language to another.

Motivation & Objective

  • To address the poor performance of open-source LLMs like LLaMa2 in non-English languages, particularly Persian.
  • To preserve English knowledge while significantly improving zero-shot and few-shot performance in Persian through targeted fine-tuning.
  • To demonstrate that transfer learning from English to Persian is effective using parallel data and parameter-efficient fine-tuning.
  • To produce high-quality, cross-lingual sentence embeddings for Persian and English that outperform existing masked language models.
  • To reduce catastrophic forgetting during multilingual fine-tuning using LoRA and parallel training data.

Proposed method

  • Expanded LLaMa2-7B's vocabulary by adding 10,000 subword tokens trained on a cleaned Persian Wikipedia corpus using Byte-Pair Encoding.
  • Trained the model on a 2-billion-token Persian text dataset using LoRA (Low-Rank Adaptation) for parameter-efficient fine-tuning.
  • Performed instruction tuning on high-quality, machine-translated Persian-English instruction datasets due to limited native Persian instruction data.
  • Utilized a two-stage training process: first, fine-tuning on plain Persian text; second, instruction tuning on parallel instruction pairs.
  • Generated sentence embeddings using the [CLS] token and the AnglE method, and evaluated cross-lingual semantic similarity using the Flores-200 dataset.
  • Measured carbon footprint using GPU power consumption (350W per RTX 3090), PUE (1.4), and Iran’s electricity carbon intensity (494 g CO2/kWh).

Experimental results

Research questions

  • RQ1Can a large language model pre-trained on English achieve state-of-the-art performance in Persian without catastrophic forgetting?
  • RQ2How effective is LoRA fine-tuning for low-resource languages like Persian when combined with multilingual parallel data?
  • RQ3To what extent can a fine-tuned LLM generate high-quality cross-lingual sentence embeddings for Persian and English?
  • RQ4Can fine-tuning on Persian data improve performance on English NLP tasks, demonstrating bidirectional transfer learning?
  • RQ5What is the carbon footprint of training a multilingual LLM on limited hardware, and how does it compare to larger models?

Key findings

  • PersianMind achieved a Spearman correlation of 69.74 on the FarSick and STS benchmarks, outperforming mBERT (51.53), ParsBERT (53.06), and XLM-RoBERTa (41.97).
  • On the Persian subset of the Belebele benchmark, PersianMind achieved state-of-the-art results, matching GPT-3.5-turbo performance in reading comprehension.
  • PersianMind achieved a 72.36 average cosine similarity on the English-Persian subset of the Flores-200 dataset, surpassing LLaMa2-7B-chat (58.68) by 14 percentage points.
  • The model outperformed mBERT and ParsBERT in both English and Persian semantic similarity tasks, with a 9% improvement over LLaMa2-7B-chat in Persian STS.
  • Training consumed 960 GPU-hours and emitted 232.38 kCO2 eq., with a carbon intensity of 494 g CO2/kWh based on Iran’s electricity mix.
  • Fine-tuning on 5,000 parallel sentences outperformed mT5-large fine-tuned on 200,000 samples in translation tasks, demonstrating data efficiency.

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.