Psionic: ML From Scratch
This book builds a machine-learning library from small understandable pieces. Every completed chapter runs the actual Psionic library, with checks and independently specified results.
Chapter 1 starts with learning a single number. You need basic programming and enough arithmetic to multiply and average two numbers. It explains the small amount of calculus as it goes. For the language, use the Coax book.
Coax listings, equations and short illustrative blocks use jai Markdown fences for syntax highlighting. Command blocks use shell.
A chapter whose status is Unimplemented: design draft is written ahead of its code. Its first line under the title is a quoted **Status: unimplemented — design draft.** marker; it explains the method, the design, what it will build and its acceptance checks, and has no source-linked listings or examples. Sketches in it are illustrative only. The physics engine and the spacecraft chapters, first drafted here this way, are now Parts IV and V of the Metaverse Engine book.
Start here
- Navigating 274 chapters (Core ML & Executor Spine vs. Model Targets Appendix): Start with the Core ML & Executor Spine (Parts I–V, X–XII, XX, XXII–XXIV, and XXVIII: tensors, inference primitives, decision services, Pylons, autodiff, exact compiled weight executors, hybrid routing, live Bitcoin settlement, and Byzantine-safe decentralized training). Treat individual model-architecture parts (Parts VI–IX, XIII–XVIII, and Part XXVII Inkling 2 Mini) as a Model Targets Appendix—read only the target you are running or extending.
- What you build. A machine-learning library: tensors, running published models from their original weights, a decision service, training, serving, exact compiled weight executors and quarantined decentralized training.
- What you need. Basic programming and arithmetic. For the language, the Coax book's Parts I–III.
- The order. This book runs original published models (Part II) before it trains anything (Part X). You see real results early, and training then reuses operations you already trust.
- The core path. Chapters 1–6 (tensors), 7, 9 and 12–17 (a decision model from original weights, and whether its probabilities are any good), 18–20 (a live decision API), 24 (a Pylon), 28 and 29 (a game asks for a decision), 103, 104, 112 and 115 (learning, gradients and a tiny decoder), 226–238 (exact compiled weight executors, hybrid routing and verified pay) and 272–274 (Byzantine-safe DiLoCo training and the Quarantine Optimizer). The model families in Parts VII–IX and the modalities in Parts XIII–XVIII are branches. Read the ones you need.
- Decisions, not text. A decision model returns one choice from a typed set, with a probability. Code can branch on it, check it and price it. Parts II–IV and XXII build this, Coder uses it to choose an engine, and Everglade's guard uses it in a game.
- Where this book sits. See the OpenAgents books for the whole library. The contents name all 28 parts.
Chapter status
The chapter registry records every chapter's number, title, status, profile, dependencies and three separate facts:
- Implemented source (
source): the code the chapter shows or runs. - Qualified targets (
qualified_targets): the targets, such ascpu,cuda,metalorwasm, with recorded evidence for the chapter's profile. Source that might compile for a target doesn't qualify it. - Adoption (
adopted_by): code outside the book that uses the chapter's implemented components today. A host, build binding or another library can consume one component without adopting the entire profile. Tests, examples and fixtures are evidence, not adoption. An empty list means no reviewed consumer is recorded, not that none exists.
A chapter's status is one of implemented, partly implemented, *design draft* or planned. A design draft starts with the quoted design-draft marker above, and a partly implemented chapter with **Status: partly implemented.**. python3 psionic/tests/book.py fails when a status marker, a contents label, the status column below or the registry disagree.
Promoting a draft to a teaching chapter
A design draft or planned chapter becomes a teaching chapter only when it has all four of the following:
- A worked calculation or trace. A small input whose result the chapter works out by hand, step by step, before the program runs.
- Runnable source. The code and an example in
psionic/examples/, listed in examples.json, with an exact transcript that the book's checks compare in debug and release. - A deliberately broken case and its diagnostic. An input or an edit that the code refuses, with the exact error or refusal shown and its exit status checked.
- An independent check. A result computed another way, such as a separate oracle, a reference implementation or a hand-derived value, that the checks compare with the code's result.
When all four exist, update the chapter's status in the same commit in four places: the chapter's status marker, its entry in chapters.json, its label in the contents and its row in the table below. The registry check fails when they disagree. Coax chapter 29's affine section is an example: a hand calculation, examples/ch29_frames.coax, a refused program with E0834, and a #test that compares the result with plain arithmetic.
The same inventory may also record libraries: native-only Coax examples with kind: "native-library", a chapter, a host consumer and retained evidence paths. They remain part of closed source/link coverage, but book.py --coax executes only the runnable examples list. Library records do not declare evaluator transcripts or qualify native evidence merely by listing it; their separate native commands and receipts state that scope. The inventory tooling regression is python3 psionic/tests/book_inventory_test.py.
To find a route through all nine books (eight Coax-implementation books plus Reverse Engineering Claude Code), see [Paths through the books](../../docs/books/paths.md). The [shared completion milestones](../../docs/books/completion.md) distinguish runnable teaching profiles from complete training, serving, game and robotics workflows.
The new weight-space programming branch adds a bounded parameter-editing interface and recorded experiments. Chapter 254 constructs small networks directly and through the exact compiler against native and trained baselines. Chapter 255 adds immutable original BF16/F32 windows and records the original GPT-OSS-20B editing matrix, including harmful edits, declined proposals and unverifiable independent quality.
Recorded adoption and remaining integration
The registry now records reviewed consumers of selected implemented components. This is a source inventory, not a new deployment or target qualification.
| Chapters | Component and actual consumer | Boundary |
|---|---|---|
| 14, 19–21 | Original decision/session and serving code is reused by the serving library and native build. | A reusable session does not establish every original model/request/backend profile. |
| 22, 24–25 | The supervisor installer, Pylon join script and public mesh effects bridge consume the managed service, Pylon and fleet paths. | Free public admission and exact model/provider pins retain their existing limits; this is not paid or generally trusted remote execution. |
| 28–29, 31–32 | Everglade's guard policy/session and actual page host use the ticket and Directions components. | The displayed tip remains the deterministic local rule. Optional remote shadows do not establish usefulness or enable ambient/model-selected behavior. |
| 37, 44, 46–47 | The native serving build emits the shared device kernels and memory plans. | Use of a common plan does not qualify every checkpoint or mean Mammoth is deployed on Metal. |
| 66–67, 70, 79 | The resident device host composes kernels, prefill and replay; serve-gptoss.sh binds the Responses host. | The original 20b CUDA/Metal and Responses records retain their distinct supported scopes. |
| 151 | Whisper's frontend loads the spectral component. | Spectral reuse does not implement the planned Parakeet chapters. |
| 43, 55, 71, 175–181, 188, 196 | serve-build.sh, book-search.coax, device-host.coax, serving fault/rollout/client modules, apps/openagents-cli/pylon.coax, coax/web/project/landing-nostr.coax, apps/openagents-cli/pylon-settle.coax and psionic/tools/executor-settle-e2e.coax directly load or bind these components, alongside reviewed sibling-module #load consumers recorded in chapters.json. | Direct component reuse does not lift the remaining serving, mesh, or training gates in each chapter. |
| 218 | The Pylon runner invokes the self-check component before advertisement. | A self-check is not remote attestation or proof of general model quality. |
| 269–271 | OpenAgents Desktop (apps/openagents-desktop/build.sh, page/models.coax, desktop-core.coax, host-core.coax, AppDelegate.swift) and openagents/runtime/oa-worker.coax build, verify, and route local Inkling 2 Mini turns to psionic-inkling-serve. | Hardware, disk, and SHA-256 readiness gates stay enforced in psionic/lib/inkling-desktop.coax; legacy mcworker and standalone inky binaries are retired from Desktop bundles. |
The source inventory also names principal runtime units for chapters that previously listed only a small example or no source. The trainer/framework, production scheduler/cache, multi-device and gait integrations still have the open gates in their chapters; adoption does not promote them automatically.
Commands run from the OpenAgents repository root. psionic/check.sh checks the whole current book and library. Build once with coax/build.sh if you want to run examples directly without the check command.
| Chapter | Status | Result |
|---|---|---|
| 1. Learning a number | Runnable: CPU | Train prediction = weight * x, check every loss, predict a held-out value, and refuse malformed work. |
| 2. Shapes and storage | Runnable: CPU | Admit rank-zero through rank-four shapes, count bytes safely, locate values and stage a copy into caller storage. |
| 3. A tensor is a view of memory | Runnable: bounded CPU f32 views | Signed strides, slicing, transposes, read-only broadcasting, empty tensors and saved-value mutation checks. |
| 4. Numbers and matrices | Runnable: CPU-f32-wide-v1 | Add, reduce, multiply matrices, gather rows, apply masked softmax and normalize rows with independent numerical checks. |
| 5. A standard library of tensor operators | Runnable: CPU-f32-wide-views-v1 | 27 operators, shape/dtype inference, support manifest and analytical value VJPs over strided views. |
| 6. One tensor, several devices and dtypes | Runnable: bounded CPU, CUDA and Metal | Owned placement, f32/f16/bf16 casts and promotion, immutable shared views, explicit waits, seeded uniform tensors and add/ReLU/dropout. |
| 7. Reading original weights | Runnable: original-weights-v1 | Inspect and bind original single/sharded BF16/F32 artifacts, decode finite windows and use imported values in shared kernels. |
| 8. Models travel between frameworks | Runnable: interchange | Bounded 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 | Runnable: qwen35-text-v1 | Render typed decisions, normalize/tokenize original Qwen data and validate complete shared-prefix/suffix layouts. |
| 10. Attention without training | Runnable: bounded CPU | Execute a dense causal decoder block with grouped-query attention, rotary positions and a key/value cache. |
| 11. A hybrid sequence model | Runnable: bounded CPU | Compose Qwen-style causal linear and full-attention layers with their separate states. |
| 12. Decisions have a different mask | Runnable: bounded CPU | Compute bidirectional full-attention blocks and fork all live hybrid prefix state. |
| 13. Read the options | Runnable: bounded CPU | Compute temperature-scaled option probabilities, vocabulary slot mass and typed decision statistics. |
| 14. Execute Elephant | Runnable: original weights, CPU | Authenticate Elephant and execute a typed text decision through its complete hybrid stack. |
| 15. Execute Mammoth | Runnable: original weights, CPU | Plan Mammoth's storage, authenticate both shards and execute the same typed text decision through all 64 layers. |
| 16. Are the probabilities any good? | Runnable: CPU; original weights for the held-out run | Load the bundle's calibration (none: temperature 1.0), print the published answer JSON and measure accuracy, Brier score, calibration error and abstention on a frozen held-out set. |
| 17. Qualify honestly | Runnable: CPU | Freeze comparison policies by digest, bind results to the exact build, make the exit status the verdict, and find chapter 14's evidence unknown, not qualified. |
| 18. Time a decision | Runnable: live-decision | Measured 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 | Runnable: live-decision | One 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, CPU | Answer NIP-DEC decision bodies over HTTP with typed refusals, deadlines, cancellation, busy refusals and the served model identity. |
| 21. The protobuf wire | Runnable: toy engine and native answers | Accept application/x-protobuf requests by transcoding them to the NIP-DEC body chapter 20 admits, and answer in protobuf on Accept: application/x-protobuf. |
| 22. Run it live | Runnable: live-decision | Golden warm-up before readiness, versioned health, bounded Coax restart supervision, private usage records and an owned loopback deployment. |
| 23. Make the numbers move | Runnable: live-decision | Exact per-request CPU prefix snapshots, isolated suffixes and device host-arena elimination; paired parity and measured changes. CPU worker pools remain chapter 35. |
| 24. A Pylon answers decisions | Runnable: local Coax relay, toy engine and Elephant on an L4; TEST-ONLY signing | NIP-42, the NIP-65 list and the 30200 beacon, NIP-44 jobs verified, queued, cancelled or refused, answered by the engine with its identity, and draining then offline on stop. |
| 25. The API fans out | Runnable: opt-in loopback HTTP-to-Pylon adapter; throwaway buyer keys | Fresh exact-identity free services, encrypted correlated attempts, checked answers, bounded failover and same-identity local fallback. Not publicly deployed. |
| 26. Check the mesh | Runnable: opt-in free mesh; configured toy CPU replay | Signed accepted remote receipts, memory-only sampled replay, pinned checker labels and independent public pool recomputation. No payment or execution attestation. |
| 27. A public mesh | Runnable: authenticated bounded free public edge | Exact provider/model pins, private fleets and real learned-model calls. |
| 28. A decision arrives while play continues | Runnable: local ticket and cancellation effects | Bounded consumer tickets, monotonic deadlines, cancellation, late-response fencing and exactly-once game admission with a deterministic fallback. Delivery plan. |
| 29. A guard asks a Pylon | Partly implemented: opt-in guard shadow slice, qualified locally and live | Authored quiet, greeting and weather options, current-state revalidation and end-to-end gates. Usefulness and ambient behavior are pending. |
| 30. Measure a guard decision | Runnable: bounded measurements and real Elephant evaluation; no gain over quiet | Local telemetry, frozen labels and actual cookie-authenticated evidence. |
| 31. Directions on request | Partly implemented: explicit-help candidate; separate live smoke evaluation | Fixed authored routes, strong local reference and current-ticket ownership; chapter 32 delivers local-first page integration, while remote usefulness remains gated. |
| 32. A guard gives directions | Runnable: instant local help and opt-in remote shadow in the actual game | Current-world projection, same-frame HUD handoff and cancellation under changing gameplay. |
| 33. Measure the work and plan the memory | Partly implemented: rp-plan-v1 exact accounting and residency plan; rf-host-v1 roofline on one host (timed phases of a real run, measured allocation against the plan and a quiet-host repeat remain) | Exact weight, state and scratch bytes, FLOPs and bytes moved per phase for Elephant, Mammoth and gpt-oss; a measured single-thread host roofline; a residency plan that admits, streams or refuses with a typed reason. |
| 34. Benchmark against llama.cpp and cuBLAS | Partly implemented: cm-warm-v1 comparison protocol; Psionic CUDA projections against opt-in cuBLAS on one host (llama.cpp on the same GGUF file, the llama-bench shapes and a quiet-machine run remain) | One warm-up and at least five warm runs per side, mean and sample standard deviation by two methods checked against an exact integer formula, and a verdict that refuses different files, formats, shapes or machines and unrecorded builds; Psionic's projections reach 76–92% of cuBLAS BF16 at one token and 10–16% at 86. |
| 35. Use every core | Partly implemented: pc-cores-v1 fixed partitions and tree merges, byte-identical at 1, 2, 4 and 8 workers; host-thread speedup on one host (the Elephant decision on the pool, the same gate on Coax jobs and a quiet-host repeat remain) | Fixed partitions and tree-ordered merges so CPU output is byte-identical at 1, 2, 4 and 8 workers. |
| 36. Many questions at once | Runnable: batched suffix forks on CUDA (RTX 4080) | A request's five suffixes in one pass over the weights, bit-identical to sequential forks, with prefix state reused across requests by model identity and exact token prefix. |
| 37. A Coax compute subset | Runnable: coax cuda on an RTX 4080 and group kernels on Apple GPUs | Buffers, integer indexes, bounded loops, work items and bindings: generated source compiles, device execution matches the CPU oracle, and negative admission refuses. |
| 38. A tensor program becomes an execution plan | Runnable: tensor-ir-f32-v1, CPU/CUDA/Metal | Typed straight-line graphs, shape/alias inference, root liveness, reusable workspace, reference/plan/device execution and exact cache invalidation. |
| 39. Compile a general tensor program | Runnable: tensor-template | Bounded 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 | Runnable: operator-registry | Public 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 and tiled-attention-cuda-f32-v1 (bounded CPU, and a group kernel on an RTX 4080 at gpt-oss-20b shapes and on layer 0's original weights; serving adoption and chapter 233 remain) | Online-softmax attention over key/value tiles with chunked prefill, grouped-query tile sharing and split-K decode, matching chapter 12's decision mask and chapter 62's sinks and windows, on the CPU and as a CUDA group kernel compared with chapter 66/67's attention. |
| 42. DeltaNet in chunks | Partly implemented: delta-chunks-cpu-f64-v1 and delta-chunks-cuda-f32-v1 (bounded CPU, and a group kernel inside chapter 44's linear-layer kernels on an RTX 4080 at Elephant's shape, 64 to 2,048 tokens and layer 0's original weights; adoption by chapter 44's decision program remains) | Chunked Gated DeltaNet prefill in WY form, equal within a named profile to chapter 11's token-by-token recurrence, with chunk-boundary snapshots, on the CPU and as a CUDA group kernel timed against chapter 44's recurrence over chunk sizes. |
| 43. Fuse and replay | Partly implemented: DEVICE-F32-TREE-v1 fused chains, CPU and CUDA (gate/up, routing and recurrent fusions, replay transaction boundaries and model use remain) | A fusion pass that merges the norm with its scale and a bias, ReLU and residual add into one launch each, admitted only when the spans do not overlap and no intermediate is read later, bit-identical to the unfused step on the CPU and an RTX 4080; steps recorded once as device graphs and replayed for decode and prefill sizes. |
| 44. Elephant on CUDA | Runnable: Elephant on CUDA (RTX 4080); Mammoth in chapter 46 | Coax-generated kernels, device buffers and launches, whole-prompt prefill, streamed layers and the complete decision checked against the CPU reference, about 201 ms per decision. |
| 45. Share the card | Runnable: every Elephant matrix can stream | Elephant beside a resident gpt-oss-20b on one 16 GB card, with a plan checker that shows a streamed plan launches what the resident plan launches. |
| 46. Mammoth on CUDA | Runnable: Mammoth on CUDA (RTX 4080), streamed | Mammoth's decision in about 1.6 s with 12.5 GiB resident and 37.8 GB streamed, within 0.0005 of chapter 15's CPU result. |
| 47. Elephant on Metal | Runnable: Elephant on Metal (Apple M5 Max) | The chapter 44 kernels through coax metal-compute, the decision within 4.6e-6 of the CPU and about 0.4 s warm. Mammoth on Metal is planned. |
| 48. Integer matrix products | Partly implemented: int8-block-i32-v1, CPU and CUDA (device kernels equal the CPU bit for bit on the RTX 4080; dp4a and int8 tensor-core instructions, and a speedup over f32, remain) | 8-bit activation blocks with exact 32-bit integer accumulation, as a row kernel for decode and a tiled int8 kernel for prompts. |
| 49. Read a GGUF file | Runnable: gguf-v3-le-v1, CPU | Bounded metadata, quantized tensor descriptors, alignment and atomic publication; original upstream headers and malformed fixtures. |
| 50. Quantized weights and caches | Partly implemented: gguf-q8_0-v1, gguf-q4_0-v1 and int8-kv-v1, CPU (K-quant and MXFP4 profiles, text perplexity, a product evaluation and cards on Elephant's original weights remain) | Q8_0, K-quants and an optional quantized KV cache, each a separate profile measured against the original weights with a declared quality loss. |
| 51. K-quants and lattice quants | Partly implemented: gguf-k-quant-v1, gguf-iq4-v1 and gguf-iq-lattice-v1, CPU (llama.cpp's quantizers, cards on a named model's original weights and perplexity on fixed text remain) | Decoders for 2- to 6-bit K-quants and IQ4, IQ3 and IQ2 formats, each with independent decode vectors and a quality card. |
| 52. Tokenizers and chat templates | Runnable: bounded CPU | WordPiece, SentencePiece-style Unigram and bounded Jinja, checked against original BERT/T5 tables and TinyLlama templates. |
| 53. Choosing the next token | Partly implemented: next-token-cpu-f64-v1 sampler, byte grammar, JSON-schema subset and Tekken trie masks (masks over the whole 131,072-token vocabulary and a second-host record remain) | A named counter RNG, temperature, top-k and top-p with one tie rule, stop tokens, limits, cancellation, a byte-automaton grammar mask, a bounded JSON Schema compiler and trie-walk masks over real Tekken tokens. |
| 54. Search the Coax book | Runnable: bs-attnpool-d64-v1, CPU | Search the Coax, Psionic and Metaverse Engine books with BM25, exhaustive vector search over Psionic's own learned embeddings, and a fused retriever. Every result names its passage, revision and status, and a stale index is refused or rebuilt. On 36 held-out queries, MRR@10 is 0.505 for BM25, 0.477 for vector search and 0.518 fused. |
| 55. Search without scanning everything | Partly implemented: bounded CPU, f32 vectors, binary64 similarities (over chapter 54's embeddings only in chapter 56's evaluation; no files on disk or wall-clock time) | An HNSW index built from scratch with deterministic levels, bounded storage, typed refusals and a checked saved form. On 4,000 random 16-value unit vectors, recall@10 against exhaustive search is 0.733, 0.878, 0.959, 0.995 and 1.000 at ef 10, 20, 40, 80 and 160, for 4% to 26% of the similarities. |
| 56. Rerank the candidates | Partly implemented: bounded CPU, binary64 pairwise reranker over seven features (answer quality is chapter 57's; everyday search does not rerank yet) | BM25 and HNSW candidates over chapter 54's books, merged and reranked by a pairwise-trained scorer, with index recall and relevance reported separately. HNSW at ef 200 shares 98.6% of the exhaustive top 100; on 36 held-out queries MRR@10 goes from 0.555 (fused) to 0.598, which chapter 241's gate calls unverifiable, near the floor. |
| 57. Answer from current sources | Partly implemented: bounded CPU, extractive sentence answers with SHA-256 passage revisions (no generated answers, status-aware answers or chapter 205 attacks yet) | Retrieve, rerank and answer with one sentence copied from a passage, cited by identity, byte span and revision digest; a citation whose passage changed or was deleted is refused instead of served; abstains under a support floor fixed before the run. On 36 held-out questions it answered 19, every citation resolved, and 5 of 19 cited a labelled passage (0.263); it abstained on 7 of 8 unanswerable questions. |
| 58. Continue a passage | Runnable: bounded CPU f32 with binary64 sums over original BF16 bytes | The pinned Llama-3.1-Minitron-4B-Width-Base checkpoint (two BF16 shards, SHA-256 recorded, weights kept outside the repository): its 291 tensors checked against the config, the Llama 3 tokenizer over full Unicode (chapter 81's UTF-8 decoder and class table) id for id against the merge-list rule over the full vocabulary on 22 strings, 13 outside ASCII, llama3 rotary frequencies with rotate-half pairs, a 4,096-position key-value cache whose incremental logits equal the full recompute bit for bit (past position 64 on the synthetic model, and layer 0 over a 74-token passage on the original weights), and greedy and seeded continuation through chapter 53's sampler on all 32 layers, with every layer's output, the last logits and the greedy tokens of a recorded run matching a parallel binary64 reference. |
| 59. Run in the browser | Partly implemented: bs-attnpool-d64-v1 in Wasm, CPU (local page only: no openagents.com deploy, distilled encoder, WebGPU compute or compression yet) | Chapter 54's search compiled from Coax to Wasm and run in headless Chrome from a bundle (query encoder, index, manifest) whose encoder and corpus digests the page checks; it refuses a stale index or another encoder, and its results equal the native tool's bit for bit on the 36 held-out queries. |
| 60. Original MXFP4 weights | Runnable: bounded CPU format decoder | Decode original gpt-oss packed groups exactly, with independent bit oracles and atomic refusals. |
| 61. A few experts, then a router | Runnable: bounded CPU router and tiny affine experts | Select and normalize top-k routes, dispatch by resident expert ID and publish a checked weighted mixture. |
| 62. Attention with sinks and a window | Runnable: gpt-oss-attention-cpu-wide-v1 | Compute per-head sink attention with a bounded ring, split-half YaRN, biased projection and clamped expert activation. |
| 63. The harmony format | Runnable: gpt-oss-harmony-text-v1 | Encode original byte ranks, frame typed messages with reasoning effort and parse strict complete replies with exact turn/handoff stops. |
| 64. Execute gpt-oss-20b | Runnable: original CPU model and seeded generation | Complete authenticated 24-layer model, dense references, replay and sampling. |
| 65. Original weights stay on the GPU | Runnable: original 20b CUDA residency | Packed original weights, complete resident memory plan and focused owned checks. |
| 66. A complete CUDA decoder | Runnable: original 20b CUDA greedy generation | Every layer, cache, router and full head stay on device; complete Harmony final display. |
| 67. Prefill together | Runnable: batched CUDA prefill | Coefficient reuse across tokens, grouped experts, causal chunk attention and atomic cache shadows. |
| 68. Coax kernels cooperate | Partly implemented: DEVICE-F32-TREE-v1 group kernels, CPU and CUDA (shuffle instructions, FP16 matrix primitives, tensor cores in group kernels and model use remain) | A shared-memory tile reduction, butterfly lane exchange and a shared-tile packed-BF16 product, bit-identical to the CPU on an RTX 4080; refused kernels with exact diagnostics; device capability admission decided in Coax. |
| 69. Original MXFP4 products use matrix hardware | Partly implemented: MXFP4-BF16-MMA-v1 expert products, CPU and CUDA (full-model routes, top tokens and step timing remain) | Original MXFP4 expert products on tensor cores: coefficients staged exactly into BF16 fragments, two-limb activations, a bound frozen before comparison, Coax admission refusing devices without the instruction; within the bound on synthetic and original layer 0 tensors on an RTX 4080, equal speed for one token and six times faster with 32 tokens per expert. |
| 70. Replay the device program | Runnable: exact CUDA decode replay | Coax compares admitted descriptors; ordered graph nodes reuse bindings and patch changing arguments. |
| 71. Throughput is a gate | Partly implemented: tg-gptoss20b-v1 throughput gate; original 20b CUDA on one RTX 4080 (P95, per-phase memory and transfers and a packaged reference engine remain; a concurrency above 1 needs chapter 175's batch evidence) | A frozen 1,024-in/128-out gpt-oss-20b workload, one warm-up and five timed runs, and a pass/fail/too-noisy verdict against 2 s prefill and 25 tokens/s decode, refused unless the build, commit, machine and device are named and greedy outputs match the reference. Chapter 69's tensor-core products in chapter 67's grouped prefill take 1,024-token prefill from 3.107 s (fail) to 1.511 s; decode runs at 56.2 tokens/s; both goals pass on the 4080. |
| 72. gpt-oss-20b on Metal | Runnable: original 20b on an Apple M5 Max | The same Coax kernels and launch programs through Metal; every weight resident; CPU-identical greedy tokens; served by serve-gptoss.sh --metal. |
| 73. Execute gpt-oss-120b | Runnable: original CPU model and residency | The same engine, 36 layers and 128 experts, original shards and measured memory. |
| 74. Fit 120b on the right device | Partly implemented: fc-120b-v1 device choice; RTX 4080 expert upload receipt (the 120b runs remain: weights not on this host, no CUDA expert cache yet, the Mac run is an owner action) | gpt-oss-120b on a device with enough resident memory, such as the 128 GiB Mac through chapter 72's Metal engine. |
| 75. Let the small model guess | Runnable: serial CPU speculative profile | Standard acceptance/correction, block bonus, whole-cache rollback, prompt n-grams and original greedy parity. |
| 76. Verify a draft block in parallel | Partly implemented: greedy device block verification; original 20b CUDA on one RTX 4080 (sampled verification on the device, a cheaper verification pass and a better drafter remain) | Prompt n-gram draft blocks verified in one batched prefill, rollback of only the speculative cache rows, exact greedy parity and byte-equal caches; measured 1.84 times slower than the target alone, so the #authority rule leaves speculation off. |
| 77. Call a tool | Runnable: finite JSON-schema enum and granted tools | Mask before sampling, typed commentary handoffs, tool-role results and final-only display. |
| 78. Device generation calls a tool | Partly implemented: gpt-oss-cuda-tools-v1; original 20b CUDA on one RTX 4080, host-masked logits (a device mask kernel, Metal, and tool calls in the streamed server remain) | Chapter 77's masked, granted tool call on the resident CUDA engine: one counted logits transfer per masked choice, typed refusal instead of CPU fallback, cancellation that releases device state; token-equal to the recorded CPU reference. |
| 79. Serve Responses | Runnable: resident original 20b CUDA, bounded Responses profile | Coax HTTP/JSON, typed reasoning/function replay, incremental SSE, cancellation and SDK checks. |
| 80. Two models, one card | Runnable: gpt-oss-20b and Elephant on one RTX 4080 | Start order and memory budget for both servers on one 16 GB card, verified starts, and a client that chains them. Concurrent use is unmeasured. |
| 81. Execute Ministral 4 | Partly implemented: bounded CPU f32 with binary64 sums over original BF16 bytes (positions past 64, the reasoning and tool formats and the image path remain) | The pinned Ministral-3-3B-Instruct-2512-BF16 checkpoint (SHA-256 recorded, weights kept outside the repository): its 236 text tensors checked against the architecture, Tekken read whole from tekken.json with its Unicode pattern and Mistral's chat format id for id against Python over the full table, YaRN rotary frequencies, and all 26 layers through chapter 58's key-value cache and chunked readout, with a recorded greedy run on the original weights that matches a float64 reference at every layer and in its tokens. |
| 82. Original FP8 weights | Partly implemented: exact CPU FP8 E4M3 block decode and approximate activation profile (on constructed files; pinning the Mistral headers and comparing activations with the reference remain) | Exact decode of FP8 E4M3 block-scaled originals, including UE8M0 scales, kept separate from derived profiles. |
| 83. A coding agent | Partly implemented: devstral-agent-v1, bounded CPU (the pinned checkpoint's header inventory against params.json, the memory plan on this host, Mistral's function-calling format byte and token exact, grammar-constrained calls and a fixed Stack task set with pass@k under a seeded stand-in; Devstral's weights, tokens, logits and real pass rates remain) | Devstral-Small-2-24B with schema-constrained function calls, measured on 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 and Mistral shapes remain) | Multi-head latent attention in expanded and absorbed forms, with the compressed cache accounted exactly. |
| 133. A tensor spread over devices | Partly implemented: shard-v1, bounded CPU logical devices (a named multi-axis mesh, layouts in chapter 38's tensor IR, transfers on real devices and operations beyond the product, add and relu remain) | Sharded tensors over a device group: replicated, row, column and partial layouts; redistributions (slice, all-gather, all-to-all, reduce-scatter, all-reduce) in a fixed device order that round-trip bit for bit and move exactly the bytes a hand-worked cost model counts; data-, column- and row-parallel products that match one device; and propagation that names the node it refuses. | | 134. Data-parallel training | Partly implemented: data-parallel-v1, bounded CPU ranks (measured throughput with and without overlap, on real threads or devices, remains) | Chapter 118's trainer data parallel for any model: micro-batches split over ranks, reports at the accumulation boundary, a bucketed chain all-reduce equal to the one-rank run bit for bit at every rank count and bucket size for chapter 103's model and chapter 115's decoder, a killed rank that writes nothing and a restart from the checkpoint on fewer ranks, and a hand-worked model of overlapping the all-reduce with backward. | | 135. Fully sharded training | Partly implemented: fully-sharded-v1, bounded CPU logical ranks (measured scaling and per-device peak memory on real devices or machines, and per-layer gathering with prefetch, remain) | Chapter 118's trainer with parameters, gradients and AdamW moments sharded over ranks: all-gather before the step, a reduce-scatter in chapter 118's addition order, each rank updating its shard; chapter 115's decoder equal to the one-rank run bit for bit at every rank count that divides it, a sharded checkpoint reloaded at another rank count, and per-rank and per-step bytes accounted against chapters 116 and 133. | | 136. Supervised conversations and tools | Partly implemented: nanochat-sft-cpu-f64-v1, bounded CPU (the Nemotron-Agentic-v1 and OpenCodeReasoning subsets with provenance and licences, nanochat's SFT mixture, and a recipe that keeps the base skill within its bound remain) | Supervised fine-tuning of chapter 128's model on calculator-tool conversations with the loss on assistant and tool-call tokens only, a split by problem, admission that refuses malformed conversations, exact resume and a frozen acceptance rule. The recorded run answers all 256 held-out questions through the tool and fails the rule's base-skill bound. | | 137. Continued pretraining and task adaptation | Partly implemented: nanochat-continue-cpu-f64-v1, bounded CPU (chapter 241's noise-floored gate and non-language-model task adaptation remain) | Chapter 128's model continued on the Coax source of chapters 1-40 from its digest-named final checkpoint, with a stated domain/rehearsal ratio, one leak audit over both corpora and a promotion rule frozen before the runs; the recorded runs gain 2.58-2.71 bits per byte on held-out code, rehearsal cuts forgetting from 0.93 to 0.16, and none meets the 0.05 limit, so none is promoted. | | 138. Preferences and reward models | Partly implemented: nanochat-prefer-cpu-f64-v1, bounded CPU (HelpSteer3 human preference pairs with provenance and fixed splits, and the length and style limitations they show, remain) | Preference pairs with known ground truth on chapter 136's calculator task, a Bradley-Terry reward model and DPO against a frozen reference, both from chapter 136's tuned model, with held-out pairwise accuracy, 95% intervals, a measured limitation on an unseen kind of mistake and frozen acceptance rules. The recorded run passes both rules: 252 of 256 held-out pairs for the reward model and 256 of 256 for DPO, which keeps 256 of 256 exact calls and 253 of 256 exact answers; on the unseen kind the reward model manages 152 of 256. | | 139. Learn from rollouts | Partly implemented: nanochat-rollouts-cpu-f64-v1, bounded CPU (rollouts from chapter 242's environments, comparisons against chapter 240's noise floor, and nanochat's GSM8K task, remain) | On-policy learning from seeded rollouts on chapter 136's calculator task: a checker that grades each rollout from its tokens and agrees with chapter 136's sf_ask, group-relative advantages with a penalty on the log-ratio to a frozen reference, a policy-gradient step through chapter 127's masked gradient, refusal of rollouts from another policy version, and a paired held-out acceptance rule frozen before the run. The recorded run, from chapter 136's tuning stopped at step 250, raises held-out exact answers from 90 to 170 of 256 (81 gained, 1 lost) and passes the rule. | | 140. Post-train a decision model | Partly implemented: cpu-f64-post-train-v1, stand-in decoder (adapters on Elephant and Mammoth, the hybrid backward pass, an abstention term, serving-engine loading and QLoRA remain) | Low-rank adapters on a frozen stand-in decoder, trained only on admitted rows of the same base and promoted only through both decision and probability gates: a hidden-region adapter passes both, a readout adapter fails the decision gate, and a 16-row cross-entropy adapter passes it but fails the probability gate. | | 141. Distill Mammoth into Elephant | Partly implemented: cpu-f64-distill-v1, stand-in student over recorded CUDA answers (the adapter on Elephant's own weights, its backward pass on the GPU, the exposure ledger's split artifact and a larger corpus remain) | Mammoth's and Elephant's answers to 72 requests, recorded on the RTX 4080, become soft targets and student features; chapter 140's adapter is trained on the KL to Mammoth, compared with Elephant and Mammoth on 8 held-out families, and admitted only from Mammoth's pinned identity and CUDA profile. | | 142. Pixels, convolutions and patches | Partly implemented: psionic-pixels-v1, bounded CPU (chapter 5 operator-table entries and GPU lowering remain) | Image admission, preprocessing profiles, nearest, bilinear and bicubic resizing with aligned corners, antialiasing and resize-then-crop, convolution with stride, padding, dilation and groups by direct sum and im2col with exact gradients, a tiled patch projection that runs ViT-B/16 at 224 pixels, both lowered into chapter 38's tensor IR, and position-table resizing, each checked against independent references. | | 143. Elephant and Mammoth see | Partly implemented: psionic-see-v1, bounded CPU (resizing, the full encoder against a reference, splicing image tokens into the text model with M-RoPE, and image-bearing decisions remain) | The 333-tensor vision inventory checked against both checkpoints, image admission and the processor's patch layout, patch embedding with interpolated positions, one block with 2-D rotary attention, the 2 by 2 merger and the multimodal request layout with interleaved M-RoPE positions; tiny encoders against an independent oracle, and an original-weight slice of Elephant and Mammoth within a frozen tolerance. | | 144. See with C-RADIO | Partly implemented: psionic-radio-v1, bounded CPU (visual-asset retrieval, the trained head over frozen features, resizing and a capture of the upstream runtime's features remain) | The pinned C-RADIOv3-B checkpoint's 175-tensor inventory, admission and the input conditioner, patch rows, the patch embedding with the CPE position table cut to the grid, the cls and register tokens, the layer-scaled block and the summary and spatial features; tiny encoders against an independent oracle, and the full 12-block encoder on original weights within a frozen tolerance. | | 145. Compress and reconstruct an image | Partly implemented: psionic-codec-v1, bounded CPU (the Cosmos-0.1-Tokenizer-CI8x8 checkpoint, its wavelet, normalization and attention blocks, and reference parity remain) | A small convolutional codec: 3 × 8 × 8 images to 16 codes of 4 bits (24 to 1), transposed-convolution upsampling checked against its scatter definition, straight-through gradients checked by central differences, AdamW training on procedural images, and a recorded run at 22.21 dB test PSNR against gates frozen before training (a second look at the test images, stated as such). | | 146. Noise, diffusion and flow | Runnable: cpu-f64-diffusion-v1, bounded CPU | A four-class Gaussian mixture in the plane with its exact posterior at every noise level: linear and cosine schedules with refusals, noise, data, velocity and flow objectives with their loss factors, an affine predictor per level and class trained by gradient descent to its least-squares answer, DDPM, DDIM, Euler and Heun samplers, sample statistics against 4-standard-error gates fixed before sampling, first and second order measured, and seeded bit-for-bit replay. Teaches the methods; qualifies no later architecture. | | 147. Poses have conventions | Runnable: bounded CPU binary64 (24 joints, 64 frames) | Quaternion, matrix, rotation-vector and 6D forms with checked round trips near the half turn; declared up, forward, handedness, quaternion order, unit, root mode and frame rate, with an undeclared field refused; forward kinematics against a homogeneous-matrix oracle; resampling with spherical interpolation; and root-scaled retargeting between skeletons with the same joints. | | 148. Motion tokens become poses | Partly implemented: cpu-f64-motion-token-v1, bounded CPU binary64 (16 codes, 8 frames a code) (no attention model or learned decoder) | A pose-segment codebook compared in the 6D form, a nearest-code encoder checked against brute force, a lookup decoder whose round trip is exact for codebook members and bounded below half the separation, a continuity check, and masked-token filling with a counted bigram model over a fixed schedule (33 of 36 held-out tokens; every miss refused by continuity). Convention mismatches, unknown tokens and bad lengths are refused. The attention masked-token model trained by gradients and a learned decoder remain. | | 149. Execute MotionBricks | Partly implemented: cpu-f64-motionbricks-v1, bounded CPU binary64 (5 heads x 16 codes x 32 values, 16 tokens of 4 frames, synthetic width 16) (no root predictor, no real-weight decoder or predictor runs, no reference trajectories) | The pinned SOMA package hashed and its pose VQ-VAE (94 tensors) and pose predictor (210) checked line for line against the architecture; the real 5 x 16 x 32 codebook packs, unpacks and re-encodes exactly; the VQ-VAE decoder, the masked pose-token transformer and its cosine confidence schedule run on synthetic weights against separately written references, and decoded motion passes chapter 148's continuity check. The root predictor, real-weight execution, SOMA's feature layout and comparison with recorded PyTorch outputs remain. | | 150. Put generated motion in the Metaverse | Partly implemented: cpu-f64-motion-verse-v1, bounded CPU binary64 written as Cast.bin F32 rows (65 joints, 32 frames) (synthetic-weight motion, one leg mapped, spliced into a Cast built around the real skeleton; no real-weight motion, no web Grid frame) | Chapter 149's synthetic-weight motion toward a destination, converted to the Metaverse's convention and retargeted through an explicit, checked joint map onto the 65-joint skeleton of Cast.bin; its skinning rows equal chapter 147's forward kinematics, pass the continuity check, and are spliced into the dance slot that metaverse/cast.coax plays and cross-fades with the idle and walk; scenes are reproducible and refused before any work past their length or pass budget; the foot-contact check catches the untrained motion skating. Real-weight motion, a whole-body map, the shipped Cast.bin and web Grid, wall-clock deadlines and the Unitree G1 remain. | | 151. Waveforms and spectral features | Partly implemented: cpu-f64-spectral-v1 FFT and log-mel features (matching recorded Parakeet features, dither and a 2D FFT remain) | Typed audio admission, windows, a direct DFT reference, an FFT of any size to 4,096 and its inverse, spectrograms, Slaney and HTK mel banks, log-mel features and per-feature normalization, checked against an independent oracle. | | 152. A speech encoder | Partly implemented: psionic-conformer-v1, bounded CPU f32 with binary64 sums (comparing with tensors recorded from NeMo's own encoder remains) | A FastConformer encoder, bounded at Parakeet's sizes (width 1,024, 24 layers) and run on its checkpoint in chapter 153: three stride-2 convolutions with chapter 142's convolution sum, lengths and masks carried per item, Conformer layers with Transformer-XL relative-position attention (NeMo's shift worked by hand) and the depthwise convolution module, a CTC head and greedy decoding. Each piece matches an independent binary64 reference, a padded batch matches each item alone bit for bit, and admission bounds rule out f32 overflow. | | 153. Transcribe with Parakeet | Runnable: psionic-parakeet-resident-v1, bounded CPU frontend + Metal f32 encoder + compensated CPU TDT | Authenticated original Parakeet v3 weights, resident native engine and explicit CLI backend. Complete feature/encoder tensors meet frozen NeMo tolerances and tokens, frames and text match exactly on 29 recordings. Frozen one-utterance slices cover 25 languages with WER/CER and offline timing; the original four-clip CPU teaching profile is retained. Coder for Mac adopts it for local hold-to-talk composer drafts and clears audio workspaces after recognition. Streaming remains separate. | | 154. Transcribe while someone speaks | Runnable: psionic-listen-v1 seeded CPU; psionic-nemotron-streaming-en-v1 original F32 Linux CUDA | Seeded CTC tutorial plus original-weight English RNNT: incremental audio features, causal subsampling, carried encoder/decoder caches, real partials and finals, reset/cancel/order refusal, original-reference parity and finite accuracy/latency/memory evidence. Explicit file-backed Metaverse Engine consumer; Metal and live microphone/UI adoption remain separate. | | 155. Speak the answer | Partly implemented: psionic-speak-v1, bounded CPU binary64 (a learned acoustic model or a pinned text-to-speech checkpoint, natural-sounding speech, intelligibility through chapter 153's transcriber, playback through the voice engine, and wall-clock time to first audio and real-time factor remain) | Text to audio on the CPU with fixed rules: numbers and symbols written out as words, letter-to-sound phones with fixed durations, a rule-based formant acoustic model that gives each frame a magnitude spectrum, Griffin-Lim phase recovery one block at a time with the frames before it held fixed, a least-squares inverse STFT that emits each sample as soon as no later frame reaches it, and barge-in that reports exactly what was heard. The stream matches the same blocks solved offline bit for bit and, as one block, textbook Griffin-Lim; Griffin-Lim's distance never rises; a template recognizer counts phone errors in the output. | | 156. A spectral neural operator | Runnable: psionic-fourier-v1, bounded CPU binary64 (64 × 64 grid, 4 channels, 8 modes a direction) | A 2-D FFT from chapter 151's transform, rows then columns, against a direct 2-D DFT; one Fourier layer (kept low modes, complex per-mode weights, inverse FFT, pointwise linear path, bias, GELU) against a direct spectral convolution; hand-written gradients against central differences; the same weights agreeing at two resolutions on a band-limited field; typed refusals for a field smaller than its kept modes, too many modes, bad sizes and non-finite input. | | 157. Learn Darcy flow | Runnable: psionic-darcy-v1, bounded CPU binary64 (32 × 32 grid, 4 channels, 4 Fourier layers) | A five-point finite-difference Darcy solver with conjugate gradients, checked by hand on one and nine nodes and against a manufactured solution at second order; seeded smooth permeability fields and solver pressures; a small FNO (pointwise lift, three Fourier layers from chapter 156, pointwise projection) with its whole gradient written by hand and checked by central differences; AdamW training on the CPU; held-out relative L2 error against a threshold fixed before the run, and the same weights at twice the resolution; typed refusals. | | 158. A field around a shape | Runnable: psionic-field-v1, bounded CPU binary64 (1,024 triangles, 4,096 points, 64 neighbours) | Signed distances and outward gradients for a sphere, a box, a capsule and an admitted closed triangle mesh (sign by winding number); area-weighted surface and box samples; grid radius and k-nearest queries equal to brute force index for index; a point convolution with mean or max aggregation whose gradients match finite differences. | | 159. Learn a scene from its views | Partly implemented: psionic-radiance-v1, bounded CPU binary64 (coordinate networks for an image and a signed-distance field, and training views from the Metaverse Engine renderer, remain) | Pinhole rays checked by back-projection; volume rendering by quadrature with its gradient by hand, matching a constant-density slab's closed form and finite differences; a voxel-grid radiance field fitted with AdamW to views of chapter 158's shapes, reaching 38 dB PSNR on held-out cameras against a frozen 20 dB threshold, with depth against exact ray hits and an occupancy check showing good views are not good geometry. | | 160. Execute DoMINO | Partly implemented: psionic-domino-v1, bounded CPU binary64 (the published domino_drivaerml checkpoint, which ships only as pickles, DrivAerML, the trained encoder, processor and volume model remain) | DoMINO's pieces at a small size: a grid encoding of a spheroid mesh (chapter 158's signed distance and a two-radius point feature over surface points), a two-radius local encoding at surface queries, and a 12-unit output network on the query and its three nearest surface points blended by inverse distance, each equal to a direct-loop oracle, with the gradient checked by central differences. Trained with AdamW on potential flow past spheroids, whose surface pressure is exact, it reaches a mean held-out relative L2 error of 0.1483 on 8 unseen shapes, under a 0.20 threshold frozen before the run and below the geometry-blind fit's 0.3581; typed refusals for bad meshes, radii, grids and out-of-box queries. | | 161. Forecast on a sphere | Partly implemented: psionic-sphere-v1, bounded CPU binary64 (the pinned FourCastNet3 checkpoint and one step against its recorded output, its 72 variables on the 721 × 1440 grid, full-size activation and memory budgets, and ERA5 data and terms remain) | A spherical harmonic transform (Gauss-Legendre latitudes, Legendre functions by recurrence, chapter 151's FFT) checked by hand on a degree-1 grid, against the explicit polynomials, a direct double sum and orthonormality; an Allen-Cahn reaction-diffusion solver on the sphere, exact in diffusion and second order overall; a spherical Fourier layer with one weight per degree, rotation-equivariant within 1e-12, with hand-written gradients; spherical and planar forecasters trained with AdamW on seeded trajectories and rolled out four steps, with area-weighted errors by lead time and latitude band against a threshold frozen before the run. | | 162. A recurrence you can inspect | Runnable: ssm-cpu-f64-v1 (bounded CPU; the Mamba-2 projections and grouped normalization are chapter 163's) | A tiny Mamba-2 style layer whose token-step, chunked and whole-sequence forms agree within a frozen tolerance, with readable gates, mixing matrices and snapshots, and requests isolated by a state reset. | | 163. Execute Nemotron Nano | Partly implemented: nemotron-h-cpu-f64-v1, bounded CPU (the pinned checkpoint's inventory, its tokenizer on ASCII text, all three layer kinds, and the whole model with greedy decoding from its cache, recorded once on the original weights against a binary64 reference; text outside ASCII and device kernels remain) | Checks the pinned NVIDIA-Nemotron-3-Nano-4B-BF16 header against its config, runs its Mamba-2, attention and MLP layers, and compares original-weight slices with an independent oracle. | | 164. Execute Nemotron Lightning | Partly implemented: nemotron-h-cpu-f64-v1, bounded CPU (the pinned checkpoint's header inventory, the MoE layer and router, a small three-kind model and the memory plan on this host; the original weights, the whole 52-layer model, its tokens and measured speed remain) | Checks NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16's shard headers against its config, runs its mixture-of-experts layer and router against an independent oracle, and plans its full expert residency on an RTX 4080 and host memory. | | 165. Sequences of observations | Partly implemented: psionic-observe-v1, bounded CPU (observations from Metaverse Engine worlds, sensors, rendered pictures and replay remain) | Observation records with ticks at a fixed rate, images, states, actions and a text condition, and a byte form that round-trips every bit and refuses missing or out-of-order frames; a procedural moving-square scene; per-action 3 × 3 next-frame kernels fitted by least squares, at 0.081 of the copy baseline's held-out error one step ahead and 0.221 of it after 8 open-loop steps, against gates frozen before the fit; a leak-free split; and the codec and scheduler contracts, run on chapters 145 and 146. | | 166. One complete Cosmos3-Edge path | Partly implemented: psionic-cosmos-v1, bounded CPU (the 28-layer transformer, full Wan VAE and vision tower on original weights, the pipeline's UniPC sampler and native flow schedule, NVIDIA reference tensors and a Metaverse Engine task evaluation remain) | The pinned checkpoint's manifest from safetensors headers checked against its configuration, three real-weight slices (latent input and output projections, the VAE's first convolution) against float64 references, and the whole conditioned path (observation, Wan-convention codec, Karras flow levels, two-tower denoiser, Euler steps, decode) on synthetic weights, passing chapter 165's contracts and an independent oracle at every stage, with a task evaluation reported apart. | | 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) | Source-limited position/pose solves, linearized posture projection, typed rest-to-rest timing, sampled PD gains/response, Panda PD/gravity and short owned-dynamics runs. The original nonlinear baseline passes numerical parity while nominal final error and brake recovery miss their goals; its pulse band is temporary. The frozen nine-profile gain study still has zero feasible candidates and no winner or held-out SDK phase. A separate common schedule qualifies the four original owned cases, then a prospective validation at two frozen C/D poses passes all eight fixed goals with no-contact SDK/own parity. D nominal is closest at normalized terminal ratio0.9710715211 (margin0.0289284789). Broader tracking acceptance, moving-state retargeting, finite nullspace/IK integration, collision/RRT, hardware and compiler bounds remain work. | | 168. Imitation before robotics scale | Runnable: owned CPU gantry and pinned NVIDIA data excerpt | Train a two-axis policy from whole demonstrations, compare next-action error and held-out rollouts, and read 170 exact F32 values from a bounded original SingleArm selection. | | 169. Execute a GR00T policy | Runnable: original LIBERO weights, Metal, prepared 140-token observation | Complete vision/language/conditioning/four-step flow path, same-input component checks and original decoded action endpoints. The separate global hidden-trace diagnostic remains outside its bound; simulator control is chapter 170. | | 170. Close the simulated control loop | Runnable: genuine LIBERO/Panda, original GR00T, Metal, MuJoCo 3.3.1; first 9-action owned-query neural prefix | The genuine SDK profile retains recorded outcomes and exact physics replay. A first original-demo000 prefix now couples two real GR00T calls to owned FK/Jacobian/mass/bias controller samples and the original OSC: nine action ticks, 225 live plus225 exact-replay SDK steps, no holds/refusals/clips. The independent PTR audit passes; task success was not required and was not observed. SDK geometry/contact/integration/cameras remain. Own contacts/simulation, broader episodes, hardware, compiler R13/R14 and wall real-time guarantees remain future work. | | 171. Learn a gait in many worlds | Runnable: CPU F64 GAE/PPO, Gaussian and scalar-LQR PPO; all three 512-batch continuations meet fixed goals; gait planned | GAE, sign-aware PPO, Gaussian sampling and the scalar actor/rollout/AdamW pipeline are qualified. The original 128-batch study misses both goals in all three seeds and remains unchanged. The separate continuation preserves the learned state/settings and extends to 512 total batches/2,048 updates per seed: all three meet gain-error≤.05 and nominal-cost-gap≤1%, with final gains .6045622741/.6219745781/.5997993114. Imports change only reserved RNG counters; all three next-batch replays are exact. New authority86/86 sites and three guard host profiles pass, with original math proofs carried. Full gait, learned critic/neural actor, GPU training and whole-curve reproducibility remain pending. See targets, Gaussian, LQR example, original evidence and continuation evidence. | | 172. Benchmark a service, not a kernel | Runnable: bench-us-v1, loopback | A seeded open-loop load generator with jittered arrivals and recorded length histograms, shadow replay, nearest-rank P50/P90/P95/P99 of time to first token, inter-token latency, end to end, inference and the rest, and a one-variable comparison against a baseline and its repeat; first figures from a loaded host, labeled as such. | | 173. Serve a model with an honest capability | Partly implemented: psionic-capability-v1, toy engine, CPU (schemas in proto/ and docs/protocol, the live host route, cancellation timed by chapter 172, a protobuf projection and a qualified Elephant entry remain) | A capability document derived from qualified records, never claiming more than they covered, served at GET /v1/capability and enforced by admission before model work. | | 174. Clients, streams and background jobs | Partly implemented: sc-client-v1 job lifecycle, resumable streams and background jobs, CPU; clients simulated in one process (the live HTTP server of chapter 79, audio streams, session reuse and its benchmark, and the Responses edge remain) | A job lifecycle checked against its table, idempotent submission, per-client limits into chapter 175's fair scheduler, server-sent events resumed by Last-Event-ID with no event lost or repeated, cancellation that frees the slot the next step with exact token and charge accounting, polled background jobs, retention and expiry. | | 175. Continuous batching and a fair scheduler | Partly implemented: cb-iteration-v1 scheduler, CPU; cbd-gptoss20b-v1 batched steps, original 20b CUDA on one RTX 4080 (preemption, recurrent state sizes, and wiring into chapters 79, 173 and 180 remain) | An iteration-level scheduler: per-step admission under a state budget, decode before chunked prefill, and fair shares by virtual time with starvation and share bounds, checked against a brute-force simulator and by token-for-token equality with solo runs on a stand-in model. Its steps run on the original gpt-oss-20b on the RTX 4080: one batched pass per step over rows from up to eight requests, each attending to its own KV cache, with every request's greedy IDs equal to its IDs alone and measured rates at concurrency 1, 4 and 8. | | 176. Paged state and a tiered prefix cache | Partly implemented: pg-pages-v1 paged state and prefix cache, CPU; tiers in one process (real model KV and recurrent state on the RTX 4080, GPU/host/disk tiers with measured transfers, 128-token pages, layer-by-layer restore, storage that outlives a machine, retention per traffic type and chapter 172's report remain) | Fixed-size pages with reference counts, free stacks and copy on write; a prefix trie keyed by model identity and exact block tokens with a chained hash; device, host and disk tiers with least-recently-used moves; and chapter 175's admission charging pages. Checked by a hand trace, brute-force models, bit-equal paged attention and token-for-token equality with cold runs; a shared-prefix workload reuses 48 of 96 prompt blocks with host and disk tiers and none on the device alone. | | 177. Route, queue and scale replicas | Partly implemented: rr-route-v1 router, queues and autoscaler, CPU; replicas simulated in one process (real replicas in separate processes or machines, a live run reproducing the simulated percentiles on owner-approved machines, batching inside a replica, adapter-aware routing, priority classes and decode balancing by cache length remain) | A router that sends each request to the replica with the smallest predicted finish, counting the prompt blocks in that replica's chapter 176 trie; bounded queues, a per-client share and typed refusals; and an autoscaler between a floor and a budget with a band of hysteresis, a scale-down delay and chapter 178's measured cold starts. Checked by hand traces, a brute-force router, simulation invariants and frozen runs: at a request every 40 ms on 4 simulated replicas, prefix affinity cuts P95 time to first token from 295.8 ms (round robin) to 200.2 ms. | | 178. Start fast | Partly implemented: cs-start-v1 startup plan and readiness machine, CPU; startup receipt on one host (machine and process start, a weight fetcher, timed kernel compiles, real golden decisions in psionic-serve and threaded hashing remain) | A startup plan predicting verify, map, arena and warm-up phases from file sizes, page-cache state, verified records and measured rates; a readiness machine that is ready only after every golden warm-up; kernel caches keyed by device, compiler and source; measured cold and warm starts, with Elephant's file verified and mapped. | | 179. Ship without downtime | Partly implemented: ro-rollout-v1 canary controller, CPU; replicas simulated in one process (real replica processes and machines, golden replays against retained evidence from a real build, chapter 218's self-check, chapter 173's full capability admission and the autoscaler during a rollout remain) | A canary rollout controller: steps by traffic share, chapter 178's readiness and golden warm-up before any traffic, a verdict per step from golden answers, an error budget and a P95 objective, promotion only after every step passed, automatic revert, draining that never moves a request in flight, and a capability document that switches with the traffic. On 160 synthetic requests a good build is promoted and slow, wrong and erroring builds are reverted, with 0 requests dropped. | | 180. Observe, meter and price | Partly implemented: psionic-price-v1 and psionic-usage-v1, CPU (schemas in proto/ and docs/protocol, wiring the meter into the live host with engine token counts, and signed receipts remain) | Service metrics, content-free audit logs, per-request usage records bound to execution evidence and a pricing policy in an authority file. | | 181. Survive failures | Partly implemented: sf-fault-v1 failure policies, CPU; replicas and faults simulated in one process (real device, process and machine failures, cordoning with drain, failover between machines or regions, data-residency routing, tool isolation and weight verification on load remain) | Failure policies under injected crashes, hangs, slow replicas, partitions and corrupt answers: health checks that eject and probe back, retries under an attempt limit and a retry budget, a hedge whose loser is cancelled, deadlines carried by every attempt, fenced late answers, and one settlement and one usage record per request key. On a fixed mix of five faults, 64 of 64 keys are answered against 58 of 64 with one try and no hedge, each charged once. | | 182. Disaggregate prefill and decode | Partly implemented: dg-split-v1 state handoff, placement and simulation, CPU; workers and links simulated in one process (transfers between real devices or machines, a snapshot message in proto/ with a model digest, re-placement and per-pool autoscaling over time, page budgets on each side, and a measured need on owner-approved machines remain) | Prefill and decode workers as separate pools. A request's pages (and a hybrid model's recurrent state) move as a snapshot with a versioned header, exact byte count and checksum; the decode side refuses anything short, long, for another model, version, request or geometry, or corrupted, and the request is prefilled again. A placement rule splits the workers by predicted prefill and decode work. Checked token for token on the stand-in model, against known corruptions, a brute-force placement, chapter 175's scheduler and simulation invariants: on 48 synthetic requests 300 ms apart on 4 simulated workers, 3 prefill and 1 decode cut the gap P99 from 389.8 ms (co-located) to 49.5 ms and raise the median time to first token from 812.5 ms to 1,559.5 ms. | | 183. Split a model across devices | Partly implemented: tensor-parallel-v1, CPU threads (several GPUs, the RTX 4080 as a member, expert parallelism, a vocabulary-parallel head, pipeline stages and real checkpoints are not built) | Tensor parallelism for latency inside one fast domain: a planner that splits heads and FFN columns over 1 to 8 devices and refuses splits that do not divide or do not fit, one all-reduce per half block counted with sd_cost, and runs on host threads equal to the single-device forward bit for bit at one device and within 1e-12 at more. | | 184. A pipeline of models | Partly implemented: vp-pipeline-v1, CPU with stand-in stages and simulated ticks (real recognizer, language model and speech stages, per-stage replicas and autoscaling, hops measured on a network, and P50/P95/P99 from chapter 172's benchmark remain) | Four stages of one spoken turn (end of turn, partial and final transcript, a reply token by token, speech sentence by sentence) with typed handoffs over hops with their own delays: the model may start on a quiet partial transcript and is restarted when the final one differs, speech starts on the first complete sentence, a bounded buffer stalls the model, the time to first audio is split into a share per stage and hop against a written budget, and a barge-in at any tick reports what each stage made, handed on, emitted and heard. | | 185. A decision model steers voice | Partly implemented: vs-steer-v1, CPU with a stand-in decision model and simulated ticks (Elephant as the decider behind /v1/systemone, a trained model on real audio, the voice engine's own frames, and wall-clock decision latency from chapter 172's benchmark remain) | Typed turn-taking questions (end the turn or hold it, start the language model early, stop the reply or ignore the sound) answered as probabilities, acted on through thresholds derived from written costs, admitted by a gate in the voice engine's order with a recorded reason for every drop, never awaited, and refused when the decision can't fit its latency share; measured on 400 drawn conversations against the fixed rules with a chapter 241 verdict. | | 186. Split a model into stages | Partly implemented: stage-plan-v1 and stage-run-v1, CPU (a cached continuation, stages on separate threads or machines, a proto/ schema for the boundary message, all 26 layers on original weights and multi-part boundaries remain) | Pipeline stages: a planner that cuts the layers into contiguous stages under per-stage memory budgets (weights, the cache for the context, buffers) and minimizes the slowest stage, with typed refusals (first, last, total, split); a boundary message of hidden-state rows bound to artifact digest, layer, position and version, refused when wrong; stages run in one process equal the unsplit forward bit for bit on a synthetic model and on Ministral 3 3B's first two original layers. | | 187. Stage packages | Partly implemented: stage-package-v1, CPU (fetching packages over a network with chunk-by-chunk checks, peak-memory measurement and packages for untied readouts, DeepSeek and other checkpoints remain) | Stage packages: a manifest of the tensors one stage of the planner's split needs, as byte ranges into the original safetensors with their SHA-256s, bound to the parent file's digest, the StgPlan digest, the stage and the boundary version; a verifier that rebuilds the manifest from the stage's own file and refuses a wrong digest, version, model, plan, boundary, stage, tensor set, range or hash; a loader that hands out views only for a verified package as chapter 178's verify and map phases. Ministral 3 3B's 14 + 12 packages are built and verified on the original weights, and chapter 186's slice runs from packaged stages bit for bit. | | 188. Peers, transport and discovery | Partly implemented: psionic-peer-loopback-v0, in-process CPU with simulated clocks (sockets, forward secrecy, signed invitations, the v2 beacon reader and a published wire contract remain) | Encrypted peer connections with recorded direct or relayed paths, invitation-only private meshes, beacon discovery and a separate owner control plane. | | 189. Place the model | Partly implemented: place-v1, CPU with simulated peers (rates and links measured on live peers, measured-against-estimate tolerance and choosing the cut with the peers remain) | A Coax placement solver: whole on this machine, then whole on a peer, then each stage of a split on its own peer under memory and readiness limits, minimizing one token's latency or the pipeline's period with every transfer charged; deterministic ties, refusals naming the binding constraint and the smallest change, and replanning with the fewest stages moved when a peer leaves. Equal to a brute force over every assignment on random fleets; Ministral 3 3B on three simulated peers worked by hand. | | 190. Stage lifecycle and fencing | Partly implemented: life-v1, CPU with simulated stages and peers (live peers, loss detection by heartbeat within a stated time, restore from saved state and memory headroom during a cutover remain) | A Coax stage lifecycle (assigned, fetching, verifying, loading, warm, serving, draining, retired, failed) per stage per placement epoch, with fencing tokens (epoch and generation) on every boundary message, report and command; the route opens only when every stage is warm, the old epoch drains, a lost peer breaks its epoch and each request retries or fails as declared, and weights pass to a new epoch on the same peer. Checked against a hand-typed transition table and a discrete-event simulation with departing and ghost stages: no request dropped or served twice. | | 191. Experts across machines and from disk | Partly implemented: expert-mesh-v1 and expert-stream-v1, CPU with simulated peers and synthetic routing traces (peers on real machines with measured per-hop latency, Mistral Small 4's real weights and routing traces, reads from a real NVMe drive and predictive prefetch remain) | Expert parallelism: routed experts split over peers, each token's row dispatched once to every peer holding one of its experts and each output returned with every byte counted, combined in route-slot order so the layer equals chapter 85's one-machine layer bit for bit for any placement; a missing expert is a typed refusal; a placement that balances expected expert load from a routing profile (Graham's rule, checked against brute force) and an imbalance measure. Expert streaming: an expert cache (LRU, LFU, chapter 96's decayed heat, optionally profiled) replayed on traces from chapter 85's router, checked against stack-distance LRU and Belady's optimum, with bytes read, hit rate and tokens a second at measured disk and memory rates. | | 192. Route by saved work | Partly implemented: sw-saved-v1 saved-work routing, CPU; peers, links and advertisements simulated in one process (advertisements over real links, transfers between real processes, a real model, recorded traffic and trust between peers remain) | Routing across a mesh by the cheapest of reusing claimed prefix blocks in place, moving them over a link, or computing cold, from bounded, short-lived, salted advertisements that list no tokens; refused advertisements, fallback on missing claims with the cold output, and predicted and realized savings per request. On 64 shared-prefix requests, moving blocks gives a mean latency of 249.5 ms against 296.6 ms cache-blind; advertising every 20 ms instead of 100 ms realizes every predicted nanosecond saved. | | 193. Compress activations exactly | Partly implemented: boundary-codec-v1, CPU (frames over a real link with measured end-to-end latency, negotiation in a handshake, the codec inside the stage pipeline and lossy profiles remain) | Lossless frames for chapter 186's boundary messages: a version byte, a codec byte (raw always accepted, byte planes with a static rANS coder, or the same after an XOR with the row above), exact round trips including NaN payloads, negative zero and subnormals, and typed refusals for bad frames; on Ministral 3 3B's real layer-0 and layer-1 boundaries the planes codec saves 16% of the bytes but costs more CPU time than it saves on any link faster than about 0.17 Gbit/s. | | 194. Who can read the prompt | Partly implemented: trust-v1, CPU with simulated peers (the attested-enclave tier, evidence and link keys from live peers, and wiring into a running split remain) | What each peer of a placement sees (prompt tokens, activations, output tokens) from the stage contract; tiers from recorded evidence (any, vetted, owned); a policy per data class as hard constraints on chapter 189's solver, refusing plaintext links and naming the exposure and the fewest peers to trust; consent for every peer before the first byte. Enforces who receives what, not cryptographic hiding: activations are not secret. Equal to a pipeline walk and a brute force on random fleets. | | 195. Check a peer's work | Partly implemented: psionic-peer-check-v0, in-process CPU binary32 stage (signed receipts a third party can verify, real backends on other hardware, multi-stage pipelines over the wire and payment remain) | Sampled re-execution of peer work on a trusted node, exact under one profile and within a derived tolerance across profiles, with MACed per-stage receipts, verdicts bound to evidence digests and a ledger in millisatoshis that a reader recounts. | | 196. Work with Mesh-LLM | Partly implemented: psionic-meshllm-v0, in-process CPU adapter (live interop with real Mesh-LLM nodes, protobuf gossip decoding, QUIC transport, the plugin endpoint, the OpenAI-compatible path and the payment exchange remain) | A Psionic buyer maps a Mesh-LLM peer's gossip to an honest capability claim and a one-stage route, translates System One requests and answers, re-runs and compares each answer, meters reported usage and prices it by Mesh-LLM's own bill rules into chapter 238's ledger, against a simulated peer in process. | | 197. DeepSeek V4.1 Flash across stages | Partly implemented: deepseek-flash-split-v1 and deepseek-flash-stages-cpu-v1 (real peers with measured per-hop latency and tokens per second, chapter 190 fencing and stage recovery, original weights and a BF16 wire remain) | V4.1 Flash split into contiguous layer stages: a versioned, checksummed multi-part boundary message (four residual streams, the hyper-connection carry, Engram ids, and the compressed rows, index keys, selections and candidate mask a later layer borrows), refused when any part is missing, extra or resized; a planner over the header manifest's per-layer bytes for up to 16 hosts (fourteen 24 GiB GPUs fit with Engram off-GPU, thirteen do not); chapter 100's synthetic stack run as a pipeline equals the unsplit run bit for bit. | | 198. Mistral Large 4 across a mesh | Partly implemented: large4-mesh-v1, CPU with simulated stages and expert peers, modeled times (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 remain) | Mistral Large 4's 54-shard inventory from its safetensors headers checked against params.json (56,563 tensors, 1,060,548,427,328 bytes), exact bytes per layer and part, and a mesh plan: pipeline stages over layers with each stage's routed experts split over a group of peers, the cache copies and boundary bytes of the shared-cache and shared-indexer layers counted exactly, chapter 189's placement and chapter 191's expert exchange, modeled latency and throughput, the smallest mesh of identical peers; a small model in Large 4's pattern split over stages and expert peers equals it whole bit for bit. | | 199. Le Chonk across a mesh | Partly implemented: chonk-mesh-v1, CPU with simulated stages and expert peers, modeled times (Large 4's real weights and draft head on real machines, measured latency, memory and acceptance, parity with a whole-model reference, Large 4's own layer arithmetic and an indexer selection in the small model's messages remain) | Mistral Large 4 with its own draft head on chapter 198's mesh: a boundary contract listing every part that crosses a cut (hidden rows, layer 35's shared cache, shared indexer selections and the head's five target activations), refusing a missing, extra or changed part; the head's bytes and room on the last stage; modeled rounds of drafting and verification across stages with time and peer-milliseconds a token; a small model in Large 4's pattern decoding greedily with a draft head across stages and expert peers, equal to plain decoding of the whole, with measured acceptance. Serving others needs Mistral's commercial licence. | | 200–214, 251, 252 | Moved | The agent harness moved to Coder: Coding Agents From Scratch on 2026-11-01, as its chapters 1–8 and 14–22. Their code stays in lib/harness/ for now. | | 215. Fit our own calibration, and refuse a stale one | Runnable: cpu-f64-calibrate-v1, synthetic probabilities | Fit per-question temperature, binned and isotonic maps on one split, keep one only if it lowers calibration error and log loss on a frozen gate split, report it once on a test split, and refuse it for any other model version or question set. |
| 216. Thresholds from written costs | Runnable: cpu-f64-threshold-v1, synthetic probabilities | Derive act, escalate and ask bands for an Elephant and Mammoth cascade from two written cost tables, freeze them after validation, and score them once on a confirmation set with intervals against always Elephant, always Mammoth and a fixed rule. | | 217. Record readings, join outcomes, watch drift | Runnable: cpu-f64-drift-v1, simulated drift | Log every decision with no content, join late or lost outcomes, flag windows whose calibration error calibrated draws rarely reach, refit maps on a schedule through chapter 215's gate, and estimate other thresholds from the log, refusing one the log never explored. | | 218. A Pylon checks itself before serving | Runnable: selfcheck-v1, Elephant on the RTX 4080 | A shipped reference set of decision requests with one identity's answers in billionths; before it advertises a slot the Pylon asks its own engine each one and needs the same choice and every value within 0.0005; an identity gate that refuses an undeclared change of weights; a read-only doctor that names the first failing step. | | 219. How far apart may two honest answers be? | Runnable: cpu-f64-distance-v1, simulated backends | A centred-log distance between two machines' answers to fresh items with no answer key; honest pairs and cheap substitutes measured against a reference, limits set from honest rounds alone that pass every honest round and no more than 5 in 100 of any substitute's, and a live round whose checked subset is drawn from the answers' digest. | | 220. Read a bounded ONNX graph | Runnable: onnx-17-v1, bounded CPU | A Coax reader for opset 17 and seven operators that names anonymous weights from the nodes that use them, refuses anything outside its set with a reason and a node, and runs a static-embedding model and a tiny image classifier within 1e-6 of onnx's reference. | | 221. Write a bounded ONNX graph | Runnable: onnx-17-write-v1, bounded CPU | Chains of Gemm, Relu and Softmax written byte for byte as onnx writes them and read back by 161 before they leave; chapter 103's logistic model and latency line exported with their scaling folded in, within 1.5e-6 of the binary64 models, and its tanh MLP refused. | | 222. A decision in milliseconds | Partly implemented: fe-tiny-v1 encoder, binary64 and q8 engines, CPU; latency receipt on one CPU (the real s1-llm-auto-router through chapter 220's reader, rotary positions, a GPU engine and multi-core kernels remain) | A ModernBERT-shaped encoder with fixed decision heads answers a typed question on a binary64 reference and a q8 engine, with identical argmaxes, a logit distance within a frozen bound, chapter 50's quality card and a 20 ms P99 gate at 512 tokens, measured cold and warm on one CPU. | | 223. Distill Elephant into a small router | Partly implemented: distill-cpu-f64-v1 on fe-tiny-v1, recorded teacher stand-in, CPU; latency receipt on one CPU (Elephant as the teacher, chapter 247's distill-v1 targets, training the encoder's body, a quiet-host latency run and shadow promotion remain; the stand-in student fails the frozen rule) | An encoder student trained on Elephant's answer distributions, with fitted temperatures, promoted only above stated agreement, calibration and cheap-answer precision. | | 224. Shadow a new model, then promote it | Runnable: shadow-sim-v1, simulated traffic | A candidate answering beside the active model with both answers logged and joined to outcomes; promoted only when disagreement and extra error, each plus two standard errors, are within stated limits; immutable candidates named by SHA-256, and activation as one compare-and-swap on an approved digest and report that leaves the active model unchanged on any refusal. | | 225. Learn which model to call | Runnable: cpu-f64-route-v1, simulated tasks and models | Route tasks among three models by learned success minus price, then judge a new router from an old one's logs with naive, direct, inverse-propensity and doubly robust estimates, and refuse when the logs never tried a model it calls. | | 226. A machine whose state is a trace | Runnable: bounded CPU reference interpreter | Admit and run a small integer stack machine whose four-token-per-step trace and SHA-256 digest identify the run; a refused run publishes nothing. | | 227. Attention as exact memory | Runnable: bounded CPU, integer scores | Parabolic keys and hard-max reads return exactly the latest write or refuse; the machine with attention as its only memory reproduces the interpreter's digest. | | 228. Arithmetic and branches from ReLU | Runnable: bounded CPU, binary64 and binary32 | A gated ReLU layer computes integer products, steps, equality and selection exactly within ±2²⁶ in binary64; binary32 only while products stay under 2²⁴. | | 229. Compile a gate graph into a block | Runnable: bounded CPU, binary64 | A gate language, its integer evaluator, a scheduler that reuses residual slots, and emitted weights whose forward pass reproduces the evaluator exactly. | | 230. A harness that catches the compiler | Runnable: bounded CPU | Run every program through the evaluator, a plan interpreter and the weights; catch four planted compiler bugs and place each in the schedule or the emitter. | | 231. An interpreter in weights, or one program in weights | Runnable: iw-v1, bounded CPU binary64 | A small register machine's interpreter compiled once into a universal block that runs any program, against one program folded in by a general partial evaluator (the first Futamura projection); every run agrees three ways with the native interpreter, with sizes and measured steps per second for all three. | | 232. Decode in logarithmic time | Runnable: hull-v1, bounded CPU | Chapter 227's parabolic keys are all vertices of one hull, so a binary search over its edges replaces the scan over every store: equal results at every read, the interpreter's digest, and comparison counts for both; no wall-clock figures without weights. | | 233. From hard-max to softmax | Runnable: bounded CPU, binary64/binary32/bfloat16 rounding | Prove softmax reads stay exact for any trace length once β ≥ ln(4V), and measure where binary32 and bfloat16 rounding breaks them. | | 234. Exact replay as a verification class | Runnable: replay-v1, bounded CPU | A claim is a program, trace and output digest plus a step count; full replay, or a window after folding the claimed rows, names the first divergent step and field; every verdict is exact, failed or unverifiable, with tamper cases for each digest. | | 235. Can gradient descent learn exact execution? | Runnable: students-v1, bounded CPU binary64 | Linear, gated and table students trained by full-batch gradient descent on traces admitted by chapter 247, judged only by rolling out from their own rows and replaying with chapter 234: the gated student, trained to convergence, is exact at eight times the training length on its training families, and every student fails on a held-out family. | | 236. A frozen exact core with a learned interface | Runnable: core-v1, bounded CPU | Chapter 229's compiled block for the machine's arithmetic and branch, admitted by chapter 237, behind 12 fixed interface sources; a controller learns only which source each token comes from, prints the sources training never told apart, and is judged by chapter 234's replay: exact on held-out programs up to eight times the training length, refused at the core's range. | | 237. Composable weight modules | Runnable: module-v1, bounded CPU binary64 | Chapter 229's blocks pinned by a digest of their shape and weight bits; two link into one block through a glue layer and a range-checked seam, and must replay the chain and the composed graph exactly; labels say how a user can check a module: exact, tests, statistical or none. | | 238. Pay for verified work | Runnable: psionic-verified-pay-v1, live 2-device Bitcoin mainnet Spark settlement, 3-leg royalties & NIP-PYLON 30201 feed | Verdict-gated 3-leg (WORKER + VALIDATOR + MODULE AUTHOR <= 25% cap, #13961) escrow under rolling 24h UTC caps and explicit mainnet arming, idempotent per (receipt_digest, leg), append-only recount, reconciled public settled feed excluding real_bitcoin_moved == false, openagents pylon verify-relay (#13963), and live 2-device Bitcoin mainnet Breez Spark settlement (200 + 50 sats verified). | | 239. A suite is three digests | Runnable: sha256-suite-v1, chapter 16's held-out suite | Pin the items with their partitions, the questions and the gate as three SHA-256 digests, keep results in an append-only receipt chain where a locked partition is read once, and compare two results only over the same items, gate and partition, so rewording a question is measured rather than hidden. | | 240. How far a metric moves by itself | Runnable: cpu-f64-noise-v1, synthetic suite and Elephant's chapter 16 run | Measure the noise floor from blocks of seeds and the spread of a gain by drawing whole tasks again, show that drawing items understates it, and refuse a partition already within the floor of its ceiling, which refuses accuracy on Elephant's 12-of-12 held-out suite. | | 241. Gates that can say unverifiable | Runnable: cpu-f64-verdict-v1, chapters 16, 215, 216 and 240 reporting | Decision, probability and evaluation gates whose verdicts are passed, failed or unverifiable with a reason: gains only beyond the noise floor on partitions with headroom, log loss and confident errors ranked above calibration error and accuracy (which fails chapter 215's binned map for question 1), and time limits that block chapter 216's background record. | | 242. Environments with checkers | Runnable: cpu-int-env-v1, a simulated agent | A task, a checker, a budget and a reference solution as one digested record, admitted only when the checker fails on empty work, passes the reference and fails a near miss; rollouts whose digest chains every attempt and verdict, accepted only when a replay reproduces them. | | 243. Fit settings on recorded answers | Runnable: cpu-f64-settings-v1, a simulated stall detector | Fit a weight, a threshold and a cut point from recorded answers with no model calls: midpoint candidates, a coordinate search priced by written costs and an optional grouped cross-validation rule; the fitted detector passes chapter 241's gate on a held-out set read once, and cross-validation against fit-set gains alone comes out unverifiable. | | 244. Search a policy, cheapest first | Runnable: cpu-f64-search-v1, a simulated world | Grow 32 policies (model, retries, context, checking) from the simplest by named operators, each a digested manifest; successive halving over three tiers keeps the best and any task's lone best, finds the same winner as measuring every policy in full for a quarter of the spend, and the winner passes chapter 241's gate on held-out tasks read once. | | 245. Reflective prompt evolution | Partly implemented: evolve-v1, bounded CPU (a served student and reflector, gpt-oss with constrained output, and the comparison with chapter 243's settings fitting remain) | Prompts as versioned components with identity digests and fields fixed by the seed; a stand-in reflector that proposes one edit from failure traces, and any other reply refused; children refused for a changed field, a grader that shares weights or did not pass chapter 246's gate, a missing canary or a drifted answer space; a Pareto front over per-item scores with parents drawn by tied-best counts; every call priced under a budget; and the final prompt against the seed on a held-out partition read once, with chapter 241's verdict. | | 246. Judges are components | Partly implemented: judge-v1, bounded CPU (Elephant and Mammoth themselves as judges on recorded answers, and real outcomes joined by chapter 217, remain) | A judge as a component named by one digest over its weights, rubric and settings; agreement with outcomes labelled by checks or diffs, Cohen's kappa with a Wilson interval, calibration error and cost per judgment; its flip rate between runs and position and length probes; a gate that passes, fails or calls it unverifiable; a grader refused when it shares an identity or weights with the student or the reflector; and its grades refused by chapter 247 as opinions. Of five stand-in judges, two pass, one fails on length, one on position, and one is too noisy to verify. | | 247. Outcomes become training rows | Runnable: rows-v1, bounded CPU | Decision outcomes admitted only with labels from a check or a diff, never an agent's summary; traces only with an exact chapter 234 replay; splits by time, and an exposure ledger shared across artifacts that gives every group one role, so a group one artifact holds out is never trained on by another. | | 248. Is the loop improving? | Runnable: cpu-f64-loop-v1, a simulated world | Cost per accepted result per cycle on a digested fixed set; every component removed in turn under the same seeds and kept only beyond twice the paired standard error; a complexity ledger of settings and spend; a share of one budget per component; a barren loop reported flat, and the break-even volume of one that improves. | | 249. An agent optimizes a Psionic kernel | Runnable: DEVICE-F32-CHUNKED-v1 norm, recorded on an NVIDIA L4; CPU checks anywhere | A bounded tuner and then an agent search chapter 37's compute subset for Elephant's offset RMS norm under a declared contract, with held-out cases, bounds traps and bit-for-bit device checks outside the agent's reach: the tuner is 1.73 times faster than chapter 44's kernels, the agent's winner 2.85 times faster than the tuner, and every evaluation, failures included, is kept in a ledger. | | 250. Can someone use Psionic instead of PyTorch? | Partly implemented: pytorch-audit-v1, bounded CPU (a model audit over 32 PyTorch operators, a capability matrix generated from the registry, nine recorded workflows and a PyTorch parity check of two MNIST models; a package for outside users, the three tutorials rebuilt and the four acceptance projects remain) | An honest, checked answer: which PyTorch workflows Psionic runs today, and what each one still lacks. | | 253. Read and repair a model's weights | Runnable: weight-edit-f64-v1, bounded CPU and recorded local proposer trials | Immutable named-tensor patches with SHA-256 base binding, expected old values, exact reversal and zero-survivor authority checks; 180 decoder metric rows, five-seed controls, fine-tuning and 32 actual local GPT-OSS trials, including harmful edits and failed proposals. | | 254. Write a network from a specification | Runnable: construct-relu4-f64-v1 (bounded CPU) | Direct ReLU4 construction and postfix-to-gated-weight compilation: 19 saved calls, 16 admitted artifacts, exact held-out arithmetic and distance-informed shortest walks from 25 starts. Three-seed AdamW and frozen/online Q baselines, failed admissions, a development-perfect boundary failure, timing/cost ledgers and offline replay; native references match and execute more cheaply. | | 255. Edit an original language model | Runnable: original-window-v1, bounded CPU and recorded original GPT-OSS-20B Metal trials | Immutable BF16/F32 windows, original GPT-OSS-20B readout edits against sampling/prompt/random/channel-fit controls, exact restoration, retained tasks and failed/unverifiable quality results; Metaverse villain-dialogue comparisons and a grounded character-writing prototype. | | 256. Build and teach a small robot | Unimplemented: design draft | Overview and experiment ledger for the complete Microduck-inspired route; chapters 257–265 supply the component calculations and final acceptance. | | 257. A robot description becomes an experiment | Runnable: decoded-joint-experiment-f64-v1 (CPU) | Decoded admission, staged radian targets and canonical identity-bound RXE1 records; general robot import remains open. | | 258. A servo that behaves like the motor | Runnable: scalar-servo-play-f64-v1 (CPU) | Requested/limited force, explicit delay/restore and independently checked illustrative friction, voltage scaling and output play. | | 259. Rollouts from independent worlds | Partly implemented: running-statistics-f64-v1 (CPU) | Shared bounded observation statistics/normalization; final-before-reset collection, lifecycle/counters and complete rollout checkpoints remain planned. | | 260. Train a neural walking policy | Unimplemented: design draft | Shared neural actor/critic training with vector Gaussian/PPO derivatives, bounded CPU learning and later biped integration. | | 261. Teach skills and switch between them | Unimplemented: design draft | Trained physical skills, qualified handoffs and explicit cue/authority decisions. | | 262. Walk by what the robot sees | Unimplemented: design draft | Calibrated observations, geometric/learned perception, onboard-only student inputs and course evaluation. | | 263. Export a policy and supervise its steps | Unimplemented: design draft | Native/ONNX policy package, normalization identity and local fake-device supervision. | | 264. Run the policy on a real robot | Unimplemented: design draft | Authorized commissioning, measured timing/fault/stop behavior and physical repeatability. | | 265. A course, a flock and a repeatable result | Unimplemented: design draft | The final owned pipeline with explicit evaluation, four-robot coordination and reproducible release evidence. | | 266. Original NVFP4 and MXFP8 weights | Runnable: bounded CPU NVFP4 and MXFP8 format decoder | Authenticated loading and exact CPU dequantization of Inkling 2 Mini's native NVFP4 and MXFP8 weight tensors. | | 267. A looped MoE transformer | Runnable: bounded CPU looped MoE recurrence and per-pass KV schedule | Three-pass middle-layer MoE recurrence (and variable loop count for TML-d24-varloop-research) with per-pass KV-cache indexing. | | 268. Execute Inkling 2 Mini on CPU | Runnable: bounded CPU Inkling 2 Mini checkpoint admission, chat template, and greedy decode | Full CPU execution of the original ~20 GB Inkling 2 Mini checkpoint with tokenizer, chat template and reference logit parity. | | 269. Inkling 2 Mini on Metal | Runnable: Apple Silicon Metal 4 + Linux/Windows CUDA Inkling 2 Mini kernels, Q8S/Q8_0 KV, DSpark, and >= 32GB IQ4_NL residency planner | Coax-generated Metal 4 & CUDA Inkling 2 Mini kernels, 21 GGML quants + Maple overlay + LoRA, lossless Q8S/Q8_0 KV, adaptive DSpark (169.8–188.1 tok/s), RTX 4080 CUDA (75.7+ tok/s), and ≥32 GB IQ4_NL residency planning. | | 270. Tool calls and Responses for Inkling 2 Mini | Runnable: Inkling 2 Mini native reasoning/tool-call parser, strict JSON schema sampler, and /v1/responses Metal 4 & CUDA server | Inkling 2 Mini native reasoning/tool-call parser, strict JSON schema sampling, live thinking stream, multi-slot SWA prefix cache, and /v1/responses Metal 4 & CUDA streaming server. | | 271. Run Inkling 2 Mini in OpenAgents Desktop | Runnable: OpenAgents Desktop multi-variant Inkling 2 Mini integration, 32K Metal/CUDA runner, verified store, and oa-worker/Inky routing | End-to-end OpenAgents Desktop integration across macOS, Linux, and Windows: multi-variant SHA-256 verified downloads, resident 32K Metal/CUDA serving, $0.00 local compute tier, and openagents/core (oa-worker) + Inky routing. | | 272. Bounded training windows and Local-SGD / DiLoCo | Runnable: training-window-v1, #authority shard gate & bounded DiLoCo leases | #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 6-tier ladder & trimmed-mean aggregator | #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 3-checkpoint 4-gate promotion & rollback | #authority three-checkpoint promotion (canonical -> quarantine -> promoted) across 4 frozen gates and atomic rollback with suspect-window exclusion. |
The selected robotics capstone is chapter 256, following the GTC Berlin pipeline specification. Chapter 257 now has a qualified CPU decoded-admission/action-query and canonical-record component. Chapter 258 adds the checked illustrative scalar servo with delay/restore. Chapter 259 now has a checked shared statistics component; its collector remains planned. The overview and chapters 260–265 remain design drafts. No complete robot-learning pipeline or product adoption is qualified. The implementation roadmap names the next coding tasks. Chapter 171 owns the reusable locomotion learner; the existing scalar profiles retain their narrower evidence.
The learning route starts with chapters 103–104, then the tensor/function transforms in 106–107, the tiny decoder in 112–118 and nanochat in 123–139. Their status rows distinguish bounded CPU implementations, actual device training and the remaining generality/performance work. Chapter 218 checks a Pylon before advertisement; chapters 215–225 and 239–249 supply calibrated, measured decision/evaluation components with their stated real or simulated inputs. The agent harness that started at chapter 200 is now the Coder book, chapters 1–8 and 14–22. The table and registry, rather than an unlisted-chapter rule, determine which chapters are implemented, partial or drafts.
The contents list completed chapters; the chapter plan sets the proposed full reading order: early Elephant/Mammoth and useful retrieval, gpt-oss, Mistral and DeepSeek, then training/nanochat, vision, motion, speech, physics, world models and robot policies (in worlds simulated by the Metaverse Engine), production hosting, inference across a mesh and measurement. Its prerequisite map lets independent branches start earlier than their position in the contents. The roadmap lists future work. Planned language and ML features are not runnable claims. Exact transcripts describe the current CPU arithmetic/printing profile; per-value tolerances state the numerical contract independently of formatting.