🚀 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]},
}