A deterministic quality eval as a run type next to BetterBench: tool calling (12 requests), coding (8 Python functions checked by unit tests in a locked-down sandbox container) and long-context retrieval (needle at 3 depths in 3 lengths up to the context). Versioned eval set in src/evals/v1, score stored per run, shown on the run page, in compare views, the benchmark list and sweep tables (optional eval per variant); API kind "eval", quality in run/sweep/compare answers; skill updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
716bd8f2f0
commit
6b67c653b5
33 files changed
+3822
-79
No files matched your search
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: kaname-tuning
|
||||
description: Deploy local LLMs on the user's Kaname server and benchmark them to find good launch options (context, KV cache type, batch sizes, GPU layers, runtime) for the hardware. Use when the user asks to deploy, test, benchmark, tune or compare a model's settings, or to find the fastest setup for a model.
|
||||
description: Deploy local LLMs on the user's Kaname server, benchmark their speed and check their answer quality to find good launch options (context, KV cache type, batch sizes, GPU layers, runtime) for the hardware. Use when the user asks to deploy, test, benchmark, tune or compare a model's settings, or to find the fastest setup for a model.
|
||||
required_environment_variables:
|
||||
- name: KANAME_URL
|
||||
prompt: Kaname base URL (no trailing slash)
|
||||
@@ -109,6 +109,17 @@ kaname -m 960 "$KANAME_URL/api/v1/benchmarks/<runId>?wait=900"
|
||||
temperature. `?full=1` only when you need the per-category details.
|
||||
- If the wait times out, the run is still going: one more call with `?wait=900`, then report.
|
||||
|
||||
Then check that the answers are still right (speed alone can hide a broken setup):
|
||||
|
||||
```bash
|
||||
kaname -X POST "$KANAME_URL/api/v1/benchmarks" -d '{"kind": "eval", "deploymentId": "<id>", "label": "Q4_K_M ctx16k q8_0 KV"}'
|
||||
kaname -m 960 "$KANAME_URL/api/v1/benchmarks/<runId>?wait=900"
|
||||
```
|
||||
|
||||
`quality.score` (0–100) and per section (`tools`, `coding`, `retrieval`). Add `?full=1` to see which
|
||||
items failed. A drop of more than a few points against the baseline means the change hurt quality,
|
||||
however fast it is.
|
||||
|
||||
## 5. Change one variable and compare
|
||||
|
||||
Stop, change one option, start, wait, benchmark again:
|
||||
@@ -120,12 +131,13 @@ kaname -X PATCH "$KANAME_URL/api/v1/deployments/<id>" -d '{"options": {"cacheTyp
|
||||
kaname -X POST "$KANAME_URL/api/v1/deployments/<id>/start"
|
||||
```
|
||||
|
||||
Or let Kaname do it: a **sweep** deploys each variant of one or two settings, benchmarks it and
|
||||
removes it again (stop your own deployment first; it counts as one run):
|
||||
Or let Kaname do it: a **sweep** deploys each variant of one or two settings, benchmarks it (with
|
||||
`"quality": true` also runs the quality eval) and removes it again (stop your own deployment first;
|
||||
it counts as one run):
|
||||
|
||||
```bash
|
||||
kaname -X POST "$KANAME_URL/api/v1/sweeps" -d '{
|
||||
"baseDeploymentId": "<id>", "quick": true,
|
||||
"baseDeploymentId": "<id>", "quick": true, "quality": true,
|
||||
"params": [{ "key": "kvCache", "values": ["f16", "q8_0", "q4_0"] }]
|
||||
}'
|
||||
kaname -m 960 "$KANAME_URL/api/v1/sweeps/<sweepId>?wait=900"
|
||||
@@ -150,12 +162,13 @@ an A/B (two deployments of the same model at once, if the user allows 2 agent de
|
||||
|
||||
Report a compact table, one row per setup, the varied option first:
|
||||
|
||||
| KV cache | Decode t/s | Prefill t/s | TTFT ms | VRAM peak | Notes |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| f16 | 58.1 | 1910 | 88 | 11.2 GB | baseline |
|
||||
| q8_0 | 57.6 | 1880 | 90 | 9.4 GB | −1 %, 1.8 GB less VRAM |
|
||||
| KV cache | Decode t/s | Prefill t/s | TTFT ms | Quality | VRAM peak | Notes |
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| f16 | 58.1 | 1910 | 88 | 86.1 | 11.2 GB | baseline |
|
||||
| q8_0 | 57.6 | 1880 | 90 | 86.1 | 9.4 GB | −1 % speed, same quality, 1.8 GB less VRAM |
|
||||
|
||||
Name the winner and why (and what stayed the same: GPU, engine version, quant, context). Then stop
|
||||
Name the winner and why: speed and quality together (and what stayed the same: GPU, engine version,
|
||||
quant, context). Then stop
|
||||
your deployment (or delete it if the user doesn't need it):
|
||||
|
||||
```bash
|
||||
|
||||
+24
-3
@@ -247,11 +247,12 @@ command and estimates. `start` goes through the same guardrails as creating one
|
||||
|
||||
| Field | |
|
||||
| --- | --- |
|
||||
| `kind` | `run` (default) or `ab` (paired A/B with `deploymentBId`, same model; needs 2 agent deployments) |
|
||||
| `kind` | `run` (default, BetterBench speed), `ab` (paired A/B with `deploymentBId`, same model; needs 2 agent deployments) or `eval` (the [quality eval](#quality-eval)) |
|
||||
| `deploymentId`, `deploymentBId` | Own, running deployments |
|
||||
| `quick` | `true`: 5 passes, a smoke check; default `false`: 20 passes, comparable |
|
||||
| `passes`, `phases` | Optional: passes per category; phases `decode`, `prefill`, `concurrency` (default all) |
|
||||
| `label`, `description` | Optional; the description goes into the report and the launch80 preview |
|
||||
| `sections` | `eval` only: `tools`, `coding`, `retrieval` (default all) |
|
||||
|
||||
Answers `201` with `state` `pending_approval` (default) or `queued`, and the run's time limit.
|
||||
|
||||
@@ -271,7 +272,10 @@ Answers `201` with `state` `pending_approval` (default) or `queued`, and the run
|
||||
```
|
||||
|
||||
`?full=1` adds BetterBench's complete summary (per category, per prompt depth, per concurrency
|
||||
level). A/B runs add `ab` (pairs, verdict, decode difference with its confidence interval).
|
||||
level). A/B runs add `ab` (pairs, verdict, decode difference with its confidence interval). Eval runs
|
||||
have `quality` instead of `headline`:
|
||||
`{"evalSet": "kaname-eval-1", "score": 83.3, "sections": {"tools": "11/12", "coding": "6/8", "retrieval": "8/9"}}`,
|
||||
and with `?full=1` the `failed` items with the reason.
|
||||
`POST /api/v1/benchmarks/{id}/cancel` cancels an own run.
|
||||
|
||||
#### `GET /api/v1/benchmarks/compare?ids=a,b,…`
|
||||
@@ -282,12 +286,29 @@ level). A/B runs add `ab` (pairs, verdict, decode difference with its confidence
|
||||
#### `POST /api/v1/sweeps`, `GET /api/v1/sweeps/{id}[?wait=S]`, `POST /api/v1/sweeps/{id}/cancel`
|
||||
|
||||
`benchmarks:run` / `benchmarks:read`. One or two settings varied from an own base deployment, e.g.
|
||||
`{"baseDeploymentId": "…", "params": [{"key": "kvCache", "values": ["f16", "q8_0"]}], "quick": true}`.
|
||||
`{"baseDeploymentId": "…", "params": [{"key": "kvCache", "values": ["f16", "q8_0"]}], "quick": true}`;
|
||||
`"quality": true` also runs the quality eval on each variant.
|
||||
Keys: `contextSize`, `modelFile`, `kvCache`, `threads`, `parallel`, `batchSize`, `ubatchSize`,
|
||||
`flashAttn`, `cacheRamMb`, `gpuLayers`, `dtype`, `maxNumSeqs`, `kvCacheGb`, `gpuMemoryUtilization`,
|
||||
`cpus` (per engine, as in the UI). Each variant is deployed, benchmarked and removed again. The
|
||||
answer lists every variant with its headline numbers and setup.
|
||||
|
||||
#### Quality eval
|
||||
|
||||
BetterBench measures speed only. `kind: "eval"` checks what a deployment answers, deterministically
|
||||
(greedy decoding, temperature 0, fixed seed, thinking turned off where the chat template supports
|
||||
it), so a quant, KV cache type or build that changes quality shows up next to the speed numbers:
|
||||
|
||||
| Section | Items | Passes when |
|
||||
| --- | --- | --- |
|
||||
| `tools` | 12 requests with 3 tools each | exactly one tool call, valid JSON arguments, the right function and the expected arguments |
|
||||
| `coding` | 8 short Python functions | the answer's code passes its unit tests, run in a throwaway container (no network, read-only, unprivileged) |
|
||||
| `retrieval` | a six-digit code hidden at 10 %, 50 % and 90 % depth in texts of 25 %, 50 % and 100 % of the context | the answer contains the code |
|
||||
|
||||
The score is the mean pass rate of the sections that could run (a server that refuses tool calls,
|
||||
e.g. vLLM without a tool-call parser, doesn't count as 0). The eval set is versioned (`evalSet`);
|
||||
only results of the same version compare.
|
||||
|
||||
## Waiting instead of polling
|
||||
|
||||
Every status call costs an agent a round of its context. The status endpoints (`/jobs/{id}`,
|
||||
|
||||
Reference in new issue
Block a user