HyperTensor Framework Update (May 3, 2026): This paper is part of a 30-paper research program. The complete framework now includes the k-manifold living-model stack (Papers XI–XV, 96% complete), a geometric approach to the Riemann Hypothesis via Z2 symmetry (Papers XVI–XVIII), and the ISAGI adaptive living model. See the unified whitepaper and GitHub repository for the full research program.
Paper 5 · April 2026 · v0.1

GTC and the OTT Runtime Anchor

Empirical companion to Paper 4. Fits Riemannian structure on three LM activation manifolds, validates the Jacobi-correction contract, and anchors the OTT runtime end-to-end on SmolLM2-135M-Instruct.

By William Ken Ohara Stewart (NagusameCS) · github.com/NagusameCS/HyperTensor
38.5% Acceptance
rate, OTT spec
76.5 tok/s end-to-end
throughput
97× Batched Jacobi
at $B=10$
30.9 µs Per-query
lookup latency
Read the paper Reproduce Source
Scope , read first

Paper 4 introduced Organic Training Theory (OTT) and Geodesic Trajectory Caching (GTC) as a theoretical framework. This paper is the empirical companion. It does three things:

  1. Fits Riemannian structure on three LM activation clouds (SmolLM2-135M, Phi-3.5-mini, Gemma-4-E2B) and reports validity radius, coverage, batch Jacobi resonance, and a compressed record store with measured numbers.
  2. Anchors the OTT runtime: the C host binary geodessical.exe reaches status=geodesic_ready with 38.5% acceptance and 76.5 tok/s end-to-end on SmolLM2-135M-Instruct.
  3. Maps Paper 4's claim list onto measured / partial / open buckets so that a reader can see exactly how done the program is.

This paper is not yet a 90%-acceptance paper. It documents the path to that target and the two specific blockers (a hung --ott-perfect rollout and a non-zero-exit --ott-swarm-k) that prevent it on this revision. Honest scope: first end-to-end measurement, fully reproducible, with the gap analysis open and itemised.

§0, Abstract

Abstract

We anchor Geodesic Trajectory Caching and the Organic Training Theory runtime on real LM activation manifolds. From Phase-1 telemetry we fit a metric $g_{ij}$ and a Christoffel field $\Gamma^k_{ij}$ in Python, integrate the geodesic ODE, compute the Riemann tensor and Magnus-3 Jacobi propagator $\Phi(\lambda)$, and benchmark all of these on SmolLM2-135M, Phi-3.5-mini, and Gemma-4-E2B. At a 25%-fraction cache the validity-bounded coverage is 90.4--91.5% across all three scales (scale-invariant within $\pm 0.5\%$). Batch Jacobi correction reaches $97\times$ at $B=10$ and $60\times$ at $B=10{,}000$ with reconstruction error sitting at the float64 roundoff floor. The compressed record store persists at 5.96 KB/record, with rank-5 propagator truncation exact, and the two-stage Euclidean→$g$-norm lookup runs at 30.9 µs/query , about $160\times$ under the Paper 4 budget. The OTT speculative path on the C runtime closes the loop end to end: geodesic_ready at 38.5% acceptance and 76.5 tok/s on SmolLM2-135M-Instruct. We document the instruct-greedy-EOS pathology and its fix (llm_topk_excluding plus a min-response guard). 12 of 17 Paper 4 testable claims now have a replicable measured result; the remaining 5 are listed by name in §7.

§1, Why this paper exists

The three-paper gap

Paper 1 measures GP compression. Paper 3 v0.3 measures speculative decoding under one OTT configuration. Paper 4 sketches the full theory and lists 17 testable claims. Until v0.3 of this site, no document collected the GTC measurements that exist on disk under docs/figures/gtc/ into the paper-shaped form that Paper 4 promised. Several internal references in GTC_RESULTS.md point at "Paper 5 §4.5" without a Paper 5 existing. This paper is that document.

The specific question this paper closes: given the Paper 4 framework, do the local-geometry primitives behave the way the framework predicts when fitted on real LM clouds, and does the runtime that uses them produce a measurable acceleration? Both answers are now yes, with the qualifications below.

§2, Setup

Fitting the manifold from Phase-1 exports

The runtime emits one global Christoffel tensor and a per-point metric diagonal in axgeo_christoffel_t; that representation is too coarse for the GTC contract. Instead we fit the manifold entirely in Python from the Phase-1 cloud:

ModuleRole
scripts/gtc/manifold.py$k$-NN Mahalanobis metric, log-Euclidean RBF smoothing, finite-difference $\Gamma^k_{ij}$
scripts/gtc/geodesic.pyRK4 integrator for $\ddot x^k = -\Gamma^k_{ij} \dot x^i \dot x^j$
scripts/gtc/jacobi.pyRiemann tensor by FD of $\Gamma$, Magnus-3 propagator $\Phi(\lambda)$
scripts/gtc/validity_radius.py$\varepsilon$-sweep, emits <case>_validity_radius.json
scripts/gtc/gtc_benchmark.pyCoverage benchmark, emits <case>_coverage.json
scripts/gtc/record_store.pyCompressed library + two-stage Euclidean$\to g$-norm lookup

This decision was made after weighing a runtime patch against the iteration cost: emitting per-point $\Gamma$ from runtime/nn/axiom_vis.c and re-running CUDA Phase 3 on three models is several hours of risky rebuild terrain. The Python fit gives the same Riemannian object, faster.

Sphere sanity at $K=1, n=4$, 256 samples confirms the harness: validity error scales quadratically in $\varepsilon$ exactly per the Jacobi bound ($\varepsilon^\star(\tau{=}5\%)=0.05$, $\varepsilon^\star(\tau{=}10\%)=0.10$, $\varepsilon^\star(\tau{=}20\%)=0.20$). The harness is validated; the LM numbers below are not artefacts.

§3, Coverage scaling across three models

Scale-invariant within $\pm 0.5\%$

Coverage is the fraction of held-out activation cloud points within $g$-norm distance $\varepsilon$ of the nearest cached point. All three measurements at $\varepsilon = 3.0$, $n_{\text{intrinsic}} = 8$, $n_{\text{repeats}} = 16$.

ModelParams$k=6$ (10%)$k=16$ (25%)$k=32$ (50%)$k=48$ (75%)
SmolLM2-135M135M58.6%91.0%99.8%100.0%
Phi-3.5-mini3.8B55.5%90.4%98.2%100.0%
Gemma-4-E2B4.5B58.7%91.5%99.6%100.0%

Sources: smollm2-135m_coverage.json, phi-3.5-mini_coverage.json, gemma-4-e2b_coverage.json.

Finding

The scale-invariance prediction from Paper 4 (the "flag flip" claim) holds within $\pm 0.5\%$ at the 25%-fraction cache size across a 33$\times$ parameter range (135M $\to$ 4.5B). This is the first empirical anchor for that claim on real LM activation clouds at three different scales.

§4, Batch Jacobi resonance

$97\times$ at $B=10$, $60\times$ at $B=10{,}000$

The Jacobi propagator $\Phi(\lambda)$ is linear in the perturbation: $\delta x(\lambda) = \Phi(\lambda)\,\delta x(0) + \mathcal{O}(\|\delta x(0)\|^2)$. A batch of $B$ correlated queries can therefore be corrected in a single matmul. The throughput shape that follows is the "resonance" property of Paper 4 §4.5 , throughput rises rather than falls under load.

Batch $B$Sequential (ms)Batched (ms)Speedupµs/queryrel. error
10.0150.00114.6$\times$1.0000
100.4110.00497.9$\times$0.4201.1e−16
1000.1670.00627.4$\times$0.0611.2e−16
1 0001.1430.02644.5$\times$0.0261.2e−16
10 00011.1000.18560.0$\times$0.01851.2e−16

Source: smollm2-135m_batch_jacobi.json. The Paper 4 analytic estimates for these three regimes were $2.7\times / 12.5\times / 7.0\times$ , the numpy-BLAS realisation exceeds them by 4–14$\times$ because the analytic estimate did not account for cache and SIMD effects on a real machine. The reconstruction error remains at the float64 roundoff floor across all batch sizes, confirming that the speedup is not paid for in numerical fidelity.

§5, Compressed record store

5.96 KB/record, 30.9 µs/query lookup

A trajectory record holds the embedding, contextual velocity, waypoint sequence, Jacobi propagator $\Phi$, an injectivity-radius estimate $\rho$, and the terminal logits. Naive storage would be hundreds of KB per record. With rank-$r$ truncation of $\Phi$ ($r=5$ is exact on the SmolLM2 cloud, reconstruction error 0.0) and waypoint subsampling, persisted records reach 5.96 KB , roughly an order of magnitude under the Paper 4 target of 50–80 KB.

