🚀 FlexOlmo - 靈活數據協作的新型語言模型
FlexOlmo 是一種新型的大語言模型,它開啟了數據協作的全新範式。藉助 FlexOlmo,數據所有者能夠在不放棄數據控制權的前提下,為開源語言模型的發展貢獻力量。無需直接共享原始數據,數據貢獻者可以決定其數據何時在模型中生效,隨時停用數據,並在數據用於推理時獲得相應的認可。
🚀 快速開始
安裝與使用
安裝 transformers
從 此源 並運行以下代碼:
from transformers import Olmoe2ForCausalLM, AutoTokenizer
import torch
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
MODEL_NAME = "allenai/FlexOlmo-7x7B-1T"
model = Olmoe2ForCausalLM.from_pretrained(MODEL_NAME).to(DEVICE)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
inputs = tokenizer("Bitcoin is", return_tensors="pt")
inputs = {k: v.to(DEVICE) for k, v in inputs.items()}
out = model.generate(**inputs, max_length=64)
print(tokenizer.decode(out[0]))
✨ 主要特性
FlexOlmo-7x7B-1T(未進行路由訓練)是一個混合專家模型,總參數達 330 億。它結合了在公共混合數據、新聞、數學、代碼、學術文本、創意寫作和 Reddit 數據上獨立訓練的專家模型。公共混合專家模型在 1 萬億個公共數據令牌上進行訓練,而其他專家模型則從公共混合專家模型分支而來,並在各自的 500 億個數據令牌上進行訓練。
📚 詳細文檔
模型信息鏈接
評估快照
模型 |
MC9 |
Gen5 |
MMLU |
MMLU Pro |
AGIEval |
BBH |
Math2 |
NewsG |
PoemG |
SciRIFF5 |
Code4 |
平均 |
先前的公共模型 |
68.7 |
58.8 |
55.9 |
26.2 |
39.9 |
35.7 |
8.2 |
76.0 |
47.8 |
48.1 |
1.1 |
42.4 |
單個模型 |
|
|
|
|
|
|
|
|
|
|
|
|
數學 |
62.5 |
44.3 |
50.6 |
24.1 |
42.0 |
45.6 |
53.1 |
42.6 |
28.0 |
50.7 |
15.8 |
41.8 |
代碼 |
40.5 |
39.4 |
29.5 |
14.5 |
27.4 |
38.1 |
6.0 |
45.1 |
28.2 |
48.0 |
21.0 |
30.7 |
新聞 |
46.5 |
48.6 |
36.4 |
15.2 |
25.7 |
30.9 |
2.5 |
77.7 |
26.9 |
47.0 |
0.0 |
32.5 |
創意寫作 |
42.7 |
43.9 |
31.5 |
11.6 |
23.3 |
27.6 |
1.7 |
56.9 |
67.5 |
42.4 |
0.0 |
31.7 |
學術 |
41.0 |
45.2 |
33.8 |
14.8 |
24.1 |
32.4 |
6.5 |
51.8 |
23.0 |
52.0 |
0.0 |
29.5 |
Reddit |
64.7 |
36.5 |
56.1 |
25.5 |
35.5 |
19.7 |
2.5 |
54.1 |
8.6 |
32.7 |
1.7 |
30.7 |
組合模型 |
|
|
|
|
|
|
|
|
|
|
|
|
BTM(前 2) |
68.7 |
57.7 |
59.4 |
28.3 |
43.2 |
44.3 |
23.1 |
73.6 |
54.4 |
46.3 |
24.0 |
47.6 |
🌟 FlexOlmo-7x7B-1T |
70.4 |
60.1 |
60.2 |
30.5 |
44.8 |
46.8 |
47.9 |
78.3 |
66.2 |
53.8 |
14.6 |
52.0 |
FlexOlmo-7x7B-1T-RT |
70.3 |
60.0 |
60.2 |
30.3 |
45.2 |
47.2 |
47.7 |
77.2 |
67.6 |
53.9 |
13.3 |
52.2 |
- 單個模型的評估指的是密集模型,而非 2x7B 的混合專家模型。
📄 許可證
本項目採用 Apache-2.0 許可證。
📚 引用
@misc{flexolmo,
title={FlexOlmo: Open Language Models for Flexible Data Use},
author={Weijia Shi and Akshita Bhagia and Kevin Farhat and Niklas Muennighoff and Pete Walsh and Jacob Morrison and Dustin Schwenk and Shayne Longpre and Jake Poznanski and Allyson Ettinger and Daogao Liu and Margaret Li and Mike Lewis and Wen-tau Yih and Dirk Groeneveld and Luca Soldaini and Kyle Lo and Noah A. Smith and Luke Zettlemoyer and Pang Wei Koh and Hannaneh Hajishirzi and Ali Farhadi and Sewon Min},
year={2025},
eprint={2507.00000},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://allenai.org/papers/flexolmo},
}