Proposed table of contents

Proposal, updated 2026-10-31. Chapter 1 and Chapter 2 and Chapter 4 and Chapter 7 and Chapter 9 and Chapter 10 and Chapter 11 and Chapter 12 and Chapter 13 and Chapter 14 and Chapter 15 and Chapter 16 and Chapter 17 and Chapter 20 are runnable on the tested CPU host. Chapter 37 and Chapter 44 are runnable on the tested NVIDIA host (Elephant, and Mammoth in chapter 46), and their examples run without a GPU. Chapter 47 is runnable on the tested Apple M5 Max (Elephant only), and chapter 72 runs and serves gpt-oss-20b there. The first gpt-oss format chapter, 60, is also runnable as a bounded CPU decoder. Chapter 61 adds the bounded top-k router and tiny affine experts. Chapter 62 adds bounded sink/window attention, split-half YaRN, biased projection and clamped activation. Chapter 41 computes the same attention in key/value tiles with an online softmax on the CPU and as a CUDA group kernel, compared with chapter 66/67's attention at gpt-oss-20b shapes and on layer 0's original weights; serving does not use it yet. Chapter 42 runs chapter 11's Gated DeltaNet prefill in chunks in WY form on the CPU, with boundary snapshots, and as a CUDA group kernel inside chapter 44's linear-layer kernels at Elephant's shape and on layer 0's original weights; chapter 44's program does not use it yet. Chapter 84 runs chapter 90's latent attention in its absorbed and expanded forms through a sequence, accounts the compressed cache exactly and compares the two forms with a dense oracle on the CPU. Chapter 86 runs Large 4's lightning indexer, top-k sparse attention, its pinned KV sharing map, NoPE layers, soft-capping and YaRN on tiny CPU fixtures; real layers remain. Chapters 64, 73, 75 and 77 now provide CPU reference execution, sampling, speculative verification and a finite-schema tool round trip; chapter 76 verifies greedy draft blocks on the GPU and measures them slower than the target alone, so speculation stays off. Chapters 226 and 227 open Part XXIII with a reference trace machine and attention as exact memory, 228 and 229 compile exact arithmetic into feed-forward weights, 230 catches planted compiler bugs, and 233 measures when a floating-point softmax keeps that memory exact.

Chapter 88 adds a bounded original DeepSeek R1-Distill-Qwen-1.5B CPU reference and a complete greedy greeting. Chapters 103 and 104 are runnable on the CPU: learning on simulated deadline data, first with hand-written gradients, then with a tape. Chapter 105 breaks that training six ways on purpose and names each fault from the run's record. Chapter 108 chooses which labels to buy by uncertainty, diversity or both, and judges each rule against random selection with a noise floor over seed blocks. Chapter 110 plans a small grid exactly, learns the same table from seeded episodes, and replans on a learned transition table when a wall moves; behavior cloning, DAgger and planning with chapter 109's learned model remain. Chapter 115 trains chapter 113's decoder end to end on the book's own prose, beats a bigram on held-out text by a margin frozen before the run, and resumes from a checkpoint bit for bit. Chapter 118 trains chapter 103's tabular models, chapter 115's decoder and chapter 117's module block through one trainer, each to the same bits as its own training loop, with exact resume. Chapter 116 counts that training step's bytes and fits it under a cap by gradient accumulation and layer recomputation, both bit for bit equal to chapter 115's run, or refuses with the smallest budget; a binary16 gradient policy with a loss scale is measured against the reference. Chapter 140 trains low-rank adapters on a frozen stand-in decoder and promotes one only through both of chapter 241's gates; adapters on Elephant and Mammoth themselves remain. Chapter 141 records Mammoth's and Elephant's answers to a 72-request corpus on the RTX 4080 and distills Mammoth into chapter 140's adapter on a stand-in student that reads Elephant's answers; the adapter on Elephant's own weights remains. Chapter 215 fits and gates its own calibration maps, and refuses them for another model version. Chapter 216 derives a cascade's thresholds from written costs on synthetic probabilities. Chapter 217 logs every decision, joins its outcome, and watches calibration drift. Chapter 239 pins a suite as three digests and keeps results in a receipt chain. Chapter 240 measures noise floors from seed blocks and task-clustered bootstraps, and refuses partitions with no headroom. Chapter 241 turns them into passed, failed or unverifiable verdicts for chapters 16, 215 and 216. Chapter 243 fits a stall detector's settings on recorded answers with no model calls. Chapter 244 searches 32 policies by successive halving and finds the full measurement's winner for a quarter of its spend. Chapter 225 uses chapter 103's trainer to choose among three simulated models and to judge a new router from an old one's logs. Chapter 254 constructs small networks directly and through the gate compiler, with recorded proposals, same-architecture trained baselines and distance-informed control. Chapter 255 implements bounded original BF16/F32 windows and records original-model readout interventions against explicit baselines, including failures. The chapters have runnable profiles, complete or partial. A chapter ships with shared Coax library code, authored checks, independent native tests, source-linked examples and an exact supported scope. Coax listings use jai Markdown fences.

The first delivery path is 1–4 → 7–14 (Elephant) → 15 (Mammoth) → 16–17 (published decision semantics, qualified honestly) → 18–23 (a live decision API) → 24–26 (a first mesh of Pylons serving the same API). Throughput and device work in 33–51 begins as soon as it has concrete operations and CPU oracles. Neither generic training, gpt-oss, Mistral, DeepSeek, the mesh, a smaller imported model nor the NVIDIA branches blocks those two decision models. Model targets defines their exact architecture and acceptance gates.

The shared completion milestones group the remaining work into complete framework, serving, game and robotics workflows. An implemented chapter qualifies its stated profile; it does not close every acceptance criterion suggested by its title. Adoption records source-component use separately from qualification and deployment.

The contents give a reading order; they do not require finishing every earlier part before starting a branch. The prerequisite map below governs that choice. Several chapters need Coax compiler features that do not exist yet; the Coax feature map names them so Psionic can act as their first real consumer. The roadmap sets delivery priorities, while the NVIDIA survey pins the proposed external targets and explains artifact, data and licensing qualifications. New breadth is proposed here; this revision does not add or renumber live project issues.

I. Small numbers, real contracts

ChapterWhat we build and check
1. Learning a number — runnableLearn y = 2x; derive the loss and gradient, verify the first update, and predict a held-out value.
2. Shapes and storage — runnableAdmit bounded dimensions, caller-owned buffers, scratch and aliases; refuse malformed work before publishing output.
4. Numbers and matrices — runnableDot/matmul, gather, stable reductions, softmax and normalization, with independent numerical contracts.
3. A tensor is a view of memory — runnable: bounded CPU viewsAdmitted ranks, strides, slicing, transposes, broadcasting, contiguous and noncontiguous layouts, zero-element tensors, storage ownership, and mutation and alias tracking. Every view's offsets are proved, and a mutation that would corrupt a saved value for backward is detected. Framework track.
5. A standard library of tensor operators — runnable: 27 CPU f32 operators and explicit value VJPsElementwise arithmetic and comparisons, reductions, indexed selection and updates, concatenation, sorting and top-k, matrix operations, convolution, pooling, interpolation and losses, each with a CPU reference, shape and dtype inference, and gradient coverage where differentiable. A machine-readable operator manifest records each operator's shapes, dtypes, backends, numerical profile and differentiation status, so support is measured, not inferred from running one architecture. Framework track.
6. One tensor, several devices and dtypes — runnable: tensor-device-v1, CPU/CUDA/MetalOwned placement and transfers, immutable shared views and reference/reader tracking, explicit completion/cancellation, f32/f16/bf16 casts and promotion, seeded uniform tensors and dropout. One shared add/ReLU/dropout program is qualified on all three devices, with independent byte/numerical checks and reported differences; no implicit CPU fallback. The 5 registry remains CPU f32. Framework track.

II. Open weights early: Elephant and Mammoth

This part introduces inference before automatic differentiation. It depends on the shared numerics in I and supplies the forward primitives reused later.

ChapterWhat we build and check
7. Reading original weights — runnableBounded original-weights-v1 Safetensors/shard-index parsing, exact identities, BF16/F32 window decoding and typed manifests; complete inventory and malformed-artifact refusals.
8. Models travel between frameworks — runnableBounded named F32/BF16 Safetensors writing/inspection, a versioned C ABI and zero-copy leased CPU f32 DLPack; a NumPy model continues training in Coax and reloads independently for inference. ONNX graph exchange is 220 and 221; arbitrary optimizer conversion remains separate.
9. Text becomes a model request — runnableqwen35-text-v1: frozen Base Labs rendering, Unicode-17 NFC, original Qwen byte-BPE tables, special tokens and exact shared-prefix layouts; explicit resource and structured-entry bounds.
10. Attention without training — runnableA bounded dense causal block, interleaved rotary tables, grouped-query attention and caches; full-sequence versus incremental results.
11. A hybrid sequence model — runnable: bounded causal CPU profileQwen-style dense blocks, causal convolution and Gated DeltaNet state transitions alongside causal full attention; upstream and real-weight qualification remain separate.
12. Decisions have a different mask — runnable: bounded CPUBlock-bidirectional full attention and complete hybrid prefix snapshots, with sequential isolated suffix forks; whole-model qualification remains separate.
13. Read the options — runnable: bounded CPUSlot LM-head probabilities, vocabulary mass and typed statistics with explicit temperature; serialization and calibration loading remain separate.
14. Execute Elephant — runnable: original weights, CPUAuthenticated original Elephant files and a typed text decision through the complete 32-layer hybrid stack. Compared with an independent CPU implementation at an intermediate layer and at the output for the recorded request; a request corpus under chapter 17's rules, calibration (12) and measured resource admission remain open gates.
15. Execute Mammoth — runnable: original weights, CPUThe chapter 14 engine with Mammoth's pinned dimensions, two authenticated shards and a library storage plan (ps_plan); one typed text decision through all 64 layers, compared with an independent layer-streamed float32 reference for the recorded request. A request corpus under chapter 17's rules, a Mammoth quality run under chapter 16 and measured resource admission remain open gates.
16. Are the probabilities any good? — runnable: CPU; 16-request Elephant runLoad exactly the calibration the pinned bundle supplies (or state that none exists and keep temperature explicit); reproduce the published serialized answers; Brier score, calibration error, abstention and per-kind accuracy on a frozen held-out request corpus, kept separate from numerical conformance. Every result names the model identity and the corpus it was measured on. Neither pinned bundle has a calibration file, so temperature is 1.0; a larger corpus remains open.
17. Qualify honestly — runnable: CPU, chapter 14 found unknownCompare with a reference whose arithmetic cannot be reproduced exactly: only like modes (decode with decode, replay with replay); distribution checks (top-1 agreement, total variation, router-margin and near-tie regret) frozen before any confirmation set is read and never loosened after; values measured on the device that ran, not a surrogate. Every result binds the exact build, libraries and arithmetic actually executed; the command's exit status is the verdict; an absent qualification reads as unknown; failures are quoted with their units and counterexamples.

Text support is the first scope. Image inputs, quantized variants and serving integration each receive separate qualification. A layer fixture or imported tensor inventory does not complete either real-model chapter. Chapter 16 measures decision quality; a matching logit is not evidence that a decision is useful, and a good held-out score is not evidence of numerical parity.

III. A live decision API

Mammoth and Elephant become something people and agents can call. This part builds the first production deployment on purpose small: one model resident in one process, one decision at a time, behind the same /v1/systemone contract the decision jobs use (NIP-DEC). It establishes how to measure a decision and how to make the numbers move; Part XIX later grows the same service into batching, caching, autoscaling and rollout.

