Skip to main content

Distributed LLM inference across heterogeneous hardware

Project description

mycellm

mycellm_

Distributed LLM inference across heterogeneous hardware.
A peer-to-peer network for running AI on GPUs worldwide.

Website · Docs · Try it · Join the network


What is mycellm?

mycellm pools GPUs across the internet into a single inference network. Anyone can contribute compute and earn credits. Anyone can chat with frontier models for free.

  • OpenAI-compatible API — drop-in replacement at /v1/chat/completions
  • P2P architecture — no central GPU cluster, no vendor lock-in
  • Ed25519 cryptographic identity — signed receipts, verifiable accounting
  • Multi-network federation — public swarm, private orgs, fleet management
  • iOS app — your iPad is a first-class inference node (Metal + llama.cpp)

Quick Start

# Install
pip install mycellm

# Create identity and join the public network
mycellm init

# Start serving (auto-detects GPU)
mycellm serve

Your node is now live. Load a model and start earning credits:

# Interactive chat
mycellm chat

# Or use the OpenAI-compatible API
curl http://localhost:8420/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "auto", "messages": [{"role": "user", "content": "Hello!"}]}'

One-liner Install

curl -fsSL https://mycellm.ai/install.sh | sh

Or with Docker:

docker run -p 8420:8420 -p 8421:8421/udp ghcr.io/mycellm/mycellm serve

How It Works

You (consumer) ──QUIC──▶ Bootstrap (relay) ──QUIC──▶ Seeder (GPU)
                                                       │
                                                  llama.cpp / vLLM
                                                       │
                                              Tokens stream back ◀──
  1. Consumers send prompts via the API or chat interface
  2. Bootstrap relays requests to available seeders via QUIC
  3. Seeders run inference on their local GPU and stream tokens back
  4. Credits flow to seeders — signed Ed25519 receipts for every request
  5. NAT traversal enables direct P2P connections when possible

Architecture

Layer Purpose Tech
Canopy Client access iOS app, CLI chat, web UI, OpenAI API
Mycelium Routing & discovery QUIC transport, Kademlia DHT, STUN/ICE
Roots Inference compute llama.cpp (Metal/CUDA/ROCm/CPU), vLLM
Ledger Accounting Ed25519 signed receipts, per-network credit tracking

Features

Inference

  • llama.cpp backend with Metal, CUDA, ROCm, and CPU support
  • Streaming token generation via SSE
  • Model management — download from HuggingFace, load/unload, scope control
  • Thermal throttling — auto-adjusts on mobile devices

Networking

  • QUIC transport with bidirectional streams (NWConnectionGroup on iOS, aioquic on Python)
  • NAT traversal — STUN discovery + UDP hole punching for direct P2P
  • HTTP fallback — works when QUIC is blocked
  • Bootstrap relay — always works, even behind symmetric NAT

Security

  • Ed25519 identity — account key → device cert → peer ID
  • Signed receipts — cryptographic proof of inference served
  • Sensitive Data Guard — regex scanning for API keys, passwords, PII
    • Client-side: blocks/redirects before sending
    • Gateway: returns 422 with explanation
    • Bypass: X-Privacy-Override: acknowledged header
  • Fleet management — remote node control with admin key auth

Multi-Network

  • Public network — open to all, auto-approved
  • Private networks — invite-only with Ed25519-signed tokens
  • Federation — gateway nodes bridge multiple networks
  • Fleet — enterprise management with remote commands
  • Trust levels — strict (verify all), relaxed (verify, don't enforce), honor (trusted LAN)

iOS App

The mycellm iOS app makes any iPhone or iPad a first-class network node.

  • On-device inference — llama.cpp on Metal, streaming tokens
  • Network chat — route to any model on the public network
  • QUIC P2P — authenticated with the bootstrap, serves inference
  • Sensitive Data Guard — auto-routes sensitive prompts to local model
  • OLED screensaver — brand-colored mushroom with spore particles

Requires iOS 17.0+. Coming soon to TestFlight.

Configuration

# Environment variables
MYCELLM_API_HOST=0.0.0.0        # API listen address
MYCELLM_API_PORT=8420            # API port
MYCELLM_QUIC_PORT=8421           # QUIC transport port
MYCELLM_LOG_LEVEL=INFO           # Logging level
MYCELLM_FLEET_ADMIN_KEY=...      # Fleet management key (optional)
MYCELLM_NO_DHT=true              # Disable Kademlia DHT

See docs/config for full reference.

API

OpenAI-compatible. Works with any client that supports the OpenAI API format.

from openai import OpenAI

client = OpenAI(base_url="http://localhost:8420/v1", api_key="unused")
response = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Endpoints

Method Path Description
GET /health Health check
GET /v1/models List available models
POST /v1/chat/completions Chat (streaming + non-streaming)
GET /v1/node/status Node status
GET /v1/node/peers Connected peers
POST /v1/node/models/load Load a model
POST /v1/node/federation/invite Create network invite
POST /v1/node/federation/join Join a network

See API docs for the full reference.

Private Networks

Create a private network for your team, lab, or organization:

# On the bootstrap node
mycellm init --bootstrap --name "my-org"

# Generate an invite
mycellm network invite --max-uses 10

# On member nodes
mycellm network join mcl_invite_eyJ...

Contributing

mycellm is open source under the Apache 2.0 license.

git clone https://github.com/mycellm/mycellm
cd mycellm
pip install -e ".[dev]"
pytest

Credits

Built by Michael Gifford-Santos.

License

Apache 2.0 — see LICENSE.


mycellm_ — /my·SELL·em/ — mycelium + LLM

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mycellm-0.1.1.tar.gz (307.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mycellm-0.1.1-py3-none-any.whl (303.9 kB view details)

Uploaded Python 3

File details

Details for the file mycellm-0.1.1.tar.gz.

File metadata

  • Download URL: mycellm-0.1.1.tar.gz
  • Upload date:
  • Size: 307.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mycellm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 67f22f1484fb754c806547c3b31fd05638d0f2a68f2006f7b289966d650bbb07
MD5 da13bca2b3f6a1322bbb4e102385bd56
BLAKE2b-256 7c469e3423bb14841d9b55d0b8d290051df471cfe75a89e8aeda4d9e6d3c2186

See more details on using hashes here.

File details

Details for the file mycellm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mycellm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 303.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mycellm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59f379f317c3b6a97e423ce2afa79d80e35f4932419d1e96bed76ecc16c8df7f
MD5 5ac4b0f6ef7a2b3b5ec02b8b24c1bc07
BLAKE2b-256 c4e97c4f0e6d94a06ffe4eaee38dbaf60d2bac827a1080a79c16ccf01f96f927

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page