# Kintsugi-27B at 2.47 bpw with a 262k window

Qwen3.8-27B as EXL3 trellis codes in one 10.5 GB GGUF, on the author's llama.cpp fork. With the DFlash2 drafter it decodes at 39 tok/s on chat and 60 on code, against 16 without.

- Recipe id: `kintsugi-27b`  ·  status: measured  ·  updated 2026-11-22
- Model: [Kintsugi-27B](https://huggingface.co/CaryPalmer/Kintsugi-27B) (27B dense (Qwen3.8-27B))
- Weights: GGUF (EXL3 trellis) EXL3 trellis 2.47 bpw, 10.5 GB, from https://huggingface.co/CaryPalmer/Kintsugi-27B, file `Kintsugi-27B-12G.gguf`
- Engine: [Kintsugi llama.cpp fork](https://github.com/professorpalmer/Kintsugi-27B) Linux bundle v1.1.1; CUDA 12.8 runtime
- Hardware: NVIDIA GeForce RTX 3060 12 GB, 62 GB RAM, Intel Core i5-12500, NVMe SSD
- Context: 262,144 tokens
- Placement: Weights (10.5 GB) and drafter in VRAM. Tiered K/V cache: 7,168 cells in VRAM with the drafter on (61,952 without), the rest of the window in RAM.
- Contributor: [David Hatley](https://github.com/davidghatley)

## Run it

From `kintsugi-27b/` in a clone of https://github.com/davidghatley/3060-recipes:

```sh
./serve.sh
```

API: OpenAI chat and responses at /v1, Anthropic at /v1/messages on port 8080

Key flags: `launcher defaults: q4_0 K/V, 262,144 window, thinking medium`, `KINTSUGI_DRAFT=off to disable the drafter`, `KINTSUGI_CTX, KINTSUGI_KV, KINTSUGI_THINK pass through`

The script itself (`kintsugi-27b/serve.sh`, machine paths shown as `$MODELS`, `$SCRATCH`, `~`; set them to where your weights and builds live):

```sh
#!/usr/bin/env bash
# Kintsugi-27B (Qwen3.8-27B, EXL3 trellis 2.47 bpw GGUF) on the author's llama.cpp fork bundle v1.1.1.
# Clients: http://127.0.0.1:8080/v1 (OpenAI), /v1/messages (Anthropic). Engine on 127.0.0.1:18080 behind the layer.
# The bundle's start-server.sh detaches the engine and returns, which would drop the shared GPU lock. This wrapper holds
# the lock (via gpu_run) until the engine exits. Stop with ./stop.sh (or Ctrl-C here), then the lock is released.
#   ./serve.sh                   foreground, holds the GPU lock while serving
#   ./serve.sh --dry-run         print the engine command line only
# Settings: any KINTSUGI_* variable from the bundle's start-server.sh (KINTSUGI_DRAFT=off, KINTSUGI_CTX=65536, ...).
set -euo pipefail
W=$MODELS/kintsugi-27b
B=${KINTSUGI_BUNDLE:-$W/bundle/Kintsugi-27B}
export KINTSUGI_MODEL=${KINTSUGI_MODEL:-$W/Kintsugi-27B-12G.gguf}
export KINTSUGI_DRAFTER=${KINTSUGI_DRAFTER:-$W/dflash-Qwen3.8-27B-Q4_0.gguf}
export KINTSUGI_SLOT_SAVE_PATH=${KINTSUGI_SLOT_SAVE_PATH:-$W/slots}
export KINTSUGI_HOST=127.0.0.1
if [ "${1:-}" = --dry-run ]; then exec "$B/start-server.sh" --dry-run; fi
# The tiered K/V cache keeps ~90k tokens (with the drafter) in VRAM and the rest of the 262k window in RAM.
# memcap counts page cache, so 20G would bind on long chats (3060-recipes AGENTS.md traps).
export GPU_RUN_MEM=${GPU_RUN_MEM:-40G}
exec "$HOME/anime-pipeline/tools/gpu_run" --free --need 11000 --wait "${KINTSUGI_GPU_WAIT:-600}" bash -c '
  B="$1"
  trap "\"$B/stop.sh\"" INT TERM
  "$B/start-server.sh" --wait || { "$B/stop.sh"; exit 1; }
  SP=$(cat "$B/logs/server-8080.pid")
  echo "serving; ./stop.sh (or Ctrl-C) to stop and free the GPU"
  while kill -0 "$SP" 2>/dev/null; do sleep 5 & wait $!; done
  echo "engine exited"' _ "$B"
```

## Measured results

| Metric | Conditions | Value | Stock | Ceiling | Source |
|---|---|---|---|---|---|
| decode | chat, drafter on | 39.4 tok/s | 16.2 | 33 | [kintsugi-27b/RESULTS.md:19](https://github.com/davidghatley/3060-recipes/blob/main/kintsugi-27b/RESULTS.md#L19) |
| decode | code, drafter on | 60.2 tok/s | 16.1 |  | [kintsugi-27b/RESULTS.md:20](https://github.com/davidghatley/3060-recipes/blob/main/kintsugi-27b/RESULTS.md#L20) |
| decode | after a 4k prompt, drafter on | 35.1 tok/s | 16.0 |  | [kintsugi-27b/RESULTS.md:21](https://github.com/davidghatley/3060-recipes/blob/main/kintsugi-27b/RESULTS.md#L21) |
| decode | after a 26k prompt, drafter on | 34.2 tok/s | 15.2 |  | [kintsugi-27b/RESULTS.md:23](https://github.com/davidghatley/3060-recipes/blob/main/kintsugi-27b/RESULTS.md#L23) |
| prefill | 6k prompt, drafter on | 628 tok/s |  |  | [kintsugi-27b/RESULTS.md:22](https://github.com/davidghatley/3060-recipes/blob/main/kintsugi-27b/RESULTS.md#L22) |
| prefill | 26k prompt, drafter on | 591 tok/s |  |  | [kintsugi-27b/RESULTS.md:23](https://github.com/davidghatley/3060-recipes/blob/main/kintsugi-27b/RESULTS.md#L23) |
| vram_peak | after warm-up, drafter on (10,858 without) | 11182 MiB |  |  | [kintsugi-27b/RESULTS.md:25](https://github.com/davidghatley/3060-recipes/blob/main/kintsugi-27b/RESULTS.md#L25) |
| other | K/V cells kept in VRAM, drafter on (61,952 without) | 7168 cells |  |  | [kintsugi-27b/RESULTS.md:24](https://github.com/davidghatley/3060-recipes/blob/main/kintsugi-27b/RESULTS.md#L24) |

## Caveats

- The baseline here is the same engine with the drafter off, not stock llama.cpp. The 33 tok/s ceiling is for undrafted decode (10.5 GB per token at 342 GB/s).
- Not measured past 26k tokens of context, where most of the K/V cache is read from RAM.
- Answer quality was not measured here; the card's HumanEval and AppWorld numbers are the author's.
- The bundle's launcher detaches, so serve.sh waits on the engine to keep a GPU queue lock held.

## Findings from this recipe

- [The desktop session holds about 0.95 GB of the card and that decides several fits](https://davidghatley.github.io/3060-recipes/findings/desktop-holds-a-gigabyte-of-vram.md)
- [On Kintsugi the drafter is worth more VRAM than keeping the K/V cache on the card](https://davidghatley.github.io/3060-recipes/findings/dflash2-drafter-beats-kv-in-vram.md)

## Credits

- Cary Palmer: Model, drafter and engine for the Kintsugi recipe, used as shipped in bundle v1.1.1. (https://huggingface.co/CaryPalmer/Kintsugi-27B)
- Qwen: The 15 mtp.* tensors grafted back into the 3D coder came from Qwen3.5-4B; Kintsugi-27B is built on Qwen3.8-27B. (https://huggingface.co/Qwen/Qwen3.5-4B)
- llama.cpp (ggml-org and contributors): The engine for Flint, the 3D coder and Inkling-2-Mini, and the base of the Kintsugi fork. (https://github.com/ggml-org/llama.cpp)
- Hugging Face: Every model, quant and drafter in these recipes is fetched from the Hub at a pinned revision and checked against the API's sha256; the base model's MTP tensors were fetched with HTTP range requests. (https://huggingface.co)
- NVIDIA: Every recipe runs on CUDA on this card; cuBLAS SGEMV is our VRAM bandwidth probe (342 GB/s), nvidia-smi dmon is the telemetry, and Inkling's experts ship in NVFP4. (https://www.nvidia.com/en-us/geforce/graphics-cards/30-series/rtx-3060-3060ti/)

## Reproductions

None yet. Ran it on your own 3060? Report your numbers: https://github.com/davidghatley/3060-recipes/issues/new?template=reproduction.yml

## Machine-readable

- https://davidghatley.github.io/3060-recipes/recipes/kintsugi-27b/recipe.json
- Folder with scripts and raw runs: https://github.com/davidghatley/3060-recipes/tree/main/kintsugi-27b
- Full results log: https://raw.githubusercontent.com/davidghatley/3060-recipes/main/kintsugi-27b/RESULTS.md

## Full write-up (README)

Qwen3.8-27B at 2.47 bits per weight (EXL3 trellis codes after QTIP, Escha W2 layout, L0xRE-V2 bit allocation) in one
GGUF, made for a single 12 GB card with the full 262,144-token window. Source: https://huggingface.co/CaryPalmer/Kintsugi-27B
(Apache-2.0). Engine: the author's llama.cpp fork with EXL3 trellis kernels, Linux bundle v1.1.1 from
https://github.com/professorpalmer/Kintsugi-27B/releases. Stock llama.cpp and Ollama cannot load the file.

### Files (outside this repo)

| What | Path | sha256 |
|---|---|---|
| Model, 10,546,687,168 B | `$MODELS/kintsugi-27b/Kintsugi-27B-12G.gguf` | `0510bae8…c48c8a74` |
| DFlash2 drafter, 1,094,346,080 B | `$MODELS/kintsugi-27b/dflash-Qwen3.8-27B-Q4_0.gguf` | `0a994382…6ca3c4` |
| Bundle tarball, 683,713,421 B | `$MODELS/kintsugi-27b/bundle-dl/Kintsugi-27B-v1.1.1-linux-x86_64.tar.gz` | `0d55dd1b…92d701` |
| Unpacked bundle | `$MODELS/kintsugi-27b/bundle/Kintsugi-27B/` | |
| Saved conversations (layer) | `$MODELS/kintsugi-27b/slots/` (capped at 20 GB by the layer) | |

Full hashes are in `$MODELS/kintsugi-27b/download.sha256`. All three matched the published values on 2026-11-21.

To fetch again (no `hf` CLI here, so plain curl; it resumes):
```
cd $MODELS/kintsugi-27b
for f in Kintsugi-27B-12G.gguf dflash-Qwen3.8-27B-Q4_0.gguf; do
  curl -fL -C - -o "$f" "https://huggingface.co/CaryPalmer/Kintsugi-27B/resolve/main/$f"; done
gh release download v1.1.1 --repo professorpalmer/Kintsugi-27B -p '*linux-x86_64.tar.gz' -D bundle-dl
mkdir -p bundle && tar -xzf bundle-dl/*.tar.gz -C bundle
```

### Run

```
./serve.sh            # foreground; queues on the shared GPU lock, frees ComfyUI's cache, holds the lock while serving
./stop.sh             # from another shell (or Ctrl-C in serve.sh); the lock is released when the engine exits
./serve.sh --dry-run  # print the engine command line
```

- Clients: `http://127.0.0.1:8080/v1` (OpenAI chat + responses) and `http://127.0.0.1:8080/v1/messages` (Anthropic).
  Port 8080 is the bundle's Python layer (saved conversations); llama-server itself is on 127.0.0.1:18080.
- Why a wrapper: the bundle's `start-server.sh` starts the engine with `setsid nohup` and returns, so under `gpu_run`
  directly the lock would be released while the engine still holds ~11 GB of VRAM. `serve.sh` waits on the engine PID.
- `GPU_RUN_MEM=40G` by default: the tiered K/V cache puts everything past the VRAM cells in system RAM, and memcap
  counts page cache.
- Any `KINTSUGI_*` setting from the bundle's `start-server.sh` passes through, e.g. `KINTSUGI_DRAFT=off`,
  `KINTSUGI_CTX=65536`, `KINTSUGI_THINK=off`, `KINTSUGI_KV=q8_0`.
- The script sees a display process on the 3060 (Hyprland), so it keeps a 600 MiB margin. It counts VRAM cells from
  what is free at start, so start it only through `serve.sh` (which waits for the room), never while another job is
  on the card.

### Harnesses

Claude Code, per shell only (don't set these globally):
```
ANTHROPIC_BASE_URL=http://127.0.0.1:8080 ANTHROPIC_API_KEY=local \
ANTHROPIC_DEFAULT_OPUS_MODEL=kintsugi ANTHROPIC_DEFAULT_SONNET_MODEL=kintsugi ANTHROPIC_DEFAULT_HAIKU_MODEL=kintsugi \
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 claude --model kintsugi
```
Codex (`~/.codex/config.toml` profile), Pi and OpenCode configs: see the bundle's `HARNESSES.md`. Codex needs
`wire_api = "responses"`. The `kintsugi-local` provider in `../opencode.json` points at :8080.

### Review notes (2026-11-21)

The bundle was read before first run: `start-server.sh` / `stop.sh` touch only the bundle folder and localhost;
the layer (`layer/bonsai_layer.py`, `slot_cache.py`) only calls its upstream on 127.0.0.1 and runs with all its tools
(code interpreter, cards, lint) switched off; `llama-server` links only bundle libraries and standard system libs.
