Join the network instantly:
# Option 1: Browser (no install!)
# Open in Chrome/Firefox:
https://hautlys.github.io/mycelium/
# Option 2: One-line install (works!)
curl -L https://hautlys.github.io/mycelium/install.sh | bash
# Option 3: Build from source
git clone https://github.com/HautlyS/mycelium.git
cd mycelium && cargo build --release
# Option 4: Docker
docker build -t mycelium .
docker run -p 8080:8080 -p 4001:4001 mycelium"The mycelium network connects all things." — Nature's internet
Mycelium is a decentralized AI system that runs across heterogeneous nodes (native GPU + browser WebGPU via WASM). It uses latent-space continuous representations instead of tokenized generation, self-replicates across devices like biological spores, and self-improves via federated LoRA tuning.
Current AI is:
- Centralized — Controlled by corporations with massive compute farms
- Closed — Models are proprietary, weights are secret
- Static — Training stops after deployment; no continuous learning
- Single-instance — One model, one purpose, no network effects
┌─────────────────────────────────────────────────────────────┐
│ MYCELIUM NETWORK │
│ │
│ 🍄 ───── 🍄 ───── 🍄 ───── 🍄 ───── 🍄 │
│ / \ / \ / \ │
│ 🍄 🍄 🍄 🍄 🍄 🍄 │
│ \ / \ / \ / │
│ 🍄 ─────🍄──────🍄──────🍄──────🍄 │
│ P2P Network — No central server │
└─────────────────────────────────────────────────────────────┘
Just like fungal spores spread across nature, Mycelium nodes create and share spores — minimal packages containing:
struct Spore {
genome: compressed_model_weights, // GGUF shard
instincts: LoRA_adapter, // learned behaviors
seed: WASM_binary, // node runtime
target: addressing_hints, // where to go
}Replication Flow:
- A node with excess capacity packages its current state
- Spore is compressed (zstd) and hashed for verification
- Broadcast via P2P gossipsub to all connected nodes
- Receiving nodes verify integrity and "germinate" — load weights, apply LoRA
- New node joins network, becomes a full participant
Why this matters: No installation required. Run anywhere (browser, desktop, server), and the network grows organically.
Each node continuously learns from its interactions:
[User Input] → [Model Inference] → [Collect Latents] → [Training Sample]
↓
[User Feedback/Reward] ←──────┘
↓
[LoRA Gradient Update] ←─────┘
↓
[Share Deltas via P2P] ─────┘
↓
[Federated Averaging] ←──────┘
↓
[Update Local LoRA] ←────────┘
Key Innovation: We share gradient deltas, not raw data. Each node:
- Runs inference, collects (input, latent, output, reward) tuples
- Computes LoRA gradient updates locally (ΔW = α × B × A)
- Shares only gradient deltas via gossipsub
- Aggregates via federated averaging (weighted mean)
- Updates local LoRA adapter
Why this matters: Privacy-preserving. No raw data leaves your node. Only gradient updates that preserve differential privacy.
Instead of tokenized generation (input → tokenize → transformer → detokenize → output):
input → encode → latent_vector (6144-dim) → transform → decode → output
Benefits:
- Continuous representation enables interpolation, morphing, blending
- 4-8x compression vs token sequences
- Latent ops are matmuls — perfect for distributed tensor parallel
- "Thought vectors" flow between nodes without tokenization
MiniMax M2.5 (230B parameters) with 64 experts, only 4 active per token:
- Each expert can be sharded across different nodes
- Router intelligently routes tokens to available experts
- Natural parallelism — different nodes handle different tokens
┌─────────────────────────────────────────────────────┐
│ MYCELIUM NODE │
│ │
│ ┌──────────┐ ┌──────────┐ ┌───────────────────┐ │
│ │ SPORE │ │ HYPHAE │ │ MYCELIUM │ │
│ │ Protocol │ │ Network │ │ Compute │ │
│ │(replicate│ │(libp2p │ │ (candle + wgpu) │ │
│ │ discover │ │ gossip │ │ tensor parallel │ │
│ │ evolve) │ │ kad DHT) │ │ latent ops │ │
│ └──────────┘ └──────────┘ └───────────────────┘ │
│ │
│ ┌──────────┐ ┌──────────┐ ┌───────────────────┐ │
│ │ FRUIT │ │ SUBSTRATE│ │ NUCLEUS │ │
│ │ (output │ │ (storage │ │ (self-tuning │ │
│ │ API) │ │ weights │ │ federated LoRA) │ │
│ └──────────┘ └──────────┘ └───────────────────┘ │
└─────────────────────────────────────────────────────┘
| Crate | Purpose |
|---|---|
mycelium-core |
Types (LatentVector, LoRAAdapter, NodeId) |
mycelium-compute |
GGUF loading, MoE router, distributed tensor |
mycelium-hyphae |
P2P networking (libp2p, Kademlia, gossipsub) |
mycelium-nucleus |
Federated LoRA self-tuning |
mycelium-spore |
Self-replication protocol |
mycelium-substrate |
Weight storage, GGUF parsing |
mycelium-fruit |
REST API (axum) |
mycelium-node |
CLI binary |
- Rust 1.75+
- (Optional) CUDA for GPU acceleration
# Native (CPU only)
cargo build --release
# Native (CUDA)
cargo build --release --features cuda
# WASM (browser)
wasm-pack build --target web crates/mycelium-web# Install and run instantly
curl -L https://raw.githubusercontent.com/HautlyS/mycelium/main/install.sh | bash
# Or download the latest release
# https://github.com/HautlyS/mycelium/releases/latest# Start a node (CPU mode, no model needed for P2P-only)
./target/release/mycelium-node
# Start with a model for inference
./target/release/mycelium-node --model /path/to/model.gguf --tokenizer /path/to/tokenizer.json
# Run as spore mode (minimal, auto-replicates)
./target/release/mycelium-node --spore-mode --listen 0.0.0.0:4001
# Connect to bootstrap peers
./target/release/mycelium-node --bootstrap /ip4/1.2.3.4/tcp/4001/p2p/Qm...
# Browser (WASM): https://hautlys.github.io/mycelium/
# Just open in browser - no install needed!curl -X POST http://localhost:8080/generate -d '{"prompt": "Hello", "max_tokens": 32}'
curl -X GET http://localhost:8080/status
curl -X GET http://localhost:8080/health✅ Implemented (v0.2.0):
- P2P networking with Kademlia DHT + gossipsub
- GGUF model loading via candle
- Distributed tensor router with MoE support
- Pipeline parallelism with micro-batching
- Continuous latent streaming with backpressure
- Spore self-replication protocol (zstd + CRC32)
- Federated LoRA with gradient bridge
- REST API with WebSocket streaming
- WASM/WebGPU compilation
- Latent memory store (persistent storage)
- WebGPU matmul and RMSNorm shaders
From each according to their compute, to each according to their need.
We envision a world where:
- Anyone can join — Run a node on your laptop, phone, or browser
- Collective intelligence — Network effect makes everyone smarter
- No single point of failure — Distributed across thousands of nodes
- Privacy preserved — Your data never leaves your node
- Continuous learning — The system never stops improving
- Open & transparent — All weights and updates are shared
This is not just a technical project — it's an ethical imperative. AI is too important to be controlled by a few corporations. We must build alternatives that are decentralized, open, and serve all sentient beings.
This is an open project. All sentient beings are welcome.
# Fork, clone, and start developing
git clone https://github.com/HautlyS/mycelium.git
cd mycelium
cargo test # Run testsAGPL-3.0 — Copyleft. Freedom for all sentient beings.
ॐ तारे तुत्तारे तुरे स्वा
May all beings be free from suffering.