{{template "views/partials/head" .}}
LocalAI uses P2P technologies to enable distribution of work between peers. It is possible to share an instance with Federation and/or split the weights of a model across peers (only available with llama.cpp models). You can now share computational resources between your devices or your friends!
{{.P2PToken}}
The network token can be used to either share the instance or join a federation or a worker network. Below you will find examples on how to start a new instance or a worker with this token.
You have to enable P2P mode by starting LocalAI with --p2p
. Please restart the server with --p2p
to generate a new token automatically that can be used to discover other nodes. If you already have a token, specify it with export TOKEN=".."
Check out the documentation for more information.
You can start LocalAI in federated mode to share your instance, or start the federated server to balance requests between nodes of the federation.
You can start llama.cpp workers to distribute weights between the workers and offload part of the computation. To start a new worker, you can use the CLI or Docker.