What Is an AI Factory? Power In, Tokens Out
An AI factory is a fixed power and cooling budget converted into model output. This explainer maps its four parts and the throughput-per-watt trade-offs that connect them.
GoogleGagik Amirkhanyan, Ran Ran, Aireen Mei, Matt Davidow, TPU Inference Software Engineering Team, Google Cloud, AI2 TeamProblem & solution
The post describes the reproduction of AI2’s OLMo 3 7B pre-training using MaxText on Google Cloud TPUs, covering both stages, matching the reference loss curve and held-out metrics. PyTorch weights were converted to JAX with logit parity, KL divergence 1.5e-3 and 98.75% top-1 agreement, and held-out evaluations caught a data loader bug that made incorrect gains appear. The run demonstrated reliability via exact checkpoint-resume with zero loss delta, resilience to a 75% capacity loss via resize with 1% throughput preservation, and seamless TPU generation change. Performance optimizations achieved 44.5% MFU on Ironwood, and head reshaping from 32 heads by 128 to 16 by 256 yielded 12.4% faster throughput at identical parameters and FLOPs. The post emphasizes that faithful reproduction requires verification on generalization metrics and provides instructions for readers to reproduce the run with open sourced code.
AI2’s OLMo 3 7B is a fully open language model with open weights, data, and training recipe. The team used MaxText, a JAX/XLA LLM training framework, to reproduce it on Google Cloud TPUs as a validation of the stack against a PyTorch/GPU reference.
The team converted AI2’s step-0 PyTorch weights to JAX Orbax format, implemented the OLMo 3 architecture (reordered norm, QK-norm, 3:1 sliding/global attention) in MaxText, built the olmo_grain data pipeline matching AI2’s tokenization and repetition filter, and ran stage 1 on Ironwood TPUs with the same recipe but a single cosine LR schedule and the public data mix. They verified with logit-parity checks and held-out evals. For stage 2, they used the same launcher on v5p with a warm-Adam init and Dolmino index. The system handled a resize from 512 to 128 devices and preemption with exact resume.
Verification on held-out evaluation metrics caught a data-loader bug that made incorrect gains appear, highlighting the importance of generalization checks over training loss alone.
Checkpoint-resume in MaxText was proven exact, with a controlled A/B test showing zero loss delta at every step after resume, and surviving a host failure during stage 2.
A head-reshaping from 32 heads x 128 head dim to 16 x 256, at identical parameters and FLOPs, yielded 12.4% faster throughput because the larger head dim fully utilizes Ironwood’s 256 x 256 MXU.
The converted step-0 checkpoint matched the HuggingFace reference at KL ≈ 1.5e-3, the 'same model, different framework' noise floor, and at full 8192-token context in bfloat16 the two agreed on the top-1 token 98.75% of the time.
Checkpoint-resume replays the run exactly; a controlled A/B shows Δ = 0.000 at every step after resume, and when a host failure killed the stage-2 run mid-flight, the resumed run re-trained 127 steps at Δ = 0.000 in logged loss and perplexity.
Reshaping heads from 32 heads x head-dim 128 to 16 x 256, at identical parameters and FLOPs, ran 12.4% faster because head-dim 256 fully utilizes Ironwood's 256x256 MXU, and its loss curve matched the original through 120B tokens (30k steps).
Summaries are generated from the original by a language model. Check the original before relying on it.
See the idea
An AI factory is a fixed power and cooling budget converted into model output. This explainer maps its four parts and the throughput-per-watt trade-offs that connect them.
Keep reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
One useful email. Unsubscribe anytime.