Text Generation
Transformers
Safetensors
lola_v1
custom_code
File size: 4,021 Bytes
a970019
 
 
 
 
 
5b878c2
bbc824c
 
 
 
 
5b878c2
932e28f
 
1c9069d
 
4219db6
1c9069d
 
5b878c2
8b31051
5b878c2
1c15d61
932e28f
d7ea010
a970019
1c15d61
932e28f
d7ea010
5b878c2
1c9069d
932e28f
5b878c2
 
1c15d61
5b878c2
1c15d61
5b878c2
1c15d61
5b878c2
1c15d61
 
5b878c2
1c15d61
 
 
 
5b878c2
1c15d61
5b878c2
1c15d61
5b878c2
 
1c15d61
5b878c2
 
1c15d61
5b878c2
1c15d61
 
 
 
5b878c2
1c15d61
5b878c2
1c15d61
 
 
5b878c2
1c15d61
5b878c2
1c15d61
 
 
 
 
932e28f
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
library_name: transformers
license: cc-by-4.0
datasets:
- uonlp/CulturaX
---

<p align="center">
  <img src="lola-logo.png"/>
</p>


<!-- Provide a quick summary of what the model is/does. -->
# LOLA &mdash; An Open-Source Massively Multilingual Large Language Model

## Abstract

LOLA is a massively multilingual large language model trained on more than 160 languages using a sparse Mixture-of-Experts Transformer architecture. Our architectural and implementation choices address the challenge of harnessing linguistic diversity while maintaining efficiency and avoiding the common pitfalls of multilinguality. Our analysis of the evaluation results shows competitive performance in natural language generation and understanding tasks. Additionally, we demonstrate how the learned expert-routing mechanism exploits implicit phylogenetic linguistic patterns to potentially alleviate the curse of multilinguality. We provide an in-depth look at the training process, an analysis of the datasets, and a balanced exploration of the model's strengths and limitations. As an open-source model, LOLA promotes reproducibility and serves as a robust foundation for future research. Our findings enable the development of compute-efficient multilingual models with strong, scalable performance across languages.

Paper: https://arxiv.org/abs/2409.11272

## Model Description

- **Developed by:** DICE Research Group (https://dice-research.org/) @ Paderborn University (https://www.uni-paderborn.de/)
- **Model type:** GPT2 style (decoder-only) with alternating sparse Mixture-of-Experts layers
- **Number of Experts**: 16
- **Model Size**: 1.3 Billion (active*) / 7.4 Billion (total)
- **Language(s) (NLP):** 160+
- **License:** CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
- **Repository:** https://github.com/dice-group/LOLA

<sub>* The number of parameters a model utilizes per token (ref: [Fedus et al, 2022](https://arxiv.org/abs/2101.03961); [Du et al, 2022](https://arxiv.org/abs/2112.06905)). This distinction is crucial for understanding the efficiency and performance of MoE models.</sub>

## How to Get Started with the Model

This pre-trained (causal language modeling) model can only be used for text-generation and requires further fine-tuning on downstream tasks.

### How to use

You can use this model directly with a pipeline for text generation.

```python
>>> from transformers import pipeline

>>> generator = pipeline('text-generation', model="dice-research/lola_v1", trust_remote_code=True)
>>> generator("The quick brown fox", max_length=13)
[{'generated_text': 'The quick brown fox jumps over the lazy dog.'}]
```

To use the top-k sampling, please set `do_sample` to `True`.

**Note:** The tokenizer used in the model comes from mGPT (https://github.com/ai-forever/mgpt)


## Training Details


### Training Framework

- DeepSpeed Megatron (https://github.com/microsoft/Megatron-DeepSpeed)
- Architecture type: Transformers (Decoder-only) with Mixture-of-Experts (MoE)
- Number of Experts: 16
- Model Size: 1.3 Billion Dense / 7.4 Billion Sparse

### Pretraining Dataset

- CulturaX (https://huggingface.co/datasets/uonlp/CulturaX)
- Total Tokens: 6.3 Trillion
- Total Languages: 167

### LOLA v1 Training:

- Computing cluster: Noctua2 (https://pc2.uni-paderborn.de/hpc-services/available-systems/noctua2)
- Number of GPUs: 96x Nvidia A100 (40GB)
- Training steps: 296000
- Tokens consumed: 465 Billion
- Training time: ~19 days

## Citation
If you use our work in your research, please make sure to cite it:
```bibtex
@misc{srivastava2024lolaopensourcemassively,
      title={LOLA -- An Open-Source Massively Multilingual Large Language Model}, 
      author={Nikit Srivastava and Denis Kuchelev and Tatiana Moteu Ngoli and Kshitij Shetty and Michael Roeder and Diego Moussallem and Hamada Zahera and Axel-Cyrille Ngonga Ngomo},
      year={2024},
      eprint={2409.11272},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2409.11272}, 
}
```