{"id":51475360,"url":"https://github.com/asmuelle/orchard","last_synced_at":"2026-07-06T20:30:32.854Z","repository":{"id":366124621,"uuid":"1275147441","full_name":"asmuelle/orchard","owner":"asmuelle","description":"Decentralized, privacy-preserving swarm-intelligence network powered by idle Apple devices (Foundation Models + Neural Engine).","archived":false,"fork":false,"pushed_at":"2026-06-20T11:12:17.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T12:12:39.671Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://asmuelle.github.io/orchard/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asmuelle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-20T10:06:52.000Z","updated_at":"2026-06-20T11:12:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/asmuelle/orchard","commit_stats":null,"previous_names":["asmuelle/orchard"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/asmuelle/orchard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Forchard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Forchard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Forchard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Forchard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asmuelle","download_url":"https://codeload.github.com/asmuelle/orchard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Forchard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35205739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-06T20:30:32.283Z","updated_at":"2026-07-06T20:30:32.843Z","avatar_url":"https://github.com/asmuelle.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌳 Orchard\n\n[![CI](https://github.com/asmuelle/orchard/actions/workflows/ci.yml/badge.svg)](https://github.com/asmuelle/orchard/actions/workflows/ci.yml)\n\n\u003e A decentralized, privacy-preserving swarm-intelligence network powered entirely by idle Apple devices.\n\nOrchard turns millions of idle iPhones, iPads, and Macs into a cooperative supercomputing\nnetwork. By coordinating the on-device **Apple Foundation Models (AFM)** and **Apple Neural\nEngines (ANE)** of participating devices, Orchard tackles massive, complex problems — from\ndisease modeling to decentralized web indexing — while keeping **100% of raw user data on\nthe device**.\n\n---\n\n## Why Orchard\n\n| Conventional cloud AI | Orchard |\n| --- | --- |\n| Energy-intensive centralized datacenters | Idle silicon you already own |\n| Per-token API fees | Zero marginal compute cost |\n| Raw data leaves the device | Raw data never leaves the device |\n| Owned by a single company | Collectively owned knowledge graph |\n\n## The Four Technical Pillars\n\n1. **Local Node Execution** — Each device is a node running native on-device inference via the\n   [Foundation Models framework](https://developer.apple.com/documentation/foundationmodels)\n   on the Neural Engine. Opportunistic: runs only when **plugged in, on Wi-Fi, and idle**.\n2. **Local Micro-Swarms** — Devices on the same LAN shard high-parameter models across their\n   unified memories using MLX-style peer-to-peer clustering.\n3. **Global Agentic Workflows** — A Task Router (on Private Cloud Compute) fragments massive\n   problems into micro-prompts; millions of edge agents process chunks and return structured\n   output for consensus aggregation.\n4. **Cryptographic Privacy** — Federated Learning with **Secure Aggregation (SecAgg)** and\n   **Differential Privacy**. Only masked gradient updates leave the device.\n\nSee [`DESIGN.md`](./DESIGN.md) for the full architecture and [`docs/`](./docs) for the public site.\n\n## Status\n\n🌳 **All five milestones (M1–M5) landed.** `OrchardNode` runs a `NodeRuntime` actor that gates\nwork behind the opportunistic scheduler and does structured-output inference via Apple's\nFoundation Models on OS 26+ (deterministic stub fallback elsewhere). `OrchardSwarm` is the\nmicro-swarm coordination layer — peer discovery, coordinator election, and a memory-aware\npipeline-parallel layer-shard planner. `OrchardRouter` is the global layer — job fragmentation,\nredundant load-balanced assignment, and majority-vote consensus that outvotes and flags faulty\nnodes. `OrchardCrypto` is the privacy layer — Bonawitz-style Secure Aggregation (Curve25519 +\nexact pairwise mask cancellation) and differential privacy, recovering the federated mean from\nmasked vectors alone. `OrchardPilot` ties them together end-to-end on a real scientific workload.\nThe micro-swarm `ShardExecutor` seam is implemented too: a pure-Swift `PipelineRunner` runs a\n`ShardPlan` as a distributed forward pass (bit-identical to monolithic), and `OrchardMLX` provides\na real Metal-accelerated executor on `mlx-swift` (opt-in; `just mlx-demo`). `OrchardTransport`\nships activations between pipeline stages over real Network.framework TCP, so `PipelineRunner`\ndrives a genuine multi-device pipeline (verified over localhost: distributed == monolithic), and\nnodes find each other over the LAN via Bonjour auto-discovery (`just bonjour-test`). See the\n[roadmap](./DESIGN.md#roadmap).\n\n## Quick start\n\n```bash\njust setup     # install toolchain + resolve packages\njust build     # build all targets\njust test      # run the test suite\njust demo      # run one task through a node (Foundation Models on OS 26+, else stub)\njust pilot     # run the full pipeline: distributed scan → consensus → federated refinement\njust site      # preview the GitHub Pages site locally\n```\n\n`just pilot` drives a scientific workload through all five layers at once:\n\n```\n🌳 Orchard pilot — distributed folding scan\n  scorer placement:  solo (scorer fits on one device)\n  candidates:        12 evaluated across 4 nodes\n  consensus:         12/12 (dissents rejected: 9)\n  best conformation: [0.486, 0.336, 0.543]  energy 0.4708\n  refined (federated DP gradient step):\n                     [0.487, 0.208, 0.593]  energy 0.3009\n  → energy reduced by 0.1699 toward the native state [0.500, -0.300, 0.800]\n```\n\n`just demo` on an OS 26+ machine produces a real on-device structured summary:\n\n```json\n{\n  \"title\": \"Apple Neural Engine Accelerates On-Device ML\",\n  \"summary\": \"The Apple Neural Engine enhances machine learning directly on devices…\",\n  \"topics\": [\"Apple\", \"Neural Engine\", \"On-Device ML\", \"Machine Learning\"]\n}\n```\n\nRequires macOS 26+ / Xcode 26+ for the on-device Foundation Models APIs. See [`TOOLS.md`](./TOOLS.md).\n\n## Repository layout\n\n```\norchard/\n├── DESIGN.md                    # Architecture \u0026 system design\n├── TOOLS.md                     # Toolchain, frameworks, dependencies\n├── AGENTS.md                    # Guidance for AI coding agents\n├── CLAUDE.md                    # Claude Code working agreement\n├── justfile                     # Task runner\n├── Package.swift                # SwiftPM manifest\n├── Sources/\n│   ├── OrchardProtocol/         # Wire types, task specs, schemas, node capabilities\n│   ├── OrchardNode/             # Node runtime, scheduler, Foundation Models adapter\n│   ├── OrchardSwarm/            # Peer discovery, coordinator election, layer-shard planner\n│   ├── OrchardRouter/           # Job fragmentation, redundant assignment, consensus aggregation\n│   ├── OrchardCrypto/           # Secure Aggregation (SecAgg) + differential privacy\n│   ├── OrchardPilot/            # Capstone: one scientific workload through every layer\n│   ├── OrchardMLX/              # Metal-accelerated ShardExecutor on mlx-swift (opt-in)\n│   ├── OrchardTransport/        # Cross-device transport over TCP + Bonjour auto-discovery\n│   ├── orchard-demo/            # Node + swarm + router + crypto + transport demo executable\n│   ├── orchard-pilot/           # End-to-end folding-scan pilot executable\n│   └── orchard-mlx-demo/        # MLX sharded-execution demo (opt-in, Metal)\n├── Tests/                       # Swift Testing suites\n├── docs/                        # GitHub Pages site\n└── .github/                     # CI + Pages workflows\n```\n\n## License\n\n[MIT](./LICENSE) — concept and scaffolding. Not affiliated with or endorsed by Apple Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmuelle%2Forchard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasmuelle%2Forchard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmuelle%2Forchard/lists"}