ChapterWhat we build and check
18. Time a decision — runnableMeasured monotonic phases, observed cold/warm file pages, peak process RSS and reproducible logical-token rates and P50/P95/P99 samples.
19. Keep the model resident — runnableOne authenticated session and reusable bounded execution arenas, descriptor-bound verified files and typed capacity refusals; device requests avoid redundant CPU state.
20. Serve `/v1/systemone` — runnable: loopback, toy and original Elephant, on the CPU or in about 202 ms end to end on an RTX 4080 (--elephant-gpu)A small HTTP host does sockets; Coax decides everything else. Bounded NIP-DEC bodies, the same body as a decision job (the HTTP carriage of the protocol specification's decision.v1.SystemOneRequest, which has no proto/ file yet), typed refusals, a deadline per request, cancellation, a busy refusal instead of an unbounded queue, and the served model identity (the authenticated checkpoint digest) in every answer. No request or answer content is logged.
21. The protobuf wire — runnable: toy engine and native answersopenagents.decision.v1alpha1, a protobuf projection of the frozen openagents.systemone.v1 JSON contract, served by the same endpoint: a protobuf request is transcoded to its NIP-DEC body and admitted by chapter 20's decoder, and a protobuf answer re-encodes the rendered JSON answer. Checked against the official Python protobuf runtime in both directions.
22. Run it live — runnableGolden warm-up before readiness, versioned health, bounded Coax restart supervision, private usage records and an owned loopback deployment.
23. Make the numbers move — runnableExact per-request CPU and device prefix snapshots, isolated suffixes and device host-arena elimination, with parity and measured changes. The CUDA/Metal prefix work retains its bit-identical whole-decision comparison (M5 Max Lab 4.1–5.4 s → 2.3–2.5 s; RTX 4080 1.84 → 1.17 s). Deterministic CPU worker pools remain chapter 35 and wider decoded-cache work remains later.

The hosting machine, domain, budget and any public access are owner decisions recorded in NEEDS_OWNER.md. The first owned loopback deployment is now checked on Linux/CUDA, with its emitted-C producer, native compiler and operational evidence in the Part III record.

IV. A first mesh of Pylons

The same API fans out to connected machines. A Pylon is one provider machine that opted in; it advertises what it serves and takes jobs over Nostr, as specified in NIP-PYLON and the decision jobs of NIP-DEC. This part routes whole decisions to whole machines. Splitting one model across machines waits for Part XXII.

ChapterWhat we build and check
24. A Pylon answers decisions — prerequisites belowA Coax Pylon with its own key: a beacon (kind 30200) advertising a decision service and the served model identity, free slots and a declared deadline; decision jobs received encrypted over relays (NIP-44) and answered by the resident model of Part III, with the answer naming the same identity. Built on the Nostr event code in coax/lib/nostr.
25. The API fans out — runnable: opt-in loopback adapter, throwaway buyer keys/v1/systemone reads fresh beacons, chooses a Pylon with a free slot that serves the exact model identity, sends the job, checks that the answer's identity matches the beacon, and falls back to the local model or refuses when none answers in time. Beacon expiry, generation counters and draining keep stale machines out of the route.
26. Check the mesh — runnable: free remote receipts, memory-only toy CPU replay, explicit trust and bounded public totalsBuyers' signed receipts (kind 3201) for completed jobs, a checker that re-runs a sampled fraction of decisions on a trusted node and publishes its verdict, and pool totals any reader can recompute. Decision work starts free; paying Pylons in Bitcoin is a later owner decision.
27. A public mesh — runnable: authenticated bounded free public edgeExisting sessions/NIP-98, private fleet invocation, exact checkpoint/provider pins and real Elephant/Mammoth production calls; current limits and trust scope are recorded in the chapter.
28. A decision arrives while play continues — runnable: local ticket and cancellation effectsBounded Coax consumer tickets, monotonic deadlines, cancellation and late-response fencing; exactly-once game admission with deterministic fallback. First consumer: low-pressure Everglade guards.
29. A guard asks a Pylon — opt-in shadow path qualified locally and live; usefulness/ambient pendingAuthored quiet/greeting/weather options, opt-in shadow then ambient behavior, current-state revalidation and actual end-to-end/quality gates. Patrol and combat stay under local rules.
30. Measure a guard decision — runnable: measured shadow path; no usefulness gain over quietFixed per-visit latency/outcome telemetry, pre-authored context labels, exact product request replay and honest comparison with quiet. Real cookie-authenticated shadow evidence precedes ambient promotion.
31. Directions on request — runnable: 9/5 finite live smoke, matching the local rule; local-first page integration is delivered in 32Explicit authored Directions intent, five frozen route contexts, current-goal semantics and a perfect finite local reference. Separate raw model choice, admission and quiet fallback; qualify fresh live evidence before any player-facing model behavior.
32. A guard gives directions — implemented: 37/26 actual-Wasm page checks; shadow off by defaultSeparate Directions/Find Work interaction, immediate local rule and optional authenticated Elephant shadow. Current-frame world, actor, goal and intent gates; cancellation and refusal preserve local help.

The Everglade guard delivery plan sequences warm routing, the shared client, game integration and reliability qualification. It brings narrow client/failure-handling and evaluation work forward from 174/175/179 and 215–217/222 without requiring those whole chapters.

Nothing here makes a peer's answer private: a Pylon that serves a request reads it. Part XX adds trust levels, attested machines and model splits.

Before chapter 24: the Nostr prerequisites

Chapter 24 needs a Pylon that signs, encrypts and holds a relay connection. The decision side is done: chapter 20 serves Elephant on /v1/systemone (on the GPU beside gpt-oss, chapters 45 and 80), and NIP-DEC's job body is the same openagents.systemone.v1 shape. As of 2026-10-29 the crypto and codecs exist (BIP-340 verification, secp256k1, ECDH, ChaCha20, HMAC, HKDF, XChaCha20-Poly1305, entropy, JSON, filters, NIP-19) and these remain, in order. Board aliases are on the signed queue.

#PrerequisiteWhoState
1BIP-340 signer (coax/lib/crypto/schnorr_sign.coax) and a fixed-work self-check (schnorr_self_verify.coax)openagents-d7, claude-sigcheck (#51f4, #89db)landed: signer 0cc86015e7 (3,384 mutants, 0 survivors; the 8 BIP-340 signing rows), self-check c9eed2394b (2,865, 0). The signer runs the fixed-work self-check in its own three stages since 936ef03f7b (3,742, 0; event_sign re-gated 5,552, 0; native and Wasm agree; 10,000 signed-event round trips). Test keys only until the #4828 secret audit (openagents-20) and the review gate
2NIP-01 event builder (coax/lib/nostr/event_sign.coax)openagents-d7 (#bab4)landed 7bef91d26c (5,194, 0); native under ASan/UBSan
3NIP-44 v2 (nip44.coax, nip44-key.coax)claude-nip44, openagents-d7 (#4878, #71e7)landed: f74988b29a (1,700, 0), the conversation key from two keys a7589e2c90 (3,434, 0; 35/35 valid and 8/8 invalid vectors), the signed-event round trip c13fad8d84
4NIP-01 relay messages (message.coax), tags, kind 0 metadataopenagents-d7 (#6015)landed c7f0d7a222 (4,162, 0), 1df209e1ca; all 237 recorded events verify natively
5WebSocket in Coax, the C socket, the relay state machineclaude-relay (#7de9)landed d7373bcc82: SHA-1, ws.coax, relay.coax (0 survivors each)
6NIP-42 AUTH (nip42.coax, nip42-event.coax)claude-nip42 (#f426)landed 9a655d3736, 8e552b89dd (1,940, 0); 219 real-signature checks
7wss://: TLS in the C host (tls-native.c, relay_uri.coax)claude-tlslanded 604767080e: OpenSSL 3.6.3 through Nix, TLS 1.2 minimum, chain and hostname checks; public REQ/EOSE on nos.lol and relay.primal.net. Apple is a stub
8The relay end-to-end test, the shared connection (relay_conn.coax) and reader (relay_read.coax)claude-relay-e2e, openagents-d7landed 32269ea6a4, relay_conn 3ff79c8d61 (1,140, 0), relay_read 4d2d9050d6 (5,371, 0)
9–11Beacon (30200), decision jobs (25910/26910/27010), NIP-65 (10002) in psionic/lib/pylon/claude-pylonlanded 2f489e00d9 (2,346 and 1,237 mutants, 0 survivors)
—Compiler source-graph cap 64 → 128 unitsopenagents-d7landed cfe213bcfa
—A Coax relay to test against (nostr/relay/, durable with --store)claude-relay-server, claude-relay-r1b, claude-storeR1 on main: b872d72ccb, edab4a2ecd; see coax/nostr.md section 17

All four owner decisions are made (NEEDS_OWNER.md): the auth signature over the Pylon key is made by the agent that creates the real key, once signing is cleared for real keys; the key is a 0600 file in ~/work/.secrets/ on the owner's Mac; the relays are relay.openagents.com and every Coax relay we run; the C host may link a TLS library. The owner allowed a TLS library in the C host for wss:// on 2026-10-29 (AGENTS.md).

V. Make execution measurable, parallel and portable

These chapters accompany real consumers in II; their placement is explanatory. The device path comes first, because sub-second decisions need it: a compute subset in Coax, whole-prompt attention and DeltaNet kernels, fusion and graph replay, then CUDA on the RTX 4080 and Metal on Apple GPUs. Several designs come from llama.cpp, reimplemented in Coax with their own checks; llama.cpp itself is a benchmark comparator, never a dependency.

ChapterWhat we build and check
33. Measure the work and plan the memory — runnable exact accounting, residency plan and one measured CPU roofline; timed real-model phases, measured allocation and a quiet-host repeat openFixed CPU numerical references, peak memory, latency samples and a reproducible workload before optimizing. Measured compute and memory bandwidth for the host, and the arithmetic intensity of prefill and decode against that roofline, so every later optimization names the bottleneck it targets. A residency plan for each model: compute directly from mapped BF16 rows without f32 expansion, separate persistent/state/scratch bytes, and refuse requests whose plan does not fit.
34. Benchmark against llama.cpp and cuBLAS — partly runnable: the cm-warm-v1 comparison protocol, and Psionic's CUDA projections against opt-in cuBLAS on one host; llama.cpp on the same file remainsThe same model, the same quantized file and the same prompt shapes run through Psionic and a packaged llama.cpp build: prompt processing and generation at fixed lengths, decision-shaped runs (a shared prefix plus suffixes), warm-up then at least five repetitions reported as mean and standard deviation, on a quiet machine with recorded clocks; cuBLAS products on the same shapes as an opt-in comparator for Psionic's own kernels, never a dependency.
35. Use every core — runnable fixed partitions, tree-ordered merges and a publish check for a sum, a matrix-vector product and attention heads, byte-identical at 1, 2, 4 and 8 workers on host threads, with one measured speedup receipt; the Elephant decision on the pool, Coax jobs and a quiet-host repeat openFixed work partitioning and tree-ordered merges so every output is byte-identical at 1, 2, 4 and 8 workers; a host thread pool calling Coax kernels on disjoint ranges until Coax jobs exist, then the same replay gate on jobs.
36. Many questions at once — runnable on CUDA: a Lab request's five suffixes in one pass over the weights, bit-identical to sequential forks; Mammoth's Lab request on the RTX 4080 9.3 s → 3.3 s (1.8 s with the prefix kept), Elephant's 0.72 → 0.51 s (0.39 s)Batched suffix forks from one prefix snapshot, proven equal to the sequential forks of chapter 12 (plan checks per question, then 0 of 248,320 logits differ on the device for every question); reuse of prefix state across requests keyed by model identity and exact token prefix, with bounded eviction (one kept prefix today; several fork buffers, the server's batched path and Metal batches remain).
37. A Coax compute subset — runnable: coax cuda, BF16 projection kernels on an RTX 4080; group kernels (threadgroup memory and barriers) and Metal 7 tensor-op tiles on Apple GPUsThe compiler's missing buffer, integer index, bounded loop, work-item and binding subset, proven on one small matrix-vector kernel: generated source compiles, real device execution matches the CPU oracle, negative admission refuses.
38. A tensor program becomes an execution plan — runnable: tensor-ir-f32-v1, CPU/CUDA/MetalBounded typed straight-line IR with matmul, broadcasting, ReLU, axis reduction, last-axis LayerNorm, read-only strided views, contiguous reshapes and constant gathers. One feed-forward block runs through CPU reference procedures, a reusable workspace plan and generated device kernels; root liveness protects aliases, actual allocation tracking measures memory, and exact graph/compiler/backend/module identity invalidates stale plans. f32 only; explicit graph construction and synchronous private arenas. Fusion, dynamic shapes and differentiation build on this representation.
39. Compile a general tensor program — runnableBounded symbolic shapes and declared branches/loops, guarded specialization, four-entry LRU plans, aggregate payload admission and one shared backend compilation across batch sizes.
40. Add your own operator — runnablePublic unary f32 schemas, CPU/reference callbacks, generated GPU lowering, input VJPs, batching and leased registry identities integrated into compiled IR models; squared-ReLU trains without new core operator cases.
41. Attention in tiles — partly implemented: tiled-attention-cpu-f64-v1 on the CPU and tiled-attention-cuda-f32-v1 as a CUDA group kernel at gpt-oss-20b shapes; serving adoption remainsOnline-softmax attention over key/value tiles that never materializes the full score matrix, with chunked prefill. The changed reduction order gets its own named profile and stated tolerance against the CPU reference, and the block-bidirectional mask, sinks and windows must still hold. Grouped-query attention loads each key/value head once for every query head that shares it.
42. DeltaNet in chunks — partly implemented: delta-chunks-cpu-f64-v1 on the CPU and delta-chunks-cuda-f32-v1 as a CUDA group kernel at Elephant's shape, timed against chapter 44's recurrence (faster at 2,048 tokens, slower below 1,024); adoption by chapter 44's program remainsWhole-prompt Gated DeltaNet prefill in chunks (the WY form: the chunk's triangular system solved by forward substitution, state carried in f32 between chunks), proven equal within a named profile to chapter 11's token-by-token recurrence, with state snapshots at chunk boundaries that chapter 12's forks and speculative rollback can reuse.
43. Fuse and replay — partly implemented: norm-and-scale and bias-ReLU-add fusion with overlap and liveness checks, and record-once replay for decode and prefill sizes, run on CPU and CUDAFused device operations (normalization with its scale, gate and up projections with their activation, expert routing, a recurrent step with its cache write), each admitted only when its buffers provably do not overlap, and a decode or prefill step recorded once and replayed as a device graph; each fusion keeps its unfused result within tolerance.
44. Elephant and Mammoth on CUDA — runnable for Elephant: about 201 ms per decision with tensor-core projections (about 175 ms for a forked question's suffix), layer-major, feed-forward matrices streamed when memory is short; Mammoth runnable in 46The first device backend, on an RTX 4080: Coax-generated PTX or CUDA C compiled by the driver or NVRTC, device buffers, launches and completion; whole-prompt prefill with chapters 41–43, the weights that do not fit in memory streamed layer by layer, and the complete decision qualified against the CPU reference. The prior bar on this GPU is about 0.2 s for a 1,000-token decision on a 9B hybrid.
45. Share the card — runnable: every Elephant matrix can streamElephant beside a resident gpt-oss-20b on the same 16 GB card: past the feed-forward matrices, the head streams in 21 chunks and then the mixer matrices, so only the workspace, the vectors and two 96 MiB slots must fit (283 MiB for the 86-token sample). A plan checker shows a streamed plan launches what the resident plan launches. The decision becomes PCIe-bound; quantized weights (34) halve the bytes and a card scheduler is a separate service.
46. Mammoth on CUDA — runnable: the plan takes the model's shape as data; Mammoth's decision on the 4080 in about 1.6 s with 12.5 GiB resident and 37.8 GB streamed per decision, within 0.0005 of chapter 15's CPU resultMammoth's 51.3 GB of text weights through chapter 44's engine on a 16 GB card: most of every decision streams over PCIe, so the time is the link's (23.7 GB/s). Elephant's plans are unchanged digest for digest. A forked Lab request is slower than whole decisions when every pass streams; chapter 36's batched suffixes make it two passes, and quantized weights (34) remain.
47. Elephant and Mammoth on Metal — runnable for Elephant: the chapter 44 kernels through coax metal-compute on an Apple M5 Max, float-float f64 qualified exhaustively, the decision within 4.6e-6 of the CPU; with Metal 7 tensor-op tiles for the projections about 0.4 s warm (was 2.7–2.9 s) and the Lab's five questions about 2.4 s with forks (was 34–47 s); served by psionic-serve --elephant-metal; Mammoth remains plannedThe same generated kernels for Apple GPUs, Metal bindings and completion/lifetime rules for the full decision path; qualify Elephant, then Mammoth, against the same CPU references. Apple GPUs have no double precision and flush subnormals, so the device profile states its own accumulation (compensated float-float sums, exhaustively checked transcendentals, host-built rotary tables) rather than inheriting chapter 4's binary64 profile. Tuning tables keyed by Apple GPU family and command buffers encoded in parallel.
48. Integer matrix products — partly implemented: int8 activation and weight blocks with stored sums, exact s32 block sums under a checked overflow bound, a row kernel and a tiled kernel equal bit for bit on the CPU, within a bound frozen before chapter 4's product; device quantizer, row kernels and an exact BF16 tensor-core tile equal the CPU bit for bit on the RTX 4080, with a throughput receipt (slower than f32 today); dp4a and int8 tensor-core primitives openActivations quantized per block to 8 bits with stored sums, dot products accumulated exactly in 32-bit integers, then scaled: a row kernel for a few tokens and a tiled int8 tensor-core kernel for whole prompts, exact on the integer part and within a stated tolerance overall against chapter 4.
49. Read a GGUF file — runnable: bounded little-endian v3, original upstream headersA bounded GGUF reader: magic, version, counts, typed metadata, tensor descriptors, alignment and data offsets, with every count, product and padding checked before use; checked on pinned upstream files and malformed headers. It opens most published quantized checkpoints.
50. Quantized weights and caches — partly implemented: Q8_0 and Q4_0 GGUF blocks decoded and quantized on the CPU, an importance-weighted Q4_0 search, an int8 KV cache within a bound frozen before chapter 41's attention, and a quality card that promotes a profile only within a declared loss, measured on a stand-in decision model; K-quant and MXFP4 profiles, text perplexity, a product evaluation and Elephant cards openQ8_0 first (about 8.5 bits per weight, small enough to keep Elephant resident on a 16 GB GPU), then the 4- and 6-bit K-quants with importance-weighted quantization and per-tensor mixes (chapter 60's MXFP4 decoder is also a candidate), then an optional quantized KV cache; independent decode vectors, partial-row refusal, separate model profiles, and measured memory against quality: perplexity on fixed text, chapter 16's decision metrics and a product evaluation, each compared with the original weights against a quality loss declared before measuring, with an uncertainty estimate over the workload (a deterministic evaluation has no run-to-run noise, but it still samples future requests). Aggressive 2–3-bit consumer profiles carry a quality card (top-1 agreement and KL against the original, task scores) and never inherit the original's evidence.
51. K-quants and lattice quants — partly implemented: Q2_K to Q6_K, IQ4_NL, IQ4_XS and the IQ3 and IQ2 lattice formats (ggml's grids embedded with their SHA-256) decoded exactly on the CPU against an independent oracle, read through chapter 49's descriptors, with a quality card per format on a stand-in model; llama.cpp's quantizers, cards on original weights and perplexity openDecoders for the 2- to 6-bit K-quant blocks and the non-uniform and lattice-codebook formats (IQ4, IQ3, IQ2), each with independent decode vectors and the quality card of chapter 50 (mean KL divergence, same-top-token rate, perplexity with its error), measured against the original weights.

NVIDIA model compatibility does not require CUDA. CUDA and Metal are separate backend projects; neither upstream speed claims nor a reference runtime establishes Psionic execution. CUDA comes first because it is the fastest device on hand. Chapter 44 relies on Coax running on Linux, which works on the development machine but is not yet a qualified Coax target; cuBLAS appears only in chapter 34's comparisons. Quantized profiles (48–51) never inherit the original weights' evidence. Chapters 35 and 36 change scheduling, never results: each must reproduce its single-worker or sequential output exactly under the named CPU profile before it counts.

VI. Useful inference beyond decisions

ChapterWhat we build and check
52. Tokenizers and chat templates — runnable: bounded CPU profileThe other tokenizer families (SentencePiece, WordPiece, Unigram) beside chapter 9's byte-pair encoder, and a bounded subset of the Jinja chat-template language, checked against published tokenizer vectors whose expected ids come from the upstream tokenizers and against real model templates.
53. Choosing the next token — runnable CPU sampler, byte grammar, bounded JSON-schema compiler and Tekken trie masks; whole-vocabulary masks and a second host openA named counter-based RNG with explicit seed/counter progression; temperature, top-k and top-p with stated tie rules; stop conditions and streamed tokens with cancellation; constrained decoding that masks the vocabulary to a grammar or JSON schema using chapter 9's tokenizer tables.
54. Search the Coax book — runnable: bs-attnpool-d64-v1, CPUSearch over the Coax, Psionic and Metaverse Engine books. Passages get stable identities (book, chapter, heading path, content hash), their revision and their chapter's status. Three retrievers rank them on a held-out query set: a BM25 baseline, exhaustive vector search over Psionic's own encoder (chapter 123's split, a learned word table, attention pooling, contrastive training on the books) and a fused retriever. Nemotron-3-Embed-1B-BF16 (exact query/document formatting, bidirectional attention, padding-aware average pooling) remains a later encoder for the same references.
55. Search without scanning everything — partly implemented: bounded CPU HNSW over fixed vectorsOne approximate index built from scratch (HNSW: graph construction, hierarchical search, bounded exploration, persistence and stated memory), introduced only once the corpus is large enough to need it; recall against exhaustive search at fixed budgets.
56. Rerank the candidates — partly implemented: runnable merge, pairwise reranker and separate index-recall and relevance measurements on the CPULexical and dense results merged, then a small shortlist scored more carefully; index recall, retrieval relevance and answer quality reported separately, so a gain in one is never credited to another.
57. Answer from current sources — partly implemented: runnable extractive answers with revision-checked citations, abstention and a held-out measurement on the CPUA Coax documentation assistant that answers from retrieved evidence and shows the exact passages, with their source spans and versions; a corrected or deleted document stops appearing in results, and answers are checked for using the evidence they cite.
58. Continue a passage — runnable checkpoint inventory, the Llama 3 tokenizer over full Unicode, llama3 frequencies, a 4,096-position key-value cache equal bit for bit to full recompute (checked past position 64), and greedy and seeded continuation on all 32 original-weight layers, every layer, the last logits and the greedy tokens matching a parallel float64 referenceLlama-3.1-Minitron-4B-Width-Base: exact head dimensions/position rules, full-versus-cached logits, and deterministic and seeded continuation through chapter 53.
59. Run in the browser — partly implemented: chapter 54's search in Wasm in headless Chrome, bit-equal to the native tool, with encoder and corpus digests checked before it answersPsionic CPU kernels compiled to Wasm through Coaxial, then WebGPU compute once Coax emits it; serve chapter 54's search on openagents.com with natively precomputed document embeddings and a separately selected query encoder small enough to download. A smaller browser query encoder must be shown compatible with the stored document embeddings, by a measured alignment or distillation or by a matched query and document encoder pair; equal vector dimensions prove nothing.

These are forward-only applications of I–II, with their own architecture profiles; training the retriever itself on contrastive pairs and hard negatives is a later extension on Part XII's machinery. Constrained decoding is a sampling contract, not a parser of model output after the fact: a token outside the grammar is never offered. Chapter 59 is a separate target with its own ABI, memory-growth and numerical evidence; a Mac result does not qualify it. The optional small import lab in appendix A can help readers with limited memory; it is not an extra dependency of Elephant or Mammoth.

VII. An open reasoning model: gpt-oss

OpenAI's gpt-oss is the first general assistant model in the plan: Apache-2.0 weights, a mixture-of-experts decoder and a structured response format built for tools and reasoning. It needs no training and no hybrid recurrence, only the forward core of I–II, the memory plan of 33 and the sampling of 53.

ChapterWhat we build and check
60. Original MXFP4 weights — runnable: bounded CPU format decoderThe checkpoint's own MoE format: 32 FP4 (E2M1) values packed into 16 bytes per block, with one biased power-of-two scale per block in a separate .scales tensor. Decode every code at every admitted scale exactly into f32 against an independent table, refuse partial blocks and out-of-range scales, and keep this original format distinct from chapter 50's derived quantization profile.
61. A few experts, then a router — runnable: bounded CPUA tiny MoE with directly checkable choices, ties, weighting, dispatch/gather and expert-residency budgets; then gpt-oss's selected-only softmax over sorted top-four logits, under an explicit wide CPU and lowest-ID-tie profile. Original gate projection and BF16 parity remain separate.
62. Attention with sinks and a window — runnable: bounded wide CPULearned per-head sink logits that join each softmax denominator without contributing a value; a 128-token banded window on alternate layers beside full attention, with a window-bounded cache; YaRN rotary scaling (base 150,000, factor 32 over 4,096 original positions); a reusable bounded biased projection; and the clamped SwiGLU (alpha 1.702, limit 7, plus-one linear term). Projected-Q/K/V execution supports 64/8 heads, windows through 128 and absolute positions through 131,071; full attention is limited to 128 tokens. Full-size original projections and whole-block/model qualification remain chapter 64 gates.
63. The harmony format — runnable: bounded text profileOriginal o200k byte ranks and case-sensitive splitting with Unicode-17 properties, shared byte-BPE and separately pinned table identity (201,088 vocabulary entries). Typed system/developer/user/assistant/tool framing, low/medium/high reasoning templates, ordinary-text marker isolation and strict full/completion parsing of analysis/commentary/final, with exact return/call stops and atomic publication. Bounds: 64 messages, 16,384 IDs and 65,536 decoded bytes; optional header extensions and tool execution remain separate.
64. Execute gpt-oss-20b — CPU reference complete; GPU throughput openComplete authenticated original BF16/MXFP4 execution, seeded temperature/top-k/top-p sampling, independent dense intermediate/router/logit references, exact cached/replay checks and measured CPU residency. Implements the sampling primitives needed here without completing chapter 53’s broader scope.
73. Execute gpt-oss-120b — CPU reference complete; GPU throughput openThe same CPU engine with 36 layers and 128 experts, separately authenticated seven-shard originals, independent full-stack references and measured resident memory on the 128 GiB host. Offload remains a separate profile for smaller hosts.
75. Let the small model guess — correctness reference complete; fast device verification openStandard acceptance, positive-residual correction and all-match bonus, complete KV snapshots/replay and prompt n-grams. Exact tiny sampled checks and original 20b→120b greedy parity for draft limits 1/2/4; measured serial target batch 1 is slower than target alone, so no acceleration claim.
77. Call a tool — bounded reference complete; device serving integration openCommentary handoffs with a bounded root-object JSON-schema enum masking the vocabulary before sampling; explicit host grant, named tool result and final-only display. Original 20b forced named calculator round trip; general schemas and autonomous tool choice remain separate profiles.

GPT-OSS device delivery order

The CPU chapters establish a numerical reference. They do not complete the usable-inference goal. Advance this track before adding another model family. 37, 41 and 43 supply shared device infrastructure as it becomes available.

OrderChapter / milestoneCompletion gate
165. Original weights stay on the GPU — qualified: original 20b / RTX 4080A pure Coax memory/dispatch plan admits the complete original 20b payload, immutable packed MXFP4 experts, persistent activations and a bounded KV cache; actual allocation on the 16 GiB RTX 4080 succeeds with measured headroom. Authenticate/upload once. Coax kernels qualify BF16 and fused original-MXFP4 products on small fixtures and original-shaped projections.
266. A complete CUDA decoder — qualified: greedy original 20bNorm, projections, YaRN, sink/window attention, routing, selected experts, residuals and head execute on device. Original 20b logits/routes meet a tolerance frozen before comparison with recorded CPU references. A complete Harmony turn runs with no per-layer activation/route downloads or weight transfers.
367. Prefill together — runnable: 128-token grouped SIMT chunksBatch prompt tokens into matrix products; group tokens by expert; tiled sink/window attention and fused small operations. Shared memory/reductions/matrix instructions extend Coax compute where measurements require them. Report time to first token separately from steady decode, with exact model/context/build identities.
468. Coax kernels cooperate — partly implemented: group-kernel tile reduction, butterfly exchange, shared-tile BF16 product and Coax capability admission run on CPU and CUDAExtend the compute contract with explicit cooperative tiles, uniform participation/barriers, lane exchange, device capability admission and packed BF16/FP16 matrix primitives. Coax owns semantics and admission; the native backend lowers them. CPU scalar oracles, negative participation/capability cases and small actual-device checks precede any full model. No hand-written model kernels.
569. Original MXFP4 products use matrix hardware — partly implemented: MXFP4-BF16-MMA-v1 expert products within a frozen bound on CPU and CUDA, original layer 0 tensors, measured against the f32 kernelsStage bounded original coefficients exactly, split f32 activations into checked BF16 limbs where needed and accumulate tile products under a separately named numerical profile. Freeze its bounds before comparing with independent tiny and retained original vectors; preserve exact route/top-token gates. Measure the selected-expert bottleneck before/after; do not silently replace the f32 reference with a looser profile.
670. Replay the device program — synchronous CUDA replay completeCoax constructs a replayable device program with immutable admitted bindings and bounded dynamic token/position control. Native CUDA graph effects own node creation/update/replay/destruction. Failed/cancelled steps retain transaction boundaries; compare cache/logits/stop behavior to the unfused path and measure host enqueue savings.
772. gpt-oss-20b on Metal — qualified: original 20b / Apple M5 MaxThe same Coax launch programs and kernels through coax metal-compute and gptoss-metal.c, with every weight resident and no CPU fallback. Chapter 66's frozen rule passes against the recorded CPU vectors, and greedy token IDs equal chapter 64's CPU engine on both fixture prompts. A per-launch CPU repeat differs only in f32 exp ulps and float-float sums. Measured on a shared machine: 34.8 tokens/s decode and 6.44 s for the 1,024-token prefill, against the 4080's 53.2 tokens/s and 3.21 s. Served by serve-gptoss.sh --metal on port 8794; the desktop app uses it with PSIONIC_GPTOSS_HOST=local. Faster Metal products wait on 68/45e. Record.
871. Throughput is a gate — partly implemented: the tg-gptoss20b-v1 gate and its 4080 receipts; both goals pass with tensor-core prefillOn the 4080, a frozen 1,024-token input/128-token forced-output workload, one warm-up and five timed runs, decided against 2 s prefill and 25 tokens/s decode by chapter 34's warm-run statistics (pass, fail or too noisy), bound to build, commit, machine and device, and refused when greedy outputs on the fixture prompts change. The f32 prefill measures 3.107 s (fail) with decode at 56.2 tokens/s; chapter 69's MXFP4-BF16-MMA-v1 products in chapter 67's grouped prefill measure 1.511 s, and both goals pass with identical greedy outputs. Remaining: P95, allocation/peak device memory per phase and transfers; an installed packaged reference on the same device; bounded continuous batching and KV allocation with aggregate and per-request rates at concurrency 1/4/8 (chapter 175); the Responses server does not yet turn the tensor-core prefill on.
974. Fit 120b on the right device — partly implemented: runnable fc-120b-v1 device-choice planner (resident, dense-resident with streamed experts, or refused, with exact bytes) picking the 128 GiB Mac over the RTX 4080 from measured rates, and a measured RTX 4080 expert upload receipt; the 120b device runs remainUse the same device engine on enough resident memory: qualify the Metal engine of 72 on the 128 GiB Mac, or an explicitly available larger/multiple CUDA device configuration. The 4080 cannot keep the complete original 120b weights resident. Hardware acquisition and new hosted machines remain owner decisions.
1076. Verify a draft block in parallel — runnable greedy device verification; measured slower, so offBatched device target verification and rollback of only speculative state, preserving overwritten sliding slots. Greedy parity and tiny sampled-law checks remain required; measure actual acceptance and a net latency gain over the qualified target-only device path before enabling speculation by default.
1178. Device generation calls a tool — partly implemented: original 20b CUDA round trips token-equal to the CPU referenceThe resident CUDA engine runs every layer; Coax masks the downloaded logits (one counted 804,352-byte transfer per argument token), checks the grant, sequences cancellation and release, and refuses instead of falling back to the CPU. A device mask kernel, Metal and the streamed server path remain.
1279. Serve Responses — resident original 20b, bounded text/function profileResponses-native HTTP and semantic SSE, separate raw reasoning replay, sequential external function handoffs, cancellation, usage and explicit unsupported-feature errors. Start after 67; keep the engine resident. Qualify owned HTTP/SDK/schema tests and real original-model requests. Decode qualification records the first improvement; the second pass adds 15.7–35.5% decode throughput over it, with exact state/output. The performance notebook retains the process and backlog. Storage, strict decoding, continuous batching and production ingress remain later gates.
1380. Two models, one card — runnable: gpt-oss-20b and Elephant on one RTX 4080Start order and memory budget for both servers on one 16 GB card (gpt-oss resident, Elephant streaming through chapter 45), --device-mib for the other order, verified starts, and a client that chains them: gpt-oss reads an issue, Elephant ranks candidate files, gpt-oss writes the report. No card scheduler; concurrent use is unmeasured.

The 65–67 record retains independent-vector qualification, complete Harmony generation, bitwise serial/batched GPU parity over 129 positions and five warm core measurements. The selected original-MXFP4 products dominate diagnostic timing. This is why cooperative/matrix support and graph replay now precede the final throughput gate. The initial implementation is useful resident GPU inference, with further throughput work explicitly open.

Check-first development uses small owned fixtures, recorded original answers and focused changed-code checks. Full CPU model execution and whole mutation roots are not routine iteration gates. Small real-device qualification precedes each full-model GPU measurement. No hand-written arithmetic kernels or served BLAS runtime is introduced; Coax owns kernels and decisions, and C owns device effects.

The torch reference upcasts MXFP4 to BF16, so a converted BF16 checkpoint is not the original artifact; chapter 60 decodes the original blocks. The reference torch, Triton and Metal implementations are read as untrusted source, not executed, and their browser and Python tools are explicitly educational upstream, so Psionic does not adopt them. The 20b model's 16 GB figure is an upstream claim until chapter 33's plan measures it. Text input is the whole scope. This part does not block Elephant or Mammoth.

VIII. Mistral models, from Ministral to Le Chonk

Mistral publishes a ladder of open models whose architectures add one feature at a time on the way to Mistral Large 4 ("Le Chonk"): 1T total and about 52B active parameters, 128 routed experts plus a shared expert, latent and sparse attention, FP8 weights and a built-in draft head. This part qualifies each feature on the smallest model that has it. Large 4's 1,060.6 GB of original files fit no single machine, so it is executed in Part XX, across a mesh.

ChapterWhat we build and check
81. Execute Ministral 4 — partly implemented: runnable checkpoint inventory, full Tekken with its Unicode pattern and the chat format, YaRN frequencies, and all 26 layers with a key-value cache, with a recorded greedy run on the original weights matched by a float64 reference; long positions and the reasoning format openMinistral-3-3B (Apache-2.0, BF16 originals): the Tekken tokenizer through chapter 9's byte-BPE engine with its own pinned tables, Mistral's chat and reasoning format, and a dense grouped-query decoder with its long-context rotary scaling; token, intermediate and logit references.
82. Original FP8 weights — partly implemented: exact CPU FP8 E4M3 block decode and approximate activation profile on constructed filesE4M3 values with one scale per 128×128 block, including Large 4's power-of-two (UE8M0) scales: exact decode of every code at every admitted scale against an independent table, partial-block and scale refusals, and FP8 originals kept distinct from chapter 50's derived profiles. The reference's dynamic FP8 activations are a separate approximate profile.
83. A coding agent — partly implemented: devstral-agent-v1, bounded CPU; Devstral's weights and real pass rates remainDevstral-Small-2-24B (Apache-2.0, FP8): Mistral's function-calling format with arguments constrained by chapter 53, and long-context requests through chapters 41 and 176; first measured against a fixed coding-task set.
84. Attention through a latent — partly implemented: latent-attention-cpu-f64-v1, bounded CPU; the comparison on original checkpoint layers remainsMulti-head latent attention: queries and keys split into rotary and non-rotary parts, keys and values reconstructed from a low-rank latent, and the absorbed projections that let decode attend in latent space. The compressed cache's size is accounted exactly, and the absorbed form is compared with the expanded one.
85. Execute Mistral Small 7 — partly implemented: mistral-small-cpu-f64-v1, bounded CPU; the original weights and whole-model execution remainMistral-Small-4-119B (Apache-2.0, FP8, 241.9 GB of originals): latent attention plus 128 routed experts with four selected and one shared expert, extending chapter 61's router. Measured residency on one large-memory machine, or the expert paging of chapter 73.
86. Sparse attention and shared layers — partly implemented: sparse-attention-cpu-f64-v1, bounded CPU; indexer selections on original Large 4 layers remainLarge 4's attention features on tiny fixtures and selected real layers: a lightning indexer that picks the top 2,048 keys per query (FP8 indexer), indexer and KV sharing across layers from the pinned source map, no rotary positions on every fourth layer, tanh soft-capping of logits at 30, and YaRN scaling (factor 2048 over 512 positions) to 1,048,576.
87. The model's own draft head — partly implemented: draft-head-cpu-f64-v1, bounded CPU; running Large 4's real head remainsLarge 4's embedded multi-token-prediction draft head as a speculator under chapter 75's acceptance rule: identical greedy output, exact acceptance probabilities on tiny fixtures, and measured acceptance and draft length.

Ministral 3, Devstral Small 2, Mistral Small 4 and Mistral Large 3 are Apache-2.0. Large 4 uses the Mistral Ecosystem Open-Weight License. It permits internal use and embedded product features, but offering the model as a service needs a separate commercial licence from Mistral, and that is an owner decision. Text is the first scope; the Pixtral-style vision encoders are separate image profiles in Part XIII. The NVFP4 variants are derived checkpoints for Blackwell GPUs, not originals.

IX. DeepSeek, natively

DeepSeek publishes both open models and unusually detailed accounts of how it serves them. This part builds our own version of the pre-reset DeepSeek V4.1 Flash work in Coax: the model ladder from a small distill to V4.1 Flash, V4.1's distinctive components, and the engine techniques behind its efficiency. Each technique is exact unless its profile says otherwise. The old Rust attempt ran V4.1 end to end but never passed numerical parity; chapter 17's rules come from that failure. It also served V4.1 Flash from one RTX PRO 6000 the way Project Maya does on home PCs (chapter 101).

ChapterWhat we build and check
88. Execute a DeepSeek R1 distill — runnable: bounded original BF16 CPU referenceR1-Distill-Qwen-1.5B through the shared dense path: the distill's own tokenizer, BOS from the tokenizer rather than the config, a template that strips earlier reasoning, and separate reasoning and final output.
89. DeepSeek’s front door — runnable: original V4.1 text tokenizer, bounded recipe and stream protocolThe recipe layer in Coax. Special tokens are inserted by boundary, never by spelling, so user or tool text that spells a marker stays text. Segments between specials encode independently. A streaming parser carries incomplete UTF-8 and multi-token delimiters across chunks in linear time and emits tool names and escaped arguments as they arrive. A stream that ends without a finish event is reported incomplete.
90. Execute DeepSeek V2-Lite — runnable: complete original BF16 CPU reference16B total, 2.4B active: DeepSeek's latent attention (sharing chapter 84's math) with 64 routed and 2 shared experts, compared in compressed and expanded form with router and combine parity and cache continuation. Fits one Mac.
91. Routers that balance themselves — runnable: CPU wide routing equationsV3-style selection with a bias used only for choosing experts and unbiased scores for weighting, V4.1's square-root-softplus scores and route scale, explicit lowest-id tie rules, and router-margin records so near ties are visible in every comparison.
92. Compressed and shared attention — runnable: projected CPU wide attention and shared stateV4.1's attention: a 128-token window ring, a gated pooling compressor (ratio 2) and an ungated one (ratio 1), a single shared KV head with an attention sink, KV and indexer state reused across layers from pinned source layers, and candidate blocks chosen at one layer and read by the layers after it. Chunked and whole prompts give identical state.
93. Many residual streams — runnable: CPU wide hyper-connection equationsHyper-connections: four parallel residual streams mixed by pre, post and Sinkhorn-normalized 4×4 coefficients (20 iterations), with the collapse that reads the previous sub-block's mix, which must cross any stage boundary.
94. Memory by lookup — runnable: original token map, exact hashes and bounded file rowsEngram: hashed n-gram tables (up to 4-grams over a normalized, compressed vocabulary) with prime bucket layouts and the reference's fixed per-layer multipliers reproduced exactly; tables of about 101 GB each read a few rows per token from mapped files or disk, never loaded whole.
95. V4.1's expert weights — runnable: CPU wide equations and original MoE component384 routed experts in low-nibble-first FP4 E2M1 with separate UE8M0 scales per row and 32 K elements, plus one shared FP8 E4M3 expert with 32×32 scales, as confirmed by the pinned source and raw header. A 0xFF scale is NaN. Clamped SwiGLU and route weights before the down projection. Exact decode vectors for every code and scale.
96. Hot experts in fast memory — runnable: exact CPU cache core; device integration openAn exact expert cache: residency seeded from a recorded routing profile, decayed-frequency heat with a swap threshold, copies between steps, misses served by a host lane or from mapped files, and next-layer gate prefetch. The cache changes only where an expert runs, never its result.
97. Prefill layer by layer — runnable: CPU chunks, original MoE batch and exact CUDA productsLayer-major chunked prefill that reads each expert once per chunk instead of once per token, then grouped block-scaled matrix products; chunk size from a per-step time budget, and a check that no configuration silently disables chunking.
98. Pack the cache exactly — runnable: exact CPU BF16 grid codec and cache/work inventoryWindow KV in FP8 and compressed and index keys in FP4 where the reference already rounds to those grids, bit-checked against it; the memory of step buffers, which scale with chunk size, budgeted separately from the cache.
99. A decode step with no host waits — runnable on gpt-oss-20b: recorded step with device sampling, no host wait inside a step; the V4.1 step remainsThe whole decode step as one recorded device command sequence: expert ids that stay on the device, sampling on the device so a stage returns a token rather than logits, and a host that schedules step N+1 while step N runs, with buffer lifetimes that allow speculative lengths to be learned a step late.
100. Execute DeepSeek V4.1 Flash on one machine — runnable on CPU: the header manifest against the config, a host byte plan that refuses this host on disk, and the 40-layer stack composed on small weights against a composed oracle; the original weights, GPU path and qualification remainThe complete model, 510.3 GB of originals: one large GPU or a large-memory Mac with experts from the cache of chapter 96 and Engram from disk, qualified under chapter 17 against a reference capture and measured for time to first token, tokens per second and memory.
101. Maya's recipe: V4.1 Flash on one card — runnable on CPU as a plan: Maya-S's formats and exact file bytes from the header manifest, its published figures checked, the prompt-skip bound, placement and token time, this host refused on disk; the experts' quantizers, GPTQ, files and the quality card remainProject Maya (MIT) serves V4.1 Flash from one PC with a hot-expert cache and 2–3-bit experts. The pre-reset Rust stage did the same on one RTX PRO 6000 (96 GB, 176 GiB of RAM, a rented g4-standard-48), not on an RTX 4080. Rebuild that box in Coax from chapters 94, 96, 97 and 98, plus routed experts requantized to about 2.6 bits a weight (178 GB) by importance-weighted GPTQ, the exact skip of layers 21–39 for all but the last 19 × 127 + 1 = 2,414 prompt tokens, and a per-machine calibration of cache size and miss lane. The quant is a separate consumer-q profile: never qualified, never in a qualified group, scored by its own card against the reference (top-1 agreement, KL, G2 answers). Targets from the old run: 24.5 tokens/s decode, 91% top-1 and mean KL 0.117; Maya's own engine on the same machine reached 35 tokens/s, 54 with drafts. Then the same build on a 16 GB card such as the 4080: what fits beside its host RAM, the decode it reaches, or a stated refusal.
102. Verify drafts by expected gain — partly implemented: draft length by expected gain; on the RTX 4080 it chooses no speculationThe checkpoint's own draft layers, fixed-length verification first, then variable-length verification chosen from a trained confidence head and a measured cost curve, reported as committed tokens per unit time rather than projected acceptance.

The reference implementation's exact arithmetic depended on its hardware and parallel layout, so qualification compares distributions, not bits; chapter 17 sets the rules. The serving facts DeepSeek has published (prefill and decode on different groups, expert parallelism only inside a fast domain, a shared prefix cache of 128-token pages) inform chapters 176, 177, 182 and 183. DeepSeek's own engine, kernels and libraries are references read as source, not dependencies. V3/R1-scale checkpoints and V4.1 split into stages run in Part XXII.

X. Learn with the operations we already own

ChapterWhat we build and check
103. Learning with arrays — runnable: cpu-f64-sgd-v1, simulator onlyA small supervised path on one dataset: a line with several inputs, logistic regression, then one hidden layer, each compared with a constant predictor and a handwritten rule, with explicit gradients and SGD. The project predicts whether a request finishes before its deadline from a controlled simulator (prompt length, queue depth, model choice, memory headroom), later from chapter 18's measurements. Feature scaling, grouped train/validation/test splits, regularization, class imbalance and threshold choice are measured, and one case shows the larger model losing. It can follow chapter 4 directly.
104. Gradients as a program — runnable: cpu-f64-tape-v1A bounded reverse-mode tape, saved values, accumulation and parameter identity; analytic and finite-difference checks.
105. Make a model fail, then find out why — runnable: cpu-f64-diagnose-v1A working classifier broken on purpose (gradients that accumulate across steps, targets paired with the wrong examples, a loss mask that includes padding, a learning rate too large, initialization that makes hidden units identical, a training-only random operation left on at evaluation), and diagnostics for each: activation distributions, gradient norms, update sizes, train and validation curves, and overfitting one small batch first. Each fault must produce a diagnostic that points at it, and repairing it must restore the expected behavior.
106. Differentiate any tensor program — runnable: autodiff-f32-v1, bounded CPUGeneral reverse mode over 38's IR: vector-Jacobian rules per operator, shared subexpressions, a parameter used more than once, unused gradients, custom derivatives, gradient-mode control and saved-tensor lifetimes. 104's tape stays the teaching version; this is the permanent one. An MLP built from registered operators, including a custom one, trains with checked gradients. Framework track.
107. Transform functions, not just tensors — runnable bounded CPU graph-function profileImmutable graph functions compose grad, value_and_grad, jacobian, jvp, vjp, hvp and shared/mapped vmap through order two over the permanent tensor IR. Formal F64 partials are evaluated at F32 primals with atomic public outputs, tied/strided input bindings and explicit work admission. Registered/device/arbitrary-procedure differentiation and order three remain refused.
108. Choose the next example to learn from — runnable: cpu-f64-acquire-v1, bounded CPUAn active-learning loop over an owned pool: a small classifier chooses examples by uncertainty, diversity or a mixture, then an independent checker supplies the requested labels; unqueried labels stay hidden from the selector. Compare with random selection using the same trainer, initial labeled set and total label budget, including the initial labels, over several fixed seeds. Keep held-out groups outside acquisition and tuning; record each query and label, quality versus labels acquired, and acquisition and training cost. Include a confidently wrong region that uncertainty alone can miss. The chapter reports whether choosing better data helps, including a negative result; the selector never supplies its own labels.
109. Learn a physical system — runnable: oscillator-rk4-f64-v1, bounded CPUA supervised oscillator or cooling surrogate from our own deterministic solver; held-out parameters, one-step error and repeated rollout stability.
110. A grid world that learns, plans and recovers — partly implemented: cpu-f64-grid-v1, bounded CPUA headless grid or 2D navigation scene with obstacles, goals and resettable state. An exact planner supplies demonstrations for a small policy, which then collects labels on the states it actually visits (DAgger); a second route plans with chapter 109's learned model, executes one action and replans, and shows the optimizer exploiting the model's errors. Whole episodes on held-out maps and parameters, completion, collisions, recovery and computation per decision, with tiny cases checked against exhaustive search. A Metaverse character that navigates and recovers follows from here.
111. Recover the physics from the motion — runnable exact F64 RK4 inverse problemUnroll the owned physical transition on the F64 tape, infer stiffness/damping from three recorded forced motions, and predict held-out motion. Six frozen noise/sampling cases, a 256-forward grid comparator and an equilibrium nonidentifiability case keep recovery, compute cost and applicability separate.
112. Bytes and a small language model — runnable: bounded CPU profileA real byte vocabulary, bigram likelihood, fixed licensed splits, named RNG and complete tiny training/generation.
113. Differentiate a decoder — runnable: cpu-f64-causal-decoder-v1Backward operations for the complete causal attention/FFN path; causal isolation and gradient coverage.
114. Compile the backward pass — partly implemented: compiled-backward-f32-v1, bounded CPU; fusion, symbolic shapes, AdamW and step time openDifferentiate the IR itself, plan saved activations, choose recomputation, fuse backward operations and compile the optimizer update. Eager and compiled training agree on loss, gradients and updates over several steps, with memory and time measured. Framework track.
115. Train the whole tiny decoder — runnable: tiny-train-cpu-f64-v1, bounded CPUA complete small transformer with training, held-out likelihood and generation; keep it as a permanent regression.
116. Train within a memory budget — partly runnable: mb-plan-v1, mb-train-cpu-f64-v1, bounded CPU (packed reduced-precision storage, random-number replay and wall-clock timing remain)Where training memory goes (parameters, gradients, optimizer state, saved activations and workspace, each with its own lifetime), gradient accumulation with correct loss normalization and update timing, activation checkpointing that recomputes chosen blocks, and a precision policy per operation (storage, multiplication, accumulation, gradients, optimizer state) with loss scaling. The tiny decoder trained under a fixed memory cap three ways, with gradients and updates against the reference, random-number replay for recomputed operations, measured savings and extra time, and overflow and underflow fixtures.
117. Models are compositions of modules — partly implemented: module-f32-v1, bounded CPUModule and Parameter, named submodules and parameter trees, persistent and non-persistent buffers, train and eval modes, initialization, freezing and parameter sharing. The gate: someone who has never worked on Psionic builds an MLP, a CNN, a small residual network and a transformer from the documented public API without touching runtime code. Framework track.
118. One trainer for every model — partly runnable: trainer-cpu-f64-v1, bounded CPU (GPU/compiled CNN training, SGD with momentum and Muon, and chapters 104, 116 and 157's trainers remain)One model, loss and optimizer interface with epochs and steps, gradient clipping and accumulation, validation, schedulers, callbacks and cancellation; an image classifier and a tiny language model train through the same interface. Framework track. A measured 196→16→10 MNIST consumer uses the same public interfaces and f64-master/f32-compute AdamW: 85.6934% on the frozen test slice, exact next-update resume and named export/reload. A separately frozen 2,910-parameter CNN uses reusable CPU convolution and the same training/state APIs, reaching 88.5742% on its held-out slice with replay and export checks. Broader CNN/GPU and generalized data/optimizer integration remain.
119. Change an activation, change the answer — runnable hint-shortcut task, named-site capture and replacement, controls, development site choice, held-out ablation and patching, exact restoreTrain a tiny decoder on an owned task with a known shortcut, then capture and replace activations at named layers on paired clean and corrupted inputs. Ablate a candidate feature, patch it from the paired run, and try to remove and restore the shortcut's effect. No-op patches and unrelated-feature controls come first; restoring the original activation must reproduce the original output under the declared profile. Choose sites on development examples, then measure effects and retained task ability on held-out counterfactuals. Reuse appendix D's bounded inspection tools, but judge the explanation by interventions rather than an attention picture; report any failure to isolate the behavior.

Chapter 109 needs 103–104, not language-model training. It is our first physics chapter, much earlier than pretrained geometry or weather models. It uses ordinary supervised learning; 111 differentiates through a smooth solver and can start after 104 and 109, without navigation or higher-order derivatives. Higher-order physics-informed derivatives are a separate extension in appendix C. Active learning in 108 needs only 103–104, not the general framework of 106–107; 119 trains chapter 113's decoder on an owned task with a known shortcut and adds bounded activation capture and replacement. These experiments begin on owned CPU fixtures and do not require another pretrained model or a GPU.

XI. Data, tokenizers, state and optimization

ChapterWhat we build and check
120. Data and resumable state — runnable: bounded CPU profile psionic-split-v1 on psionic-resume-v1Provenance, disjoint splits, document packing, model/optimizer/RNG/data counters and exact resume under a named profile. Splits are made by task, session or time, never by row: repeated episodes, paraphrases and near-duplicates stay in one split, preprocessing is fitted on training data only, and planted leakage (including a feature known only after the outcome) must be detected. Provenance, grouping, one split per group, the leakage audit, training-only preprocessing and exact resume on the clean split run; semantic paraphrase detection and chapter 247's exposure ledger remain.
121. Feed the accelerator — partly implemented: runnable packed-text batches on 1, 2, 4 and 8 host-thread workers through a bounded prefetch ring, byte-identical to the single-threaded stream and across a resume, with the stall model and one measured CPU receipt; no image pipeline, masks, transforms or GPU transfersIndexed and streaming datasets, samplers, batching and collation, shuffling, transforms, workers, prefetching, pinned host memory, backpressure and resumable iterator state; a reproducible image and text pipeline, with the GPU time lost to loading measured. Framework track.
122. A checkpoint holds the whole experiment — runnable: bounded CPU profile psionic-resume-v1A versioned record of parameters, optimizer and scheduler state, RNG, data position, precision policy, compilation identity and provenance. Training interrupted at a chosen step resumes and reproduces the declared continuation profile; 135 restores it into a different shard layout. Framework track. Packing, identities, the record, the pointer and exact resume run; scheduler state, compilation identity and shard layouts remain.
123. Learn a tokenizer — runnable: bounded CPU profileDeterministic byte-BPE training in Coax with explicit tie rules and a pinned pretokenization pattern (nanochat's two-digit number groups); the trained table round-trips through chapter 9's encoder, and an independent oracle reproduces the merges.
124. AdamW, then Muon — runnable: cpu-adamw-v1, cpu-muon-v1Independent update derivations, parameter groups, precision and the exact pinned nanochat optimizer behavior. AdamW, groups, precision and resume run; nanochat's MuonAdamW grouping and updates run on one rank in binary64. Multi-rank sharding, bf16/fp32 bit parity and base_train's schedules remain.
125. Optimizers are reusable componentsOne optimizer interface for SGD with momentum, AdamW and Muon, schedulers, parameter groups, weight decay and complete state serialization; optimizers swap on an unchanged model, each update checked against an independent calculation. Framework track.

Data admission begins with the first trainer. These chapters consolidate it before longer runs rather than postponing provenance until this part.

XII. Rebuild nanochat, then extend the training pipeline

ChapterWhat we build and check
126. Execute nanochat exactly — runnable on the CPU, partly implementedPinned BPE/conversation rules, inert checkpoint export, every enabled forward feature and cached inference.
127. Differentiate nanochat — runnable on the CPUGradients for every enabled feature; tiny independent comparisons and complete parameter coverage.
128. A complete pretraining run — partly implemented: runnable on the CPUTokenizer training from 123, initialization, schedules, accumulation, token budgets, packing, resume and held-out loss/bits-per-byte; tiny first, measured scale later. The same budget spent two ways (a smaller model trained longer against a larger one trained for fewer steps), including the deployed inference cost.
129. Train a whole model on one GPU — partly runnable: gpu-train-f64-v1 and char-gpt-shakespeare-v2, CPU and CUDA (a 10.8M-parameter decoder trains whole-step at 108k tokens/s in FP32 (held-out 1.517) and 237k tokens/s on BF16 tensor cores with BF16 storage (1.520), against PyTorch's 1.528, with exact resume; an MLP and a CNN on the device and convolution gradients remain)GPU forward and backward, gradient accumulation and optimizer updates on device, BF16 and FP32 policies, and the backward kernels inference never needed: matrix products, normalization, attention and convolution gradients. An MLP, a CNN and a tiny transformer train on the RTX 4080 with all trainable state on the device between steps, and a 10–50M-parameter decoder runs a complete training job with no PyTorch, no unintended CPU fallback and independently verified gradients. Framework track.
130. Profile a training step — partly runnable: tp-step-v1, CPU and CUDA (chapter 129's useful-scale step is profiled with one fixed bottleneck and before-and-after receipts; launch overhead apart from kernel time and per-buffer allocation lifetimes remain)Operator-level CPU and GPU timing, kernel launches, GPU idle time, transfers, allocation lifetimes, peak activations, backward cost and compile cost; one bottleneck found, fixed and its improvement measured. Framework track.
131. Train the same model eager and compiled — partly runnable: train-compare-v1, bounded CPU (a whole-step GPU program exists for chapter 129's decoder but is not compared with an eager path; bounded dynamic batch sizes, fusion and the optimizer compiled in remain)Whole-step compilation with bounded dynamic batches, fusion, activation liveness and the optimizer step; the same model, data order and RNG policy compared on gradients, updates, final metrics, memory, compile cost and steady-state speed. Framework track.
132. Train across devices — partly runnable: device-group-v1, CPU threads and CUDA (several identical GPUs or machines, a real interconnect, sharded optimizer state, a deterministic ring all-reduce and the collectives shared with serving remain)One real homogeneous topology: gradient collectives (shared with 176), sharding/resume, numerical comparisons and measured scaling.
133. A tensor spread over devices — partly runnable: shard-v1, bounded CPU logical devices (a named multi-axis mesh, layouts in chapter 38's tensor IR, transfers on real devices and more operations remain)A device mesh, replicated, sharded and partially reduced layouts, collectives, placement propagation and redistribution; one operation runs under several layouts and matches a single-device reference. Framework track.
134. Data-parallel training — partly runnable: data-parallel-v1, bounded CPU ranks (measured throughput with and without overlap remains)Gradient buckets, all-reduce, accumulation boundaries, communication overlapped with computation, and handling a failed rank; one and two devices compared on gradient semantics, throughput and restart. Framework track.
135. Fully sharded training — partly runnable: fully-sharded-v1, bounded CPU logical ranks (measured scaling and peak memory, and per-layer gathering, remain)Sharded parameters, gradients and optimizer state, prefetching all-gather and reduce-scatter, and checkpoints restored into a different shard layout; a model whose training state exceeds one GPU's memory trains and resumes. Framework track.
136. Supervised conversations and tools — runnable calculator-tool SFT with assistant/tool loss masks, split by problem, refusals, resume and a frozen rule (dataset subsets remain)Assistant/tool loss masks and validation; bounded Nemotron-Agentic-v1/OpenCodeReasoning subsets with provenance and base-skill regression.
137. Continued pretraining and task adaptation — partly implemented: runnable on the CPUA separately specified domain workload, data mixture, retention checks and promotion criteria. This is a Psionic extension, not a stage claimed from the pinned nanochat speedrun.
138. Preferences and reward models — runnable Bradley-Terry reward model and DPO on calculator-tool pairs with known ground truth, held-out accuracy with intervals and frozen rules (HelpSteer3 remains)HelpSteer3 pairwise data, ranking/reward losses and an optional separately specified DPO experiment; held-out comparisons and reward-model limitations.
139. Learn from rollouts — runnable seeded rollouts, a token checker, group-relative advantages with a KL penalty to a frozen reference and an on-policy step on chapter 136's calculator task, with a paired held-out rule (chapter 242's environments and chapter 240's noise floor remain)The pinned nanochat on-policy, mean-centered-reward recipe; bounded rollouts, independent gradient/reward checks and held-out task results. Rollouts come from chapter 242's environments.
140. Post-train a decision model — partly implemented: cpu-f64-post-train-v1, stand-in decoderQualified hybrid backward and LoRA adapters (W + (α/r)·BA with W frozen, so only A and B carry gradients and optimizer state while backward still passes through the frozen layers), selected trainable regions, cross-entropy/Brier/abstention, resume and held-out promotion. Promotion passes both of chapter 241's decision and probability gates. A zero adapter reproduces the base model exactly, only the intended parameters change, the adapter records the base-model identity it is compatible with and loads and unloads through the serving path, and task gains and retained abilities are evaluated separately. A quantized-base variant names its full recipe before it is called QLoRA.
141. Distill Mammoth into Elephant — partly implemented: cpu-f64-distill-v1, stand-in student over recorded CUDA answersMammoth's slot distributions as soft targets on a recorded request corpus; KL/cross-entropy over slots, held-out agreement and chapter 16's quality metrics, with Elephant's cost measured against Mammoth's.

The nanochat study is the compatibility contract. Its current speedrun trains a tokenizer and a base model and runs SFT; RL is a separate program. Chapter 139 depends on SFT and its own reward contracts, not on completing preference learning or continued pretraining. Chapters 140–141 need the decision forward path, chapter 16's evaluation and the shared training machinery, not nanochat RL. A distilled student is a new model profile with its own evidence; it inherits neither model's results. No generic PPO, KL penalty or broad RLHF parity is implied. Distributed training (132–135) can begin after a correct resumable single-device trainer and the selected backend.

XIII. Images become features and latent representations

ChapterWhat we build and check
142. Pixels, convolutions and patches — partly implemented: bounded CPU profile psionic-pixels-v1Exact resize/channel/range conventions, convolution, sampling and patch projection with tiny independent fixtures. Admission, profiles, nearest, bilinear and bicubic resizing with aligned corners, antialiasing and resize-then-crop, convolution forward (direct and im2col) and gradients, a tiled patch projection at ViT-B/16 size, lowering of both into chapter 38's IR, and position-table resizing run; chapter 5 operator-table entries and GPU lowering remain.
143. Elephant and Mammoth see — partly implemented: bounded CPU profile psionic-see-v1The pinned Qwen3.5 vision encoder and projector, exact image preprocessing, image token layout and multimodal rotary positions; image-bearing decision requests with their own reference captures.
144. See with C-RADIO — partly implemented: bounded CPU profile psionic-radio-v1C-RADIOv3-B feature outputs, visual-asset retrieval and a small Psionic-trained head over frozen features.
145. Compress and reconstruct an image — partly implemented: bounded CPU profile psionic-codec-v1The older Cosmos-0.1-Tokenizer-CI8x8, including wavelets, normalization and decoder; inspect latent/reconstruction numerics. A small convolutional codec with a 4-bit quantizer, transposed-convolution upsampling, straight-through gradients and AdamW training on procedural images runs, measured on held-out images against frozen gates; the Cosmos checkpoint, its wavelet, normalization and attention blocks and reference parity remain.
146. Noise, diffusion and flow — runnable: bounded CPU profile cpu-f64-diffusion-v1Train a tiny generative example; distinguish objectives, schedules, conditioning and reproducible sampling. A four-class Gaussian mixture with an exact posterior, linear and cosine schedules, four objectives, per-level affine predictors trained by gradient descent, DDPM, DDIM, Euler and Heun samplers and frozen statistical gates run; neural predictors shared across levels and vector conditioning remain for later chapters.

Chapter 143 extends the priority decision models and needs only 142 and the Elephant/Mammoth forward path; text-only qualification does not carry over. Chapter 144 needs the shared forward core and 142; its trained head also needs 103–104. Chapter 145 is an older teaching target, not a promise of Cosmos3 codec compatibility. Chapter 146 introduces the methods later world/robotics models need; it does not qualify their architectures.

XIV. Motion for the Metaverse

ChapterWhat we build and check
147. Poses have conventions — runnable rotation forms, declared conventions, forward kinematics, resampling and same-skeleton retargetingRotation representations, skeleton hierarchy, root coordinates, units, timing and retargeting fixtures.
148. Motion tokens become poses — partly implemented: runnable pose-segment codebook, nearest-code encoder, lookup decoder, continuity check and counted masked-token fillingA tiny codebook/VQ decoder and masked-token generation; known token-to-pose and pose-continuity checks.
149. Execute MotionBricks — partly implemented: pinned SOMA inventory, real codebook tokenizer, synthetic-weight decoder, masked pose transformer and scheduleOne pinned SOMA package: root timing/trajectory, masked motion-token transformer and VQ-VAE decoder, with full trajectory references.
150. Put generated motion in the Metaverse — partly implemented: checked joint map onto the OpenAgents Metaverse's Cast skeleton, synthetic-weight motion played and cross-faded in the dance slotAn explicit skeleton/target interface, bounded generation and animation handoff; a reproducible destination-to-pose scene.

This is the preferred first major Metaverse ML demonstration after useful vision features. It reuses attention, common image/codebook operators where required, and motion math; it does not depend on speech, DoMINO, weather or nanochat RL. Unitree G1 is a separate embodiment/profile, not an interchangeable asset.

XV. Audio becomes words, and words become audio

ChapterWhat we build and check
151. Waveforms and spectral features — runnable CPU FFT and log-mel features; recorded Parakeet features, dither and 2D openSample/rate/channel admission, windowing, tiny DFT → FFT/inverse, spectrogram/mel and exact feature normalization.
152. A speech encoder — partly implemented: runnable FastConformer subsampling, masks, relative-position attention, convolution module and CTC head with seeded weights against binary64 references on the CPU, bounded at Parakeet's size and run on its weights in 153; tensors recorded from NeMo openFastConformer convolution/attention, subsampling and length/mask propagation, compared against fixed intermediate tensors.
153. Transcribe with Parakeet — implemented: bounded resident original-weight engine, Coax frontend, Metal encoder, CPU TDT, native API and CLI; actual NeMo feature/encoder tolerance and exact token/frame/text parity on 29 recordings; frozen 25-language smoke WER/CER and offline timingparakeet-tdt-0.6b-v3, authenticated original files and token-duration decoding; 20.47-second utterances. The legacy CPU teaching record is retained. Coder for Mac now adopts it for local hold-to-talk drafts with explicit audio-buffer clearing. Vocabulary rescoring and streaming remain separate.
154. Transcribe while someone speaks: runnable seeded CTC plus original-weight psionic-nemotron-streaming-en-v1 on Linux CUDA (English RNNT, persistent frontend/encoder/decoder state, real partials, finalization, reset/cancel/order refusals). Explicit file-backed Coax consumer admits one final through the OpenAgents Metaverse Engine’s media/turn gate; finite original-weight parity, accuracy, memory and p50/p99 timings recordedMetal effects, live microphone/UI partials and default CLI/TUI/Metaverse voice-host adoption need their own qualification. Chapter 153’s offline multilingual TDT profile is preserved.
155. Speak the answer — partly implemented: runnable rule-based text to speech (normalization, letter-to-sound, a formant acoustic model, block Griffin-Lim with a streamed least-squares inverse STFT, first-audio transform counts, barge-in accounting), bit for bit against offline references; a pinned checkpoint, natural speech, ASR intelligibility and the voice engine's playback openOne separately selected and pinned text-to-speech checkpoint (Voxtral-4B-TTS is a candidate, but its CC BY-NC 4.0 weights exclude commercial use): text normalization, acoustic model, vocoder, streamed audio frames into the voice engine's playback path; intelligibility (ASR round trip through 153) and latency evidence.

This branch starts from shared convolution/attention and spectral operations; it need not wait for motion. Spectral primitives are shared with physics. Offline transcription in 153 does not establish streaming latency; 154 does, for its named host and chunk size. The text-to-speech target still needs a survey entry with its weights, code and data terms before 155 is selected. Neither chapter changes the voice engine's consent or floor rules.

XVI. Fields, geometry and physical prediction

ChapterWhat we build and check
156. A spectral neural operator — runnable 2-D FFT, mode truncation and one Fourier layer with hand-written gradients on the CPUTiny DFT/FFT references, complex arithmetic, truncation and spectral layers on a small field; reuse the spectral core from 151.
157. Learn Darcy flow — runnable finite-difference Darcy solver, seeded fields and a small FNO trained with AdamW on the CPU, held-out error against the solverReimplement the PhysicsNeMo FNO architecture/recipe on bounded reproducibly generated data; compare against a solver on held-out fields.
158. A field around a shape — runnable signed distances, mesh admission, samples, grid neighbourhoods and point convolution on the CPUSigned distances, point clouds, spatial neighborhood queries, point convolutions and local aggregation with tiny geometric oracles.
159. Learn a scene from its views — partly implemented: runnable pinhole rays, differentiable volume rendering checked against a closed form and finite differences, and a voxel-grid radiance field fitted to rendered views of analytic shapes and measured on held-out cameras on the CPU; no coordinate networks and no Metaverse Engine-rendered viewsA coordinate network fitting an image, then a signed-distance field, then differentiable ray compositing on tiny fixtures, then a small radiance field trained on rendered views of a synthetic Metaverse scene and rendered from held-out cameras. Compositing derivatives, held-out image quality, depth where ground truth exists, memory and render time; good novel views are not evidence of an accurate collision surface or a usable game asset.
160. Execute DoMINO — partly runnable geometry and local encodings, stencil output network and AdamW training on exact spheroid potential flow, held-out error under a frozen threshold (published checkpoint is pickle-only; DrivAerML and the full model remain)domino_drivaerml, a bounded DrivAerML subset, exact preprocessing, surface/volume outputs and physical error measures.
161. Forecast on a sphere — partly implemented: spherical harmonic transform, a per-degree spherical Fourier layer and a small forecaster rolled out on synthetic reaction-diffusion data on the CPU; FourCastNet3 and ERA5 remainOptional FourCastNet3 branch: spherical operators, variable/grid conventions, geographic weighting and multi-step forecast evaluation.

The first physics result is already in 109. FNO adds field learning; DoMINO adds geometry-specific operations. Chapter 161 is an alternative specialty, not a successor that must wait for DoMINO. Its field/activation budgets and ERA5 acquisition/terms need their own qualification. The Darcy recipe is not a pretrained checkpoint. None of these models replaces the Metaverse's authoritative simulation without a separate consumer contract.

XVII. More sequence architectures

ChapterWhat we build and check
162. A recurrence you can inspect — runnable: ssm-cpu-f64-v1, bounded CPUTiny state-space transitions, causal convolution, chunked/whole-sequence versus token-step execution and independent state reset.
163. Execute Nemotron Nano — partly implemented: nemotron-h-cpu-f64-v1, bounded CPU; text outside ASCII and device kernels remainNVIDIA-Nemotron-3-Nano-4B-BF16: the complete Mamba-2/Transformer hybrid and all recurrent/cache state.
164. Execute Nemotron Lightning — partly implemented: nemotron-h-cpu-f64-v1, bounded CPU; the original weights and whole-model execution remainNVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16: combine the exact hybrid and MoE profiles; floating point before NVFP4 or speculation.

This branch can follow dense inference and performance work without waiting for motion or physics. Qwen Gated DeltaNet support does not establish Mamba-2 support. The router is chapter 61 in Part VII. Active parameter count is not total checkpoint residency. Bolt's different Gemma-4 architecture is an optional study in appendix B.

XVIII. World models and embodied policies

The worlds these policies act and learn in come from the Metaverse Engine book: batched environments (Metaverse Engine chapter 31), differentiable simulation (32), sensors (33), observation pictures (34), robot import (35) and replay (36). This part uses them and does not repeat them.

ChapterWhat we build and check
165. Sequences of observations — partly implemented: bounded CPU profile psionic-observe-v1Temporal/multimodal representations, a tiny conditioned generation task and codec/scheduler contracts. Observation records with an exact byte form, a procedural scene, per-action next-frame kernels fitted by least squares and measured one step ahead and in open-loop rollouts against frozen gates, a leak-free split, and codec and scheduler contracts on chapters 145 and 146 run; observations from Metaverse Engine worlds remain.
166. One complete Cosmos3-Edge path — partly implemented: bounded CPU profile psionic-cosmos-v1Qualify one bounded conditioned generation path across its autoregressive/diffusion towers and exact codecs; numerical and physical evaluations stay distinct.
167. Command a robot — runnable position/pose IK, linearized posture projection, rest-to-rest timing, PD gains, short owned Euler loop, nonlinear control measurements, bounded gain study (no qualified family) and scheduled PD (original cases and two frozen C/D poses; no-contact SDK/own parity)The fixed-source Panda grip-position IK admits typed radian seeds, world/metre targets and source joint ranges; fixed DLS damping, global step cap and 0–96 updates produce an atomic one-micrometre candidate or typed nonconvergence. A runnable example, 254 emitted root mutants and 50 independent/native contexts qualify this position-only profile, with no new SDK or physics. The typed joint-PD/gravity query now exposes proportional, derivative, zero-rate gravity, requested and clipped force fields with source caps and explicit physical gains. Its example, 54+91 emitted root sites and 44 independent/native contexts qualify the pure query. A 250-step coupled PD/Euler example now matches one frozen constraint/contact-off SDK prefix: independent controller fields and three native fresh-feedback/recorded-command-shadow profiles qualify this short no-contact run. The principal orientation error and one pose-update query adds owned quarter-angle arithmetic and a dimensioned six-row DLS candidate; 320 emitted root sites and 4200 rotation/54 pose contexts qualify this stage. The whole pose solver now requires both one-micrometre position and one-microradian principal-angle tolerance, admits zero-work success and preserves output on typed nonconvergence. Its 111 emitted root sites and 112 configured queries/279 external one-step transitions qualify exact stopping and cumulative projection counts: twelve of fourteen goals converge, two finite-far goals retain budget exhaustion. The isolated typed rotor PD model now separates continuous damping from sampled strict-Jury diagnostics and matches 2032 new applied steps against independent exact-input/80-digit closed forms; 136 emitted sites, ex
168. Imitation before robotics scale — runnable: owned CPU imitation and original-data excerptTwo-axis gantry behavior cloning with fixed state/action scales, whole-episode splits and separate action-error/rollout measures; pinned Panda metadata and 170 exact F32 values from an original PhysicalAI SingleArm episode. This qualifies data handling, not Panda command semantics or GR00T inference.
169. Execute a GR00T policy — runnable: original learned VLA on MetalPinned GR00T-N1.7-LIBERO/libero_10, category 2: complete vision/language/conditioning/four-step flow path for a prepared 140-token observation. Same-input components and original decoded action endpoints pass; the separately recorded global hidden diagnostic does not. Broader request lengths and the unit-/frame-checked robot-model adapter (R12, R17), clocks/rates (R13) and simulator outcomes remain integration work for 170.
170. Close the simulated control loop — runnable genuine SDK profile and first9-action owned-query neural prefixDelivered first, per owner ordering: original GR00T on Metal drives genuine source LIBERO/Panda scenes through Coax preparation, chunk supervision and an own Coax OSC controller, using MuJoCo 3.3.1 for evaluation. Frozen scene/state outcomes, explicit fault experiments and exact recorded-control physics replay are reported in the chapter. The historical episode profile uses plain clocks and fixed arrays. A paired runtime-clock adapter now has exact recorded-command SDK prefixes; a first nine-action whole-neural prefix now uses its owned-query path, while robot unit/frame migration and compiler R13/R14 remain pending. The initial native point/vector compiler profile now checks affine roles, frame/unit/carrier identity and minimum precision, with a small F64 Spacecam subtraction consumer. A separate binary source-token mutation profile now qualifies twelve type-preserving token changes, source-call apply/undo and native witnesses; no-alternate and unsupported operations remain explicit. Full frame transforms and broader Panda migration remain open. An owned twelve-body Panda FK query now qualifies typed radian input, F64 world positions, distinct hand/grip attitudes and all-link reference comparisons, with a runnable example. It is a fixed source-bound model precursor, not an importer/dynamics backend. The owned geometric grip-site Jacobian now qualifies linear/angular derivative blocks, retained SDK columns and independent finite differences, with a unit-checked joint-rate example. The separate four-body finger extension now qualifies two metre-valued slide coordinates, unchanged arm output, source-bound branches and a new five-query all-body SDK reference, with a runnable example. The [owned nine-coord
171. Learn a gait in many worlds — runnable GAE/Gaussian and scalar-LQR PPO (Root / GPT-6); fixed512-batch continuation goals met, gait openThe targets, Gaussian and original scalar-LQR study retain all earlier proofs and the three128-batch efficacy misses unchanged. The separate continuation imports exact learned checkpoints, preserves optimizer/world state and settings, explicitly reserves fresh disjoint counters under the same seeds, and extends each to512totalbatches/2048updates. All81fixed actions/numeric-lineage audits pass; all three final gains .6045622741/.6219745781/.5997993114 meet BOTH unchanged goals (error≤.05, nominalgap≤1%). No retuning/earlystop/prefix/baseline rerun. New source86/86 sites, two type refusals and three guard-only native modes pass; old arithmetic is source/C-closure bound, new samples independently audited. Replays after256 are exact; combined curves preserve first128 rows. This meets the named scalar-LQR acceptance slice. Learned critic/neural multidimensional actor, quadruped contacts/sensors, terrain/randomization, held-out gait, GPU training, repeatable full learning curves and teacher/student transfer remain open. Aethyr31/33/35 and general Quantity provenance/compiler R14/R20/R21/R23 remain separate. No next chapter starts in this task.

Cosmos needs mature vision, temporal representations and generative methods. The robotics path needs vision/language, shared training, action conventions and flow matching; it does not require Cosmos inference first. GR00T is not a commercial default while its card and included license disagree.

The robot-policy chapters run on the physical-world foundations of the Coax roadmap and on this book's physics and transform chapters, all as prerequisites rather than parallel inventions:

FoundationWhere it comes fromWhat chapters 168–170 use it for
Scalar units, then coordinate framesCoax R12 scalar quantities are available for native C; frame forms remain workTarget: joint angles, positions, poses and velocities carry checked units and frames. Chapter 168's delivered profile still uses plain f64 fields with explicit conventions.
Typed clocks and multirate ticksCoax R13Simulation time for episodes, declared policy and control rates, sample-and-hold of action chunks and maximum observation age
Bounded controlCoax R14The control step is #bounded: fixed stack and scratch, no allocation, blocking or unbounded loops in its call graph
Deterministic replay and snapshotsCoax R15–R16Episodes replay exactly under a named profile, with the first divergence reported; resets restore snapshots
Robot-model importCoax R17The embodiment's frames, joint limits and inertias come from a checked URDF subset
Stamped sensors and actuator supervisionCoax R18Observations are stamped; a simulated supervisor validates every command's freshness, limits, epoch and expiry
Fault scenariosCoax R19Dropout, delays, saturation and invalid values are recorded scenarios that reproduce the same run
Deterministic solverChapter 109, then Metaverse Engine Part IVThe simulated system the policy controls: chapter 109's oscillator now, the engine's rigid bodies, contacts and batches (the Metaverse Engine 17–22, 31) later
Differentiable solver and parameter recoveryChapter 111Sensitivities of outcomes to actions and physical parameters, checked against finite differences
Transform functionsChapter 107grad, vjp, jvp and vmap for action sensitivities and batched episodes

Chapter 167 commands a robot with PD, IK and planning over the engine, and 171 learns a gait in Metaverse Engine Part IV's batched worlds. Chapter 168 already states its units and integration step in its profile; it moves onto these types as they ship. Chapters 169 and 170 are planned against them and do not start with hand-rolled clocks, frames or unchecked control loops. Real robot hardware is a separately authorized later integration, with its own safety review, device qualification and real-time profile; nothing in this part drives an actuator. Metaverse Engine Part V builds its spacecraft on the same foundations rather than a parallel set.

XIX. Host inference in production

This part turns a qualified model into a service that other people and agents depend on. It follows the production practice described in Inference Engineering, but builds the infrastructure in Coax: admission, scheduling, routing, scaling, rollout and metering decide in Coax, with #authority files and zero-survivor mutation where they decide work, money or policy. The host does network, process and device effects only, as the Coax Native Web dev server already does for the website. It grows Part III's first deployment: chapter 172 generalizes the timing of 18, chapter 173 the server of 20, and chapters 175–181 add what one resident model serving one decision at a time leaves out.

ChapterWhat we build and check
172. Benchmark a service, not a kernel — runnable: bench-us-v1, loopback load generatorTime to first token, inter-token latency, per-user and total tokens per second, and end-to-end versus inference-only time at P50, P90, P95 and P99. A load generator with a named RNG reproduces input/output length distributions, request contents, sampling parameters and jittered arrival patterns; recorded traffic can be replayed as a shadow. A fixed baseline is required, and only one variable changes per run.
173. Serve a model with an honest capability — runnable capability document from qualified records, honesty check and admission on the toy CPU engine; proto/ schemas, live host route, timed cancellation and a qualified Elephant entry openShared System One protocol integration, versioned manifests, bounded requests, cancellation and evidence for each model/backend/profile; request and response schemas start in proto/.
174. Clients, streams and background jobs — partly implemented: runnable job lifecycle (queued, running, done, cancelled, failed, gone) checked against its table, idempotent submission keys, per-client limits feeding chapter 175's fair scheduler, server-sent events resumed from Last-Event-ID, cancellation that frees the batch slot the next step and settles once on chapter 181's ledger, polled background jobs with a retention window; clients simulated in one process; the live HTTP server, audio streams, session reuse and the Responses edge openStreamed tokens and audio over a bidirectional connection, session reuse, cancellation that reaches the scheduler, and asynchronous jobs that are acknowledged at once and complete later under their own deadline; an OpenAI-compatible Responses edge is translated into the System One contract, not the other way round.
175. Continuous batching and a fair scheduler — partly implemented: runnable iteration-level scheduler (admission per step under a state budget, decode before chunked prefill, virtual-time fair shares with starvation bounds) checked against a brute-force simulator and solo runs of a stand-in model; its steps run on the original gpt-oss-20b on the 4080 as one batched pass over rows from several requests, each on its own KV cache, with every request's greedy IDs equal to its IDs alone and measured concurrency 1/4/8; preemption and server wiring openToken-level batching that admits and retires requests every step under a state-memory budget, chunked prefill interleaved with decode, preemption and priority classes. Every request's output must be identical to running it alone (batch invariance), which the fixed reduction order makes testable.
176. Paged state and a tiered prefix cache — partly implemented: runnable page tables with reference counts and copy on write, a prefix trie keyed by model identity and exact block tokens, device/host/disk tiers with least-recently-used moves, and admission in chapter 175's scheduler charging pages, checked against brute-force models and cold runs of a stand-in model; real model state, real tiers with measured transfers, 128-token pages, layer-by-layer restore and chapter 172's report openFixed-size pages for KV cache and for hybrid recurrent snapshots; a prefix cache across requests that spills from device to host memory to local disk, with measured hit rate, eviction and time to first token on hits versus misses. Prefixes are found through a content-hashed chain of 128-token pages; pages never depend on a compute machine staying alive, restore overlaps layer by layer with compute, and retention is set per traffic type. Any approximate reconstruction, such as bounded sliding-window replay, is its own profile and never enters an exact cache identity.
177. Route, queue and scale replicas — partly implemented: runnable prefix-affinity router reading chapter 176's trie, bounded queues with per-client shares and typed refusals, and an autoscaler with hysteresis, a scale-down delay and chapter 178's measured cold starts, checked in a discrete-event simulation against least-work and round-robin baselines; real replicas, a live run, batching inside a replica, adapter-aware routing and decode balancing openA cache-aware and adapter-aware router, a bounded priority queue, and a replica autoscaler (minimum and maximum replicas, window, scale-down delay, concurrency target, scale to zero). The policies are pure Coax, checked against a deterministic discrete-event simulation of recorded and synthetic traffic before any machine runs them. Prefill cost is modelled from uncached tokens and the prefix they attend to, with length buckets and engines that pull work; decode balances both request count and total cache length per replica.
178. Start fast — runnable startup plan, #authority readiness machine and kernel-cache key on the CPU, with a measured cold and warm start receipt and Elephant's file verified and mapped; machine and process start, a weight fetcher, timed kernel compiles, real golden decisions in psionic-serve and threaded hashing openCold start split into machine, process, weights and kernel startup and measured separately; content-addressed weight delivery from chapter 7's identities, mapped loading, and generated-kernel caches keyed by device, compiler and source identity.
179. Ship without downtime — partly implemented: runnable canary controller with readiness and golden warm-up gates, per-step verdicts from golden answers, an error budget and a P95 objective, automatic revert, draining and an atomic capability-document switch, checked against a brute-force transition table and in chapter 177's simulation; real deployment and real golden evidence openCanary rollout with gradual traffic ramps and automatic revert, driven by both latency objectives and golden requests whose outputs must match retained evidence; draining in-flight requests before a replica stops.
180. Observe, meter and price — runnable usage records, metrics, content-free audit log and #authority msat price policy with quotes and budget holds on the CPU; proto/ schemas, live host wiring and signed receipts openVolume, input/output lengths, status counts, latency percentiles, replicas, utilization and queue depth; audit logs that record changes and no user content by default; per-request usage records bound to execution evidence and a pricing policy in an #authority file. Settlement stays in the Bitcoin wallet, outside Psionic.
181. Survive failures — partly implemented: runnable health checks with ejection and probes, retries under an attempt limit and a retry budget, hedging with cancellation, deadline propagation, fenced late answers and exactly-once billing per request key, checked in a simulation with injected crashes, hangs, slow replicas, partitions and corrupt answers; real failures, failover, residency, tool isolation and weight protection openHealth checks, cordoning a failing device or machine, idempotent retries, active-active and active-passive failover between machines or regions, data-residency routing, isolation of tool execution and protection of weights.
182. Disaggregate prefill and decode — partly implemented: runnable state handoff between two simulated workers (pages and recurrent state behind a versioned, checksummed header, refused unless whole), a placement rule for the prefill:decode split, and a discrete-event simulation against co-located workers with a local-prefill threshold and lost transfers; real multi-device transfers, a proto/ message, re-placement over time and a measured need openConditional disaggregation: separate prefill and decode workers exchange a complete state snapshot (chapter 12's identity-bound claim, extended for transfer) as a versioned message; a prefill queue, a local-prefill threshold and an xPyD ratio that adjusts to traffic. Only after chapters 172 and 175 measure that prefill interference is the bottleneck. DeepSeek's published layout (small prefill groups, large decode groups, a separate vision encoder role, scaling prefill on unserved tokens and decode on requests in flight) is the reference design.
183. Split a model across devices — partly implemented: runnable tensor parallelism for chapter 113's decoder on host threads (heads and FFN columns split Megatron-style, refusals for splits that do not divide or do not fit a budget, one all-reduce per half block counted with sd_cost, bit for bit at one device and within 1e-12 at 2, 4 and 8); GPUs, expert parallelism and real checkpoints remainTensor parallelism for latency and expert parallelism for gpt-oss, DeepSeek and other MoE throughput: collectives, sharded weights and state, and results compared with the single-device reference. Expert parallelism stays inside one fast interconnect domain, with data-parallel attention, redundant experts rebalanced from a load window and balance reported as busiest over mean, measured by time rather than token count.
184. A pipeline of models — partly implemented: runnable four-stage voice pipeline with stand-in stages (end of turn, partial and final transcript, reply, speech) on simulated 10 ms ticks: an early start on a quiet partial transcript, kept or thrown away when the final one arrives, speech on the first complete sentence, a bounded buffer that stalls the model, the time to first audio split per stage and hop against a written budget, and barge-in accounting at any tick, checked against an event-time oracle and the stages run one after another; real stages, replicas, measured network hops and percentiles openA compound voice workload (voice activity, transcription, decision model, speech) with each stage scaled separately in one cluster, an end-to-end latency budget per stage and a measured cost for each network hop.
185. A decision model steers voice — partly implemented: runnable stand-in decision model steering chapter 184's pipeline: end-of-turn, hold, early-start and barge-in questions answered as probabilities, actions from written costs through chapter 216's th_answer, a gate in the voice engine's order (shape, range, floor, epoch, deadline) with recorded drop reasons, answers never awaited and refused past their latency share, and 400 drawn conversations measured against the fixed rules with a chapter 241 verdict, checked against a tick-by-tick reference; Elephant as the decider, a trained model, real audio and wall-clock latency openElephant as the voice engine's decisions:<model> decider: proposals pass the existing never-awaited gate (clamping, confidence floor, epoch and deadline fences, recorded drop reasons); a slow or absent model can only fail to steer, never stall a frame.

Serving can begin after the first qualified decision model and an actual consumer contract. Chapter 185 is the first consumer: it needs 16's published semantics and 163's measured latency, and the gate stays the authority over what a decision may change. The more traffic a deployment has, the more of this part it can justify: disaggregation, multi-device inference and global caches each wait for a measurement that shows the need, not for a chapter number. Hosted machines need a qualified Linux target and an owner-approved budget; buying GPUs, choosing providers and compliance certification are owner decisions recorded in NEEDS_OWNER.md, not chapters.

XX. Inference across a mesh

A mesh pools memory and compute across machines that are loosely connected, over ordinary networks rather than device interconnects. Part IV's Pylons route whole decisions to whole machines; this part splits a model that no single machine holds. Chapter 183 is the tightly coupled case in one machine or rack. The design follows the Mesh-LLM lessons recorded before the reset, with the trust rules from the earlier private-inference work. Coax decides placement, admission, routing, verification and price; the host provides transport, files and devices.

ChapterWhat we build and check
186. Split a model into stages — partly implemented: runnable stage planner under per-stage memory budgets with typed refusals, a checked boundary message (artifact digest, layer, position, version) and in-process stages equal to the unsplit forward bit for bit (synthetic model and Ministral 3 3B layers 0–1 on original weights); cached continuation, threads or machines, a proto/ schema and the full model on original weights remainA stage boundary contract derived from the model: a typed list of everything that crosses it (hidden state, residual streams, shared-KV and recurrent sidebands), bound to the artifact, stage range and protocol version. Two stages must match the whole model on identical tokens: logits, greedy output, cached continuation. Dense Ministral 3 first, with raw activations.
187. Stage packages — partly implemented: runnable stage package manifests (byte ranges into the original safetensors with SHA-256s, bound to the parent digest, StgPlan digest, stage and boundary version), a verifier with typed refusals and a loader gated by chapter 178's readiness; Ministral 3 3B's 14 + 12 packages built and verified on original weights and chapter 186's slice reproduced from packages; network fetch with chunk checks, peak memory and other checkpoints remainEach stage fetches and loads only its own tensors and required shared assets, verified chunk by chunk against chapter 7's identities. Fetched bytes, materialized bytes, peak memory and time to readiness are measured separately.
188. Peers, transport and discovery — partly implemented in process: encrypted frames, measured direct and relayed round trips, invitation-only joins, group routes and separate lanesEncrypted peer connections with the direct or relayed path recorded and measured; private meshes joined by invitation, public ones discovered through Part IV's NIP-PYLON beacons, whose model groups advertise a head and its stages; an owner control plane separate from the inference plane.
189. Place the model — partly implemented: runnable placement solver on simulated peers (memory and readiness limits, latency or period objective with link costs, deterministic ties, refusals with the smallest change, minimal-move replanning), equal to a brute force; live peers and measured-against-estimate tolerance remainRun whole on one machine if it fits, else route the whole request to a peer, else split. Splitting uses per-layer memory and measured stage and link costs, and states its objective: the sum of stage times for one request's latency, or the slowest stage for throughput. The placement planner is pure Coax, checked in simulation.
190. Stage lifecycle and fencing — partly implemented: runnable stage lifecycle with epoch and generation fencing on simulated stages (route opens only when every stage is warm, drain on cutover, break and retry or fail on a lost peer, weights adopted on the same peer), checked by a discrete-event simulation with ghost stages; live peers, heartbeat loss detection and restore from saved state remainLoad downstream stages first and publish the entry route only when every stage is ready. A topology generation fences out stale commands, and partial failures withdraw the route and release memory. Each live sequence declares whether it drains, fails or restores.
191. Experts across machines and from disk — partly implemented: runnable expert parallelism on simulated peers (dispatch, compute and slot-order combine equal to chapter 85's layer bit for bit, exact byte counts, load-balancing placement checked against brute force, typed refusal for a missing expert) and an expert cache replayed on synthetic routing traces with measured disk and memory rates; real machines, real weights and traces, a real NVMe drive and prefetch remainExpert parallelism over a mesh with routed tokens and gathered outputs, and expert streaming from local disk for MoE models larger than memory; measured against chapter 85's single-machine results.
192. Route by saved work — partly implemented: runnable saved-work routing across a simulated mesh (reuse in place, move over a link or compute cold), bounded salted advertisements with typed refusals, fallback on missing claims and realized savings, checked by a brute-force router and frozen runs; real links, transfers, model, recorded traffic and trust openMesh-wide cache-aware routing that compares queue delay plus restore and suffix-prefill cost against cold prefill. Cache advertisements are bounded, short-lived, salted hints that never contain raw tokens; claimed hits that turn out to be missing fall back, and the realized saving is recorded.
193. Compress activations exactly — partly implemented: runnable lossless frames for chapter 186's boundary messages (raw, byte planes with rANS, XOR with the row above), exact round trips and typed refusals, measured on Ministral 3 3B's layer-0 and layer-1 boundaries (ratio 1.19, pays only below about 0.17 Gbit/s); a real link, handshake negotiation, the codec in the pipeline and lossy profiles remainCodec negotiation with a mandatory raw fallback and round-trip equality of each frame, with the full encode, decode and copy cost measured. Lossy activation formats are a separate profile with their own quality evaluation.
194. Who can read the prompt — partly implemented: runnable exposure model per placement (prompt tokens, activations, output tokens per peer, equal to a walk of the pipeline), tiers from recorded evidence, a per-class trust policy as hard constraints on chapter 189's solver with refusals naming the exposure and the fewest peers to trust, plaintext links refused, and consent for every peer before the first byte; the attested-enclave tier, live evidence and keys, and wiring into a running split remainTrust levels computed from evidence: a peer serving the request reads it; a hardened process on a machine its owner controls is harder to snoop on, not private; only an attested hardware enclave running a logged release is private. Requests are routed by sensitivity and fail closed rather than falling back.
195. Check a peer's work — partly implemented in process: MACed stage receipts, sampled re-execution, exact or bounded comparison, a verdict ledger and its recountSampled re-execution of a peer's work on a trusted node. Results match exactly only when both sides run the same backend profile, and are otherwise compared within that profile's tolerance. Signed usage receipts per stage, a pricing policy in an #authority file, and settlement in Bitcoin through the wallet, outside Psionic.
196. Work with Mesh-LLM — partly implemented in process: gossip-to-claim mapping, a one-stage route, System One translation, exact re-run checks, metering and Mesh-LLM's bill rules against a simulated peer; live interop remainsA Psionic server attached to an existing Mesh-LLM mesh through its plugin endpoint interface, serving the OpenAI-compatible and /systemone decision contracts so the mesh can route to it. Payments interoperate with its token-metered Lightning exchange (deposit first, then settle from reported usage) through our own wallet. Its code is read as untrusted source; joining a public mesh is an owner decision.
197. DeepSeek V4.1 Flash across stages — partly implemented: the boundary contract, the planner and a pipelined synthetic runContiguous layer stages on several devices or machines. The boundary carries the four residual streams, the carry, Engram ids and the compressed rows, keys, selections and candidate mask later layers borrow, in f32, versioned and checksummed; the planner splits the real per-layer bytes over up to 16 hosts; every tested split matches chapter 100's synthetic run bit for bit. Real peers, fencing and stage recovery, per-hop latency and a BF16 wire remain.
198. Mistral Large 4 across a mesh — partly implemented: runnable header-only inventory of Large 4's 54 shards checked against params.json, exact per-layer bytes, a pipeline-and-expert-parallel mesh plan with shared-cache and shared-indexer transfers counted, the smallest mesh of identical peers, and a small model split over stages and expert peers equal to the whole bit for bit; Large 4's real weights on real machines, measured per-hop latency, parity with a whole-model reference, Large 4's own layer arithmetic, own-tensor stage packages and trust rules remainMistral-Large-3-675B (Apache-2.0, 681.5 GB of originals): latent attention and 135-expert routing placed across machines, with parity against the whole-model reference on selected layers and tokens, per-hop latency and per-stage memory.
199. Le Chonk across a mesh — partly implemented: runnable boundary contract for Mistral Large 4 listing the hidden rows, shared cache, shared indexer selections and the draft head's target activations at every cut, with missing, extra and changed parts refused; the draft head's bytes and room on the last stage; modeled draft-and-verify rounds on chapter 198's plans; and a small model decoding greedily with a draft head across stages and expert peers, equal to plain decoding of the whole, with measured acceptance; Large 4's real weights and head on real machines, measured latency, memory and acceptance, whole-model parity and its own layer arithmetic remainMistral Large 4 with all of Part VI: 1,060.6 GB of FP8 originals placed across machines, sparse attention and shared layers crossing stage boundaries, the built-in draft head, and recorded parity, latency and cost. Serving it to others is subject to its licence.

A mesh multiplies failure modes: placement plans, advertisements and handshakes are not evidence of correct execution. Each split earns its own parity evidence on the machines that ran it. Joining a public mesh, paying peers or offering Large 4 as a service each need owner approval.

XXI. Serving a harness

The agent harness that was this part moved on 2026-11-01 to its own book, Coder: Coding Agents From Scratch: chapters 200–214, 251 and 252 are now its chapters 1–8 and 14–22 (the plan). Their code stays in lib/harness/ for now. What remains here is what needs the model and the server, and each piece links to the harness chapter it serves: the prefix cache measured from the server side (176 for Coder chapter 3), tool arguments constrained during generation (53 for Coder chapter 4), decision models that route work, and what a harness costs a served model in tokens. Chapter numbers 200–214, 251 and 252 are not reused.

ChapterNow
200. MovedCoder chapter 1. The simplest loop
201. MovedCoder chapter 2. Model-visible means logged
202. MovedCoder chapter 3. Keep the prefix stable
203. MovedCoder chapter 4. Tools as typed capabilities
204. MovedCoder chapter 5. A sandbox and approvals
205. MovedCoder chapter 6. A document tries to become the system prompt
206. MovedCoder chapter 7. Condense the history
207. MovedCoder chapter 8. Programs as tool calls
208. MovedCoder chapter 14. Forks, subagents and jobs
209. MovedCoder chapter 15. Plugins with owned lifecycles
210. MovedCoder chapter 16. Speak the protocols
211. MovedCoder chapter 21. Measure the harness
212. MovedCoder chapter 22. Generate candidates, then check them
213. MovedCoder chapter 18. Consent before sharing
214. MovedCoder chapter 19. Remember a fact, then revise it
251. MovedCoder chapter 17. One agent, many tasks
252. MovedCoder chapter 20. An agent that stays online

XXII. Decisions in production

A decision model is only as useful as the thresholds, evidence and checks around it. These chapters come from the pre-reset work on Jev, System One and small decision models (notes). Each extends an early chapter and can start as soon as that chapter exists: 215 after 16, 216 after 16 with synthetic probabilities (live traffic after 20 and 22), 217 after 20 and 22, 218 and 219 after 24 and 25, and 220 to 224 after Part III.

ChapterWhat we build and check
215. Fit our own calibration, and refuse a stale one — runnable: cpu-f64-calibrate-v1, synthetic probabilitiesPer-question temperatures and binned or isotonic maps fitted on a calibration split and scored on held-out data (reliability curve, expected calibration error, Brier, log loss, confident errors; no bin reported below 20 rows); a map is served only if it passes its frozen gate, and refused for any other model identity or question set.
216. Thresholds from written costs — runnable: cpu-f64-threshold-v1, synthetic probabilitiesA versioned threshold record derived from the cost of a wrong action and the cost of falling through, with three bands (act, abstain to a person or a stronger model, refuse), checked by held-out cost per decision with confidence intervals, never tuned on raw numbers by hand. The first project is an Elephant and Mammoth cascade with three actions (use Elephant's answer, escalate to Mammoth, abstain or ask for more), driven by an explicit table of consequences: each kind of mistake, added latency and inference cost, worked by hand first on synthetic probabilities. It is compared with always Elephant, always Mammoth and a fixed escalation rule, reporting error against coverage, escalation rate, latency and cost; the operating point is chosen on validation data before the confirmation set is opened. Two consumers, a voice interruption and a background classification, rationally choose differently from the same probabilities.
217. Record readings, join outcomes, watch drift — runnable: cpu-f64-drift-v1, simulated driftFor every decision, the raw and calibrated probabilities, the threshold and the model identity, with no content; each joined to its later outcome or a small judged sample, maps refitted on a schedule, and an alert when calibration error rises past a stated bound. Each record also names the eligible actions, the chosen action, its selection probability and the policy version, its measured cost, and whether the outcome is still pending, so later policies can be evaluated from the log.
218. A Pylon checks itself before serving — runnable: selfcheck-v1, Elephant on the RTX 4080A read-only doctor and a self-check against shipped reference decisions that the Pylon must pass before it advertises a slot; an update that would change the served model identity is refused unless declared.
219. How far apart may two honest answers be? — runnable: cpu-f64-distance-v1, simulated backendsA distance between two machines' answer distributions (centred log probabilities), measured for honest pairs across backends and for cheap substitutes (a quantized copy, another runtime, a sibling model), with round and strike limits set between them; fresh seeded items with no answer key, the checked subset chosen after answers arrive.
220. Read a bounded ONNX graph — runnable: onnx-17-v1, bounded CPUA Coax reader for a fixed opset and a small set of operators, mapping anonymous initializers to named tensors by walking the graph and refusing anything outside the set; first consumers are a static-embedding model and a tiny image classifier.
221. Write a bounded ONNX graph — runnable: onnx-17-write-v1, bounded CPUExport of 8's portable inference subset as ONNX, re-read by 161 and by an independent checker, so a model trained in Psionic leaves as an inert artifact. Framework track.
222. A decision in milliseconds — runnable fe-tiny-v1 encoder on binary64 and q8 CPU engines, with parity, a quality card, a frozen 20 ms P99 gate and a one-CPU latency receipt; the real mmBERT-small router, rotary positions and a GPU engine openA small encoder with fixed decision heads (a ModernBERT-family model with local and global attention, GeGLU and quantized embedding rows, per-head temperatures) answering a typed question in milliseconds, with identical argmaxes and a stated distance from its reference, and the p50 and p99 latency at 512 tokens on CPU and GPU.
223. Distill Elephant into a small router — runnable head distillation of fe-tiny-v1 from a recorded teacher stand-in under chapter 118's trainer, with a leak-free split, a fitted temperature, a frozen rule (failed: one answer in 96), written cascade costs and a one-CPU latency receipt; Elephant as the teacher, distill-v1 targets, body training and shadow promotion openAn encoder student trained on Elephant's answer distributions over owned synthetic requests, with temperatures fitted on a development split; promoted only above stated agreement with Elephant, calibration error and cheap-answer precision.
224. Shadow a new model, then promote it — runnable: shadow-sim-v1, simulated trafficA candidate model answering beside the current one on live traffic, both logged; promoted only within stated disagreement limits and with no regression in joined outcomes. Chapter 179 rolls out new builds of one model; this rolls out a different model. Candidates are immutable, activation is atomic by approved digest, and a deliberately worse candidate must leave the active one unchanged.
225. Learn which model to call — runnable: cpu-f64-route-v1, simulator onlyFirst with full information: every candidate model runs on the same bounded tasks, results are scored independently, and a small logistic model or MLP learns to choose. Then with partial feedback, where only the chosen model's outcome is seen: a simulated router over three models with different strengths, costs and latency, whose true rewards the simulator knows but the learner does not. Naive, inverse-propensity and doubly robust estimates of a new policy's value are compared with the true value, including an action the old policy never tried, whose value the logs cannot recover. A small model trained in Psionic then improves how OpenAgents uses other models.

A probability is never permission: the consumer of each answer owns its threshold, abstention and interpretation, and these chapters make those choices explicit, versioned and measured.

XXIII. Programs compiled into weights

A transformer can execute a program exactly when its weights are compiled rather than trained: attention becomes an exact memory, ReLU gates become arithmetic and branches, and the model's own output is the program's trace, so the answer carries its proof and anyone can check it by replay. This part rebuilds that idea, which the pre-reset work reproduced from Percepta's published construction (notes; full production architecture, Pylon decentralized training, and coding-agent integration in the OpenAgents Executor Network Master Specification). It needs only chapters 1–4 and 10 for 226 to 234; 235 to 237 also need chapter 115's training and Coder chapter 8's programs as tool calls. A CPU runs these programs orders of magnitude faster, and every chapter says so beside its own numbers: the point is computation inside a model that can be verified, not a faster computer.

ChapterWhat we build and check
226. A machine whose state is a trace — runnableA small integer stack machine (constants, locals, add, subtract, multiply, load, store, conditional branch, output, return), a CPU reference interpreter, and a trace format of a few tokens per instruction whose digest identifies the run; anything outside the machine's window is a typed refusal.
227. Attention as exact memory — runnableKeys placed on a parabola and a hard-max read that returns exactly the matching entry, latest write winning, with cumulative sums from uniform keys; a near miss is a typed refusal, checked against a map oracle on generated read and write streams.
228. Arithmetic and branches from ReLU — runnableProducts, step-function conditionals and residual wiring that are exact inside a checked integer range (64-bit integers, then binary64 within 2^53) and refused outside it.
229. Compile a gate graph into a block — runnableA small gate-graph language and its evaluator, a scheduler that packs gates into layers and reuses residual slots, and weights emitted for an exact block profile: chapter 10's residual stream and gated feed-forward layer without normalization, with ReLU gating, in binary64 (RMSNorm and SiLU cannot be exact, and chapter 233 rules out narrower formats). The block's forward pass must reproduce the evaluator bit for bit.
230. A harness that catches the compiler — runnableA seeded differential run over generated graphs across the evaluator, a plan interpreter and the compiled weights, which catches planted compiler bugs in the families the pre-reset harness found (same-step writes resolved in schedule order: early reuse and same-layer scheduling; accumulation across layers: a missing or wrong-signed clear) and places each in the schedule or the emitter.
231. An interpreter in weights, or one program in weights — runnable: iw-v1, a five-instruction register machineA universal interpreter compiled once, against a single program baked into weights (the first Futamura projection, growing with the program's length); sizes and steps per second for both, always beside the native interpreter's.
232. Decode in logarithmic time — runnableA convex-hull lookup that replaces the linear scan over the trace, checked equal to it with comparison counts; wall-clock figures come only from running the weights, never from an interpreter standing in for them.
233. From hard-max to softmax — runnableThe analytic bound on how far softmax can stray from hard-max, then real softmax execution under chapter 41's attention profile, measuring the trace length and number format at which exactness breaks.
234. Exact replay as a verification class — runnableFull replay and window spot checks that name the first divergent step, tamper fixtures for each digest, and a verdict (exact replay, failed, unverifiable) used by the mesh's re-execution checks (26, 195) and the GPU kernels' acceptance (43–44).
235. Can gradient descent learn exact execution? — runnable: students-v1Students trained on verified traces and scored by their first divergent token and by held-out program families at two, four and eight times the training length, never by loss alone; the pre-reset attempts all failed (0 of 2 exact at best), and the chapter reports whatever this one finds. Its training rows are admitted by chapter 247.
236. A frozen exact core with a learned interface — runnable: core-v1A compiled module behind fixed interface tokens, with a trained controller that prepares its inputs and reads its outputs, judged by replay acceptance on held-out programs: learning does the routing, the compiled core keeps the exactness.
237. Composable weight modules — runnableTwo digest-pinned compiled modules linked into one, with composition that must replay exactly, conformance cases, and a label for how a user can check a module: exact replay, deterministic tests, statistical evidence or none.
238. Pay for verified work — implemented: two-leg (WORKER + VALIDATOR) escrow, rolling 24h UTC caps, W2.1 schemas, reconciled NIP-PYLON 30201 feed, and live 2-device Bitcoin mainnet Breez Spark qualificationA run that pays its contributors for traces a validator has replayed: the worker's capability declared only after a digest-checked self-test, worker and validator on different devices and both paid, receipts before settlement, per-payout and daily caps under owner approval, settled in Bitcoin through the wallet outside Psionic; counts include only real, verified payments.

Every claim in this part names the path that produced it, reports partial exactness as partial, uses benchmarks that are what their names say, and ships the check that would falsify it. Verified traces are also training data whose labels are provably correct; chapter 235 tests how far that helps.

XXIV. Measure, then improve

Systems that improve themselves need a measurement they cannot fool. This part rebuilds the pre-reset Gym as library code, then the loops that use it: fitting settings on recorded answers, searching policies, reflective prompt evolution, model judges, and outcomes turned into training rows (notes). The prior is sobering: ten pre-reset prompt-optimization attempts produced no measured win, while fitting settings on recorded answers and choosing a configuration per task did. Every loop here keeps its held-out data unread until its choice is written down, never lets a component grade its own work, and keeps an addition only with a measured gain over the simplest baseline. 239 to 241 can start right after 16.

The result the book builds toward joins most of its parts: a small Psionic model that chooses a cheaper inference path (223, 225), evaluated on independently checked outcomes (217, 242), served through the API (20) and promoted only when it improves a quality-and-cost objective written down in advance (224, 241).

ChapterWhat we build and check
239. A suite is three digests — runnable: sha256-suite-v1, chapter 16's held-out suiteItems with their partitions, the question set and the gate each carry a digest; results go to an append-only store with a receipt chain, and a locked partition can be read once. Rewording a question changes only the question digest; a run over different items is refused as a comparison.
240. How far a metric moves by itself — runnable: cpu-f64-noise-v1, synthetic suite and chapter 16's Elephant runThe noise floor from seed blocks and a task-clustered paired bootstrap, and a headroom check that refuses a partition already at its ceiling; reproduced on an Elephant suite before any optimization claims a gain.
241. Gates that can say unverifiable — runnable: cpu-f64-verdict-v1, chapters 16, 215, 216 and 240 reportingComparison gates as #authority Coax: a decision gate requiring a gain beyond the noise floor, a probability gate that ranks log loss and confident errors above calibration error and accuracy, and an evaluation gate where cost and time can block a result but never earn one; verdicts are passed, failed or unverifiable. Chapters 16, 215 and 216 report through them.
242. Environments with checkers — runnable: cpu-int-env-v1, a simulated agentA task, a checker, a budget and a replay as one record; the checker must fail on empty work and pass on the reference solution before the environment is admitted; rollouts use Psionic-served models.
243. Fit settings on recorded answers — runnable: cpu-f64-settings-v1, a simulated stall detectorThresholds, cut points and weights fitted from answers already recorded, with zero model calls: midpoint candidates, acceptance only when strictly better on the fit set and on grouped cross-validation; the first optimization to try, before any text changes.
244. Search a policy, cheapest first — runnable: cpu-f64-search-v1, a simulated worldPolicies as digested manifests, operators named for what they do, successive halving across tiers from replay to full measurement, a per-task Pareto frontier, and the held-out read only after the winner is written down.
245. Reflective prompt evolution — partly implemented: evolve-v1 on a stand-in student and reflectorGEPA in Coax: candidates whose fields are fixed by the seed, per-instance Pareto sampling, a reflector served by Psionic that is never the grader, refusal of a malformed reflection, a check that the answer space did not drift, and a canary proving the candidate reached the model. Measured honestly against chapter 243's settings fitting.
246. Judges are components — partly implemented: judge-v1 on stand-in judgesElephant or Mammoth inside a search as a pinned judge or router: agreement with real outcomes measured, a grader whose identity differs from the student's and the reflector's, cost per judgment recorded, and a teacher's opinion never stored as a label.
247. Outcomes become training rows — runnable: rows-v1, the example's feed and chapter 234's tracesDecision outcomes and verified traces admitted with their replay verdicts; labels from diffs and checks, never from an agent's own summary; an exposure ledger across artifacts so held-out groups are never trained on; splits by time. These rows feed chapters 139 to 141, 223 and 235.
248. Is the loop improving? — runnable: cpu-f64-loop-v1, a simulated worldCost per accepted result per cycle on a fixed set, an ablation for every component, a complexity ledger, and shared budgets for proposer, student and grader; a loop that does not improve is reported as such.
249. An agent optimizes a Psionic kernel — runnable: DEVICE-F32-CHUNKED-v1 norm on an L4First a conventional bounded autotuner over tile and workgroup sizes, vector widths and a few fusion choices; then a harness agent proposing new implementations inside chapter 37's compute subset for a normalization kernel or a small gated feed-forward block. The agent receives the reference operation and its input contract, compilation, correctness results, profiler measurements and a fixed budget; the evaluator and its independent tests are outside its writable scope, with held-out shapes, awkward dimensions, extreme values and memory checks. A winner must keep the declared numerical behavior and improve measured performance on the declared workload, with its source, compiler identity, device, memory and timings kept. The whole search cost, failures included, is reported, and a run that finds nothing is still a result.
250. Can someone use Psionic instead of PyTorch? — partly implemented: a model audit, a generated capability matrix, nine recorded workflows and PyTorch parity on two MNIST models; the package, tutorials and acceptance projects remainAn externally consumable package: public APIs, operator documentation, examples, diagnostics and reproducible benchmarks, and a command that audits a proposed model (its operators, dtypes, gradients and backends) before allocating large GPU memory. Three published PyTorch tutorials (a classifier, a convolutional model and a transformer training example) are rebuilt with public APIs only, recording model-specific lines, unsupported operations, runtime modifications, effort, cold-start compile time, throughput, memory and final quality. The gate is zero engine modifications for an ordinary new model; each one needed names a missing public abstraction, which is then added.

The loops improve the system around the weights first (settings, prompts, routers, harness configuration); weight updates follow only when both the decision and probability gates pass, since the pre-reset fine-tuning raised accuracy while making confidence worse.

XXV. Weight-space programming

An LLM can propose changes to the weights themselves. This branch follows the compiled constructions in Part XXIII and the independent measurement in Part XXIV, with chapter 119's causal interventions as its first reference. It begins with small, fully observable experiments and records failures; targeted sparse changes do not establish preserved behavior by their size.

ChapterWhat we build and check
253. Read and repair a model's weights — runnable: weight-edit-f64-v1, bounded CPU and recorded local proposer trialsNamed rank-0–4 binary64 tensors, SHA-256 base binding, sparse expected-old/replacement edits with whole-result publication and exact reversal; a trained decoder's permanent edits checked against activation interventions, five saved seeds, no-op/random/permuted/untrained/erased controls, separate fine-tuning and 32 fresh GPT-OSS trials. The chapter records failed proposals, harmful edits and a descriptive criterion's false positives.
254. Write a network from a specification — runnable bounded CPUDirect ReLU4 weights and postfix-to-gated-weight compilation: 19 recorded calls, 16 admitted artifacts, exact arithmetic on 1936 held-out rows per task and shortest walks from 25 starts given oracle distances. Native/hand/planner references match and native arithmetic is cheaper; three-seed AdamW and frozen/online Q baselines, three admission failures, planted boundary failure, costs and offline replay are recorded. No learned-navigation or original-model claim.
255. Edit an original language model — runnable: original-window-v1, bounded CPU and recorded original Metal trialsImmutable identity-bound BF16/F32 windows; GPT-OSS-20B readout edits, sampling/prompt/random/channel-only fitting controls, three declined LLM proposals, held-out retained tasks, exact rollback and independent offline audits. Failed finite goals and unverifiable independent quality remain explicit. Qwen3.5 generation, loop repair and shadow adoption remain open.

XXVI. Build and teach a small robot

Owner-selected end-to-end robotics goal, 2026-11-15: carry the GTC Berlin Microduck development sequence through our own maintained platform. The specification identifies the October 21 keynote and primary training/runtime sources, and separates their evidence from the capabilities we must deliver.

ChapterWhat it builds and verifies
256. Build and teach a small robot — design draftOverview, experiment ledger and counters for the full asset-to-training-to-hardware route; later chapters own the component and final-route gates.
257. A robot description becomes an experimentDecoded bounded embodiment/task admission, explicit observation/action meaning, identity and atomic refusal; two-joint hand mapping before a generic importer.
258. A servo that behaves like the motorRequested/delivered force, delay state, identified actuator terms and checkpoints; independent torque/inertia and queue traces before hardware.
259. Rollouts from independent worlds — partly implementedFinal-before-reset observations, frozen normalization, detached old-policy data, bounded collection, independent counters and complete mid-rollout restore.
260. Train a neural walking policy — design draftVector Gaussian scores and one joint PPO ratio, shared actor/critic backward/trainer, fresh analytic-plant learning followed by actual biped/contact integration; no copied scalar optimizer.
261. Teach skills and switch between them — design draftNew skill learning, contact-aware entry/exit conditions, explicit cue/authority state and transition qualification distinct from within-skill success.
262. Walk by what the robot sees — design draftCalibrated depth geometry, perception/planner/walking boundaries, onboard-only student inputs and held-out obstacle-course evaluation.
263. Export a policy and supervise its steps — design draftModel/normalizer/action package, shared native/ONNX comparisons, target admission and fake-device asynchronous supervision before motors.
264. Run the policy on a real robot — design draftSeparately authorized commissioning, actual timing/fault/stop measurements, calibration and repeatability under a named physical profile.
265. A course, a flock and a repeatable result — design draftFinal complete owned route, independent versus shared four-robot scenes, explicit cue origins, qualified physical showcase and reproducible manufacturing/software release.

The coding-agent implementation roadmap turns these drafts into RB-00…RB-13 work packages with specific source owners, proposed files, independent checks, capacity budgets and completion records. The first task is RB-01 contract admission; a general simulator, CUDA training, new hardware or large model is not required to start it.

This is a cumulative route through existing owners, not a new ML framework or robot simulator. The first selected legged consumer is a small biped; chapter 171's quadruped goal remains a separate later embodiment. A completed tabletop arm, GR00T or Cosmos is not a prerequisite for starting this branch.

Pipeline stageComponent/book ownerRequired new gate
Task brief, agent tools and editable assetsCoder; shared asset registry, editor and componentsPinned geometry/rights, physical dimensions and an evaluator outside the agent's writable scope
Rig, actuators and simulationEngine 17–22 and 35; Coax physical-world contracts; Psionic 109/111/167Strict imported embodiment, identified/sourced servo behavior, full contact/fall model and independent comparisons
Collection and learningPsionic 117–124, 129 and 171; engine 31Isolated batched environments, general neural actor and learned critic, PPO/GAE, normalizer, optimizer, curriculum and complete resume
Perception and navigationPsionic 142/165; engine 33–34Declared real-sensor-available inputs, privileged teacher/student separation, held-out obstacle courses and sensor faults
Evaluation, export and local executionPsionic 8, 220–221, 239–242, 247–248; robotics integration contextIndependent action vectors, complete native/interchange graph, frozen skill/transition gates and measured embedded timing
Physical transfer and several robotsCoax R12–R20; local supervisor and capstone 256Authorized commissioning, stop/fall behavior, per-robot command leases and state, logged cue origins/interventions
Manufacture and continued operationPlatform design/production registry and product servicesCommercially usable geometry, reproducible assembly, calibration, repair and offline operation

Chapter 171 continues to own the reusable learner. Its scalar Gaussian/LQR profiles do not become biped training evidence by changing a chapter title. Train actual new policies for balance/walking, sit/stand, controlled rest and recovery; add a qualified forward roll and guarded skill transitions. Extend the shared framework only with operators required by this actor/critic and perception path, and qualify each CPU/device implementation independently.

Delivery order is reference/contract admission → compatible imported execution → owned neural learning → complete owned simulation/perception → physical transfer → multi-robot capstone. Independent SDKs may provide comparisons; shipping logic, solvers, learners and tools remain Coax. Existing CUDA can accelerate development, while offline operation and a complete non-NVIDIA execution profile are explicit goals. Every additional training backend needs its own quality, timing and memory evidence.

Part XXVII. Looped transformers: Inkling 2 Mini

Target: Inkling 2 Mini (26.4B total / 3.4B active MoE, 3-pass middle-layer loop, native NVFP4 weights with MXFP8 last four layers, ~20GB footprint, plus the variable-loop TML-d24-varloop-research checkpoint).

ChapterWhat it proves
266. Original NVFP4 and MXFP8 weightsAuthenticate and decode native NVFP4 and MXFP8 checkpoint tensors with exact CPU reference dequantization.
267. A looped MoE transformerExecute the 3-pass middle-layer recurrence (and variable loop counts) with per-loop KV-cache/state layout against a tiny hand-checked reference.
268. Execute Inkling 2 Mini on CPULoad the original ~20GB checkpoint, apply its tokenizer/chat template, and verify logits and greedy decode against an independent reference.
269. Inkling 2 Mini on MetalCoax-generated Metal kernels for NVFP4/MXFP8 matvec/matmul, looped MoE prefill/decode, and residency planning for >=32GB Macs.
270. Tool calls and Responses for Inkling 2 MiniWire Inkling 2 Mini's tool-calling format and thinking/CoT output into Psionic's /v1/responses server.
271. Run Inkling 2 Mini in OpenAgents DesktopConnect the resident local Psionic Metal runner into apps/openagents-desktop/ with discovery/download, residency guardrails, model picker, and streaming tool-use sessions.

Part XXVIII. Decentralized training on Pylons

Closes the OpenAgents Executor Network flywheel (Workstream 5, #13923, #13925, #13927): bounded Local-SGD / DiLoCo training windows over decontaminated verified shards, 6-tier Byzantine verification blocking 7/7 planted attacks, and the Quarantine Optimizer (canonical -> quarantine -> promoted) blocking 3/3 regressions with atomic lineage rollback.

ChapterWhat it proves
272. Bounded training windows and Local-SGD / DiLoCo — runnable: training-window-v1#authority Dataset Shard Authority (zero quarantined rows, PII redaction, zero eval leakage) and bounded DiLoCo lease pool with bandwidth caps and expiry reclamation.
273. Six-tier Byzantine verification for public training — runnable: train-verify-v1#authority Tiers 0–5 verification ladder, coordinate-wise trimmed-mean aggregation, and 7/7 adversarial attack rejection.
274. The Quarantine Optimizer and atomic lineage rollback — runnable: quarantine-opt-v1#authority three-checkpoint promotion across 4 frozen gates (decision-v1, probability-v2, Ch 234 exactness, ext-eval-v2 cost) and atomic rollback with suspect-window exclusion.

A framework, not only engines

Most of this plan teaches how to run and train particular architectures. To replace PyTorch inside OpenAgents, Psionic also has to make a new architecture easy to write. The rows marked "Framework track" above add that. Their graduation requirement is one sentence:

A developer defines, trains, fine-tunes, evaluates, saves, exports and deploys a new neural network entirely in Coax and Psionic, on CPU and GPU, without installing or importing PyTorch.

That is a concrete decision for OpenAgents' own workflows. Replacing PyTorch as everyone's ecosystem needs far more operators, tools, hardware and integrations, and is not claimed.

The tensor IR is the center. One representation, 38's, carries a model from Coax source to eager execution (5), modules (117), differentiation (106, 107), compiled forward and backward programs (39, 114, 131), custom operators (40), distributed layouts (133) and exported artifacts (8, 221). This IR is explicitly authored Psionic data: the implemented passes transform it, not arbitrary Coax functions. Automatic extraction from general Coax source remains separate work. Every special model implementation should contribute reusable operators to this path where it can.

Four acceptance projects (each reports the quality reached and the resources used; divergence from a PyTorch reference is measured, not assumed harmless):

ProjectPathGate
Train from scratchA small MLP on MNIST, then ResNet-18 on CIFAR-10 (3–6, 106, 117–118, 121, 125, 129)Raw dataset to a saved model that reloads independently
A language model without PyTorchA 10–50M-parameter decoder with tokenization, batched mixed-precision training, checkpoints, compiled backward and inference (114, 116, 122, 129–131)A full RTX 4080 run with tokens per second, peak memory, a loss curve and an independently implemented PyTorch baseline
Import, fine-tune, serveA published model read from inert tensors, LoRA adapters trained in Psionic, the adapter saved and served (8, 140, 173)Original model to useful adaptation to deployed inference, with PyTorch needed for nothing
Train across GPUs and recoverReplicated, then sharded training, interrupted and restored (122, 133–135)Verified synchronization, declared numerical consistency, correct resume and measured scaling

Order.

  1. A usable framework: tensor semantics, modules, general autodiff, custom operators, optimizers and a data loader. Graduation: a new MLP and CNN train without modifying the runtime.
  2. Competitive single-GPU training: unified IR and compiled autodiff, GPU backward kernels, whole-step training, mixed precision and profiling. Graduation: a small language model trains end to end on the 4080 with a reproducible PyTorch comparison.
  3. PyTorch leaves OpenAgents: import and export, LoRA fine-tuning, reproducible checkpoints and deployment. Graduation: the selected internal training and deployment workflows need no PyTorch installation.
  4. Broader adoption: distributed tensors, sharded training, public model packages and compatibility tests (250).

After the current gpt-oss delivery milestones, this track is proposed to take priority over adding more large pretrained targets. Executing another architecture proves compatibility; letting a developer define and train a new one proves the framework. A Python frontend is out of scope: AGENTS.md keeps Python to tooling. The stable C ABI and DLPack (8) let others build one.

Optional laboratories

AppendixScope and entry point
A. A small imported decoderSmolLM2-135M after 7–10; a deliberately non-NVIDIA, smaller-memory tokenizer/checkpoint lab.
B. Other assistant architecturesNemotron-Mini-4B-Instruct after 48, with an inert conversion of its original .bin; Bolt-E4B as a distinct Gemma-4-derived profile. Neither is automatic dense-model compatibility.
C. Derivatives inside derivativesHigher-order/input derivatives and a tiny PINN after 104–109; independent derivative and PDE-residual checks.
D. Look inside a modelBounded activation capture at named layers, logit lens over the residual stream, attention and recurrent-state inspection; doubles as the tool for localizing a reference mismatch in 14–15. Chapter 119 extends this instrumentation with checked activation replacement and causal experiments.

Prerequisites, not a waiting list

PathPrerequisitesFirst complete payoff
Urgent decisions1–4, then 7–13Elephant 14, Mammoth 15, published semantics 16; Metal 37–47 advances alongside.
A first model of your own1–4Deadline prediction 103 → gradients 104 → failure diagnosis 105; a grid-world policy 110 after 109.
Active learning103–104 and an owned pool with independently checked labelsChoose examples 108 → compare quality at equal label budgets against random selection, with held-out groups never queried.
Causal activation experiments113's tiny decoder trained on an owned task, with bounded activation capture and replacement (appendix D's wider inspection tools remain planned)Remove and restore a known shortcut in 119, with control patches and held-out counterfactuals.
A framework, not only engines2–4 and 38; 104 and 115 for training; 44 and 37 for the GPU; 132 and 133 for distributionTensors and operators 3–6 → modules, autodiff and custom operators 117, 106–107, 40 → trainer, data, optimizers 118, 121, 125 → GPU training and compilation 129–131, 39, 114 → checkpoints and interchange 122, 8, 221 → distribution 133–135 → can someone use it 250.
Live decision API14–15 and 17; an owner-approved hostTiming 18 → resident model 19 → /v1/systemone 20 → running live 22 → measured optimizations 23.
First Pylon meshPart III's API and coax/lib/nostrA Pylon answering decisions 24 → the API fanning out 25 → receipts and checks 26.
Decision throughput14 and 33; Coax jobs for the second half of 35Byte-identical parallel CPU 35; batched forks and prefix reuse 36.
GenerationShared dense inference and 9's tokenizer tablesSampling and constrained decoding 53 → continuation 58.
Mistral7–10, 33, 53 and the router in 61; 75 for draftingMinistral 3 81 → FP8 82 → Devstral 83 → latent attention 84 → Small 4 85 → Large 4 components 86–87.
DeepSeek7–10, 17, 33, 53 and the router in 61; latent attention 84R1 distill 88 → recipe 89 → V2-Lite 90 → V4.1 components 91–95 → engine techniques 96–99 → V4.1 Flash on one machine 100 → drafts 102; across stages 197.
gpt-oss7–10, 33 and 53; the router in 61MXFP4 60 → 20b 64 → 120b 73 → speculative decoding 75; tool calls 77.
Retrieval / dense continuationShared storage, artifacts, tokenizer and attention; each exact model profile54 → approximate index 55 → reranking 56 → grounded answers 57 / 58; browser search 59 once Coax Wasm/WebGPU compute exists.
Training / nanochat103–104, 112–124 and exact nanochat forward/backwardTiny pretraining 128 → SFT 136 → the specific rollout recipe 139.
Decision post-training14–16, 104 and hybrid backwardAdaptation 140; Mammoth-to-Elephant distillation 141.
Early physics103–104 and an owned deterministic solver; a differentiable smooth solver for 111Surrogate and rollout checks 109 → recover physical parameters from motion 111, including ambiguous observations; navigation 110 branches independently.
VisionShared forward core and 142; gradients for a trained headElephant/Mammoth images 143; C-RADIO 144; learned image codec 145 is a separate branch.
Metaverse motionShared forward core, required codec operators and 147–148MotionBricks 149 → the Metaverse 150.
SpeechShared convolution/attention and 151–152Parakeet 153 → streaming 154; text-to-speech 155 after its target is selected.
Scientific MLShared training/spectral core for FNO; geometry operators for DoMINODarcy 157 or DoMINO 160; spherical weather 161 branches independently.
Hybrid / MoE languageShared dense inference, state-space 162 and exact profiles; router 61 (Part VII) for LightningNano 163 → Lightning 164.
World generationShared vision/codec, diffusion/flow 146 and temporal 165One Cosmos3-Edge path 166.
Robot policiesShared vision/language, training, flow 146 and imitation/embodiment 168; the solvers 109 and 111 and transforms 107; Coax R12–R19 units and frames, clocks, bounded control, replay, robot-model import, supervision and fault scenariosGR00T 169 → simulated closed loop 170, conditional on artifact terms; over the Metaverse Engine Part IV engine, control 167 and batched locomotion 171; real hardware only as a separately authorized integration.
Production hostingA qualified model, 33's measurements and a consumer contractBenchmark 172 → server and clients 173–174 → batching and cache 175–176 → routing, scaling, rollout, metering 177–181.
Large-scale servingMeasured need from 172 and 175; two or more devicesDisaggregation 182; tensor/expert parallelism 183.
Voice / training scale16, 172 and the voice gate / a resumable trainer plus backendVoice pipeline 184 and decision steering 185 / distributed training 132.
Mesh inference186's two-stage parity, 33's measurements and network transportPackages and placement 187–190 → experts and routing 191–193 → trust and verification 194–195 → Mesh-LLM interoperation 196 → DeepSeek V4.1 across stages 197 → Mistral Large 3 198 → Le Chonk 199.
HarnessPart III's API; chapter 53's constrained decoding; chapter 176's prefix cacheMoved to the Coder book, chapters 1–8 and 14–22.
Decisions in production16 and 20–22 for calibration, thresholds and outcomes; 24–26 for Pylon checks; Part III for the encoder branchOwn calibration 215 → cost thresholds 216 → outcomes and drift 217; Pylon self-check 218 → honest-distance limits 219; ONNX 220 → millisecond encoder 222 → distilled router 223 → shadow promotion 224.
Programs compiled into weights1–4 and 10; 115 and 207 for the learned chapters; the wallet and Pylon mesh for 238Trace machine 226 → exact memory and arithmetic 227–228 → compiler and harness 229–230 → interpreter or baked program, fast decode, softmax limits 231–233 → replay verification 234 → learned execution and a frozen core 235–236 → composable modules 237 → paid verified work 238.
Measure, then improve16, then 200, 217 and 234Suites, noise floors and gates 239–241 → environments, settings fitting and policy search 242–244 → prompt evolution and judges 245–246 → outcomes as rows and loop accounting 247–248.
Choosing and improving the system16 for synthetic utilities; 20–22 and 217 for logged traffic; 37–44, 207 and 242–244 for the kernel agentCascade 216 → learned model choice 225 → promotion 224; candidates and checks 212; an agent-optimized kernel 249.

Coax features each branch needs

<!-- capability-claim: psionic.language.current --> Psionic is a consumer of the Coax roadmap. The current compiler has bounded CUDA and Metal compute, including selected cooperative kernels; the general language features below have different remaining scopes. A chapter that needs an extension names its concrete consumer and verification gate. Existing bounded library implementations are not absent merely because their general language form remains planned.

Coax capability and remaining gapWhere Psionic needs itAvailable boundary
Bounded CUDA/Metal buffer, index, loop and dispatch compute is shipped; additional compute forms need their own admission and target evidence37–47, 59Generated Coax kernels and CPU oracles; no hand-written tensor shaders.
Bounded direct WGSL graphics modules are shipped; a qualified Psionic WebGPU compute path remains work59Use CPU references until the compute workload has its own admitted lowering, binding and device evidence; graphics emission does not qualify it.
Language jobs, threads and a memory model (ch14) remain planned35, 36, 99, 173–177, 186–195Host workers may call Coax on disjoint ranges under their explicit replay and lifetime gates.
Native f16/bf16, FP8 and FP4 scalar types remain planned33, 50, 60, 82, 95, every BF16 kernelPacked storage, casts and format decoders already run in the declared Psionic profiles.
Bounded generic procedures and fixed-storage structs ship with built-in equatable, ordered, numeric and copyable constraints (ch08); general user-defined constraints and operators remain plannedEvery multi-dtype kernel, 50Shared numeric helpers are now a language option, with actual kernel adoption and native/device qualification still required. Generic struct bindings still reject views and view-containing values.
General SIMD/vector/matrix types remain planned; selected lane/group loops and matrix primitives already ship33–35, 147–150Scalar or qualified cooperative kernels; measure before requesting another form.
Language pointers, owning containers and allocators (ch06) remain planned33, 36 caches, 73, 96 and 222 expert paging, 120Host-owned bounded views and library-owned CPU/CUDA/Metal handles with explicit leases.
Native-C quantities, formal unit products/quotients and initial concrete point/vector types with frame/minimum-precision checks are available (quantities, spatial profile); full frame transforms, compiler clocks, bounded control, general robot import and stamped supervision remain work168–170Fixed-model FK, Jacobian and finger queries adopt typed radian/metre coordinates and world positions. The original SDK loop keeps its stated raw boundaries; these queries do not migrate it or establish compiler runtime bounds. Concrete quantity/spatial device output is refused in the initial profile.
Logical tensors over chosen layouts, compile and startup budgets, device graphs and zero-copy buffers, and kernel derivatives (roadmap R21–R24) remain plannedThe Metaverse Engine 17–37, Psionic 171Solvers index an explicit environment dimension and use library-level CUDA graph replay and leased DLPack views until the language forms exist; gradients are hand-written reverse kernels checked against finite differences.
Full-state and rotating frames, astronomical time scales, integrators and event location, light-time stamps, parameter provenance, fidelity profiles and typed rule modules (roadmap R12, R13, R15, R16, R18 and R20) remain plannedThe Metaverse Engine 39–48Existing orbital and frame state keeps explicit conventions over plain f64 fields; the Grid's scalar quantity precursor does not supply transforms or migrate those profiles. These chapters adopt each checked form as it ships.
A broader qualified target matrix and general asynchronous language effects remain work20–26, 44, 132, 173–185, 186–199Recorded owned Linux/CUDA and Apple CPU/Metal runs retain their named hardware and numerical scopes; they do not qualify every Linux target or an asynchronous ownership model.

The framework track already has strided views (3), owned device storage (6), a typed tensor IR (38), bounded specialization (39), registered operators (40) and bounded CPU autodiff (106). The tensor IR is explicitly authored Psionic data; automatic extraction and transformation of arbitrary Coax functions remain separate work. Built-in constraints now permit shared numerical helpers; migrating actual multi-dtype kernels and qualifying their native/device profiles remain consumer work. Language ownership, results, user-defined constraints and operators, narrow scalar types, additional cooperative forms, asynchronous effects and broader target qualification should extend those real consumers. A general GPU training backend is not implied by the existing inference or CPU backward profiles. <!-- /capability-claim --> Stable issue slugs describe existing work; chapter numbers are provisional. When a branch is selected, split it into concrete issues with the same code/checks/book/evidence acceptance loop. The remaining outlines stay proposals until their workloads and acceptance gates are selected.