Olmicro is a fully open, controlled suite of five hybrid base language models from Ai2, from 275M to 2.7B parameters, released with every intermediate checkpoint. This repository has the code to train, resume, evaluate, convert and run them. For the models themselves (architecture, data, hyperparameters and evaluations), see the tech report.
Paper · Models · Evaluations
Five base models, three training stages each, 1,707 checkpoints in all (collection, details).
| Model | Hugging Face weights (every checkpoint a branch) | Olmo-core training checkpoints (with optimizer state) |
|---|---|---|
| Olmicro 275M | allenai/olmicro-275m-base | allenai/olmicro-275m-base (bucket) |
| Olmicro 450M | allenai/olmicro-450m-base | allenai/olmicro-450m-base (bucket) |
| Olmicro 810M | allenai/olmicro-810m-base | allenai/olmicro-810m-base (bucket) |
| Olmicro 1.4B | allenai/olmicro-1.4b-base | allenai/olmicro-1.4b-base (bucket) |
| Olmicro 2.7B | allenai/olmicro-2.7b-base | allenai/olmicro-2.7b-base (bucket) |
Every checkpoint is a branch of the model repo, stage<k>-step<7-digit step> (1 = pretraining, 2 = midtraining,
3 = long-context extension), and a folder of the bucket, stage<k>/checkpoints/step<7-digit step>/. main is the final
long-context extension checkpoint.
Inference with transformers (no install from this repo needed):
pip install "torch==2.11.0" "transformers>=5.12,<5.16" "flash-linear-attention==0.5.2"
uv venv --python 3.12 && source .venv/bin/activate
uv pip install "torch==2.11.0" "transformers>=5.12,<5.16" "flash-linear-attention==0.5.2"
python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "allenai/olmicro-1.4b-base"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).to("cuda")
inputs = tok("The capital of France is", return_tensors="pt").to("cuda")
print(tok.decode(model.generate(**inputs, max_new_tokens=20)[0]))
Pass revision="stage1-step0100000" (any branch name) to from_pretrained to load an intermediate checkpoint.
flash-linear-attention provides the fast Gated DeltaNet kernels; without it, the model falls back to a much slower
PyTorch path. From a clone of this repository (see below), uv run scripts/inference/hf_generate.py allenai/olmicro-1.4b-base "The capital of France is" does the same.
To train, resume, convert checkpoints or use the other scripts, set up this repository's environment with uv:
git clone https://github.com/allenai/olmicro && cd olmicro
uv sync
This creates .venv with everything needed to train, resume from a released checkpoint, run inference with
transformers and convert checkpoints. A few features need extra packages that uv sync does not install:
| To | Install |
|---|---|
| run inference with vLLM | uv pip install --python .venv/bin/python ./plugins/vllm_plugin (vLLM 0.25 and the vLLM plugin) |
| train with FlashAttention 2 on A100 / Ampere GPUs | uv pip install --python .venv/bin/python flash-attn --no-build-isolation (compiles against the installed torch; needs the CUDA toolkit) |
| train with FlashAttention 3 on H100 / Hopper GPUs | no wheel: build it from the hopper/ directory offlash-attention into.venv |
| train with FlashAttention 4 on B200 / B300 / Blackwell GPUs | uv pip install --python .venv/bin/python "flash-attn-4[cu13]==4.0.0b19" "quack-kernels==0.5.3" |
run downstream evals during training ( --downstream-evals ) |
uv pip install --python .venv/bin/python ai2-olmo-eval==0.9.0 |
log training to W&B ( --wandb-project ) |
uv pip install --python .venv/bin/python "wandb<0.29" |
Training uses the FlashAttention version for your GPU if it is installed, and PyTorch SDPA otherwise (the same model, slightly different numerics). Install only the one for your GPU.
When adding packages:
- Keep
--python .venv/bin/python: without it,uv pip installinstalls into any virtualenv or conda environment that is active in your shell instead of.venv. If you setUV_PROJECT_ENVIRONMENT, point--pythonat that environment instead. - A later
uv syncremoves these packages again; useuv sync --inexactto keep them. - vLLM and FlashAttention 4 can't share an environment (their
apache-tvm-ffipins conflict, and training then fails at the first step). Use a separate clone or environment for each. - The pins matter: newer quack-kernels crash FlashAttention 4's backward pass, and wandb 0.29+ fails at the end of every run with Olmo-core 2.6.0.
To reproduce the released evaluations you need none of these: scripts/eval/olmo_eval/run.py sets up olmo-eval in
its own environment.
Run from the repository root. Training commands use 8 GPUs; see training for other counts.
uv run scripts/inference/vllm_generate.py allenai/olmicro-1.4b-base "The capital of France is"
uv run scripts/download_checkpoint.py --size 275m --stage 1 --step final --out ckpts/275m-s1-final
uv run scripts/convert/convert_olmo_core_to_hf.py ckpts/275m-s1-final hf/275m-s1-final
uv run torchrun --nproc-per-node 8 scripts/train/pretrain.py --size 275m --save-folder runs/275m-s1
uv run torchrun --nproc-per-node 8 scripts/train/pretrain.py --size 275m --save-folder /tmp/smoke --no-evals \
'--trainer.hard_stop={value: 10, unit: steps}'
uv run torchrun --nproc-per-node 8 scripts/train/midtrain.py --size 275m --save-folder runs/275m-s2 \
--load-path ckpts/275m-s1-final
uv run scripts/download_checkpoint.py --size 275m --stage 1 --step 100000 --out ckpts/275m-s1-step100000
uv run torchrun --nproc-per-node 8 scripts/train/pretrain.py --size 275m \
--save-folder runs/275m-s1-from-100k --resume ckpts/275m-s1-step100000
uv run scripts/eval/olmo_eval/run.py allenai/olmicro-1.4b-base
Details: checkpoints, training (including resuming), evaluation, inference and conversion.
All training data is read from the public mirror https://olmo-data.org (no credentials needed). The training
data is licensed under ODC-BY 1.0. It is intended for research and educational use in accordance with
Ai2's Responsible Use Guidelines.
- Pretraining is reproducible from public data: the same data in the same order, and the same hyperparameters and seeds. Resuming from a released checkpoint reproduces the logged loss step by step: per-step differences are about 1e-3 over the first 100 steps (about 4e-2 if the batches differ), with no drift over 1,000 steps. Results are not bitwise identical across GPU types, attention kernels or GPU counts. From scratch, the initial weights depend on the GPU type and sharding, so they match in distribution rather than bit for bit.
- Midtraining and long-context extension use the runs' hyperparameters, seeds and token budgets on public data:
- Midtraining runs on Olmo Hybrid's public midtraining data, which for 275m, 450m and 2.7b is exactly the data our runs used (fingerprints match). For 810m and 1.4b, 0.18% of the tokens differ.
- Long-context extension runs on Olmo Hybrid's public long-context mix (a different sample from our runs, whose exact data is not public).
Details: training. The checks behind these statements (configs, data fingerprints,
initialization, loss, conversion parity) and the provenance of every run (commits, hardware, restarts) are on the
testing branch.
src/olmicro/ recipes (per size x stage hyperparameters), model and data configs, checkpoint helpers
scripts/train/ pretrain.py, midtrain.py, long_context.py (torchrun; --dry-run prints the full config)
scripts/eval/ olmo-eval template (the released evals' setup)
scripts/inference/ transformers and vLLM generation
scripts/convert/ olmo-core -> transformers checkpoint conversion
plugins/ transformers and vLLM plugins (see below)
docs/ checkpoints, training, evaluation, inference
The models use the olmicro architecture, which is not in transformers or vLLM yet. Until it is:
- transformers : each model repo ships its modeling code, so
trust_remote_code=Trueis enough.plugins/transformers_pluginregisters the same code with theAuto*classes and holds the Olmo-core -> HF weight converter. - vLLM :
plugins/vllm_pluginregisters the architecture with stock vLLM. It is a standalone package, not part ofuv sync(to install it, seeQuickstart ). It also needstransformers_plugin, whichuv syncalready installs; in another environment, install both at the same git ref (see its README).
Both are bridges: once upstream support lands, the plugins (and their class names) may change.
The code is licensed under Apache 2.0 (see LICENSE); third-party components are listed in THIRD_PARTY_NOTICES.md. The Olmicro models are licensed under Apache 2.0. They are intended for research and educational use in accordance with Ai2's Responsible Use Guidelines.
@techreport{samaga2026olmicro,
title = {{Olmicro}: Scaling Down to Accelerate the Science of Language Models},
author = {Yashas Samaga and Saumya Malik and Malia Morgan and Jacob Morrison and Tyler Murray and Michael Noukhovitch and Jackson Petty and Noah A. Smith and William Merrill},
institution = {Allen Institute for AI},
year = {2026},
month = nov,
url = {https://allenai.org/papers/olmicro}
}