OLMo-2: reordered (post) normalization and a loader-clobber root-cause
Ran Tao (Octoryn Research)
摘要
An independent dense-engine port of OLMo-2-1B (AllenAI) validates its departures from a standard pre-norm block: no input normalization, reordered post-normalization on sublayer outputs before they rejoin the residual, and full-dimension QK-normalization. Against a recent Hugging Face transformers reference, f16 prefill-logit parity reaches min cosine 0.999998 with argmax 12/12; an int8 path (0.998700) is reported, not claimed equal to f16. A loader bug that overwrote the MLP-norm slot was rooted and fixed by a model-specific guard. Correctness smoke test only; no quality or throughput claim.
本 Research Object 以其原始语言(英文)发表。
1. Contribution
Claimed. An independent dense-inference-engine port of OLMo-2-1B (AllenAI), implemented without a vendor BLAS dependency, reproduces a recent Hugging Face transformers f16 prefill-logit reference at min cosine 0.999998, argmax 12/12 on an RDNA2-class AMD GPU, given identical token ids. The port correctly implements OLMo-2's three architectural departures from the standard pre-norm Llama-style block: (a) reordered / post-normalization — there is no input normalization; the raw residual feeds the attention and MLP projections, and the post-attention and post-feedforward normalizations are applied to the sublayer OUTPUTS before they are added back to the residual; (b) full-dimension QK-normalization (RMSNorm over the whole Q/K projection, NOT per-head). A second, engineering-level contribution is the identification and fix of a loader-clobber root cause: the engine's generic weight loader overwrote the MLP normalization with the post-attention normalization, corrupting the forward pass until a model-specific guard was introduced.
NOT claimed. This is a correctness-validation result, not a novel algorithm and not a benchmark-scale evaluation. It does NOT claim generation quality, decode/throughput performance, or any wall-clock figure. It does NOT claim parity for larger OLMo-2 variants, nor that the int8 path (measured cosine 0.998700) matches f16. The reordered-norm and QK-norm mechanisms are OLMo-2's own design, not contributions of this work; the contribution is the faithful independent reproduction plus the root-cause fix.
2. Methods
| Field | Value |
|---|---|
| Model | OLMo-2-1B (AllenAI) |
| Hardware | RDNA2-class AMD GPU (16 GB) |
| Stack | Dense inference engine, no vendor BLAS dependency |
| Oracle / baseline | A recent Hugging Face transformers release |
| Procedure | Direct HF-logits parity: identical token ids fed to engine and oracle; compare per-position logit vectors |
| Precision | f16 (primary); int8 (secondary, reported only) |
| Metric + gate | Per-position cosine similarity vs oracle; argmax match count; cosine gate (>=0.999) as used in the parity harness |
| Stimulus / inputs | Parity prompt(s) yielding 12 compared token positions; exact prompt text not recorded in source notes |
3. Results
| Quantity | Value |
|---|---|
| f16 min cosine vs reference | 0.999998 |
| f16 argmax matches | 12/12 |
| int8 cosine | 0.998700 |
| Regression families re-checked | Qwen3 / Phi-3 / Qwen2.5 (no regression) |
| BLAS dependency | None (independent linear-algebra path) |
4. Ablations / Negative controls
The source records the loader-clobber bug as a before/after observation rather than a controlled ablation: with the generic loader overwriting the MLP normalization, the forward pass is wrong; after introducing the model-specific guard, parity reaches min cosine 0.999998 / argmax 12/12. This is the closest thing to a negative control available, but it is a bug-fix delta, not a systematically swept ablation of each architectural feature (reordered-norm, full-dim QK-norm) in isolation. No per-feature force-off ablation is recorded.
5. Threats to validity / Limitations
- Sample size. Parity covers 12 token positions (a single small set of prompt positions). This is a correctness smoke test, not a benchmark-scale evaluation. A high cosine across 12 positions does not establish behavior across long contexts, diverse prompts, or rare token paths.
- Parity is not quality. Logit cosine and argmax match against an oracle measure the numerical faithfulness of one forward pass. They say nothing about end-to-end generation quality, coherence, or task accuracy.
- No throughput / single forward. No decode rate, latency, or variance is measured. There is no multi-run statistic; the reported numbers are point measurements.
- Precision ceiling. The engine's highest precision here is f16; there is no f32 reference forward inside the engine, so the irreducible f16 ULP noise floor bounds achievable cosine. The int8 path (0.998700) is reported but explicitly NOT claimed to match f16.
- Scope. Claims are bounded to OLMo-2-1B on the tested RDNA2-class GPU versus a recent
transformersrelease. Larger OLMo-2 variants, other hardware, and other reference versions are untested. - Ablation rigor. The root-cause fix is validated as a before/after bug delta, not as an isolated per-feature ablation; the load-bearing role of reordered-norm vs full-dim QK-norm individually is not separately demonstrated.
- Oracle trust. Results assume the reference release loads OLMo-2 weights correctly; the oracle was not independently re-validated beyond version pinning.
- evidenceLevel. Retained as "experimental"; given the 12-position sample this is a correctness-validation experiment, not a broad empirical study — readers should weight it accordingly.
6. Reproducibility / Provenance
- Oracle pin: a recent Hugging Face
transformersrelease (specific version pinned internally). - Hardware: RDNA2-class AMD GPU (16 GB).
- Fix locus (high level): the generic weight loader is guarded by a model-specific check so OLMo-2's reordered normalizations load into the correct slots and the MLP normalization is no longer overwritten.
- Independence check: the runtime links only the AMD HIP runtime plus system libraries — no vendor BLAS / DNN math library.
- Validate the oracle first: confirm the pinned reference actually loads the OLMo-2 weights (not random-init) before trusting parity numbers.
- Build / run: compiled with a standard HIP compiler toolchain targeting the RDNA2 architecture; exact harness invocation not recorded in source notes.
声明边界
作者对范围的明确界定——本工作证明了什么、未证明什么——沿用自 Octoryn Research 的发表模型。
证明
- An independent port of OLMo-2-1B with reordered post-normalization and full-dimension QK-normalization reproduces a recent Hugging Face transformers f16 reference at min cosine 0.999998 with argmax matching on all 12 compared token positions.
- A generic-weight-loader root cause that overwrote the MLP normalization slot was identified and fixed via a model-specific guard, restoring forward-pass correctness.
未证明
- Generation quality, coherence, task accuracy, or throughput.
- Parity for larger OLMo-2 variants.
- That the int8 path (0.998700) matches f16.
- Behavior beyond the 12-position correctness smoke test, including long contexts, diverse prompts, or rare token paths.
适用于
- f16 prefill-logit parity for OLMo-2-1B on a single RDNA2-class AMD GPU versus a recent Hugging Face transformers reference, with identical token ids fed to both.
- A correctness-validation comparison of per-position logit vectors is the goal.
不适用于
- Quantized, generation-quality, or throughput claims are required.
- Other model families, other hardware classes, or other reference-library versions are in scope.
- Benchmark-scale or long-context evaluation is required.
作者
- Ran Tao — 调查研究, 写作
引用本文
引用格式
Tao, R., Octoryn Research. (2026). OLMo-2: reordered (post) normalization and a loader-clobber root-cause (TR-2026-0015). Octopus Research Institute.
BibTeX
@techreport{oritr20260015,
title = {OLMo-2: reordered (post) normalization and a loader-clobber root-cause},
author = {Tao, Ran and {Octoryn Research}},
institution = {Octopus Research Institute},
year = {2026},
note = {Permanent ID TR-2026-0015. Not peer reviewed.}
}披露
- 资助
- 硬件与基础设施由 Octoryn / Octopus Core Pty Ltd 提供。
- 利益冲突
- Octoryn 提供商业推理与治理工具;相关发现独立报告。
