🚀 LOLA — 开源大规模多语言大语言模型
LOLA是一个大规模多语言大语言模型,它采用稀疏专家混合Transformer架构,在超过160种语言上进行训练。该模型解决了在利用语言多样性的同时保持效率,并避免多语言常见问题的挑战。评估结果显示,它在自然语言生成和理解任务中具有有竞争力的表现。此外,研究还展示了学习到的专家路由机制如何利用隐式的语言系统发育模式,以缓解多语言带来的难题。此开源模型促进了研究的可重复性,为未来研究提供了坚实基础。
🚀 快速开始
这个预训练(因果语言建模)模型仅可用于文本生成,并且需要在下游任务上进行进一步微调。
如何使用
你可以直接使用文本生成管道来使用这个模型。
>>> 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.'}]
若要使用top-k采样,请将do_sample
设置为True
。
⚠️ 重要提示
模型中使用的分词器来自mGPT (https://github.com/ai-forever/mgpt)
✨ 主要特性
LOLA是一个GPT2风格(仅解码器)的模型,带有交替的稀疏专家混合层,支持160多种语言。它采用了稀疏专家混合Transformer架构,能够在利用语言多样性的同时保持效率,避免多语言常见问题。其学习到的专家路由机制可以利用隐式的语言系统发育模式,缓解多语言带来的难题。
📦 安装指南
文档未提及具体安装步骤,暂无法提供。
💻 使用示例
基础用法
>>> 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.'}]
高级用法
若要使用top-k采样,请将do_sample
设置为True
。
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, do_sample=True)
📚 详细文档
模型描述
- 开发者:帕德博恩大学(https://www.uni-paderborn.de/)的DICE研究小组(https://dice-research.org/)
- 模型类型:GPT2风格(仅解码器),带有交替的稀疏专家混合层
- 专家数量:16
- 模型大小:13亿(活动参数*)/ 74亿(总参数)
- 支持语言(NLP):160多种
- 许可证:CC BY 4.0(https://creativecommons.org/licenses/by/4.0/)
- 仓库地址:https://github.com/dice-group/LOLA
* 模型每个标记使用的参数数量(参考:Fedus等人,2022;Du等人,2022)。这种区分对于理解MoE模型的效率和性能至关重要。
训练详情
训练框架
- DeepSpeed Megatron(https://github.com/microsoft/Megatron-DeepSpeed)
- 架构类型:带有专家混合(MoE)的Transformer(仅解码器)
- 专家数量:16
- 模型大小:13亿密集参数 / 74亿稀疏参数
预训练数据集
- CulturaX(https://huggingface.co/datasets/uonlp/CulturaX)
- 总标记数:63万亿
- 总语言数:167
LOLA v1训练情况
- 计算集群:Noctua2(https://pc2.uni-paderborn.de/hpc-services/available-systems/noctua2)
- GPU数量:96个Nvidia A100(40GB)
- 训练步数:296000
- 消耗标记数:4650亿
- 训练时间:约19天
🔧 技术细节
LOLA采用DeepSpeed Megatron训练框架,使用Transformer(仅解码器)架构并结合专家混合(MoE)技术。在预训练阶段,它使用了CulturaX数据集,涵盖167种语言,总标记数达到63万亿。在LOLA v1的训练中,使用了Noctua2计算集群和96个Nvidia A100(40GB)GPU,经过296000步训练,消耗4650亿标记,历时约19天。
📄 许可证
本模型使用CC BY 4.0许可证(https://creativecommons.org/licenses/by/4.0/)。
📚 引用
如果你在研究中使用了我们的工作,请确保进行引用:
@inproceedings{srivastava-etal-2025-lola,
author = {Nikit Srivastava and Denis Kuchelev and Tatiana Moteu Ngoli and Kshitij Shetty and Michael Röder and Hamada Zahera and Diego Moussallem and Axel-Cyrille Ngonga Ngomo},
title = {{LOLA} -- An Open-Source Massively Multilingual Large Language Model},
booktitle = {Proceedings of the 31st International Conference on Computational Linguistics},
editor = {Owen Rambow and Leo Wanner and Marianna Apidianaki and Hend Al-Khalifa and Barbara Di Eugenio and Steven Schockaert},
month = jan,
year = {2025},
address = {Abu Dhabi, UAE},
publisher = {Association for Computational Linguistics},
pages = {6420--6446},
url = {https://aclanthology.org/2025.coling-main.428/},
note = {arXiv:2409.11272 [cs.CL]},
}