Transformers
GGUF
English
Mixture of Experts
olmo
olmoe
Inference Endpoints
mav23 commited on
Commit
ccb1e9c
β€’
1 Parent(s): 1481458

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +97 -0
  3. olmoe-1b-7b-0924.Q4_0.gguf +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ olmoe-1b-7b-0924.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - moe
7
+ - olmo
8
+ - olmoe
9
+ co2_eq_emissions: 1
10
+ datasets:
11
+ - allenai/OLMoE-mix-0924
12
+ library_name: transformers
13
+ ---
14
+
15
+ <img alt="OLMoE Logo." src="olmoe-logo.png" width="250px">
16
+
17
+
18
+ # Model Summary
19
+
20
+ > OLMoE-1B-7B is a Mixture-of-Experts LLM with 1B active and 7B total parameters released in September 2024 (0924). It yields state-of-the-art performance among models with a similar cost (1B) and is competitive with much larger models like Llama2-13B. OLMoE is 100% open-source.
21
+
22
+ This information and more can also be found on the [**OLMoE GitHub repository**](https://github.com/allenai/OLMoE).
23
+ - **Paper**: https://arxiv.org/abs/2409.02060
24
+ - **Pretraining** [Checkpoints](https://hf.co/allenai/OLMoE-1B-7B-0924), [Code](https://github.com/allenai/OLMo/tree/Muennighoff/MoE), [Data](https://huggingface.co/datasets/allenai/OLMoE-mix-0924) and [Logs](https://wandb.ai/ai2-llm/olmoe/reports/OLMoE-1B-7B-0924--Vmlldzo4OTcyMjU3).
25
+ - **SFT (Supervised Fine-Tuning)** [Checkpoints](https://huggingface.co/allenai/OLMoE-1B-7B-0924-SFT), [Code](https://github.com/allenai/open-instruct/tree/olmoe-sft), [Data](https://hf.co/datasets/allenai/tulu-v3.1-mix-preview-4096-OLMoE) and [Logs](https://github.com/allenai/OLMoE/blob/main/logs/olmoe-sft-logs.txt).
26
+ - **DPO/KTO (Direct Preference Optimization/Kahneman-Tversky Optimization)**, [Checkpoints](https://huggingface.co/allenai/OLMoE-1B-7B-0924-Instruct), [Preference Data](https://hf.co/datasets/allenai/ultrafeedback_binarized_cleaned), [DPO code](https://github.com/allenai/open-instruct/tree/olmoe-sft), [KTO code](https://github.com/Muennighoff/kto/blob/master/kto.py) and [Logs](https://github.com/allenai/OLMoE/blob/main/logs/olmoe-dpo-logs.txt).
27
+
28
+ # Use
29
+
30
+ Install `transformers` **from source** until a release after [this PR](https://github.com/huggingface/transformers/pull/32406) & `torch` and run:
31
+
32
+ ```python
33
+ from transformers import OlmoeForCausalLM, AutoTokenizer
34
+ import torch
35
+
36
+ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
37
+
38
+ # Load different ckpts via passing e.g. `revision=step10000-tokens41B`
39
+ model = OlmoeForCausalLM.from_pretrained("allenai/OLMoE-1B-7B-0924").to(DEVICE)
40
+ tokenizer = AutoTokenizer.from_pretrained("allenai/OLMoE-1B-7B-0924")
41
+ inputs = tokenizer("Bitcoin is", return_tensors="pt")
42
+ inputs = {k: v.to(DEVICE) for k, v in inputs.items()}
43
+ out = model.generate(**inputs, max_length=64)
44
+ print(tokenizer.decode(out[0]))
45
+ # > # Bitcoin is a digital currency that is created and held electronically. No one controls it. Bitcoins aren’t printed, like dollars or euros – they’re produced by people and businesses running computers all around the world, using software that solves mathematical
46
+ ```
47
+
48
+ You can list all revisions/branches by installing `huggingface-hub` & running:
49
+ ```python
50
+ from huggingface_hub import list_repo_refs
51
+ out = list_repo_refs("OLMoE/OLMoE-1B-7B-0924")
52
+ branches = [b.name for b in out.branches]
53
+ ```
54
+
55
+ Important branches:
56
+ - `step1200000-tokens5033B`: Pretraining checkpoint used for annealing. There are a few more checkpoints after this one but we did not use them.
57
+ - `main`: Checkpoint annealed from `step1200000-tokens5033B` for an additional 100B tokens (23,842 steps). We use this checkpoint for our adaptation (https://huggingface.co/allenai/OLMoE-1B-7B-0924-SFT & https://huggingface.co/allenai/OLMoE-1B-7B-0924-Instruct).
58
+ - `fp32`: FP32 version of `main`. The model weights were stored in FP32 during training but we did not observe any performance drop from casting them to BF16 after training so we upload all weights in BF16. If you want the original FP32 checkpoint for `main` you can use this one. You will find that it yields slightly different results but should perform around the same on benchmarks.
59
+
60
+ # Evaluation Snapshot
61
+
62
+ | Model | Active Params | Open Data | MMLU | HellaSwag | ARC-Chall. | ARC-Easy | PIQA | WinoGrande |
63
+ |-----------------------------|---------------|-----------|------|-----------|------------|----------|------|------------|
64
+ | **LMs with ~1B active parameters** | | | | | | | | |
65
+ | **OLMoE-1B-7B** | **1.3B** | **βœ…** | **54.1** | **80.0** | **62.1** | **84.2** | **79.8** | **70.2** |
66
+ | DCLM-1B | 1.4B | βœ… | 48.5 | 75.1 | 57.6 | 79.5 | 76.6 | 68.1 |
67
+ | TinyLlama-1B | 1.1B | βœ… | 33.6 | 60.8 | 38.1 | 69.5 | 71.7 | 60.1 |
68
+ | OLMo-1B (0724) | 1.3B | βœ… | 32.1 | 67.5 | 36.4 | 53.5 | 74.0 | 62.9 |
69
+ | Pythia-1B | 1.1B | βœ… | 31.1 | 48.0 | 31.4 | 63.4 | 68.9 | 52.7 |
70
+ | **LMs with ~2-3B active parameters** | | | | | | | | |
71
+ | Qwen1.5-3B-14B | 2.7B | ❌ | **62.4** | 80.0 | **77.4** | **91.6** | **81.0** | 72.3 |
72
+ | Gemma2-3B | 2.6B | ❌ | 53.3 | 74.6 | 67.5 | 84.3 | 78.5 | 71.8 |
73
+ | JetMoE-2B-9B | 2.2B | ❌ | 49.1 | **81.7** | 61.4 | 81.9 | 80.3 | 70.7 |
74
+ | DeepSeek-3B-16B | 2.9B | ❌ | 45.5 | 80.4 | 53.4 | 82.7 | 80.1 | **73.2** |
75
+ | StableLM-2B | 1.6B | ❌ | 40.4 | 70.3 | 50.6 | 75.3 | 75.6 | 65.8 |
76
+ | OpenMoE-3B-9B | 2.9B | βœ… | 27.4 | 44.4 | 29.3 | 50.6 | 63.3 | 51.9 |
77
+ | **LMs with ~7-9B active parameters** | | | | | | | | |
78
+ | Gemma2-9B | 9.2B | ❌ | **70.6** | **87.3** | **89.5** | **95.5** | **86.1** | **78.8** |
79
+ | Llama3.1-8B | 8.0B | ❌ | 66.9 | 81.6 | 79.5 | 91.7 | 81.1 | 76.6 |
80
+ | DCLM-7B | 6.9B | βœ… | 64.4 | 82.3 | 79.8 | 92.3 | 80.1 | 77.3 |
81
+ | Mistral-7B | 7.3B | ❌ | 64.0 | 83.0 | 78.6 | 90.8 | 82.8 | 77.9 |
82
+ | OLMo-7B (0724) | 6.9B | βœ… | 54.9 | 80.5 | 68.0 | 85.7 | 79.3 | 73.2 |
83
+ | Llama2-7B | 6.7B | ❌ | 46.2 | 78.9 | 54.2 | 84.0 | 77.5 | 71.7 |
84
+
85
+ # Citation
86
+
87
+ ```bibtex
88
+ @misc{muennighoff2024olmoeopenmixtureofexpertslanguage,
89
+ title={OLMoE: Open Mixture-of-Experts Language Models},
90
+ author={Niklas Muennighoff and Luca Soldaini and Dirk Groeneveld and Kyle Lo and Jacob Morrison and Sewon Min and Weijia Shi and Pete Walsh and Oyvind Tafjord and Nathan Lambert and Yuling Gu and Shane Arora and Akshita Bhagia and Dustin Schwenk and David Wadden and Alexander Wettig and Binyuan Hui and Tim Dettmers and Douwe Kiela and Ali Farhadi and Noah A. Smith and Pang Wei Koh and Amanpreet Singh and Hannaneh Hajishirzi},
91
+ year={2024},
92
+ eprint={2409.02060},
93
+ archivePrefix={arXiv},
94
+ primaryClass={cs.CL},
95
+ url={https://arxiv.org/abs/2409.02060},
96
+ }
97
+ ```
olmoe-1b-7b-0924.Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:437ef4cb9e19d574bd5689e7df640b4c37e007f2d09196eacef4ca7279d7cf38
3
+ size 3928037024