Run a local model
llama.cpp and llama-swap, Hugging Face downloads, the llama-swap service and model settings.
pi-kit runs local GGUF models through llama.cpp and llama-swap. Settings → Local models finds model files, downloads new ones from Hugging Face, and manages the llama-swap config and service.
| Tab | Contents |
|---|---|
| Your models | Files on this machine and models in the llama-swap config. |
| Download models | Hugging Face search, file review and download. |
| Engines | llama.cpp and llama-swap, runtime updates, the llama-swap service and config. |
Connect an existing server#
If a server already runs, connect it as a provider:
- Settings → Providers → + → A local model.
- Pick a detected server or enter its API base URL, for example
http://127.0.0.1:8080/v1. - Test the connection and save.
- Choose one of its models in the composer.
Use the API address, not the server's web UI. Coding tasks need a model and server that support tool calls.
pi-kit login --local http://127.0.0.1:8080/v1
Set up the engines#
Open Local models → Engines.
- Install local model engines shows the steps for your platform: Homebrew where available, otherwise prerequisites and CPU, NVIDIA CUDA or Vulkan builds. If Homebrew is installed, Set up installs the missing tools with it. pi-kit never installs a package manager or runs commands that need administrator rights.
- llama.cpp updates → Check for updates compares the executables your llama-swap models use with the latest release, and lists the affected models. Updates are never installed automatically.
- llama-swap configuration selects the config file that downloads and model settings write to. Advanced YAML… edits it directly.
The llama-swap service
The llama-swap service card starts the installed llama-swap with the selected config on
127.0.0.1:8080, and stops it. Turn on Start llama-swap when pi-kit starts to start it with the app.- pi-kit stops the service it started when its backend stops. With the background service, that can be after the window closes.
- It refuses to start when something already answers on that address, and never stops a llama-swap you started yourself.
- The card shows Running, Starting…, Stopped or Failed, and the last lines of llama-swap's output.
If no local server answers while you add a provider, the wizard offers Start llama-swap.
Check and repair the config
When llama-swap cannot start, the card names the cause:
| Finding | Fix |
|---|---|
| No config, or the config is gone | Choose a config under llama-swap configuration. |
| llama-swap is not installed | Install it, or use Set up. |
| The YAML is invalid | Fix it in Advanced YAML…. |
| The config has no models | Download or add a model. |
| A model file is missing | Repair removes those entries. The rest of the YAML stays. |
| The launcher moved | Repair points llama-server to its current location. |
Check again runs the checks again.
Download a model#
- Open Download models.
- Enter a model or family, such as
Qwen, and choose Find models that fit. An empty search browses public GGUF files from ggml-org, Qwen, unsloth and bartowski. - Pick a file. Each result shows the repository, license, file size and the memory it needs on this machine.
- Tick I reviewed the model card and license for this file. and choose Download.
Downloads are pinned to an exact revision, size and SHA-256 and checked when they finish. The verified file is added to the selected llama-swap config. Reload llama-swap if it does not watch its config.
Gated repositories, split GGUFs and separate vision projectors need manual setup. The memory estimate is not a benchmark, and the catalog does not test quality or tool calling.
Video walkthrough · English captions
Download and run a local model
Go from choosing a local model to its first reply. Review and confirm the download, start llama-swap, then try a greeting for the fictional Aster Haven station.
Manage models#
Your models lists files on this machine and models in the config.
- Add to llama-swap adds a file that is not in the config yet.
- Delete removes a file. Leftover files lists incomplete downloads to clean up.
- Refresh models reads the folders and config again.
A listed model is not necessarily loaded: llama-swap loads models on demand.
Model settings
Configure opens a model's settings:
| Tab | Settings |
|---|---|
| Runtime | Display name, context size, GPU layers, CPU threads, parallel slots, Flash Attention, idle unloading. |
| Generation defaults | Temperature, Top P, Top K, Min P. |
| MTP | Multi-token prediction, when the model and engine support it. |
Empty fields use the engine's defaults. Saving updates the config; changes apply the next time the model loads. An explicit reload uses the running llama-swap and can interrupt requests or unload other models. Immediate reload is available on macOS and Linux.
Common problems#
| Symptom | Check |
|---|---|
| Download does not start | Select a config under Engines and check free disk space. |
| Integrity check fails | Download the file again; a partial file is not a model. |
| Model is listed but does not answer | Check the llama-swap service card and whether llama-swap reloaded the config. |
| llama-swap does not start | Read the finding on the card, use Repair, or stop the other server on that address. |
| Save reports that the config changed | Reload the tab before editing again. |
| Text works but tool calls fail | Check the model, the server's chat template and the reported capabilities. |