Skip to content
Octopus Research Institute
TR-2026-0003Technical reportPeer review: Not peer reviewedEvidence: ReproducedStatus: Released

A sovereign dense engine reproduces HF logits across 16 transformer families

Ran Tao (Octoryn Research)

This is not peer-reviewed. Treat it as a working document, not a validated result.

Abstract

A single dense inference engine with no vendor BLAS and no third-party ML framework reproduces HuggingFace next-token logits at cosine >= 0.999979 (f16) across 15 transformer families spanning three positional paradigms and both attention and non-attention (SSM/RWKV) sequence mixers. Per-mechanism ablations confirm each reimplemented component is load-bearing, with no cross-family logit regression. This is a correctness-reproduction result at smoke-test scale (1-2 prompts per family), bounded by an f16 ceiling - not a generation-quality, throughput, or benchmark claim.

1. Contribution (and what is explicitly NOT claimed)

Claimed. A single dense inference engine, containing no vendor BLAS (vendor GEMM/DNN libraries absent from the linked-library list) and no third-party ML framework, reproduces the next-token logits of a HuggingFace reference to cosine >= 0.999979 (f16) across 15 transformer families spanning three positional paradigms and both attention and non-attention sequence mixers. Per-mechanism ablations (negative controls) confirm that each reimplemented component is load-bearing, and adding the SSM/RWKV/MoE/ALiBi/parallel-block families causes no logit regression in previously-passing families.

NOT claimed. This is a correctness-reproduction result, i.e. the reimplemented forward matches the reference math. It is not a generation-quality, long-context, downstream-task, or throughput result, and the evaluation is smoke-test scale (see Section 5). "Sovereign reimplementation across many architectures" is an engineering-breadth contribution plus a small number of mechanism-ablation findings; it is not a claim of a new model or a new algorithm.

2. Methods

