Views
No views yet

| Size | Training Tokens | Layers | Hidden Size | Attention Heads | Context Length |
|---|---|---|---|---|---|
| OLMo 2-1B | 4 Trillion | 16 | 2048 | 16 | 4096 |
| OLMo 2-7B | 4 Trillion | 32 | 4096 | 32 | 4096 |
| OLMo 2-13B | 5 Trillion | 40 | 5120 | 40 | 4096 |
| OLMo 2-32B | 6 Trillion | 64 | 5120 | 40 | 4096 |
pip install transformers>=4.481from transformers import AutoModelForCausalLM, AutoTokenizer
2olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-2-0425-1B")
3tokenizer = AutoTokenizer.from_pretrained("allenai/OLMo-2-0425-1B")
4message = ["Language modeling is "]
5inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)
6# optional verifying cuda
7# inputs = {k: v.to('cuda') for k,v in inputs.items()}
8# olmo = olmo.to('cuda')
9response = olmo.generate(**inputs, max_new_tokens=100, do_sample=True, top_k=50, top_p=0.95)
10print(tokenizer.batch_decode(response, skip_special_tokens=True)[0])
11>> 'Language modeling is a key component of any text-based application, but its effectiveness...'1AutoModelForCausalLM.from_pretrained("allenai/OLMo-2-0425-1B",
2 torch_dtype=torch.float16,
3 load_in_8bit=True) # Requires bitsandbytesinputs.input_ids.to('cuda')stage1-stepXXX-tokensYYYB. For checkpoints with ingredients of the soup, the naming convention is stage2-ingredientN-stepXXX-tokensYYYBrevision:olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-2-0425-1B", revision="stage1-step140000-tokens294B")1from huggingface_hub import list_repo_refs
2out = list_repo_refs("allenai/OLMo-2-0425-1B")
3branches = [b.name for b in out.branches]main revision of this model) or many intermediate checkpoints. Two recipes for tuning are available.1torchrun --nproc_per_node=8 scripts/train.py {path_to_train_config} \
2 --data.paths=[{path_to_data}/input_ids.npy] \
3 --data.label_mask_paths=[{path_to_data}/label_mask.npy] \
4 --load_path={path_to_checkpoint} \
5 --reset_trainer_stateolmo@allenai.org. Press: press@allenai.org| Instruct Model | Avg | FLOP×10²³ | AE2 | BBH | DROP | GSM8K | IFE | MATH | MMLU | Safety | PQA | TQA |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Closed API models | ||||||||||||
| GPT-3.5 Turbo 0125 | 60.5 | n/a | 38.7 | 66.6 | 70.2 | 74.3 | 66.9 | 41.2 | 70.2 | 69.1 | 45.0 | 62.9 |
| GPT 4o Mini 0724 | 65.7 | n/a | 49.7 | 65.9 | 36.3 | 83.0 | 83.5 | 67.9 | 82.2 | 84.9 | 39.0 | 64.8 |
| Open weights models 1-1.7B Parameters | ||||||||||||
| SmolLM2 1.7B | 34.2 | 1.1 | 5.8 | 39.8 | 30.9 | 45.3 | 51.6 | 20.3 | 34.3 | 52.4 | 16.4 | 45.3 |
| Gemma 3 1B | 38.3 | 1.2 | 20.4 | 39.4 | 25.1 | 35.0 | 60.6 | 40.3 | 38.9 | 70.2 | 9.6 | 43.8 |
| Llama 3.1 1B | 39.3 | 6.7 | 10.1 | 40.2 | 32.2 | 45.4 | 54.0 | 21.6 | 46.7 | 87.2 | 13.8 | 41.5 |
| Qwen 2.5 1.5B | 41.7 | 1.7 | 7.4 | 45.8 | 13.4 | 66.2 | 44.2 | 40.6 | 59.7 | 77.6 | 15.5 | 46.5 |
| Fully-open models | ||||||||||||
| OLMo 1B 0724 | 24.4 | 0.22 | 2.4 | 29.9 | 27.9 | 10.8 | 25.3 | 2.2 | 36.6 | 52.0 | 12.1 | 44.3 |
| OLMo 2 1B | 42.7 | 0.35 | 9.1 | 35.0 | 34.6 | 68.3 | 70.1 | 20.7 | 40.0 | 87.6 | 12.9 | 48.7 |
| OLMo 2 1B | OLMo 2 7B | OLMo 2 13B | OLMo 2 32B | |
|---|---|---|---|---|
| Pretraining Stage 1 | 4 trillion tokens (1 epoch) | 4 trillion tokens (1 epoch) | 5 trillion tokens (1.2 epochs) | 6 trillion tokens (1.5 epochs) |
| Pretraining Stage 2 | 50B tokens | 50B tokens (3 runs) merged | 100B tokens (3 runs) 300B tokens (1 run) merged | 100B tokens (3 runs) 300B tokens (1 run) merged |
| Post-training | SFT+DPO+GRPO (preference mix) | SFT + DPO + PPO (preference mix) | SFT + DPO + PPO (preference mix) | SFT + DPO + GRPO (preference mix) |
@misc{olmo20242olmo2furious,
title={{2 OLMo 2 Furious}},
author={Team OLMo and Pete Walsh and Luca Soldaini and Dirk Groeneveld and Kyle Lo and Shane Arora and Akshita Bhagia and Yuling Gu and Shengyi Huang and Matt Jordan and Nathan Lambert and Dustin Schwenk and Oyvind Tafjord and Taira Anderson and David Atkinson and Faeze Brahman and Christopher Clark and Pradeep Dasigi and Nouha Dziri and Michal Guerquin and Hamish Ivison and Pang Wei Koh and Jiacheng Liu and Saumya Malik and William Merrill and Lester James V. Miranda and Jacob Morrison and Tyler Murray and Crystal Nam and Valentina Pyatkin and Aman Rangapur and Michael Schmitz and Sam Skjonsberg and David Wadden and Christopher Wilhelm and Michael Wilson and Luke Zettlemoyer and Ali Farhadi and Noah A. Smith and Hannaneh Hajishirzi},
year={2024},
eprint={2501.00656},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2501.00656},
}olmo@allenai.org.