0.15.0: endpoints instead of deployments; drop Runtimes and Intel GPUs pages

Pascal Linxweiler committed 2026-10-26 21:43:53 +01:00
1 parent 2aaeb94d3c
commit 579f8f5011
6 files changed
+77 -254

No files matched your search

+67 -84
@@ -1,24 +1,44 @@
# Benchmarks
Kaname measures deployments with [BetterBench](https://github.com/GGZ14/BetterBench) (Apache-2.0),
the benchmark behind [launch80.com](https://www.launch80.com), and presents the results the way
launch80 does. BetterBench and the [L80 CLI](https://github.com/launch80/L80-Skills) are built into
the image (pinned versions, checked by checksum); nothing to install.
Kaname measures **endpoints**, OpenAI-compatible servers you run yourself (llama.cpp, vLLM, SGLang,
Ollama, …), with [BetterBench](https://github.com/GGZ14/BetterBench) (Apache-2.0), the benchmark
behind [launch80.com](https://www.launch80.com), and presents the results the way launch80 does.
BetterBench and the [L80 CLI](https://github.com/launch80/L80-Skills) are built into the image
(pinned versions, checked by checksum); nothing to install. Kaname doesn't start or manage the
servers: it only sends them requests.
Start everything from a deployment's **Benchmark** card (the deployment must be running for a run
or an A/B). All runs are listed under **Benchmarks** in the main menu. Runs go one at a time; avoid
other load on the server while one runs.
- [Single run](#single-run)
- [Endpoints](#endpoints)
- [Speed run](#speed-run)
- [The report](#the-report)
- [Paired A/B](#paired-ab)
- [Sweeps](#sweeps)
- [Resource usage](#resource-usage)
- [Quality eval](#quality-eval)
- [What a run records](#what-a-run-records)
- [Comparing runs](#comparing-runs)
- [Publishing to launch80](#publishing-to-launch80)
- [Where results are stored](#where-results-are-stored)
## Single run
## Endpoints
Add one under **Endpoints → Add endpoint**:
| Field | Meaning |
| --- | --- |
| **URL** | The server's root, e.g. `http://192.168.1.20:8080` (Kaname adds `/v1`). It must be reachable from Kaname's worker container. |
| **API key** | Optional; sent as `Authorization: Bearer …`. It stays on the server: never shown again, written to logs or put into a run, and passed to BetterBench only through its environment. |
| **Engine** | Detected (llama.cpp via `/props`, vLLM via `/version` and `/v1/models`, SGLang via `/get_server_info`, Ollama via `/api/version`), or set by hand. |
| **Model** | The model name to request. Empty: the only one the server lists. A run can pick another one the server serves. |
| **Hardware notes** | What runs behind the endpoint: GPUs (name, count, VRAM, PCIe link, P2P, ReBAR, driver), the machine (CPU, RAM, OS, VM or bare metal), the server (engine name and version if you want to override the detected ones, container image, quant, KV cache type, context, parallel slots) and free notes such as launch flags. |
Kaname can't see the machine behind an endpoint, so the hardware notes are what makes runs
comparable: they are copied into every run. Fill in at least the GPU and the KV cache type.
**Test connection** asks the server for its models and, where it tells, its engine, version,
context and slots. Kaname asks again before queuing a run (a server that doesn't answer fails right
away) and when the run starts, and records what it reported then.
## Speed run
Start it on the endpoint's page, **Benchmark → Speed**:
| Option | Meaning |
| --- | --- |
@@ -29,11 +49,9 @@ other load on the server while one runs.
| **Prompt processing** | Growing input lengths up to the context size: prefill t/s per depth. |
| **Parallel requests** | 1, 2, 4 and 8 requests at once: aggregate throughput. |
On a CPU a full run can take hours. The run page shows the current step and BetterBench's live
output; **Cancel** stops it, **Run again** repeats it with the same settings.
Each run keeps a snapshot of the deployment as it was (runtime, image, launch options, CPU/GPU and
host), so results stay comparable after you change the deployment.
Runs go one at a time. Keep other load off the server while one runs; on a CPU a full run can take
hours. The run page shows the current step and BetterBench's live output; **Cancel** stops it,
**Run again** repeats it with the same settings against the same endpoint.
## The report
@@ -45,7 +63,7 @@ Built after launch80's `bench.betterbench.v1` page:
†), responses cut off at max_tokens, batched streams, failed requests, skipped prefill depths,
prefix-cache hits.
- Charts and full tables for decode per category, latency ranges, prefill per depth and parallel
load, the reasoning/answer split, resource usage and a Method section.
load, the reasoning/answer split and a Method section.
Every figure comes from BetterBench's own report code; Kaname never computes, averages or invents
numbers of its own. BetterBench's original HTML report and `results.json` (with the endpoint URL and
@@ -53,89 +71,54 @@ host name removed) are available on the run page.
## Paired A/B
The most precise way to answer "is B faster than A?", e.g. q8_0 vs f16 KV cache, 4 vs 8 threads.
The most precise way to answer "is B faster than A?", e.g. q8_0 vs f16 KV cache, two engine builds,
two GPUs.
1. Create a second deployment of the **same model** with the one setting you want to test.
2. Start both. They must fit in memory together.
3. On A's Benchmark card choose **A/B**, pick B, start.
1. Add both servers as endpoints. They must serve the **same model name** (BetterBench sends one
name to both), e.g. with llama.cpp's `--alias`.
2. On A's page choose **Benchmark → A/B**, pick B, start.
BetterBench sends the same prompts to both, alternating, with greedy decoding, and stops once the
difference is known to ±the **target precision** (default 1 %) or after **max pairs** (default 200,
at least 12). The report shows the verdict (B faster / slower / no measurable difference), the
confidence interval, both sides, what differs between the two deployments, and the caveats.
## Sweeps
A sweep tries several values of one or two settings and compares them, e.g. context size × KV cache
type. Open it from the Benchmark card (**Sweep → Set up a sweep**); the base deployment doesn't need
to run.
Settings you can vary:
| Engine | Settings |
| --- | --- |
| llama.cpp | context size, model file (quant), KV cache type, threads, parallel slots, batch size, micro-batch size, flash attention, prompt cache size, GPU layers (GPU runtimes) |
| vLLM | context size, dtype, max sequences, KV cache size (CPU), GPU memory share (GPU) |
| both | CPU limit |
Values are comma-separated (`4096, 8192, 16384`); for the model file you tick the downloaded quants.
Every combination becomes a variant, up to 16. Kaname deploys each variant as a temporary
deployment (memory limit: the base's, raised where a variant needs more), benchmarks it, removes it
again and moves on. The sweep page shows progress, then a chart and a table of all variants with the
best value per column in bold, and **Compare in detail** for the full comparison.
confidence interval, both sides, what differs between the two endpoints, and the caveats. Each side
can have its own API key.
## Quality eval
BetterBench measures speed. The **Quality** tab on a deployment's Benchmark card runs Kaname's own
short, deterministic check of the answers (greedy decoding, fixed seed, thinking off):
BetterBench measures speed. **Benchmark → Quality** runs Kaname's own short, deterministic check of
the answers (greedy decoding, fixed seed, thinking off):
- **Tool calling**: 12 requests; one tool call with valid JSON, the right function and arguments.
- **Coding**: 8 short Python functions, checked by unit tests in a throwaway container (Kaname's own
image, no network, read-only, unprivileged).
- **Coding**: 8 short Python functions, checked by unit tests in the **sandbox** container (no
network, read-only, no capabilities, memory/CPU/process limits, only an exchange folder shared
with the worker). Without the sandbox service the section is skipped.
- **Long-context retrieval**: a code hidden at 10/50/90 % depth in texts of 25/50/100 % of the
context.
context (per request: llama.cpp splits its context across its slots).
The score (0–100) is the mean pass rate of the sections that could run. It shows on the run page
(with every item and why it failed), in compare views and, with "Also run the quality eval", as a
column in sweeps. The eval set is versioned (`kaname-eval-1`); only results of the same version
The score (0–100) is the mean pass rate of the sections that could run (a server that refuses tool
calls doesn't count as 0). It shows on the run page (with every item and why it failed) and in
compare views. The eval set is versioned (`kaname-eval-1`); only results of the same version
compare.
## Agents
With the deployments and benchmarks scopes, an API token can deploy models, run benchmarks, quality
evals and sweeps on its own deployments, within the guardrails in Settings → API tokens; by default
each start, run and sweep waits for your approval on its page. See `docs/api.md` and
`docs/agent/SKILL-tuning.md` in the repository.
## Resource usage
Every run (single, A/B, sweep variant) records, every 2 seconds:
- **CPU**: cores used, average and peak, per container.
- **RAM**: average and peak, against the container's memory limit.
- **GPU**: VRAM average and peak, utilization, power draw and temperature, per GPU. NVIDIA from
`nvidia-smi`; AMD from sysfs; Intel power/temperature from hwmon and VRAM/utilization from the
processes' DRM fdinfo (see [[Intel GPUs]]). These are whole-GPU figures, not per process.
- **PCIe link**: the fastest link seen during the run (GPUs slow their link down when idle).
## What a run records
When a run starts (single, A/B, every sweep variant), Kaname records what it measures:
When a run starts, Kaname records what it measures:
- **GPUs**: count, name, VRAM; PCIe link, current (under load) and maximum, e.g. "Gen4 x8 of Gen5
x16", at the card's upstream port; peer-to-peer between GPUs ("n/a" with one); Resizable BAR.
- **Runtime**: image, tag and registry digest; the engine version the server reports (llama.cpp
build, vLLM version) and, for forks, the runtime's engine name.
- **Model**: quant and KV cache type, context length and concurrency (llama.cpp slots, vLLM max
sequences).
- **System summary**: CPU, RAM, the disk holding the models, OS and kernel, GPU driver, VM or bare
metal with GPU passthrough, Kaname version. Never the hostname, IP addresses, users or paths.
- A **description** you write (when starting the run or later on its page).
- **GPUs**: count, name, VRAM, PCIe link, P2P, ReBAR (from the hardware notes).
- **Engine**: name and version (detected, or from the notes), container image if noted.
- **Model**: the name requested, quant (from the notes or the model name) and KV cache type,
context length and parallel slots.
- **System summary**: CPU, RAM, OS, GPU driver, VM or bare metal, Kaname version. Never host names,
IP addresses, users, paths, the endpoint's URL or its name in Kaname.
- A **description**: the endpoint's notes, or what you write when starting the run (also editable
later on its page).
All of it is on the run page, in compare views and in sweep tables (shared values above, differing
ones as columns). It goes to BetterBench as `--note`s (in `results.json` and its report) and into the
launch80 preview as page sections. What detection can't see (a VM's PCIe link, a GPU missing from
the PCI ID list) can be entered in **Settings → Hardware**.
All of it is on the run page and in compare views. It goes to BetterBench as `--note`s (in
`results.json` and its report) and into the launch80 preview as page sections.
Runs from before Kaname 0.15 measured deployments Kaname ran itself; they stay readable with what
they recorded then, but can't be run again.
## Comparing runs
@@ -155,7 +138,7 @@ the L80 docs require:
launch80 pages are **public**, can't be edited, are kept for 5 days, and an account can publish 10
per day. Publishing needs a launch80 token (Supporter role) in `L80_TOKEN`, see
[[Configuration]]. The token stays on the server: it is passed to the L80 CLI through its
environment only for the publish step and is never shown in the UI or written to logs. Only single
environment only for the publish step and is never shown in the UI or written to logs. Only speed
runs can be published.
## Where results are stored
+7 -9
@@ -11,7 +11,7 @@ After changing `.env`, apply it with `docker compose up -d` (the containers are
- [Hugging Face](#hugging-face)
- [Folders and ports (Docker host)](#folders-and-ports-docker-host)
- [Downloads](#downloads)
- [Runtimes (Docker)](#runtimes-docker)
- [Code sandbox](#code-sandbox)
- [Benchmarks and launch80](#benchmarks-and-launch80)
- [Advanced](#advanced)
@@ -93,18 +93,16 @@ Notes:
bandwidth option, so the worker pauses and resumes it whenever it gets ahead of the limit: short
bursts go above it, the average holds.
## Runtimes (Docker)
## Code sandbox
Runtimes let Kaname start llama.cpp / vLLM containers (Settings → Runtimes). The worker talks to
Docker through the `docker-proxy` service in `compose.yaml`, which only exposes the parts of the
Docker API Kaname needs (containers, images, networks, info). Remove that service and `DOCKER_HOST`
to run Kaname as a pure downloader. See [[Runtimes]].
The `sandbox` service in `compose.yaml` runs the quality eval's coding answers: no network, a
read-only filesystem, no capabilities, memory/CPU/process limits. It shares only the `sandbox`
volume with the worker. Remove the service (and the volume on the worker) and the eval skips its
coding section. Kaname needs no access to Docker.
| Variable | Default | Description |
| --- | --- | --- |
| `DOCKER_HOST` | set in `compose.yaml`: `tcp://docker-proxy:2375` | Docker API the worker uses (`tcp://…` or `unix:///var/run/docker.sock`). Unset: runtimes are disabled. |
| `KANAME_DOCKER_NETWORK` | auto-detected | Docker network the model containers join so the worker can reach them. Detected from the worker's own container; only needed if the worker doesn't run in Docker. |
| `KANAME_MODELS_SOURCE` | auto-detected | Where the models live on the Docker host: a host path (`/mnt/nas/models`) or a volume name. Mounted read-only into model containers. Detected from the worker's `/models` mount; only needed if the worker doesn't run in Docker. |
| `SANDBOX_DIR` | set in `compose.yaml`: `/sandbox` | Exchange folder with the sandbox, on the worker and the sandbox. Unset on the worker: the coding section is skipped. |
## Benchmarks and launch80
+3 -4
@@ -1,7 +1,7 @@
# Kaname wiki
Kaname is a self-hosted web app for downloading local LLMs from Hugging Face, serving them with
llama.cpp or vLLM containers, and benchmarking them.
Kaname is a self-hosted web app for downloading local LLMs from Hugging Face and benchmarking the
servers that run them (any OpenAI-compatible endpoint).
Installation is described in the [README](https://git.linxweiler.xyz/pascallinxweiler/Kaname).
## Pages
@@ -9,5 +9,4 @@ Installation is described in the [README](https://git.linxweiler.xyz/pascallinxw
- [[Configuration]]: every setting in `.env`, with defaults and examples
- [[Storing models on a NAS]]: keep models on an NFS share (e.g. TrueNAS)
- [[Importing existing models]]: take over models that are already on disk
- [[Runtimes]]: llama.cpp / vLLM images, GPUs (NVIDIA, Intel, AMD), API keys
- [[Benchmarks]]: BetterBench runs, paired A/B, sweeps, resource usage, publishing to launch80
- [[Benchmarks]]: endpoints, BetterBench runs, paired A/B, the quality eval, publishing to launch80
-71
@@ -1,71 +0,0 @@
# Intel GPUs
Kaname runs models on Intel Arc GPUs (A-series, B-series, Arc Pro) with llama.cpp (SYCL or Vulkan)
and vLLM (XPU). The GPU is passed into the model containers as `/dev/dri`; all GPU libraries (oneAPI /
Level Zero, Vulkan) come with the runtime images. The host only needs the kernel driver.
## Host prerequisites
On the Docker host (or the VM that has the GPU):
- **Kernel driver**: `xe` for Battlemage (B-series, Arc Pro B60/B65), `i915` or `xe` for Alchemist.
New cards need a recent kernel; if the GPU has no driver (`lspci -k` shows none) or `/dev/dri` is
missing, update the kernel.
- **Firmware**: the distribution's `linux-firmware` package must include the GuC/HuC files for the
card (the `xe` driver doesn't bind without them; `dmesg | grep -i xe` tells).
- **`/dev/dri`** exists with `card*` and `renderD*` nodes. Nothing else is needed for Docker: no
Intel container toolkit, no compute runtime on the host.
- **Groups**: you don't have to add anyone to `render`/`video`. Kaname reads the group IDs of the
device nodes and adds them to the model containers, so images that don't run as root can open the
GPU too.
### In a Proxmox VM
- Enable IOMMU on the host (`intel_iommu=on` or AMD's equivalent, `iommu=pt`) and pass the GPU
through as a PCIe device (machine type q35, "PCI-Express" ticked, all functions).
- **Resizable BAR**: enable "Above 4G decoding" and "Resizable BAR" in the host's firmware. Whether
the VM sees the full BAR depends on the host kernel and QEMU; check inside the VM in Settings →
Hardware ("Largest BAR" should be about the VRAM size) or with `sudo lspci -vvv`.
- **PCIe link**: inside a VM, the link speed and width are what the VM's virtual PCIe port reports,
not necessarily the physical slot. Enter the real values in Settings → Hardware if they differ;
benchmark runs record those.
### Check the host
`scripts/intel-probe.sh` (in the repository) prints, read-only, what Kaname can use on this host:
the GPU and its driver, the PCIe link per level, BAR sizes, hwmon sensors, the `/dev/dri` groups and
whether per-process GPU stats (DRM fdinfo) are readable.
```bash
bash scripts/intel-probe.sh
sudo bash scripts/intel-probe.sh # adds lspci's link and Resizable BAR details
```
## Runtimes
Settings → Runtimes has presets for Intel; the llama.cpp ones are added automatically the first time
an Intel GPU is detected (pull the image before deploying):
| Preset | Image | Notes |
| --- | --- | --- |
| llama.cpp (Intel SYCL) | `ghcr.io/ggml-org/llama.cpp:server-intel` | oneAPI/SYCL. `ZES_ENABLE_SYSMAN=1` is set so llama.cpp sees free VRAM (`-ngl auto` needs it). |
| llama.cpp (Vulkan) | `ghcr.io/ggml-org/llama.cpp:server-vulkan` | Often close to SYCL; worth comparing with an A/B. |
| vLLM (Intel XPU) | `vllm/vllm-openai-xpu:v0.31.0` | Safetensors models. Reserves `--gpu-memory-utilization` (0.9) of the VRAM up front; 8 GiB shared memory. |
The deployment form shows the GPU and a rough **VRAM estimate** (weights + KV cache + compute buffers
for llama.cpp with all layers on the GPU; the reserved share for vLLM) against the card's VRAM.
## Telemetry during benchmarks
The Intel driver has no whole-GPU "VRAM used" or "utilization" file; both are reported per process
(DRM fdinfo, as `intel_gpu_top` and `nvtop` read them). During a benchmark Kaname reads:
- **Power and temperature** from the GPU's hwmon sensors in sysfs (no privileges needed).
- **VRAM in use and utilization** by summing every process's DRM fdinfo, through a small probe
container started from Kaname's own image for the duration of the run. To read other containers'
`/proc/<pid>/fdinfo` it runs in the host's PID namespace with two capabilities
(`SYS_PTRACE`, `DAC_READ_SEARCH`), everything else dropped, no network, read-only filesystem,
`no-new-privileges`. It only reads and prints those files; it is removed when the run ends.
Utilization is the busiest engine (render or compute) over each 2-second interval, like
`intel_gpu_top`'s headline. If the probe can't run, power and temperature are still recorded.
-84
@@ -1,84 +0,0 @@
# Runtimes
A runtime is a container image that serves models: llama.cpp, vLLM, or your own forks (e.g. a vLLM
build patched for Intel Arc). Kaname registers and pulls them in Settings → Runtimes; a
**deployment** then starts a runtime with a downloaded model and its launch options (Deployments in
the main menu), and [[Benchmarks]] measure it.
- [Setup](#setup)
- [Runtimes](#runtimes-1)
- [GPUs](#gpus)
- [API keys](#api-keys)
- [Limits](#limits)
## Setup
`compose.yaml` contains a `docker-proxy` service ([tecnativa/docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy))
and sets `DOCKER_HOST=tcp://docker-proxy:2375` for the worker. The proxy holds the Docker socket and
only lets through containers, images, networks and info requests. It isn't published on a port.
Settings → Runtimes shows what the worker sees: Docker version, CPU model and features (AVX2,
AVX-512, AMX, …), memory, NVIDIA GPUs, the network model containers join, and where the models come
from on the Docker host (both detected from the worker's own container).
## Runtimes
The CPU presets are created on first start:
| Preset | Image | Serves |
| --- | --- | --- |
| llama.cpp (CPU) | `ghcr.io/ggml-org/llama.cpp:server` | GGUF models. Pin a build like `server-b11429` for reproducible tests. |
| vLLM (CPU) | `vllm/vllm-openai-cpu:v0.31.0` | safetensors models. BF16 is recommended on AMD Zen; `VLLM_CPU_KVCACHE_SPACE` is the KV cache size in GiB. AVX-512 recommended, AVX2 minimum. |
More presets are under **Add runtime → From a preset**:
| Preset | Image | Hardware |
| --- | --- | --- |
| llama.cpp (CUDA) | `ghcr.io/ggml-org/llama.cpp:server-cuda` | NVIDIA. Added automatically the first time Kaname sees an NVIDIA GPU. |
| vLLM (CUDA) | `vllm/vllm-openai:v0.31.0` | NVIDIA (large download) |
| llama.cpp (Vulkan) | `ghcr.io/ggml-org/llama.cpp:server-vulkan` | Intel / AMD via `/dev/dri` |
| llama.cpp (Intel SYCL) | `ghcr.io/ggml-org/llama.cpp:server-intel` | Intel via `/dev/dri` |
| llama.cpp (ROCm) | `ghcr.io/ggml-org/llama.cpp:server-rocm` | AMD via `/dev/kfd` + `/dev/dri` |
| vLLM (Intel XPU) | `vllm/vllm-openai-xpu:v0.31.0` | Intel via `/dev/dri` |
| vLLM (ROCm) | `vllm/vllm-openai-rocm:v0.31.0` | AMD via `/dev/kfd` + `/dev/dri` |
Add your own with **Add runtime → Custom image**: any image from any registry (including your own
Gitea registry). Fields:
- **Engine type**: *llama.cpp-compatible* or *vLLM-compatible*. Decides how Kaname builds the command
line and talks to the server; forks with the same CLI use the same type.
- **Hardware**: CPU, NVIDIA (CUDA), Intel / AMD via `/dev/dri`, or AMD ROCm. Decides which GPU
options deployments get and which devices are passed through.
- **Environment**, **Extra arguments** (appended to the generated command), **Shared memory**.
- **Devices**: further device nodes to pass through, limited to `/dev/dri…` and `/dev/kfd`.
- **NUMA tuning**: adds `CAP_SYS_NICE` and `seccomp=unconfined`, as vLLM recommends for its CPU
build. Off by default because it relaxes the container's isolation.
**Pull** downloads the image (with progress); **Update** pulls a moving tag like `:server` again.
## GPUs
**NVIDIA**: install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
on the Docker host and restart Docker. Kaname itself doesn't need the GPU: the worker asks Docker for
GPUs when it starts a model container (like `docker run --gpus`), and lists the host's GPUs (name,
VRAM, driver) by running `nvidia-smi` in a short-lived container. Nothing changes in `compose.yaml`.
A deployment with an NVIDIA runtime picks **which GPUs** to use (all or specific ones) and gets the
GPU launch options: llama.cpp GPU layers (`-ngl`), split mode and tensor split across several GPUs,
MoE experts on the CPU; vLLM tensor parallelism and GPU memory share.
**Intel / AMD**: the runtime's hardware setting passes `/dev/dri` (and `/dev/kfd` for ROCm) through;
the device nodes must exist on the Docker host. Kaname adds the device nodes' group IDs (render,
video) to the container. Intel setup, presets and telemetry: [[Intel GPUs]].
## API keys
Settings → API keys holds keys that deployments can require (llama.cpp `LLAMA_API_KEY`, vLLM
`VLLM_API_KEY` / `--api-key`). They are passed through the container's environment and hidden in
the command shown in the UI and in logs. A key can be shown again later in Settings.
## Limits
Kaname only starts images registered as runtimes, never in privileged mode or with the host network,
and always mounts the models read-only. Kaname uses prebuilt images; build forks elsewhere (e.g. a
CI pipeline) and push them to a registry.
-2
@@ -1,8 +1,6 @@
- [[Home]]
- [[Configuration]]
- [[Importing existing models]]
- [[Runtimes]]
- [[Intel GPUs]]
- [[Benchmarks]]
- [[Storing models on a NAS]]
- [README / Install](https://git.linxweiler.xyz/pascallinxweiler/Kaname)