ItemValue
HardwareAMD RDNA2-class discrete GPU (16 GB)
StackRecent ROCm toolchain; a single sovereign engine build with no vendor BLAS
OracleA recent transformers release for dense families; an older transformers plus a compatible compressed-tensors release for compressed-tensors/AWQ checkpoints (newer stacks silently random-init experts)
ProcedureThe engine emits per-position logit vectors; an offline harness runs the same token ids through the oracle and compares row-by-row
Precisionf16 (the engine's highest precision; there is no f32 path)
Metricper-row cosine of full logit vectors; argmax agreement; gate = cosine >= 0.999
Stimulusa short fixed prompt (12 next-token rows); several ports additionally validated on a second prompt

The comparison is on identical ids with identical weights, so a high cosine is evidence of forward-math equivalence, not merely plausible output.

3. Results - per-family parity

FamilyParadigm exercisedmin cosineargmax
Qwen2.5GQA, QK-norm per head, RoPE high theta0.99997912/12
SmolLM2GQA, sliding-window attention0.99999812/12
Llama-3.2GQA0.99999812/12
MistralGQA, sliding-window attention0.99999212/12
Phi-3fused qkv / gate-up1.00000012/12
Qwen3QK-norm per head0.99998912/12
OLMo-2reordered/post-norm, full-dim QK-norm0.99999812/12
StableLM-2partial RoPE, LayerNorm bias0.99999712/12
GPT-2learned-absolute position, Conv1D1.00000012/12
OLMoEsparse MoE (top-8/64)0.99999912/12
BloomALiBi, embedding LayerNorm1.00000011/12 (dagger)
Falconparallel block, MQA1.00000012/12
Granite4 scalar multipliers0.99999711/12 (dagger)
Mambaselective-scan SSM0.9999978/8
RWKVWKV linear-attention1.00000012/12

15/15 pass the cosine gate; 13/15 are full-argmax. (dagger) The two misses are sub-f16-ULP ties: at the contested position the engine's two top logits are exactly equal (gap on the order of one ULP at that magnitude) and the oracle breaks the tie at a lower index. With no f32 path these are irreducible, not defects (cosine ~ 1.0). A 16th family is excluded from results - the available checkpoint held a config-only weight stub, reported rather than faked.

4. Ablations (negative controls)

Each reimplemented mechanism is disabled while holding everything else fixed; a faithful port must break:

FamilyMechanism disabledcosineargmaxVerdict
Mambaselectivity (constant delta)-0.730/8load-bearing
StableLM-2partial RoPE -> full RoPE-0.623/12load-bearing
Falconparallel block -> sequential0.9770/12load-bearing
RWKVWKV recurrence disabled0.963/12load-bearing

These are the result's strongest evidence: parity could in principle be coincidental, but a mechanism whose removal collapses the forward is demonstrably the one being computed.

5. Threats to validity / limitations

  • Sample size is small. The per-family sweep is 1 prompt x 12 next-token positions (a few ports add a second prompt). This is a correctness smoke test, not a benchmark-scale evaluation; it can catch a wrong forward but cannot estimate rare-token tail behaviour. A benchmark-grade follow-up (hundreds of prompts from a held-out corpus, reporting the cosine distribution and worst case) is not done here.
  • No variance reported. Logit comparison is deterministic given fixed ids/weights, so repetition is not informative for cosine - but any timing claims (absent here) would need repeated trials. This report makes no throughput claim.
  • f16 ceiling. No f32 path, so sub-ULP argmax ties are irreducible and any precision-sensitive claim is bounded by f16.
  • Parity != quality. Forward-math equivalence does not establish generation quality, calibration, or downstream-task performance.
  • Quantization beyond the tested q8 spot-checks is out of scope.
  • Uncovered axes (named): MLA, 2D/m-rope, NoPE-attention, hybrid SSM+attention (Jamba), Mamba-2/SSD, Mixture-of-Depths.

6. Reproducibility

  • The engine is a single sovereign build; per-family ports are versioned independently.
  • Build verification: confirm the linked-library list shows only the platform GPU runtime plus system libraries (no vendor BLAS/DNN).
  • Run: dump per-position logits at f16 for a short fixed prompt, then diff against an oracle pinned to the releases described in Section 2.
  • Validate the oracle first (the compressed-tensors trap, Section 2): an unpinned transformers silently random-inits MoE experts and invalidates the comparison.

Claim boundary

The author's explicit scope — what this work does and does not establish — carried over from the Octoryn Research publishing model.

Proves

  • A vendor-BLAS-free dense engine reproduces HF next-token logits at cosine >= 0.999979 (f16) across 15 transformer families spanning 3 positional paradigms and attention + SSM + RWKV mixers plus dense and MoE variants.
  • Per-mechanism ablations (disabling selectivity, recurrence, partial RoPE, or the parallel block) collapse the forward, showing each reimplemented component is load-bearing.
  • Adding SSM, RWKV, MoE, ALiBi, and parallel-block families causes no cross-family logit regression in previously-passing families.

Does not prove

  • Generation quality, calibration, long-context, or downstream-task performance.
  • Throughput or latency competitiveness.
  • Behaviour at benchmark sample sizes - the evaluation is 1-2 prompts and a handful of token positions per family, a correctness smoke test.
  • f32-level numerics; the f16 ceiling means sub-ULP argmax ties are irreducible.
  • Correctness for families whose checkpoint weights were absent (one family excluded).

Applies when

  • f16 next-token-logit reproduction against a version-pinned, weight-validated transformers oracle on identical token ids, on a single RDNA2-class GPU.

Does not apply when

  • Any generation-quality, throughput, or statistically-powered evaluation claim; quantized correctness beyond the tested q8 spot-checks; other hardware backends.

Authors

  • Ran Tao — Investigation, Writing

Cite this

Citation

Tao, R., Octoryn Research. (2026). A sovereign dense engine reproduces HF logits across 16 transformer families (TR-2026-0003). Octopus Research Institute.

BibTeX

@techreport{oritr20260003,
  title       = {A sovereign dense engine reproduces HF logits across 16 transformer families},
  author      = {Tao, Ran and {Octoryn Research}},
  institution = {Octopus Research Institute},
  year        = {2026},
  note        = {Permanent ID TR-2026-0003. Not peer reviewed.}
}

Disclosures

Funding
Hardware and infrastructure provided by Octoryn / Octopus Core Pty Ltd.
Conflicts of interest
Octoryn ships commercial inference and governance tooling; findings are reported independently.