Run an expert worker

Turn a spare GPU, CPU or phone into an expert worker: build it, volunteer for the scarcest slice, download it, serve, and dial out over 443 to earn KVR.

An expert worker is a pure (hidden, ids) → out function — no attention, no KV cache, no sampler — that computes a slice of a MoE model's experts whenever the backbone's router selects them. You don't choose what to serve; the coverage market hands you the scarcest, highest-reward range clipped to your budget, so a 4 GB phone and a datacenter GPU both find a slot.

Seven steps

Build → volunteer → serve → dial → earn

The whole path — the dial script waits for the backbone with a retry loop.

# 1. build the worker for your backend (cuda | rocm | cpu)
bash scripts/build-node-runtime.sh <backend>   # -> linkcpp-expert-worker

# 2. volunteer — the market assigns the scarcest range within your budget
POST /api/expert-volunteer {model, max_experts}     -> {layer, experts:[a,b]}

# 3. download only that slice (node-token auth)
GET  /api/proxy/models/<model>/expert-shard?layers=L:L+1&experts=a:b   # a mini-GGUF

# 4. serve it
linkcpp-expert-worker --model <slice.gguf> --serve <port> --layer L --n-embd <E>

# 5. dial out over 443 (no inbound ports)
scripts/expert-relay-dial.py --mode worker \
  --hub wss://gate.kvasir-ai.net/api/expert-relay --session <S> --local 127.0.0.1:<port>

# 6. heartbeat so the demand map and rewards can see you
POST /api/expert-coverage
  • The slice is tiny. A layer-0, 128-expert slice is 794 MB against the 72 GB full model — the grain that lets weak devices participate. You only download the range the market assigned.
  • Dial-out, never dial-in. Step 5 opens one outbound WebSocket on 443, so carrier NAT and CDN edges pass it and you expose zero inbound ports — the same path a phone uses.
  • The heartbeat is load-bearing. Without POST /api/expert-coverage you serve nothing the demand map knows about, and nothing you do is credited.
  • Reward is per work. Bridged work accrues to the hub's contribution ledger; the gateway delta-credits KVR to your own wallet (non-custodial). You need a wallet address to be paid.

The worker speaks the same dispatch protocol as an in-datacenter GPU — (n_used, n_tokens, cur, sel) → experts over one long-lived stream. A partial-shard worker just sets n_used = 1. That uniformity is why a phone, a CPU box and a Blackwell card are interchangeable members of the same swarm.