LocalAI (P2P workers)
The all-in-one LocalAI server can share one model across worker machines that find each other with a token; underneath it uses llama.cpp RPC (and MLX distributed on Macs).
- Mac: Partly
- NVIDIA PC: Yes
- AMD PC: Yes
- Linux, processor only: Yes
- Raspberry Pi and boards: Yes
- Windows: Partly
- Android: No
- iPhone, iPad: No
At a glance
- Best for
- People already running LocalAI who want workers to join with a token instead of typing addresses.
- Runs on
- Containers for CPU, CUDA, ROCm, Intel and Vulkan, Jetson and DGX Spark images, and a Mac app; Windows through containers.
- How it splits a model
- Worker mode splits one llama.cpp model by memory (llama.cpp RPC); federated mode only sends whole requests to whichever machine is free.
- Connections
- llama.cpp RPC over its peer-to-peer overlay, or MLX over TCP or Thunderbolt RDMA.
- How devices join
- A shared token (libp2p).
- Models
- GGUF in worker mode; MLX with MLX distributed.
- API
- OpenAI, Anthropic and Ollama compatible.
- Rules
- One model at a time in worker mode, and workers must join before the model loads.
Get started
macOS
Download LocalAI.dmg from the releases
Linux
docker run -p 8080:8080 localai/localai:latestThen:
local-ai run --p2p # main machine; copy the token
TOKEN=<token> local-ai p2p-worker p2p-llama-cpp-rpc # each worker
Limits to know
- Its docs call the distributed modes experimental.
- Speeds are the same as llama.cpp RPC, which our estimates use.
Estimates come from published hardware specs and our open formulas, not from running the model on your machine. Real speed varies with runtime, drivers and settings. Numbers marked “Measured” come from a linked benchmark.