No description
This repository has been archived on 2026-11-22. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Python 95.2%
  • JavaScript 4.4%
  • Dockerfile 0.2%
  • HTML 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-26 15:26:08 -04:00
.claude/skills/training-smoke-test bump fla to 0.5.2 (#798) 2026-08-06 22:10:23 -04:00
benchmarks Add opt-in AttnRes RMSNorm fusion and source RMS reuse 2026-10-22 10:07:43 -04:00
docs Add state-dependent low-rank sigmoid loop gate 2026-10-20 22:42:14 -04:00
src Add TXT360 and ClimbMix shards to synth decay mix 2026-10-26 15:26:08 -04:00
.gitignore Remove committed smoke-test artifacts and ignore run output dirs 2026-10-17 21:25:11 -04:00
.readthedocs.yaml bump fla to 0.5.2 (#798) 2026-08-06 22:10:23 -04:00
AGENTS.md datamix rework 2026-10-19 08:59:31 -04:00
CHANGELOG.md Add OPD prompt anchors and rollout student entropy logging 2026-10-17 21:19:10 -04:00
CLAUDE.md bump fla to 0.5.2 (#798) 2026-08-06 22:10:23 -04:00
CONTRIBUTING.md bump fla to 0.5.2 (#798) 2026-08-06 22:10:23 -04:00
LICENSE bump fla to 0.5.2 (#798) 2026-08-06 22:10:23 -04:00
Makefile Remove Beaker and obsolete workflows; consolidate core interfaces 2026-10-14 11:14:44 -04:00
MANIFEST.in bump fla to 0.5.2 (#798) 2026-08-06 22:10:23 -04:00
pyproject.toml Add opt-in AttnRes RMSNorm fusion and source RMS reuse 2026-10-22 10:07:43 -04:00
README.md Remove Beaker and obsolete workflows; consolidate core interfaces 2026-10-14 11:14:44 -04:00

OLMo Logo

OLMo-core

Building blocks for OLMo modeling and training

Docs Examples Pypi GitHub License Paper URL Playground Discord

Installation

First install PyTorch according to the instructions specific to your operating system and hardware.

For development, we recommend installing from source:

git clone https://github.com/allenai/OLMo-core.git
cd OLMo-core
pip install -e .[all]

Or you can install from PyPI with:

pip install ai2-olmo-core

There are a number of optional dependencies that must be installed to use certain functionality as well, including:

The published Docker images contain all core and optional dependencies, and are regularly tested on our in-house H100 clusters. But there are several things to keep in mind if you intend to use these images:

  • They do not come with the OLMo-core package installed, only its dependencies, to accommodate for regular code changes.
  • They may not work on your own cluster if you have different hardware or driver/CUDA versions.

If the published images do not work for your use-case for any of the above reasons, you could adapt our Dockerfile to build your own images.

Training

Use Fizz training for recipes, presets, configuration overrides, evaluation, and local or torchrun DDP training. Tokenization, Hugging Face tools in src/scripts/huggingface/, and checkpoint tools in src/scripts/ complement that workflow. See checkpoint migration before loading older runs.

Inference

With Hugging Face Transformers

You can use our Hugging Face transformers integration to run inference on the OLMo checkpoints:

pip install transformers>=4.57.0
from transformers import AutoModelForCausalLM, AutoTokenizer
olmo = AutoModelForCausalLM.from_pretrained("allenai/Olmo-3-1125-32B")
tokenizer = AutoTokenizer.from_pretrained("allenai/Olmo-3-1125-32B")
message = ["Language modeling is "]
inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)
# inputs = {k: v.to('cuda') for k,v in inputs.items()} # optional verifying cuda
# olmo = olmo.to('cuda')
response = olmo.generate(**inputs, max_new_tokens=100, do_sample=True, temperature=1.0, top_p=0.7)
print(tokenizer.batch_decode(response, skip_special_tokens=True)[0])

Alternatively, with the Hugging Face pipeline abstraction:

from transformers import pipeline
olmo_pipe = pipeline("text-generation", model="allenai/Olmo-3-1125-32B")
print(olmo_pipe("Language modeling is"))

With vLLM

vLLM provides high-throughput inference for OLMo models. You can use it for offline batched inference:

pip install vllm>=0.11.0
from vllm import LLM, SamplingParams
llm = LLM(model="allenai/Olmo-3-1125-32B")
sampling_params = SamplingParams(temperature=1.0, top_p=0.7)
prompts = ["Language modeling is"]
outputs = llm.generate(prompts, sampling_params)
for output in outputs:
    prompt = output.prompt
    generated_text = output.outputs[0].text
    print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")

For more details, see the vLLM documentation.

With Olmo-core (beta)

Autoregressive generation is supported directly in Olmo-core. Using this capability, we provide a chat-loop demo that can be used to interact with models in an interactive chat session:

python -m olmo_core.generate.chat https://olmo-checkpoints.org/ai2-llm/Olmo-3-1025-7B/stage3/step11921/ --max-new-tokens 512

Evaluation

Additional tools for evaluating OLMo models are available at the OLMo Eval and olmes repositories.

Development

The Python library source code is located in src/olmo_core. The corresponding tests are located in src/test. The library docs are located in docs. You can build the docs locally with make docs.

Code checks:

  • We use pytest to run tests. You can run all tests with pytest -v src/test. You can also point pytest at a specific test file to run it individually.
  • We use isort and black for code formatting. Ideally you should integrate these into your editor, but you can also run them manually or configure them with a pre-commit hook. To validate that all files are formatted correctly, run make style-check.
  • We use ruff as our primary linter. You can run it with make lint-check.
  • We use mypy as our type checker. You can run it with make type-check.

Citing

@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},
}