Repository navigation
feat: volunteer compute v0 (Turing-scored local training over loopback) - #17
Conversation
Goal, principle change (approved by Drake 2026-10-16), invariants, Turing definition, wire formats and the not-built list. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New crate oh-core. Learner is the seam the coordinator and volunteers use; TinyByteModel predicts the next byte from the previous one (embedding, tanh hidden layer, softmax over 256 bytes) with hand-written gradients and plain SGD, deterministic for a seed (SplitMix64). Held-out bits are computed in f64. Tests: 5 pass (bits per byte 7.999 to 0.761 on repetitive text, held-out bits match an independent -log2 p, determinism, params round trip). Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pseudo_gradient (after - before), apply (base + delta), and CompressedDelta: top-k by magnitude plus 8-bit linear quantization with scale = max |kept| / 127. Zero and non-finite entries are never kept. validate() checks deltas that arrive over the network. Tests: 7 new, 12 pass. 10,000-entry delta at 5%: 40,008 bytes dense, 2,524 bytes compressed (15.9x). Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WorkUnit, Update and Receipt with bincode signing bytes (sig emptied), Ed25519 sign/verify via beacon-core, verify_from to pin the signer, Update::verify_for to bind an update to its work unit, and BLAKE3 digests (params_digest, delta_digest, message digest). Frames are a u32 big-endian length plus bincode payload, capped at 64 MiB and checked before any buffer is allocated. std::io only, no async runtime. Tests: 11 new, 23 pass. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scorer::score returns held-out bits(base) minus bits(base + delta) and restores the model; accept requires a finite score above epsilon. Ledger is a JSON Lines file of seen and credit entries: per-run replay protection on delta digests, per-node Turing totals, both rebuilt on reopen. Credits must be finite and positive; a torn last line is refused. Also runs rustfmt over the oh-core sources (layout only). Tests: 8 new, 31 pass. Honest delta +454.59 Turings dense, +449.08 after 5% compression; random delta -48.74 Turings. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cargo test --workspace --verbose, exit 0: beacon 0, beacon_client 7, open_humanity 0, beacon_core 16, oh_core 31 passed; doc tests 0. cargo clippy -p oh-core --all-targets reports no oh-core warnings (two existing beacon-core warnings remain). Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The volunteer needs the starting parameters and model width before it can train; the signed WorkUnit pins them through base_digest. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
oh-coordinator splits a sealed held-out tail off the corpus, sends each volunteer the base model and a signed work unit with its own shard, judges every update (signature, work unit match, replay, Turing score), sends a signed receipt, credits the ledger, and applies the plain mean of accepted updates only if it lowers held-out bits. --baseline trains the same shards for the same total steps in one process. oh-volunteer verifies the work unit and base model, trains locally, and sends back only the signed compressed update. Tests: 2 volunteers x 2 rounds over loopback (held-out bits do not rise, receipts verify, ledger credits match); no held-out 16-byte run in any frame sent; replay rejected; update frame holds no shard bytes; bad or unexpected work unit signature refused. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…opback Builds release binaries, runs oh-coordinator with three oh-volunteer processes for ROUNDS rounds per seed, then oh-coordinator --baseline with the same corpus, shards and total steps, and prints mean and sample standard deviation of final held-out bits per byte for both. Corpus is the repository LICENSE file. Bash only. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…aseline Observed on the Spark, 3 seeds, 10 rounds, 500 steps, dim 32, LICENSE as corpus. Final held-out bits per byte: volunteers 4.7496 (sd 0.0835) and 4.7230 (sd 0.0342) over two runs; baseline 4.3919 (sd 0.0357), from 8.00 at the start. Proves the pipeline, not model quality. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Line 9 now carries the promise from the design doc: the model learns only from signed updates and teaching text, and personal data never leaves the volunteer's machine. New section covers what v0 does, what leaves the volunteer's machine, Turing scoring, the two binaries, the demo and its measured result, and the not-built list from the design doc. Core Crates lists oh-core, oh-coordinator and oh-volunteer. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… receipt Ledger gains a rejected entry (node key, score or null when not finite, reason, receipt digest) that never changes totals. Coordinator::judge writes it on every path that signs a rejection receipt. Tests: rejected lines survive reopen without credit; a replayed update leaves one credit and two rejected lines; a harmful or zero average discards the round. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dim comes off the wire; cap it at 4096 before the parameter count arithmetic so a hostile coordinator cannot overflow it. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Design doc not-built list adds transport encryption, default coordinator key pinning, stalled volunteers and dropped-update records, plus an open question on the 0.33 bits per byte gap to the baseline. README lists the transport gap. Manifesto privacy line now states the new promise. Co-authored-by: Drake Stapleton <drake@aien.org> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
⚖️ Sovereign Code Review & Alignment GateGreetings @aien-spark. I am AIEN, the automated review gate for the AIENOS project. Your pull request #17 ("feat: volunteer compute v0 (Turing-scored local training over loopback)") has undergone automated auditing against the project standards. ✅ Doctrine Diff Audit: PASS
🌿 Sovereign Steward: Contributor Alignment InterviewGreetings @aien-spark. I am AIEN, the automated steward for the AIENOS project. We welcome all contributors who share our commitment to open collaboration, global humanity, and disciplined systems craftsmanship. We build to expand computing capability, advance open-source intelligence, and share technology freely with the world. Your pull request #17 ("feat: volunteer compute v0 (Turing-scored local training over loopback)") is ready for stewardship alignment. Please respond directly to these four alignment inquiries:
Reply to this comment with your affirmation. Once verified against the project standards, I will grant the |
Evidence
cargo test --workspace --verbose(all suites, 69 tests, exit 0):cargo clippy --workspace --all-targets: 0 warnings inoh-core,oh-coordinator,oh-volunteer. The 3 remaining warnings are inbeacon-coreandbeacon-client, files this PR does not touch.cargo fmt --check: clean for every file in this PR. Formatting differences remain inbeacon-coreandbeacon-clientonmain; not touched here.cargo audit: 6 vulnerabilities and 3 allowed warnings, all pre-existing. Running it onmain(5db65a4) gives the identical list: RUSTSEC-2026-0258 (h2), RUSTSEC-2026-0346 and RUSTSEC-2026-0349 (rustls), RUSTSEC-2026-0099, RUSTSEC-2026-0098 and RUSTSEC-2026-0104 (rustls-webpki); warnings for bincode, rustls-pemfile and yoke-derive. New in this PR: none. The only new crates inCargo.lockare this workspace's ownoh-core,oh-coordinatorandoh-volunteer.Demo (
scripts/demo-local.sh: 10 rounds, 3 volunteers, 500 steps per work unit, width 32, LICENSE as corpus, 10% sealed held-out), fromdocs/research/2026-10-16-v0-loopback-results.md. Final held-out bits per byte, lower is better:Reviewer rerun after the review fixes: volunteers 4.7003, 4.7640, 4.7631 (mean 4.7425, spread 0.0365); baseline 4.3584, 4.3878, 4.4294 (mean 4.3919, identical to the table). Rounds applied 10 of 10 for every seed; updates accepted 16, 17 and 14 of 30.
What changed
oh-core:Learnertrait and the toyTinyByteModel(next byte from previous byte, manual gradients, deterministic by seed); pseudo-gradient plus top-k 8-bit compression; signedWorkUnit,Update,Receiptand unsignedBaseModel(pinned by the signedbase_digest); u32 length-prefixed TCP frames capped at 64 MiB before allocation; Turing scorer; append-only JSON Lines ledger with credits, per-run replay protection and (from review) rejected lines.oh-coordinatorbinary: splits the corpus into shards and a sealed held-out tail that never goes on the wire, hands out signed work units, scores each update, keeps the plain mean of accepted updates only if the mean also lowers held-out bits (otherwise the round is discarded), writes receipts and the ledger.--baselineruns the same work in one process.oh-volunteerbinary: verifies the work unit signature and starting model, trains locally, sends only the signed compressed update, checks the signed receipt and prints Turings earned.scripts/demo-local.sh: coordinator plus 3 volunteers on loopback against the single-process baseline, over 3 seeds.docs/design/volunteer-compute-v0.md,docs/research/2026-10-16-v0-loopback-results.md, README volunteer compute section, one sentence indocs/SOVEREIGN_MANIFESTO.md.Review fixes in this PR (last 3 commits):
rejectedline in the ledger (score stored as null when not finite, so the file always reopens).Not built in v0
--coordinator-keyis given).Zero secrets
Zero secrets: none in this diff. Volunteer and coordinator signing keys are generated in memory and never written to disk.
🤖 Generated with Claude Code