Model Card for HiTZ/Latxa-Llama-3.1-8B-Instruct

We introduce Latxa 3.1 8B Instruct, an instructed version of Latxa. This new Latxa is based on Llama-3.1 (Instruct), which we trained on our Basque corpus (Etxaniz et al., 2024) comprising 4.3M documents and 4.2B tokens using language adaptation techniques (paper in preparation).

DISCLAIMER

This model is still under development. Further training details will be released with the corresponding research paper in the near future.

Our preliminary experimentation shows that Latxa 3.1 8B Instruct outperforms Llama-3.1-Instruct by a large margin on Basque standard benchmarks, and particularly, on chat conversations. In addition, we organized a public arena-based evaluation, on which Latxat competed against other baselines and proprietary models such as GPT-4o and Claude Sonnet. The results showed that Latxa ranked 3rd, just behind Claude and GPT-4 and above all the other same-size competitors. The official paper is coming soon.

Model Details

Model Description

Latxa is a family of Large Language Models (LLM) based on Meta’s LLaMA models. Current LLMs exhibit incredible performance for high-resource languages such as English, but, in the case of Basque and other low-resource languages, their performance is close to a random guesser. These limitations widen the gap between high- and low-resource languages when it comes to digital development. We present Latxa to overcome these limitations and promote the development of LLM-based technology and research for the Basque language. Latxa models follow the same architecture as their original counterparts and were further trained in Latxa Corpus v1.1, a high-quality Basque corpora.

  • Developed by: HiTZ Research Center & IXA Research group (University of the Basque Country UPV/EHU)
  • Model type: Language model
  • Language(s) (NLP): eu
  • License: llama3.1
  • Parent model: meta-llama/Llama-3.1-8B-Instruct
  • Contact: hitz@ehu.eus

Getting Started

Use the code below to get started with the model.

from transformers import pipeline

pipe = pipeline('text-generation', model='HiTZ/Latxa-Llama-3.1-8B-Instruct')

messages = [
    {'role': 'user', 'content': 'Kaixo!'},
]

pipe(messages)

>>
[
  {
    'generated_text': [
      {'role': 'user', 'content': 'Kaixo!'},
      {'role': 'assistant', 'content': 'Kaixo! Zer moduz? Zer behar edo galdetu nahi duzu?'}
    ]
  }
]

Uses

Latxa models are intended to be used with Basque data; for any other language the performance is not guaranteed. Same as the original, Latxa inherits the Llama-3.1 License which allows for commercial and research use.

Direct Use

Latxa Instruct models are trained to follow instructions or to work as chat assistants.

Out-of-Scope Use

The model is not intended for malicious activities, such as harming others or violating human rights. Any downstream application must comply with current laws and regulations. Irresponsible usage in production environments without proper risk assessment and mitigation is also discouraged.

Bias, Risks, and Limitations

In an effort to alleviate the potentially disturbing or harmful content, Latxa has been trained on carefully selected and processed data which comes mainly from local media, national/regional newspapers, encyclopedias and blogs (see Latxa Corpus v1.1). Still, the model is based on Llama 3.1 models and can potentially carry the same bias, risk and limitations. Please see the Llama’s Ethical Considerations and Limitations for further information.

Training Details

DISCLAIMER

Further training details will be released with the corresponding research paper in the near future.

Evaluation

We evaluated the models 5-shot settings on multiple-choice tasks. We used the basque partitions of each dataset.

The arena results will be released in the future.

Testing Data, Factors & Metrics

Testing Data

  • Belebele (Bandarkar et al.): Belebele is a multiple-choice machine reading comprehension (MRC) dataset spanning 122 language variants. We evaluated the model in a 5-shot fashion.
  • X-StoryCloze (Lin et al.): XStoryCloze consists of the professionally translated version of the English StoryCloze dataset to 10 non-English languages. Story Cloze is a commonsense reasoning dataset which consists of choosing the correct ending to a four-sentence story. We evaluated the model in a 5-shot fashion.
  • EusProficiency (Etxaniz et al., 2024): EusProficiency comprises 5,169 exercises on different topics from past EGA exams, the official C1-level certificate of proficiency in Basque.
  • EusReading (Etxaniz et al., 2024): EusReading consists of 352 reading comprehension exercises (irakurmena) sourced from the same set of past EGA exams.
  • EusTrivia (Etxaniz et al., 2024): EusTrivia consists of 1,715 trivia questions from multiple online sources. 56.3% of the questions are elementary level (grades 3-6), while the rest are considered challenging.
  • EusExams (Etxaniz et al., 2024): EusExams is a collection of tests designed to prepare individuals for Public Service examinations conducted by several Basque institutions, including the public health system Osakidetza, the Basque Government, the City Councils of Bilbao and Gasteiz, and the University of the Basque Country (UPV/EHU).

Metrics

We use Accuracy, as they are framed as Multiple Choice questions.

Results

Task Llama-3.1 8B Instruct Latxa 3.1 8B Instruct
Belebele 73.89 80.00
X-Story Cloze 61.22 71.34
EusProficiency 34.13 52.83
EusReading 49.72 62.78
EusTrivia 45.01 61.05
EusExams 46.21 56.00

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: HPC Cluster, 4 x A100 64Gb nodes x32
  • Hours used (total GPU hours): 2,336h
  • Cloud Provider: CINECA HPC
  • Compute Region: Italy
  • Carbon Emitted: 173.45kg CO2 eq

Acknowledgements

This work has been partially supported by the Basque Government (IKER-GAITU project).

It has also been partially supported by the Ministerio para la Transformación Digital y de la Función Pública - Funded by EU – NextGenerationEU within the framework of the project with reference 2022/TL22/00215335.

The models were trained on the Leonardo supercomputer at CINECA under the EuroHPC Joint Undertaking, project EHPC-EXT-2023E01-013.

Citation

Coming soon.

Meanwhile, you can reference:

@misc{etxaniz2024latxa,
      title={{L}atxa: An Open Language Model and Evaluation Suite for {B}asque},
      author={Julen Etxaniz and Oscar Sainz and Naiara Perez and Itziar Aldabe and German Rigau and Eneko Agirre and Aitor Ormazabal and Mikel Artetxe and Aitor Soroa},
      year={2024},
      eprint={2403.20266},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
Downloads last month
199
Safetensors
Model size
8.03B params
Tensor type
BF16
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.

Model tree for HiTZ/Latxa-Llama-3.1-8B-Instruct

Finetuned
(971)
this model
Quantizations
2 models

Dataset used to train HiTZ/Latxa-Llama-3.1-8B-Instruct

Collection including HiTZ/Latxa-Llama-3.1-8B-Instruct

Evaluation results