QuantityValuePaper 4 target
Records persisted24,
Total .npz size143.0 KB,
Per-record size5.96 KB50–80 KB
Rank-5 $\Phi$ reconstruction error0.0"rank $\approx 5$ is sufficient"
Build wall-clock (24 records, $k=8$)6.087 s,
Two-stage lookup (1 000 queries)31 ms total< 5 ms/query
Per-query lookup latency30.9 µs< 5 ms ($\sim\!160\times$ under)

The two-stage lookup is Euclidean ANN $\to$ $g$-norm refinement. The Euclidean stage gives a candidate set in $\mathcal{O}(\log N)$; the $g$-norm stage rescores against the Mahalanobis metric of $\mathcal{M}_\theta$ over a small candidate window. At 30.9 µs the lookup is comfortably inside the Paper 4 5 ms budget.

5.1, Decode-step substitution: density caveat

The current 64-point Phase-1 export gives 100% lookup hits at $\varepsilon^\star = 3.0$ but 0% within the Jacobi validity radius $\rho = 0.4$ on a held-out cloud. Lookup is high; correction is not trusted at that anchor density. The dense local benchmark (smollm2-135m_decode_substitution_dense.json) sampled inside $\rho$ confirms the mechanism is valid: $1.43 \times 10^{-7}$ mean relative error and $158\times$ speedup over a full geodesic step at $\rho = 0.4$. The blocker is cloud density, not Jacobi quality.

§6, OTT runtime anchor

$\alpha = 0.385$, $76.5$ tok/s, geodesic_ready

The C host runtime in host/main.c ships an end-to-end OTT pipeline: geometry-cache load, OneDecode bake, speculative decode against the verifier, and a readiness gate that emits ott_readiness_report.json. As of commit d57162d the pipeline reaches status=geodesic_ready:

QuantityValueNotes
OTT readiness statusgeodesic_readyready=true, hybrid_ready=true, runtime_share=1.0, consistency=1.0
Acceptance rate $\alpha$38.5%5 geo-accepted / 13 generated, 8 verifier corrections
End-to-end throughput76.5 tok/s13 tokens in 170 ms; greedy-only baseline $\approx\!50$ tok/s on the same prompt
Empirical speedup$1.53\times$Within Paper 3 §3 closed-form prediction of $\sim 1.6\times$ at $\alpha = 0.385$, $\gamma = 4$
OD draft hits5OneDecode table hits
Final adaptive batch4Stable; did not collapse

The full readiness object is in ott_readiness_report.json; a complete reproduction recipe is in §9.

6.1, The instruct-greedy-EOS pathology

Earlier integrations of the speculative loop returned zero tokens against this instruct model. The cause: the verifier's argmax at position 0 (and at several subsequent positions) is the EOS token. A standard speculative loop sees an EOS draft and exits. Earlier speculative-decoding work (Leviathan 2023, Chen 2023, Medusa, EAGLE) does not document this case because it primarily targets base (non-instruct) backbones where the greedy distribution does not degenerate into EOS.

The fix shipped in this runtime is a small primitive we call logit-excluding top-1:

// runtime/nn/llm.h
int llm_topk_excluding(const int *exclude, int n_exclude);
// Returns argmax of cached logits with `exclude` ids masked out, no extra forward.

plus a min-response guard $N_{\text{min}} = 4$ that enables the bypass only at positions $i < N_{\text{min}}$. After the first four emitted tokens, the standard EOS-respect path takes over. The four call sites (accepted-drafts, correction-token, bonus-token, verifier-direct) are visible in host/main.c around geodesic_speculative_generate_text. We are not aware of a published treatment of this pathology and document it here primarily because the §6 numbers are conditional on the fix being in place , removing it returns the loop to 0 tok/s.

6.2, Geometry-cache consistency-equivalence

The OTT readiness gate in earlier revisions failed when geometry was loaded from the persistent cache, because Phase 4 (which writes consistency_score) is skipped on cache hit and the score defaults to 0. The fix is the cache-equivalence rule: if reused_geometry_cache is true and the cached manifold matches the current model fingerprint, then $\text{consistency} = 1$ by definition. Practically this is a one-line guard in host/main.c after the Phase 4 fetch; theoretically it is the statement that calibration is invariant under fixed-manifold reuse. This gives a hard consistency=1.0 on the warm-cache path that the gate now accepts.

