OLMoE: the first sparse-MoE in a dense sovereign engine (and an eps trap)
Ran Tao (Octoryn Research)
摘要
First hand-written sparse mixture-of-experts FFN (router top-8 of 64 experts, weighted SwiGLU sum, un-renormalized router weights) in a previously dense-only engine, validated by f16 prefill-logit parity vs a HuggingFace oracle for OLMoE-1B-7B on an AMD RDNA2 (gfx1030) GPU. It also isolates a load-bearing config trap: the config omits the RMSNorm epsilon, and an assumed value 10x too small capped parity near cosine 0.99 because the normalized signal variance was near epsilon; the correct value restored cosine 0.999999, argmax 8/8. A correctness result, not a throughput or benchmark evaluation.
本 Research Object 以其原始语言(英文)发表。
1. Contribution
Claimed. A hand-written, sovereign sparse mixture-of-experts FFN — a router selecting top-8 of 64 experts, each a SwiGLU, combined as a weighted sum with router weights used un-renormalized (no top-k renormalization) — reproduces OLMoE-1B-7B HuggingFace f16 prefill logits at cosine 0.999999, argmax 8/8 on an AMD RDNA2-class GPU (gfx1030). The result also isolates a load-bearing configuration trap: the model config omits the RMSNorm epsilon; the engine had assumed a value 10x smaller than the HuggingFace default. Because the embedding variance here (~9.5e-6) is comparable to epsilon itself, the 10x error inflated the RMSNorm output by ~1.36x and capped parity at cosine 0.99. Setting epsilon to the correct (larger) default restored cosine 0.999999. This is the first sparse-MoE family in an engine that previously had only dense FFNs.
NOT claimed. This is a correctness-validation (logit-parity) result, not a novel algorithm and not a performance result. It does NOT claim generation quality, MoE dispatch throughput, or any benchmark-scale evaluation. It does NOT claim parity for larger MoE models, many-expert routing at scale, or other MoE families. It does NOT claim that an 8-bit-quantized path matches f16 fidelity (the quantized path measured cosine 0.999341, separately). The epsilon finding is an engineering diagnosis specific to models whose normalized signal variance is near epsilon — not a general claim about all RMSNorm models.
2. Methods
| Field | Value |
|---|---|
| Model | OLMoE-1B-7B (AllenAI), sparse MoE, top-8 of 64 experts |
| Hardware | AMD RDNA2-class GPU (gfx1030, 16 GB) |
| Oracle / baseline | HuggingFace transformers (default RMSNorm epsilon), f16, identical token ids |
| Procedure | Direct HF-logit parity: feed identical ids, compare engine logits vs oracle by cosine + argmax |
| Precision | f16 (primary); an 8-bit-quantized path measured separately |
| Metric + gate | Cosine similarity and argmax match; correctness gate at high cosine (exact gate value not recorded in source notes) |
| Stimulus / inputs | Short coherent prompts yielding deterministic single-token answers; prompt count not recorded in source notes |
| Norm config | RMSNorm epsilon omitted from config; corrected to the HuggingFace default from an assumed value 10x too small |
| Sovereignty check | Dependency audit confirms only the vendor HIP runtime + system libraries (no third-party BLAS / DNN / math kernel libraries); router, expert dispatch, and weighted sum are hand-rolled |
3. Results
| Configuration | Metric | Value |
|---|---|---|
| f16, assumed (wrong) epsilon | cosine | 0.99 (capped) |
| f16, assumed (wrong) epsilon | RMSNorm output inflation | ~1.36x |
| f16, correct (HF default) epsilon | cosine | 0.999999 |
| f16, correct epsilon | argmax | 8/8 |
| 8-bit-quantized path | cosine | 0.999341 |
| Embedding variance (context for trap) | variance | |
| VRAM | f16 | 13.7 GB |
| VRAM | 8-bit-quantized | 7.3 GB |
| No-regression check | Qwen2.5, OLMo-2 | passed (no regression) |
4. Ablations / Negative controls
The epsilon comparison functions as a controlled ablation of the normalization epsilon:
| Variant | cosine | Interpretation |
|---|---|---|
| assumed (smaller) epsilon | 0.99 | wrong default; ~1.36x norm inflation, load-bearing |
| HF-default epsilon | 0.999999 | correct; parity restored |
This pairing demonstrates the epsilon is load-bearing here specifically because embedding variance (~9.5e-6) is comparable to epsilon.
5. Measured eps-sensitivity curve
To turn the "epsilon is load-bearing because embedding variance ~ epsilon" claim from an anecdote into a curve, a runtime override of the RMSNorm epsilon was added (mirroring an existing negative-control hook used elsewhere in the engine) and the epsilon was swept. Each run dumps the prefill last-position logits; cosine is taken against the HF-correct epsilon reference (itself validated at cosine 0.999999 vs the HF oracle). The relative-epsilon column is normalized so the HF-correct value is 1x. f16, OLMoE-1B-7B, single short prompt, RDNA2-class GPU, single run.
| relative epsilon | cosine vs HF-correct reference | argmax match |
|---|---|---|
| 0.01x | ~0.991 | yes |
| 0.1x (engine's original assumed value) | ~0.992 | yes |
| 0.3x | ~0.996 | yes |
| 1x (HF-correct reference) | 1.000000 | reference |
| 3x | ~0.989 | yes |
| 10x | ~0.867 | NO |
| 100x | ~0.850 | NO |
Findings. (1) A sharp peak at the correct epsilon. (2) The engine's original assumed value (0.1x of correct) gives cosine ~0.992, independently reproducing the original "~0.99" degradation and quantifying the cost of the 10x epsilon error. (3) The model tolerates a band of epsilon values for argmax stability (top-1 token preserved) but argmax breaks once epsilon is roughly an order of magnitude above the correct value (top-1 flips, cosine collapses to ~0.85-0.87). (4) The sensitivity is concentrated exactly in the regime where epsilon is comparable to the embedding variance, which is the mechanism: when the normalized signal's variance is near epsilon, epsilon stops being negligible. This is a measured sensitivity curve, not a single before/after point.
6. Threats to validity / Limitations
- Sample size is a correctness smoke test, not a benchmark. Parity rests on a small number of short prompts (exact count not recorded in source notes) over a handful of token positions, reported as argmax 8/8. This is a correctness signal, not a benchmark-scale evaluation of accuracy or capability.
- Parity is not quality. Cosine 0.999999 / argmax 8/8 validates that the engine reproduces oracle logits; it says nothing about end-to-end generation quality, long-context behavior, or downstream task performance.
- No variance / single configuration. Numbers are single-run point measurements; no repeated trials or variance are reported. VRAM figures are single observations.
- Precision ceiling. f16 is the highest precision path reported; the 8-bit-quantized path (cosine 0.999341) is honestly lower fidelity and is not claimed to match f16.
- Scope of the epsilon finding. The epsilon trap generalizes only to models whose normalized-signal variance is near epsilon; it is not a universal claim about RMSNorm.
- Baseline weakness. The oracle is HuggingFace transformers at an unrecorded recent version; the source does not pin the version or the exact cosine gate, so reproduction requires re-establishing the oracle. Validate the oracle (real weight load, coherent output) before trusting parity.
- Quantization / family bounds. Results apply to OLMoE-1B-7B on gfx1030; no claim for larger MoE, scaled routing, or other MoE families.
7. Reproducibility / Provenance
| Item | Value |
|---|---|
| Build / run | Compiled for the RDNA2-class target against the vendor HIP runtime (exact toolchain invocation omitted) |
| transformers (oracle) version | not recorded in source notes (recent version) |
| Cosine gate value | not recorded in source notes |
| Sovereignty | Dependency audit: vendor HIP runtime + system libraries only (no third-party BLAS / DNN / math kernel libraries); hand-rolled router / dispatch / weighted sum |
| Caveat | Validate the oracle first (confirm real weight load and coherent decode) before trusting the parity number. |
声明边界
作者对范围的明确界定——本工作证明了什么、未证明什么——沿用自 Octoryn Research 的发表模型。
证明
- A hand-written sovereign sparse-MoE FFN (router top-8 of 64 experts + weighted SwiGLU with un-renormalized router weights) reproduces OLMoE-1B-7B HuggingFace f16 prefill logits at cosine 0.999999 with full argmax agreement on an AMD RDNA2 (gfx1030) GPU.
- The omitted RMSNorm epsilon default is load-bearing here because the normalized signal variance is near epsilon; correcting the assumed value lifts parity from cosine 0.99 to 0.999999.
- The engine now spans both dense and sparse-MoE FFN families.
未证明
- Larger MoE models or many-expert routing at scale.
- Generation quality or MoE dispatch throughput.
- That an 8-bit-quantized path matches f16 fidelity.
- Benchmark-scale accuracy: parity rests on a small-prompt correctness smoke test, not a benchmark.
适用于
- f16 prefill-logit parity for OLMoE-1B-7B on an AMD RDNA2 (gfx1030) GPU against HuggingFace transformers with identical token ids and the correct RMSNorm epsilon.
不适用于
- Throughput, generation, or quality claims, or other MoE families.
- Models whose normalized-signal variance is not near epsilon (the eps trap does not generalize).
- Reproduction without first re-establishing and validating the HuggingFace oracle (real weight load and coherent output).
作者
- Ran Tao — 调查研究, 写作
引用本文
引用格式
Tao, R., Octoryn Research. (2026). OLMoE: the first sparse-MoE in a dense sovereign engine (and an eps trap) (TR-2026-0013). Octopus Research Institute.
BibTeX
@techreport{oritr20260013,
title = {OLMoE: the first sparse-MoE in a dense sovereign engine (and an eps trap)},
author = {Tao, Ran and {Octoryn Research}},
institution = {Octopus Research Institute},
year = {2026},
note = {Permanent ID TR-2026-0013. Not peer reviewed.}
}披露
- 资助
- 硬件与基础设施由 Octoryn / Octopus Core Pty Ltd 提供。
- 利益冲突
- Octoryn 提供商业推理与治理工具;相关发现独立报告。
