Skip to content

Language models, retrieval, prompting, and language adaptation · Autoregressive and open-weight model families · LNG043 · Model

OLMo model family

Emphasizes transparent language-model development through released artifacts and technical reports, making the family useful for studying training and reproducibility. The OLMo 2 report is an anchor;

Runs as a notebook Complete calculation CodeSplash's own run

In CodeSplash

No method yet, but the reference's example runs here as a notebook.

Do it in CodeSplash Open the reference's example as a Python or R notebook.

Availability
Runs as a notebook
Code example
Complete calculation
Who ran it
CodeSplash's own run
CodeSplash's run
The reference's example ran in Python and R here, and they agree.
The reference's record
Python: The chapter's authors report running it; there is no record for this entry alone. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

Emphasizes transparent language-model development through released artifacts and technical reports, making the family useful for studying training and reproducibility. The OLMo 2 report is an anchor; different stages and variants remain grouped.

Question / objective

Can released training artifacts support a more reproducible study of language-model development?

Architecture / computational structure

A documented causal decoder is accompanied by training stages, data recipes, and released artifacts where available. Learned checkpoint weights are parameters; corpus, schedule, optimizer, and checkpoint stage define the experiment.

Assumptions

Open artifacts improve auditability but do not automatically remove copyright, bias, contamination, or privacy concerns in source data.

Formula / computational definition

Ls(θ)=Ex∼Ds[−log⁡pθ(x)]for training stage s.\mathcal L_s(\theta)=\mathbb E_{x\sim D_s}\left[-\log p_\theta(x)\right]\qquad\text{for training stage }s.

Base training minimizes next-token loss over curated corpora. Training-stage changes alter data distributions, optimization schedules, and consequently the effective objective encountered along the learning trajectory.

Parameters and notation

Learned parameters: identified in the architecture subsection. Hyperparameters, design and inference choices: Checkpoint stage, corpus mixture, learning-rate schedule, optimizer settings, context length, tokenizer, and any subsequent instruction tuning.

Fitting, fine-tuning, and adaptation

Select the correct stage and tokenizer, then use the official recipe for continued training or supported adapters/SFT for adaptation. Preserve configuration and data provenance. Validate loss by domain, benchmark contamination, reproducibility, and capability retention rather than equating openness with automatically unbiased data.

How to use and calibrate

Compare learning curves, held-out loss by domain, benchmark robustness, training stability, and the availability of enough artifacts to reproduce reported steps. Use development data for settings and an independent test set for the final estimate. Report uncertainty across examples or seeds when the evaluation design supports it; model scores and self-assessments are not automatically calibrated probabilities of correctness.

Example application

Study how a domain-data mixture changes language-model loss and downstream behavior.

Interpretation / pitfalls

Watch out

Reproduction still depends on substantial compute and exact data processing. The code below isolates one stated component; successful execution does not validate model quality or reproduce the cited experiment.

Python and R code examples

Full implementation route: Use the official OLMo repository for training details and documented Transformers integrations for supported inference checkpoints. R bridges Python with reticulate; the native example summarizes domain-weighted loss rather than purporting to reproduce a training run.

Example scope: Domain-weighted evaluation of two OLMo-style training checkpoints; not published measurements.

Dependencies: Python 3 standard library; base R; shared setup above. No model downloads or external services.

Validation: Python component executed in the combined example script; R counterpart supplied but not runtime-tested here. All numbers are synthetic.

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Complete calculation — Domain-weighted evaluation of two OLMo-style training checkpoints; not published measurements.

Shared setup for this chapter
import math

def softmax(xs):
    m = max(xs)
    es = [math.exp(x-m) for x in xs]
    return [e/sum(es) for e in es]

def dot(a, b):
    return sum(x*y for x, y in zip(a, b))

def matvec(matrix, vector):
    return [dot(row, vector) for row in matrix]

def meanvec(rows):
    return [sum(row[j] for row in rows)/len(rows) for j in range(len(rows[0]))]

def sigmoid(x):
    return 1/(1+math.exp(-x))

def nll(probabilities):
    return -sum(math.log(p) for p in probabilities)
weights = [0.6,0.4]
losses = {"stage_a": [1.8,2.1], "stage_b": [1.6,2.2]}
print({name: dot(weights,values) for name,values in losses.items()})
R

Complete calculation — Domain-weighted evaluation of two OLMo-style training checkpoints; not published measurements.

Shared setup for this chapter
softmax <- function(x) {
  shifted <- exp(x-max(x))
  shifted/sum(shifted)
}
weights <- c(0.6,0.4)
losses <- rbind(stage_a=c(1.8,2.1), stage_b=c(1.6,2.2))
print(drop(losses %*% weights))

Sources

From the CodeSplash reference, entry LNG043.