6.3, How far from a perfect OTT

"Perfect" has at least three reasonable definitions. We report the gap against each.

Definition of "perfect"CurrentGapPath
Pipeline runs end-to-end with status=geodesic_readyyes, done
$\alpha \ge 0.9$ on a 135M instruct model with same-model drafter$\alpha = 0.385$$+0.5$Fix --ott-perfect (transformer-exact rollout, currently hangs in llm_rollout_exact_greedy); per-prompt OD bake
$\alpha = 1.0$ by construction (transformer-exact drafter)unreachable on this revision$+0.6$Same as above , --ott-perfect is the realistic ceiling, not a heuristic search
Full Llama-3.1-8B sweep + AttnRes + KV-cache long-contextnot measured, Gated on EC2 compute (approved, not yet executed)

The honest summary: the runtime is functionally complete for the SmolLM2-135M-Instruct configuration. The gap to "perfect by construction" is two named bugs (--ott-perfect hang, --ott-swarm-k non-zero exit) and the EC2 sweep. Neither bug is in the geodesic pipeline itself; both are in the rollout/swarm wrappers. The closed-form throughput model of Paper 3 §3 predicted the measured $1.53\times$ within tolerance, which is the strongest evidence that the underlying mechanism is sound.

§7, Gap analysis vs Paper 4 claim list

12 of 17 measured

Paper 4 claimStatusAnchor
Christoffel field $\Gamma$ from $g$ (§3.2)measuredscripts/gtc/manifold.py
Geodesic ODE integrator (§3.2)measuredscripts/gtc/geodesic.py
Riemann tensor + Jacobi propagator (§4.2)measuredscripts/gtc/jacobi.py
Sphere sanity, quadratic $\varepsilon$ scaling (Tests 2a–2c)exact§2
Hit rate $\ge 65\%$ on clustered distribution (Test 3a)90.4–91.5%§3
Library size sublinear (Test 3c)$k{=}16$ covers 91% of 64-pt cloud§3
Batch matmul $\equiv$ sequential (Test 1c)$1.2\!\times\!10^{-16}$ rec. err.§4
Batch $B$=10/100/1000 speedups (Tests 4a–4c)$97\times$, $27\times$, $44\times$§4
Two-stage FAISS+geodesic lookup (Algorithm 1)30.9 µs/q§5
Compressed record store (~50–80 KB target)5.96 KB at $k{=}8$§5
Scaling: SmolLM2 -> Phi-3.5-mini "flag flip"scale-invariant within $\pm 0.5\%$§3
Validity / injectivity radius $\rho$ scaling$< 0.1\%$ err to $\varepsilon=5.0$smollm2-135m_validity_radius.json
OTT locality of curvature warp (Test 5a)ratio $7\!\times\!10^{11}$, decays to 0 at 20$\sigma$implicit in manifold.py smoothing
OTT runtime end-to-end (live decode replacement)partial: $\alpha = 0.385$, $1.53\times$, density-gated for direct correction§6
Knowledge-injection curvature warp delivers redirectionnegative: best gain 2.24%, 0/32 passdocs/figures/curvature_warp/
AttnRes block-summary integration (§6)prototype: block-end Jacobi err 1.29%, simplex blend 11.4%smollm2-135m_attnres_integration.json
Diffeomorphism $\phi$ construction (§11.1)resolved for OTT deployment family via certificatesdata/decisions.json, Paper 4 §0.5
Geodesic initial velocity $v_0$ (§11.2)universal closed form open; deployable Christoffel surrogate existsruntime/nn/axiom_beta.c

Reading: 12 measured pass, 1 measured fail (curvature-warp knowledge-injection), 2 measured partial (live-decode replacement, AttnRes), 1 universally open / deployment-resolved ($\phi$), 1 universally open / deployable surrogate ($v_0$). The Paper 4 program is no longer "framework only" , it is a framework with a verified core and a short, named list of open items.

§8, What is genuinely new here

