LocalAI has released 5.1.0, letting Android phones open the server's web interface and manage connected devices individually. Server operators can process multiple chat requests together. Web chat users can choose long-term memory and conversation retention settings. If devices use shared tokens to connect, change the configuration before upgrading.
1. The phone opens the interface while the server runs the model
The new Android app opens a remote server's web interface. Enter the server address or scan a one-time invitation QR code, verify the peer, and proceed with pairing. The server runs the model, not the phone.
2. Issue invitations per device instead of sharing one access pass
The new P2P connection method, which connects devices directly, replaces a single shared access pass with per-device invitations. Register devices with one-time invitations and revoke one without disconnecting others. Invitations are created for specific roles, such as devices, remote servers, or workers.
Devices can connect directly or through an operator-provided relay server. Hole punching, a technique for direct communication across routers and firewalls, is also supported. Public relay servers only help establish connections and do not carry actual data.
On first startup, the server creates a key file containing its identity in the data path. Keep this file so paired devices can recognize the same server. Workers that run parts of a model join an invitation with this command:
local-ai worker llama-cpp-rpc --join "<invite link>"3. Split long inputs to keep ongoing conversations moving
When llama.cpp uses two or more request-processing slots, it schedules work based on available shared KV cache space. This cache stores input processing results and conversation context for reuse. Requests wait when space is insufficient, while long inputs are split so conversations already generating answers can continue.
The LocalAI team reported the results below on DGX Spark (GB10) with Ornith-1.5-35B-A3B Q8_0 and about 16 concurrent requests. Both configurations completed 128 of 128 requests across two runs.
Table: Throughput and response latency by concurrent request configuration
Conditions: DGX Spark (GB10), Ornith-1.5-35B-A3B Q8_0, about 16 concurrent requests, two runs, comparing a 4-slot baseline with 16-slot paged serving
| Metric | 4-slot baseline | 16-slot paged serving |
|---|---|---|
| Total output tokens (tokens/second) | 81.0 | 153.3 |
| Median time to first token (seconds) | 35.5 | 8.3 |
The team's reported 89% throughput gain aggregates multiple requests. Keeping 4 slots and enabling only the new defaults made little difference in the same workload. Read that result alongside the configuration with more slots.
A separate Qwen3-8B test split 8,000-token inputs into 256-token chunks on the same GPU. The team reported that the longest pause in ongoing conversations fell from 690 milliseconds to 109 milliseconds. However, time to first token for long inputs rose by 0.5 seconds at the 99th percentile, the threshold for the slowest 1% of measurements. Keeping short conversations flowing thus came with longer waits for long requests.
4. Reuse processing results for shared inputs
Conversations starting with the same long system prompt can share processing results for their opening portion. Paged serving divides memory and assigns it to requests. If at least 256 prefix tokens match, it reuses those results even while the earlier conversation is generating an answer. Each request generates its own answer separately.
The team used the same system prompt for 32 requests per run in a Qwen3-8B test on DGX Spark. Enabling sharing reduced both duplicate input processing and response waits. Both configurations completed 96 requests across three runs.
Table: Effects of sharing processing results for a common prompt
Conditions: DGX Spark, Qwen3-8B, the same system prompt for 32 requests per run, three runs, comparing sharing off and on
| Metric | Sharing off | Sharing on |
|---|---|---|
| Prompt tokens processed per run (tokens) | 7,989 | 3,945 |
| Median time to first token (milliseconds) | 220 | 110 |
This feature works without client changes. The model editor offers concurrency settings for unified memory shared by the CPU and GPU, discrete GPUs, and CPUs.
5. Choose web chat memory and conversation retention separately
Disabling memory prevents conversations from reading or writing long-term memory, while keeping logs and traces. Zero conversation retention also prevents server-side storage of conversation content but records usage counters. Administrators can disable this feature or limit the permitted level.
The experimental Android app supports password and API key login. It cannot connect to servers configured only for OAuth, which delegates authentication to external accounts. Retention controls apply to web sessions, excluding API key requests, backend process output, worker logs, and temporary files.
6. Existing operators must pair devices again
Shared-token P2P does not coexist with the new method. If old settings remain, the server stops startup with exit code 1 and provides migration guidance. Remove the old settings and reissue per-device invitations. For distributed clusters, upgrade the frontend and workers together.
The model configuration API's POST /api/models/config/{id} now also returns a 410 response, so check clients using this endpoint. Finer per-device access control and concurrent chat processing come with re-pairing and configuration checks for existing operators.
LocalAI 5.1.0 centers on finer control over connections and chat processing, and existing P2P operators should prepare for configuration migration first.
