Skip to main content
QUICK REVIEW

[Paper Review] Tamil-Llama: A New Tamil Language Model Based on Llama 2

Anitha Balachandran|arXiv (Cornell University)|Nov 10, 2023
Topic ModelingComputer Science8 citations
TL;DR

Extends LLaMA 2 with 16k Tamil tokens, uses LoRA for efficient training, and releases Tamil-focused Alpaca/OpenOrca instruction data to improve Tamil generation and understanding.

ABSTRACT

Language modeling has witnessed remarkable advancements in recent years, with Large Language Models (LLMs) like ChatGPT setting unparalleled benchmarks in human-like text generation. However, a prevailing limitation is the underrepresentation of languages like Tamil in these cutting-edge models, leading to suboptimal performance in diverse linguistic contexts. This paper addresses this lacuna, enhancing the open-source LLaMA model with an addition of 16,000 Tamil tokens, aiming to achieve superior text generation and comprehension in the Tamil language. We strategically employ the LoRA methodology for efficient model training on a comprehensive Tamil corpus, ensuring computational feasibility and model robustness. Moreover, we introduce a Tamil-translated version of the Alpaca dataset and a subset of the OpenOrca dataset tailored for instruction fine-tuning. Our results showcase significant performance improvements in Tamil text generation, with potential implications for the broader landscape of LLMs in Indian languages. We further underscore our commitment to open research by making our models, datasets, and code publicly accessible, fostering further innovations in language modeling.

Motivation & Objective

  • Address underrepresentation of Tamil in open-source LLMs by augmenting LLaMA 2 vocabulary with Tamil tokens.
  • Train Tamil-LLaMA models efficiently using LoRA on a Tamil corpus.
  • Create Tamil-translated Alpaca and OpenOrca instruction datasets for Tamil fine-tuning.
  • Evaluate Tamil-LLaMA on instruction-following, reasoning, translation, and NLU tasks to demonstrate improvements over baseline models.

Proposed method

  • Extend LLaMA 2 vocabulary by adding 16,000 Tamil tokens using a Tamil SentencePiece tokenizer.
  • Combine original 32,000-token vocabulary with 16,000 Tamil tokens to form a 48,000-token vocabulary.
  • Pre-train with causal language modeling on a Tamil corpus (6–12 GB range across setups) using fp16 and LoRA adapters.
  • Fine-tune instruction-following models with translated Alpaca and OpenOrca datasets plus a Tamil Wikipedia-derived dataset, via LoRA in FP16.
  • Evaluate using GPT-4-based scoring supplemented by manual reviews across 120+ Tamil instruction prompts.
  • Compare 7B and 13B Tamil-LLaMA models against gpt-3.5-turbo on multiple tasks.

Experimental results

Research questions

  • RQ1Can adding 16,000 Tamil tokens to LLaMA 2 substantially improve Tamil text generation and understanding?
  • RQ2Does LoRA-based pre-training and fine-tuning yield efficient, robust Tamil-LLaMA models suitable for instruction-following tasks?
  • RQ3Do Tamil-translated Alpaca and OpenOrca datasets improve Tamil instruction tuning outcomes compared to baseline models?
  • RQ4How do Tamil-LLaMA models perform on Tamil NLU and translation benchmarks relative to English-centered LLaMA variants?

Key findings

  • Tamil-LLaMA models outperform baseline LLaMA 2 on Tamil instruction-following tasks as rated by GPT-4.
  • In GPT-4 based evaluation, Tamil-LLaMA-7B achieves higher overall scores (63.83) than gpt-3.5-turbo (61.33).
  • Tamil-LLaMA-13B attains an overall GPT-4 score of 71.17, surpassing gpt-3.5-turbo (61.33).
  • On NLU benchmarks, Tamil-LLaMA significantly outperforms original LLaMA on IndicSentiment (81.3% vs random 50.5%) and IndicGLUE (80.12%).
  • Translation tasks show strong Tamil-to-English performance, with Tamil-LLaMA surpassing original LLaMA 2 70B in Tamil translations and approaching gpt-3.5-turbo.
  • Code-generation and reasoning tasks are improved relative to Tamil generation from larger models, though mathematical reasoning remains challenging.

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.