How to Set Prompt and Micro-Batch Size in llama-server
Tune llama-server --batch-size and --ubatch-size for faster prompt processing.
THE FIELD GUIDE
Run AI on your own computer, check model and hardware requirements, and verify which steps work without a cloud connection.
Tune llama-server --batch-size and --ubatch-size for faster prompt processing.
Use llama-server --mlock to stop the operating system swapping model weights to disk.
Use llama-server --cache-ram to keep the KV cache in system RAM on machines with limited VRAM.
Pass a Jinja chat template to llama-server so chat prompts are formatted the way your model expects.
Enable flash attention in llama-server for faster long-prompt processing.
Raise Ollama's request queue limit so bursts of requests wait instead of being refused.
Raise OLLAMA_NUM_PARALLEL so Ollama answers several requests at the same time.
Shrink Ollama's KV cache with a quantized cache type so longer conversations fit in memory.
Enable flash attention in Ollama for faster long-prompt runs on supported hardware.
Keep two models loaded in Ollama at once so switching between them does not trigger a reload.