库名称: transformers
许可证: cc-by-4.0
数据集:
- uonlp/CulturaX
标签:
- 多语言
- 混合专家
LOLA — 开源超大规模多语言大模型
摘要
LOLA是基于稀疏混合专家(Mixture-of-Experts)Transformer架构、支持160多种语言的超大规模多语言大模型。我们的架构设计和实现方案在保持效率的同时,成功驾驭了语言多样性挑战,规避了多语言建模的常见缺陷。评估结果表明,该模型在自然语言生成与理解任务中具有竞争优势。我们还揭示了专家路由机制如何利用隐式语言谱系模式来缓解"多语言诅咒"。本文深入剖析了训练过程、数据集构成,并客观探讨了模型优势与局限。作为开源模型,LOLA推动了研究可复现性,为未来研究奠定了坚实基础。我们的发现为开发计算高效、跨语言扩展性强的多语言模型提供了新思路。
论文: https://arxiv.org/abs/2409.11272
模型描述
- 开发团队: 帕德博恩大学DICE研究组(https://dice-research.org/)
- 模型类型: GPT2风格(纯解码器)交替稀疏混合专家层
- 专家数量: 16
- 模型规模: 13亿(激活参数*)/74亿(总参数)
- 支持语言: 160+
- 许可证: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
- 代码库: https://github.com/dice-group/LOLA
* 指模型每个token实际使用的参数量(参见Fedus等,2022; Du等,2022)。这对理解MoE模型的效率与性能至关重要。
快速开始
本预训练模型(因果语言建模)仅支持文本生成任务,下游任务需进一步微调。
使用方法
可通过pipeline直接进行文本生成:
>>> from transformers import pipeline
>>> generator = pipeline('text-generation', model="dice-research/lola_v1", trust_remote_code=True)
>>> generator("敏捷的棕毛狐狸", max_length=13)
[{'generated_text': '敏捷的棕毛狐狸从懒狗身上跳了过去。'}]
使用top-k采样时请设置do_sample=True
。
注: 模型分词器源自mGPT(https://github.com/ai-forever/mgpt)
训练详情
训练框架
- DeepSpeed Megatron (https://github.com/microsoft/Megatron-DeepSpeed)
- 架构类型: Transformer(纯解码器)+混合专家(MoE)
- 专家数量: 16
- 模型规模: 13亿稠密参数/74亿稀疏参数
预训练数据
- CulturaX (https://huggingface.co/datasets/uonlp/CulturaX)
- 总token数: 6.3万亿
- 覆盖语言: 167种
LOLA v1训练:
- 计算集群: Noctua2 (https://pc2.uni-paderborn.de/hpc-services/available-systems/noctua2)
- GPU数量: 96块NVIDIA A100(40GB)
- 训练步数: 296,000步
- 消耗token: 4650亿
- 训练时长: ~19天
引用
若您的研究使用了本工作,请引用:
@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]},
}