allenai/OLMoE-1B-7B-0924-Instruct

Model

98

stars

29

commits

10

repos using this model

5

linked in READMEs

Sep 13, 2024

updated

co2_eq_emissions
conversational
endpoints_compatible
moe
olmo
olmoe
safetensors
text-generation
transformers

README

OLMoE Logo.

Model Summary

OLMoE-1B-7B-Instruct is a Mixture-of-Experts LLM with 1B active and 7B total parameters released in September 2024 (0924) that has been adapted via SFT and DPO from OLMoE-1B-7B. It yields state-of-the-art performance among models with a similar cost (1B) and is competitive with much larger models like Llama2-13B-Chat. OLMoE is 100% open-source.

This information and more can also be found on the OLMoE GitHub repository.

Use

Install transformers from source until a release after this PR & torch and run:

from transformers import OlmoeForCausalLM, AutoTokenizer
import torch

DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

# Load different ckpts via passing e.g. `revision=kto`
model = OlmoeForCausalLM.from_pretrained("allenai/OLMoE-1B-7B-0924-Instruct").to(DEVICE)
tokenizer = AutoTokenizer.from_pretrained("allenai/OLMoE-1B-7B-0924-Instruct")
messages = [{"role": "user", "content": "Explain to me like I'm five what is Bitcoin."}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(DEVICE)
out = model.generate(inputs, max_length=100)
print(tokenizer.decode(out[0]))
"""
<|endoftext|><|user|>
Explain to me like I'm five what is Bitcoin.
<|assistant|>
Bitcoin is like a special kind of money that you can use to buy things online. But unlike regular money, like dollars or euros, Bitcoin isn't printed by governments or banks. Instead, it's created by a special computer program that helps people keep track of it.

Here's how it works: imagine you have a bunch of toys, and you want to
"""

Branches:

Evaluation Snapshot

Task (→)MMLUGSM8kBBHHuman-EvalAlpaca-Eval 1.0XSTestIFEvalAvg
Setup (→)0-shot8-shot CoT3-shot0-shot0-shot0-shot0-shot
Metric (→)EMEMEMPass@10%winF1Loose Acc
OLMo-1B (0724)25.07.022.516.0-67.620.5-
+SFT36.012.527.221.241.581.926.135.9
+DPO36.712.530.622.050.979.824.237.4
OLMo-7B (0724)50.832.536.932.3-80.819.6-
+SFT54.225.035.738.570.986.139.749.3
+DPO52.89.016.635.083.587.537.949.1
JetMoE-2B-9B45.643.037.254.6-68.220.0-
+SFT46.153.535.664.869.355.630.550.4
DeepSeek-3B-16B37.718.539.448.3-65.913.5-
+Chat48.546.540.870.174.885.632.357.0
Qwen1.5-3B-14B60.413.527.260.2-73.420.9-
+Chat58.955.521.359.783.985.636.257.3
OLMoE (This Model)49.83.033.622.4-59.716.6-
+SFT51.440.538.051.669.284.143.354.0
+DPO51.945.537.054.884.082.648.157.7

Citation

@misc{muennighoff2024olmoeopenmixtureofexpertslanguage,
      title={OLMoE: Open Mixture-of-Experts Language Models}, 
      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},
      year={2024},
      eprint={2409.02060},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2409.02060}, 
}

Contributors

Muennighoff

14 commits

natolambert

6 commits

jacobmorrison

4 commits

soldni

3 commits

allenai/OLMoE-1B-7B-0924-Instruct

Model

98

stars

29

commits

10

repos using this model

5

linked in READMEs

Sep 13, 2024

updated

co2_eq_emissions
conversational
endpoints_compatible
moe
olmo
olmoe
safetensors
text-generation
transformers

README

OLMoE Logo.

Model Summary

OLMoE-1B-7B-Instruct is a Mixture-of-Experts LLM with 1B active and 7B total parameters released in September 2024 (0924) that has been adapted via SFT and DPO from OLMoE-1B-7B. It yields state-of-the-art performance among models with a similar cost (1B) and is competitive with much larger models like Llama2-13B-Chat. OLMoE is 100% open-source.

This information and more can also be found on the OLMoE GitHub repository.

Use

Install transformers from source until a release after this PR & torch and run:

from transformers import OlmoeForCausalLM, AutoTokenizer
import torch

DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

# Load different ckpts via passing e.g. `revision=kto`
model = OlmoeForCausalLM.from_pretrained("allenai/OLMoE-1B-7B-0924-Instruct").to(DEVICE)
tokenizer = AutoTokenizer.from_pretrained("allenai/OLMoE-1B-7B-0924-Instruct")
messages = [{"role": "user", "content": "Explain to me like I'm five what is Bitcoin."}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(DEVICE)
out = model.generate(inputs, max_length=100)
print(tokenizer.decode(out[0]))
"""
<|endoftext|><|user|>
Explain to me like I'm five what is Bitcoin.
<|assistant|>
Bitcoin is like a special kind of money that you can use to buy things online. But unlike regular money, like dollars or euros, Bitcoin isn't printed by governments or banks. Instead, it's created by a special computer program that helps people keep track of it.

Here's how it works: imagine you have a bunch of toys, and you want to
"""

Branches:

Evaluation Snapshot

Task (→)MMLUGSM8kBBHHuman-EvalAlpaca-Eval 1.0XSTestIFEvalAvg
Setup (→)0-shot8-shot CoT3-shot0-shot0-shot0-shot0-shot
Metric (→)EMEMEMPass@10%winF1Loose Acc
OLMo-1B (0724)25.07.022.516.0-67.620.5-
+SFT36.012.527.221.241.581.926.135.9
+DPO36.712.530.622.050.979.824.237.4
OLMo-7B (0724)50.832.536.932.3-80.819.6-
+SFT54.225.035.738.570.986.139.749.3
+DPO52.89.016.635.083.587.537.949.1
JetMoE-2B-9B45.643.037.254.6-68.220.0-
+SFT46.153.535.664.869.355.630.550.4
DeepSeek-3B-16B37.718.539.448.3-65.913.5-
+Chat48.546.540.870.174.885.632.357.0
Qwen1.5-3B-14B60.413.527.260.2-73.420.9-
+Chat58.955.521.359.783.985.636.257.3
OLMoE (This Model)49.83.033.622.4-59.716.6-
+SFT51.440.538.051.669.284.143.354.0
+DPO51.945.537.054.884.082.648.157.7

Citation

@misc{muennighoff2024olmoeopenmixtureofexpertslanguage,
      title={OLMoE: Open Mixture-of-Experts Language Models}, 
      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},
      year={2024},
      eprint={2409.02060},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2409.02060}, 
}

Contributors

Muennighoff

14 commits

natolambert

6 commits

jacobmorrison

4 commits

soldni

3 commits