Docs
Memory
One paging dial. Laptop is the default. Phone is the lower stop. Weights stay on disk and the session pages what does not fit.
| Preset | Budget | KV | Staging |
|---|---|---|---|
| laptop | ~8 GiB. Shrinks to free RAM when 8 GiB does not fit | 2048 + 4 sink | 2 buffers |
| desktop | ~32 GiB, same free-RAM rule | 4096 | 2 buffers |
| server | ~128 GiB, same free-RAM rule | 8192 | 2 buffers |
| phone | ~2 GiB, then half of free RAM | 512, or 256 / 128 when the cap is tight | 1 buffer, 4 threads |
| none | No streaming budget | Grows with context | Off |
What gets pinned
Final norm stays resident. Embeddings, lm_head, and the first layers stay only while pin plus staging still fits. Experts are never pinned. The LRU uses leftover RAM after the trunk. GGUF block-quants stay packed.
Laptop and above keep two staging buffers, so the largest streamed tensor has to fit twice. Phone keeps one, so that tensor has to fit once. Convert Hugging Face BF16 7B and larger to GGUF Q4_K. --ram-gb 8 on a phone with 6 GiB free becomes 3 GiB.
CLI
uaii generate --model model.q4_k.gguf --preset laptop --prompt "hi" uaii generate --model model.q4_k.gguf --preset phone --prompt "hi" uaii chat --model model.q4_k.gguf --jsonl --preset phone
uaii doctor prints the resolved phone budget, whether it was clamped, and available bytes. Phone builds are in Mobile.