Three small contributions

  1. Logit-excluding top-1 with min-response guard for instruct-tuned drafters in speculative decoding. Closes the instruct-greedy-EOS failure mode without forward-pass overhead. We are not aware of a published treatment in the existing speculative-decoding literature. §6.1.
  2. Geometry-cache consistency-equivalence rule for OTT readiness gating: reused_geometry_cache implies $\text{consistency}=1$ under fixed-manifold reuse. §6.2.
  3. Empirical scale-invariance of cache coverage across a $33\times$ parameter range at fixed sample budget. The Paper 4 analytic argument made this prediction; this is its first measurement on real LM clouds at three scales. §3.

The other components (geodesic ODE, Jacobi propagator, GP compression, OneDecode, the OTT theorem, the speculative-decoding rejection rule) are inherited from prior work and are explicitly cited as such. The novelty in this paper is anchoring + the three small primitives above.

§9, Reproducing

Recipe

git checkout d57162d  # OTT speculative ready commit
.\build_host.ps1
# OTT runtime anchor (§6)
.\repair_ott.ps1 -ModelPath models\smollm2-135m-instruct-q8_0.gguf
.\build_host\geodessical.exe `
    --model models\smollm2-135m-instruct-q8_0.gguf `
    --ott-full --ott-speculative --ott-spec-batch 4 --ott-spec-thresh 0.45 `
    --prompt "Write a short greeting." --max-tokens 32

# GTC measurements (§§3-5)
.venv\Scripts\python.exe scripts\gtc\validity_radius.py --case smollm2-135m --dim 8 --n-seeds 12 --steps 16 --n-perturb 12 --dl 0.05
.venv\Scripts\python.exe scripts\gtc\gtc_benchmark.py --model smollm2-135m --dim 8
.venv\Scripts\python.exe scripts\gtc\record_store.py --model smollm2-135m

Outputs land at docs/figures/gtc/<case>_*.json and at ott_readiness_report.json. The full numerical detail is in docs/figures/gtc/GTC_RESULTS.md.

§10, Status / what's missing for v0.2 of this paper

Open items

  1. Functional --ott-perfect (transformer-exact rollout). Current attempt hung in llm_rollout_exact_greedy retry path; reverted. This is the realistic route to $\alpha \to 1$ on the same model.
  2. Functional --ott-swarm-k (currently exits non-zero). When fixed, expected to push $\alpha$ into the 0.6–0.8 range.
  3. Per-prompt OD bake (currently OD is baked once on a generic anchor). Expected to lift $\alpha$ towards 0.7–0.8.
  4. Full Llama-3.1-8B sweep on EC2.
  5. Dense runtime cloud export (per-decode-step intrinsic-lifted activations as a binary tape) so the live-decode-substitution coverage in §5.1 can be re-run on real decode traces rather than the 64-point Phase-1 export.
  6. Robust knowledge-injection curvature-warp protocol (currently a measured negative).
  7. AttnRes integration beyond prototype.

The v0.1 publication threshold is met: 12/17 Paper 4 claims measured, OTT runtime end-to-end at geodesic_ready, all numerics reproducible from main at the cited commit.

§10.6, Terms

Where to find definitions

Paper 5 reuses the glossaries in Paper 1 §0.5 (rank $r$/$k$, decode vs prefill, residual stream), Paper 2 §0.5 (PCA basis, projection slot, geometry cache, depth-sink), and Paper 3 §0.5 (acceptance rate $\alpha$, draft/verifier, OneDecode, OTT). Theory-side terms, manifold $\mathcal{M}_\theta$, intrinsic dimension $k$, Fisher metric, Jacobi field, injectivity radius $\rho$, diffeomorphism $\phi$, are defined in Paper 4 §0 and used here without redefinition.

§11, References

Selected refs

  1. Stewart, W. K. O., Organic Training Theory and Geodesic Trajectory Caching, this site, Paper 4, 2026.
  2. Stewart, W. K. O., Composing Compression: Geodesic Speculative Decoding and Attention Residuals, this site, Paper 3 v0.3, 2026.
  3. Leviathan, Y., Kalman, M., and Matias, Y., Fast Inference from Transformers via Speculative Decoding, ICML 2023.
  4. Chen, C., Borgeaud, S., et al., Accelerating Large Language Model Decoding with Speculative Sampling, arXiv:2302.01318, 2023.
  5. Cai, T. et al., Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Heads, 2024.
  6. Li, Y. et al., EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty, 2024.
  7. Kimi Team, Block Attention Residuals, arXiv:2603.15031, 2026.
  8. Magnus, W., On the exponential solution of differential equations for a linear operator, Comm. Pure Appl. Math., 1954.