Benchmarks page; Runtimes: GPUs, presets, API keys; Configuration: L80_TOKEN, speed limit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent
24e991dd32
commit
e6aff67fd6
5 files changed
+193
-7
No files matched your search
+120
@@ -0,0 +1,120 @@
|
||||
# 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.
|
||||
|
||||
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)
|
||||
- [The report](#the-report)
|
||||
- [Paired A/B](#paired-ab)
|
||||
- [Sweeps](#sweeps)
|
||||
- [Resource usage](#resource-usage)
|
||||
- [Comparing runs](#comparing-runs)
|
||||
- [Publishing to launch80](#publishing-to-launch80)
|
||||
- [Where results are stored](#where-results-are-stored)
|
||||
|
||||
## Single run
|
||||
|
||||
| Option | Meaning |
|
||||
| --- | --- |
|
||||
| **Quick** | 5 passes per prompt category: a smoke test. Its percentiles rest on few samples and the report says so. |
|
||||
| **Full** | 20 passes: what you want for numbers you compare or publish. |
|
||||
| **Custom** | Any number of passes. |
|
||||
| **Generation** | Single request, 8 prompt categories: decode t/s, inter-token latency, time to first token. |
|
||||
| **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.
|
||||
|
||||
## The report
|
||||
|
||||
Built after launch80's `bench.betterbench.v1` page:
|
||||
|
||||
- **Headline**: combined decode t/s (BetterBench's weighted score), inter-token latency (1 % low or
|
||||
stream-update p99), time to first token (p50).
|
||||
- **Read these first**: caveats in launch80's order: quick run, under-sampled percentiles (marked
|
||||
†), 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.
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
## 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** (NVIDIA): VRAM average and peak, utilization, power draw, per GPU, from `nvidia-smi`.
|
||||
These are whole-GPU figures, not per process.
|
||||
|
||||
## Comparing runs
|
||||
|
||||
Tick up to 16 runs in the Benchmarks list and choose **Compare**. Settings that differ are
|
||||
highlighted; numbers show the change against the first run. Differences under 2 % are usually noise:
|
||||
use an A/B for those.
|
||||
|
||||
## Publishing to launch80
|
||||
|
||||
You can publish a run as a public launch80 page (`bench.betterbench.v1`), with a double opt-in as
|
||||
the L80 docs require:
|
||||
|
||||
1. **Preview**: the L80 CLI builds the payload as a dry run; nothing leaves the server. You see
|
||||
exactly what would be published (endpoint and host name are stripped).
|
||||
2. **Publish**: only after you confirm the preview explicitly.
|
||||
|
||||
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
|
||||
runs can be published.
|
||||
|
||||
## Where results are stored
|
||||
|
||||
Results files and HTML reports go to `benchmarks/` next to the database (`/data/benchmarks` in the
|
||||
image); summaries are in the database. Deleting a run removes both.
|
||||
+20
@@ -11,6 +11,8 @@ 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)
|
||||
- [Benchmarks and launch80](#benchmarks-and-launch80)
|
||||
- [Advanced](#advanced)
|
||||
|
||||
## Login (OIDC)
|
||||
@@ -86,6 +88,10 @@ Notes:
|
||||
- Before a download starts, Kaname checks that enough space is free in the models folder.
|
||||
- If a download is interrupted, the `hf` CLI restarts unfinished files from the beginning (it can't
|
||||
resume partial files); finished files are kept.
|
||||
- **Speed limit**: set in the UI, not in `.env`: Settings → Downloads → Speed limit, in MB/s, for
|
||||
all downloads together; changes apply to running downloads within seconds. The `hf` CLI has no
|
||||
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)
|
||||
|
||||
@@ -100,6 +106,16 @@ to run Kaname as a pure downloader. See [[Runtimes]].
|
||||
| `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. |
|
||||
|
||||
## Benchmarks and launch80
|
||||
|
||||
See [[Benchmarks]]. BetterBench and the L80 CLI are part of the image; only publishing needs a
|
||||
setting.
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --- | --- | --- |
|
||||
| `L80_TOKEN` | | launch80 publish token (comes with the launch80 Supporter role). Lets you publish a benchmark run as a public launch80 page, after a preview and an explicit confirmation. Unset: publishing is off, previews still work. The token stays on the server: it is passed to the L80 CLI through its environment, never shown in the UI or written to logs. |
|
||||
| `L80_API_BASE` | launch80's default | Alternative launch80 API URL; you normally don't set this. |
|
||||
|
||||
## Advanced
|
||||
|
||||
You normally don't set these: the image's defaults match the paths in `compose.yaml`.
|
||||
@@ -112,6 +128,8 @@ You normally don't set these: the image's defaults match the paths in `compose.y
|
||||
| `HF_ENDPOINT` | `https://huggingface.co` | Alternative Hub endpoint (e.g. a mirror); passed to the `hf` CLI. Metadata lookups still use huggingface.co. |
|
||||
| `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` | | Proxy settings, passed to the `hf` CLI. |
|
||||
| `PORT` | `3000` | Port the web server listens on inside the container. |
|
||||
| `BENCHMARKS_DIR` | `/data/benchmarks` | BetterBench results and HTML reports (default: `benchmarks/` next to the database). |
|
||||
| `BETTERBENCH_BIN`, `L80_BIN` | set in the image | Paths of the bundled `betterbench` and `L80` executables. |
|
||||
|
||||
## Example
|
||||
|
||||
@@ -131,4 +149,6 @@ WEB_PORT=3000
|
||||
KANAME_VERSION=0.4.0
|
||||
|
||||
MAX_CONCURRENT_DOWNLOADS=2
|
||||
|
||||
L80_TOKEN=…
|
||||
```
|
||||
+5
-1
@@ -1,9 +1,13 @@
|
||||
# Kaname wiki
|
||||
|
||||
Kaname is a self-hosted web app for downloading and managing local LLMs from Hugging Face.
|
||||
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.
|
||||
Installation is described in the [README](https://git.linxweiler.xyz/pascallinxweiler/Kaname).
|
||||
|
||||
## Pages
|
||||
|
||||
- [[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
|
||||
+47
-6
@@ -1,8 +1,15 @@
|
||||
# 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; starting them with a model and
|
||||
testing configs is the next step (in development).
|
||||
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
|
||||
|
||||
@@ -11,30 +18,64 @@ and sets `DOCKER_HOST=tcp://docker-proxy:2375` for the worker. The proxy holds t
|
||||
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, the network model containers join, and where the models come from on the
|
||||
Docker host (both detected from the worker's own container).
|
||||
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
|
||||
|
||||
Two presets are created on first start:
|
||||
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**: GPU device nodes to pass through, limited to `/dev/dri…` and `/dev/kfd`.
|
||||
- **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.
|
||||
|
||||
## 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,
|
||||
|
||||
+1
@@ -2,5 +2,6 @@
|
||||
- [[Configuration]]
|
||||
- [[Importing existing models]]
|
||||
- [[Runtimes]]
|
||||
- [[Benchmarks]]
|
||||
- [[Storing models on a NAS]]
|
||||
- [README / Install](https://git.linxweiler.xyz/pascallinxweiler/Kaname)
|
||||
Reference in new issue
Block a user