transformers pytorch bloom text-generation generation question answering instruction tuning multilingual dataset:MBZUAI/Bactrian-X arxiv:2404.04850 license:cc-by-nc-4.0 autotrain_compatible text-generation-inference endpoints_compatible region:us
---
datasets:
- MBZUAI/Bactrian-X
language:
- multilingual
library_name: transformers
license: cc-by-nc-4.0
pipeline_tag: text-generation
tags:
- generation
- question answering
- instruction tuning
---

###  Model Description

This HF repository hosts instruction fine-tuned multilingual BLOOM model using the parallel instruction dataset called Bactrain-X in 52 languages. 
We progressively add a language during instruction fine-tuning at each time, and train 52 models in total. Then, we evaluate those models in three multilingual benchmarks. 

Please refer to [our paper](https://arxiv.org/abs/2404.04850) for more details.

* Base model: [BLOOM 7B1](https://huggingface.co/bigscience/bloom-7b1)
* Instruction languages: English, Chinese, Afrikaans, Arabic, Azerbaijani, Bengali, Czech, German, Spanish, Estonian, Farsi, Finnish, French, Galician, Gujarati, Hebrew, Hindi, Croatian, Indonesian, Italian, Japanese, Georgian, Kazakh, Khmer, Korean, Lithuanian, Latvian, Macedonian, Malayalam, Mongolian, Marathi, Burmese, Nepali
* Instruction language codes: en, zh, af, ar, az, bn, cs, de, es, et, fa, fi, fr, gl, gu, he, hi, hr, id, it, ja, ka, kk, km, ko, lt, lv, mk, ml, mn, mr, my, ne
* Training method: full-parameter fine-tuning.

### Usage
The model checkpoint should be loaded using `transformers` library.

```python
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("MaLA-LM/lucky52-bloom-7b1-no-33")
model = AutoModelForCausalLM.from_pretrained("MaLA-LM/lucky52-bloom-7b1-no-33")
```

### Citation
```
@inproceedings{ji2025lucky52,
      title={How Many Languages Make Good Multilingual Instruction Tuning? A Case Study on BLOOM}, 
      author={Shaoxiong Ji and Pinzhen Chen},
      year={2025},
      booktitle={Proceedings of COLING},
      url={https://arxiv.org/abs/2404.04850}, 
}
```

