TL;DR
Most "open" language models release only their weights and inference code. OLMo released everything needed to study how a 7 billion parameter model is built: the pretraining corpus Dolma, the training and evaluation code, training logs, and hundreds of intermediate checkpoints. The 7B model is competitive with other models of its size on eight zero-shot tasks, and the release lets other researchers rerun, inspect and change each stage. The aim is to make language model research a science that others can check.
Builds on: Transformer, AdamW Optimizer, Perplexity, Rotary Position Embedding, Gated Linear Unit (GLU) · Leads to: Instruction Tuning (the paper's chat variant is built by instruction tuning and preference training on the released base model)
Why it mattered
The paper's argument is that the most powerful models had become closed. Their training data, architectures and development details were undisclosed, which made it hard to study their biases and risks. OLMo's answer was to release the whole pipeline under a permissive Apache 2.0 license, not only the final weights. The paper lists the artifacts: training and modeling code, weights for the 7B model, a second 7B model trained on 2T tokens and a 1B model, more than 500 intermediate checkpoints saved every 1000 steps, the metrics logged during training, the Dolma corpus with tools to rebuild its order, and the adaptation code and data.
The release also made some research questions answerable that were hard before. Because the training data and the data order can be reconstructed, a researcher can ask how a specific document affected a specific checkpoint. Because the checkpoints are public, a researcher can compare learning curves across models that release them, such as Pythia-6.9B and RPJ-INCITE-7B, which the paper does in its perplexity analysis.
The paper also records lessons from training at this scale, and states that the paper's authors had already improved the data and training setup after the first release. The conclusion reports that MMLU scores improved by 24 points, to 52 percent, after that change.
The problem
Before OLMo, a team that wanted to study a language model had three choices. It could use a closed model, where the data and training recipe were hidden. It could use a model that released weights only, where the data and training were unknown. Or it could use one of the most open models, such as the Pythia suite or BLOOM, which released training code, checkpoints and data.
The paper names the gap: the most capable open models did not come with the data, the code, the checkpoints and the logs together. Without them, a researcher cannot check claims about training data, cannot tell whether a score is inflated by overlap with an evaluation set, and cannot watch how the model changed over training. OLMo sets out to close that gap while staying competitive in quality.
How it works
The pipeline runs in this order: data, tokenizer, model, optimizer, checkpoints, and then evaluation during and after training.
flowchart LR D[Dolma corpus] --> T[Tokenize and concatenate documents] T --> B[Chunks of 2048 tokens, shuffled] B --> M[Decoder-only transformer] M --> L[Next-token loss] L --> O[AdamW step with warmup, decay and clipping] O --> C[Checkpoint every 1000 steps] C --> E[Downstream and perplexity evaluation]
- Start from the corpus. The training set is a 2 trillion token sample of Dolma, the paper's open corpus. Dolma is built by language filtering, quality filtering, content filtering, deduplication, mixing of sources, and tokenization. Its sources include web pages, code, papers, books and encyclopedia text.
- Tokenize and join documents. Each document is turned into tokens with a byte-pair tokenizer (the GPT-NeoX-20B tokenizer, with extra tokens for masking personal identifiers). An end-of-sequence token is added after each document, and all documents are joined into one long stream. Tiny case: with chunks of 4 tokens, the documents "A B" and "C D" become the stream A, B, end, C, D, end, and the chunks are [A, B, end, C] and [D, end, ...].
- Cut and shuffle. The stream is cut into chunks of 2048 tokens. The chunks are shuffled in the same order for every run, so the data order can be rebuilt from the released artifacts.
- Run the model. Each chunk goes through a decoder-only transformer. OLMo changes the standard transformer in a few ways. It has no bias terms, it uses non-parametric layer normalization, it uses the SwiGLU activation, and it uses rotary position embeddings instead of absolute position embeddings.
- Score the next token. The loss is the average negative log probability of each next token. Recall Perplexity: it is the exponential of that average, so the same loss can be read as an effective count of choices.
- Update the weights. AdamW updates the weights. For the 7B model the learning rate warms up over the first 5000 steps and then decays linearly to a tenth of its peak. (Table 1 lists 2000 warmup steps for the 1B model.) After warmup, the gradient is clipped so that its total length is at most 1.0.
- Save and test. A checkpoint is saved every 1000 steps. Every 1000 steps the model is also evaluated on the core tasks, so the team can choose designs by watching the curves.
- Adapt. For a chat version, the released base model is instruction tuned on a mix of instruction data, and then trained with direct preference optimization on preference pairs.
The math
Step 4 in symbols: the layer
Layer normalization here has no learned gain or bias. For a feature vector x of length d, let mu and sigma be its mean and standard deviation across the d features. The normalized output is
The activation is SwiGLU, from Shazeer's GLU variants. With two weight matrices W and V and the Swish function, which is z times the sigmoid of z,
where the symbol that looks like a circle with a dot is the elementwise product. Its output is half the width of its input, so the paper doubles the width before the gate: the input to SwiGLU is 22,016 for the 7B model, which gives an output of 11,008. The hidden size is set near 8/3 times the model width d and then rounded to the closest multiple of 128. With d = 4096, the rule gives about 10,923 before rounding and 11,008 after, the value the paper reports for 7B.
Step 6 in symbols: the learning rate and clipping
Let eta_max be the peak learning rate and t the step. The warmup phase, with 5000 steps for 7B, is
After warmup the rate decays linearly to a tenth of the peak by the end of training, which takes T steps. Gradient clipping treats all parameters as one long vector g. If its length is above 1.0, it is scaled down to length 1.0:
This keeps the direction of the update and caps its size, so a single spike cannot move the weights far.
Step 5 in symbols: perplexity and bits per byte
Perplexity is the exponential of the average loss per token. Because different models use different tokenizers, the paper reports bits per byte instead. If a test set has L total bytes in UTF-8 and the model assigns total negative log likelihood N_bits in bits, then
This is comparable across tokenizers because it divides by bytes, not tokens.
Results
The paper's numbers, copied from its text and tables:
- Core downstream tasks. Zero-shot accuracy on eight tasks (ARC easy and challenge, BoolQ, OpenBookQA, SciQ, HellaSwag, PIQA and WinoGrande). OLMo-7B, at the 2.46 trillion token checkpoint, averages 69.3. LLaMA-7B averages 69.6, Llama 2 7B 70.5, Falcon-7B 70.3, MPT-7B 69.8, RPJ-INCITE-7B 66.6 and Pythia-6.9B 63.0. The paper calls OLMo-7B competitive on aggregate.
- Smaller model. OLMo-1B averages 60.4, above Pythia 1B (54.5) and TinyLlama 1.1B (59.4). StableLM 1.6B averages 66.5, but the paper notes it is larger and trained on unknown data.
- Learning curves. Most tasks rise as training goes on. A sharp upward tick in many tasks between the last two checkpoints shows the benefit of linearly reducing the learning rate to zero over the final 1000 steps.
- Perplexity. On the Paloma benchmark, which has 585 domains from 18 sources, the paper reports bits per byte on 11 sources. OLMo-7B is decontaminated against Paloma, meaning documents with paragraphs that leak Paloma test text were removed. The paper argues that without decontamination, other models can underestimate their perplexity. OLMo-7B overtakes the other models on web-like data such as C4, which the paper suggests may come from its training mix being 88.8 percent Common Crawl, and it is less sample-efficient on on sources such as WikiText-103 and Wikipedia-like text.
- Adaptation. After instruction tuning and DPO, OLMo-7B improves on MMLU, ToxiGen and TruthfulQA. It outperforms most other chat models of its size in the paper's comparison, but remains behind Tülu 2 trained on Llama 2. The paper suggests the gap may come from test-set contamination in Llama 2 and from the Tülu mix being designed mainly for Llama models.
Limits. The 7B results are on one data mix and one budget of 2.46 trillion tokens. The core evaluation is zero-shot on eight tasks. The paper notes that data-scaling trends differ between sources, and that sample efficiency is weakest on curated text such as Wikipedia and papers. The adaptation comparisons depend on the post-training mix.
Reading guide
- Section 1, Introduction. Read after Transformer. It states the openness goal and the release list. The model size table is worth reading next to the architecture section.
- Section 2.1, Architecture. Needs Layer Normalization, Rotary Position Embedding and Gated Linear Unit (GLU). The list of five changes is a list of design choices, each explained by a related model family.
- Section 2.2, Dolma. Needs Subword Tokenization for the tokenizer. The filtering and deduplication steps are data engineering and can be read for their purpose.
- Section 2.4, Evaluation. Needs Perplexity for the intrinsic evaluation. Zero-shot ranking of answers is explained in Section 4.1 and needs no earlier lesson.
- Section 3, Training. Needs AdamW Optimizer, Learning Rate and Gradient Norm Clipping. Section 3.1 uses ZeRO: Memory optimizations Toward Training Trillion Parameter Models for sharding and Mixed-Precision Training for bfloat16.
- Section 4, Results. Only the comparisons need care; read the tables with the model sizes in mind.
- Section 2.3 and 4.3, Adaptation. Needs Instruction Tuning and Direct Preference Optimization. The comparisons are against Llama-family models such as LLaMA: Open and Efficient Foundation Language Models.
Check yourself
QuestionWhat does the paper release that most earlier open models did not, and why does the paper say that matters for science?Show answer
The paper releases the whole pipeline: the Dolma pretraining data, the training and evaluation code, training logs, and more than 500 intermediate checkpoints. Earlier open models often released only weights and inference code. With the full pipeline, researchers can check which data a model saw, reproduce the training, and study how the model changed over training, which the paper says is needed to study biases, risks and the effect of data.
QuestionA model uses a SwiGLU layer with input width 22,016. What is the output width, and why?Show answer
The output is 11,008. SwiGLU is a gated activation: it computes two halves of the input, multiplies them elementwise, and so produces a vector half the size of its input. Twenty-two thousand and sixteen divided by two is 11,008.
QuestionWarmup runs for 5000 steps, and the peak learning rate is 3.0 times ten to the minus four. What is the learning rate at step 2500, under the linear warmup rule?Show answer
At step 2500 the rate is the peak times 2500 divided by 5000, which is one half of the peak. So the learning rate is 1.5 times ten to the minus four.
QuestionThe paper says that for some sources OLMo-7B is less sample-efficient than other models. Why is it fair to compare models on bits per byte rather than on perplexity per token, and what does a lower bits-per-byte score mean?Show answer
Models with different tokenizers split the same text into different numbers of tokens, so token-level perplexity is not directly comparable. Bits per byte divides the total information needed to code the test set by its number of bytes, which is the same for every model. A lower value means the model predicts the test text with fewer bits per byte, so it fits that text better.
Sources
- Groeneveld et al., OLMo: Accelerating the Science of Language Models, 2024. https://arxiv.org/abs/2402.00838
- Loshchilov and Hutter, Decoupled Weight Decay Regularization (AdamW), 2019. https://arxiv.org/abs/1711.05101
- Shazeer, GLU Variants Improve Transformer, 2020 (SwiGLU). https://arxiv.org/abs/2002.05202