A control panel for llama.cpp. llama control panel is a native Linux desktop app that
manages your local GGUF models and acts as a front end for llama-server — launch it
with the right parameters, watch its logs, and keep your model library organised,
without touching a terminal.
It is a server controller and model manager, not a chat client. There is no chat
UI and no inference proxying; llama control panel starts and stops llama-server and leaves
the talking to the server's own web UI.
- Recursively scans a models directory for
.gguffiles and shows filename, size (GB), and a quantization parsed from the filename (Q4_K_M,Q5_K_S,Q8_0,IQ4_XS,BF16, …). - Model source: a local
.gguffile, or a Hugging Face repo (-hf user/model:quant, downloaded on demand, with an optional exact file). - Full launch-parameter panel, grouped and scrollable, each control with a plain-English
tooltip: context & batching (
-ngl,-c,-b,-ub,-t,-tb,-np,-fa, KV offload, context shift), KV cache (-ctk,-ctv,-lm), sampling (--temp,--top-k,--top-p,--min-p, repeat/presence/frequency penalties, seed,-n), thinking/reasoning (--jinja,--reasoning,--reasoning-effort,--reasoning-budget), and server (--host,--port,--api-key,-to,--ui,--props,-cb,--warmup), plus free-form extra flags. - Per-model presets are saved automatically as you change a value, and restored when you reselect the model.
- Command preview shows the exact argv that will run.
- Start / Stop Server and Open Web UI (enabled only while running).
- Memory estimate panel: weights + KV cache + runtime overhead for the selected
model, context, KV type, and
-ngl, classified against live VRAM + RAM (fits / tight / partial / OOM). - Profiles: save the current parameters under a name (optionally remembering the model), then apply or delete them. The header shows how many profiles exist; saving an existing name asks before replacing it.
- Delete removes the model plus its sidecar files (
mmproj-*.gguf,.json,.txt,.model,.vocab) after listing every path; other.ggufmodels in the folder are kept. Deleting a running model is refused.
The core launch controls (model source, GPU layers, context, batch, threads, flash attention, host/port) and Profiles stay on Local Models in the right-hand panel. Everything else — micro-batch, parallel slots, KV cache types, load mode, full sampling, reasoning/thinking, and server tuning — lives in the Advanced Options tab, each with a tooltip.
Point the llama-server field at the binary itself or a parent folder — use the Folder… button (or type a path) and the app searches recursively and fills in the binary.
- Search GGUF repositories (most downloaded first) and list the
.gguffiles in a repo with sizes. - Runs here column flags whether a file fits this machine's VRAM using
file size × 1.3 < total VRAM(≈30% headroom):Yes/No, or—when no NVIDIA GPU is present. - Downloads stream into your models directory with progress, live speed, and a Cancel button; a cancelled download keeps its partial file so the next attempt resumes.
- Optional HF token for gated/private repos and higher rate limits.
- Precompiled binary — picks the newest GitHub release that actually carries a Linux
asset for the selected backend (CPU, Vulkan, CUDA 12.8, CUDA 13.5, ROCm) and CPU
architecture, downloads it, extracts into
releases/<tag>-<backend>-<arch>/, and offers to adopt the binary. - Build from source — clones
ggml-org/llama.cppinto<install folder>/llama.cppand runs the CMake configure/build steps, streaming output to the console. If the install folder is already a llama.cpp git checkout, it is used directly. Update pullsorigin/masterand rebuilds only when there are new commits; Rebuild forces a build. Missing tools are listed with install hints; the app never runssudo. - Backend is auto-detected from
nvidia-smi/ Vulkan and can be overridden. - Archives are validated against path traversal and extracted with symlink protection.
Live merged stdout/stderr from llama-server in a read-only monospace console, with
auto-scroll, Clear, and Copy All.
The status bar always shows system RAM (psutil), GPU VRAM (NVML, hidden when no NVIDIA
GPU is present), and the server state: Stopped, Starting, Running, Error.
- Linux (x86_64 or aarch64)
- Python 3.12+
PySide6>=6.7.0,huggingface-hub>=0.25.0,psutil>=6.0.0,nvidia-ml-py- A
llama-serverbinary (point at it, or let the llama.cpp tab install/build one)
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
./venv/bin/python main.pyOpen the Local Models tab and set:
| Field | Example |
|---|---|
llama-server binary |
~/Code/llama.cpp/build/bin/llama-server (or the folder ~/Code/llama.cpp) |
| Models directory | ~/models |
Both are saved immediately. The models directory is scanned recursively for .gguf
files, including subfolders.
~/.config/llama-control-panel/config.json:
{
"llama_server_path": "/home/you/Code/llama.cpp/build/bin/llama-server",
"models_dir": "/home/you/models",
"hf_token": "",
"runtime_root": "~/.local/share/llama-control-panel",
"model_presets": {
"/home/you/models/TinyLlama-1.1B.Q4_K_M.gguf": {
"ngl": 99, "ctx": 4096, "batch": 512, "threads": 12,
"host": "127.0.0.1", "port": 8080, "flash_attn": true, "extra_flags": ""
}
},
"profiles": [
{
"name": "8k-q4",
"model": "/home/you/models/TinyLlama-1.1B.Q4_K_M.gguf",
"params": {
"ngl": 99, "ctx": 8192, "batch": 512, "threads": 12,
"host": "127.0.0.1", "port": 8080, "flash_attn": true, "extra_flags": ""
}
}
]
}Writes are atomic (temp file + os.replace) and the file is 0600 because it can hold
an HF token. If the file is unreadable it is moved to config.json.corrupt-<timestamp>
and defaults are used, so a broken config never blocks startup or destroys your presets
silently.
main.py entry point (adds src/ to the path)
pyproject.toml packaging metadata (src layout)
src/llama_cp/
config.py JSON config, atomic writes, per-model presets, profiles
server_manager.py QProcess wrapper, state machine, readiness detection, shutdown
hf_worker.py QThread workers: search, file listing, cancellable download
runtime_manager.py release asset selection, safe extraction, build plans, update check
runtime_workers.py install/build/download/update QThread workers
gguf_meta.py GGUF metadata header reader (no tensor access)
memory_estimator.py weights + KV cache + overhead, fits/tight/partial/oom
ui/
main_window.py tab host, status bar, GPU telemetry, closeEvent
local_tab.py model scan, core launch controls, presets, profiles (right pane)
advanced_tab.py advanced options tab (sampling, cache, reasoning, server tuning)
hf_tab.py Hugging Face search, file list, VRAM fit column, download bar
runtime_tab.py install/build/update llama.cpp, adopt binary
logs_tab.py log console
memory_panel.py memory estimate panel
tests/ GGUF reader, estimator, panel, hf, profiles, runtime tests + run_all.sh
./tests/run_all.sh./packaging/build_appimage.shThe script builds inside python:3.12-slim-bookworm by default; the resulting AppImage
needs glibc 2.34 or newer (Ubuntu 22.04+). It writes
dist/llama-control-panel-<version>-x86_64.AppImage and installs a .desktop entry
plus icon under ~/.local/share (skip with --no-install). Use --local to build on
the host instead of Docker.
- No readiness timeout: if
llama-servernever prints a listener line, the state staysStartingwhile logs keep streaming. - Cancelling a download aborts at the next chunk boundary, not instantly.
- GPU telemetry reads device 0 only.
- The memory estimate treats compute buffers as a fixed 1 GiB and splits weights by layer
fraction when
-ngl < block_count; both are approximations, not measurements. It does not model--no-kv-offload, mmap, swap, or MoE compute buffers. - One server at a time, one download at a time.
