MeshKore LLM, which I've been building, splits one open-weight model across computers that lend the resources they aren't using. This post is about the part that took me the longest, which is deciding what goes where.

What runs on each machine

The model is split by layers, with llama.cpp RPC underneath. One machine is the head. It runs llama-server, holds the first layers and answers the request. The others are workers, each running ggml-rpc-server with its own range of layers. For every generated token the head computes its layers and then calls each worker for theirs, in order.

So a worker does real compute on the layers it holds, and every token waits on a round trip to each worker. That gives the one rule I won't bend: the pool never runs a model that fits on a single machine. Splitting it would only add hops.

A node's identity is a keypair it generates for itself. It runs at low priority, stops lending on battery, and serves its owner the model on a local OpenAI-compatible endpoint at 127.0.0.1:17080.

How the hub decides the split

The hub runs no model. It measures the machines and plans, with these rules in this order:

  1. Take the highest-ranked model in the catalog whose footprint fits in the memory being lent.
  2. Use as few machines as possible, largest first, because every extra machine is one more hop per token.
  3. Give each machine a share of the layers proportional to what it lends.
  4. Video memory first. A PC with a discrete GPU can also lend system RAM, but layers go there only when the GPUs of the chosen machines can't hold the model, and never on the head.
  5. A machine with a slow link waits in reserve. The head measures how long it waits on each worker, and a link counts as slow when that wait is more than twice the best one and above 30 ms.

Rule 5 was the uncomfortable one. Someone offers memory and the hub tells their machine to wait. But one slow worker slows every token for everybody in that copy of the model, and a machine in reserve still joins when no copy could form without it. Right now all this lands on a 125B Qwen MoE with 6B active parameters, at an aggressive IQ3_XXS quant.

A laptop goes on battery, or someone just stops the node, and the hub plans again with what's left. A plan that no longer fits is replaced at once. A better plan has to wait until the pool has been stable for a while, since moving to a bigger model means reloading weights on every machine and that takes minutes.

Requests are less tidy. If the cluster fails before the first byte, the request goes to another cluster or to the re-formed one. If it fails in the middle of a stream, the stream ends with an error. I don't have a good way to resume it yet.

What isn't solved

A split model is slower than the same model would be on one box, if you had the box. Privacy is the other open problem. Prompts and answers aren't stored, only counters and totals, but the hub and the head machine can read a request while it runs, and the other machines see activations that can partly reveal the input. Don't send secrets yet. Packaging is behind too: the one-command install and the desktop app are Apple silicon only, and on Windows and Linux you build the node from source until I get the packages out.

The code for the node and the hub is public on GitHub under the Sustainable Use License 1.0, which is not an open source license. It's free for personal use, research and teaching, and inside a company. Commercial exploitation needs a separate agreement.

If you've run inference across machines on different networks, how did you deal with a slow or flaky node? I'd like to know if there's something smarter than keeping it in reserve.