Qwen3.8-27B NariQ trellis files all in VRAM8.44 GB of NariQ 2.5 bpw (default) and 3.0 bpw on 12 GB

Nari Labs' 2.5 and 3.0 bpw trellis-coded Qwen3.8-27B on their llama.cpp fork, every layer on the GPU. With ngram-mod and a 0.8B draft model the 2.5 bpw file decodes at 41.9 tok/s at 64k; 112k without the draft. Stock flags give 1.7-2.8 tok/s.

Decode · 2.5 bpw default, 64k, thinking off, fresh code
41.93tok/sstock 2.77
Prefill · 8k prompt, 2.5 bpw default
359.5tok/s
Context
64k tokens
VRAM peak
11,557MiB
PLATE 1 · TUNED VS STOCK, TOK/S2026-11-29
DECODE2.5 BPW DEFAULT, 64K, THI…41.93STOCK 2.77CEILING 40.6DECODE3.0 BPW DEFAULT, 40K, NO…21.9STOCK 1.71CEILING 33.9DECODE · 2.5 BPW DEFAULT, 64K, THINKING…41.93STOCK 2.77CEILING 40.6DECODE · 3.0 BPW DEFAULT, 40K, NO DRAFT21.9STOCK 1.71CEILING 33.9

TUNED STOCK FLAGS CEILING FROM MEASURED BANDWIDTH

Decode and prefill share no scale; each metric is drawn to its own maximum. Stock means the engine's default flags on the same file.
→Exact file, build and flags

Run it

Serve · from qwen38-27b-nariq/ in a clone of the repo
./serve.sh
Modelnari-labs/Qwen3.8-27B-NariQ-GGUF on Hugging Face · Apache-2.0
WeightsGGUF (NariQ trellis, TRL1-TRL6 types) NariQ 2.5 bpw (default) and 3.0 bpw, 8.44 GB from nari-labs/Qwen3.8-27B-NariQ-GGUF
Qwen3.8-27B-NariQ-2.5bpw.gguf at f886dfa75811
VARIANT=3.0 serves Qwen3.8-27B-NariQ-3.0bpw.gguf (10.12 GB). Draft model: ggml-org/Qwen3.5-0.8B-GGUF Q8_0 requantized to Q4_K_M locally. Projector: Qwen3.8-27B-NariQ-mmproj-BF16.gguf. Stock llama.cpp cannot load the files.
Enginenari-labs llama.cpp fork nariq/b12431 at 2644f7de4 · CUDA sm_86 build
PlacementEvery layer, the K/V cache and the 0.8B draft model in VRAM; the TRL2 token embedding (0.32 GB) stays in host memory and is decoded on the CPU. Optional projector on the CPU.
HardwareNVIDIA GeForce RTX 3060 12 GB · 62 GB RAM · Intel Core i5-12500 · NVMe SSD
The desktop is on the same card (about 1 GB); the working limit was about 11.7 GB in use.
APIOpenAI-compatible /v1 (llama-server) on port 8109
Key flagsVARIANT=2.5|3.0 NQ_PROFILE=default|fast|long|card|stock --spec-type ngram-mod,draft-simple with a 0.8B draft, n 8, p-min 0.75 q4_0 K/V, ub 256, -np 1 NQ_MMPROJ=cpu for images
Trap
  • No BF16 or Q8_0 reference was on disk, so KLD is measured against the 3.0 bpw file, not against the original model.
  • The baseline is the fork's own run.sh start line (fit moves 16-26 layers to the CPU, 4k window); the card's -c 131072 command does not start on 12 GB.
  • The draft model costs window: 64k with it vs 112k without on 2.5 bpw, 8k vs 40k on 3.0 bpw.
  • q4_0 K/V in every tuned profile (KLD 0.002-0.005 on the 3.0 file).
  • The ceilings (40.6 and 33.9 tok/s) are for undrafted decode: bytes per token at the card's measured 342 GB/s.
12Every number links to its line

Measured results

MetricConditionsMeasuredStockCeilingSource line
Decode2.5 bpw default, 64k, thinking off, fresh code41.93 tok/s2.7740.6RESULTS.md:46
2.5 bpw default, thinking on25.65 tok/sRESULTS.md:47
2.5 bpw default at 60k depth25.05 tok/sRESULTS.md:48
3.0 bpw default, 40k, no draft21.9 tok/s1.7133.9RESULTS.md:62
2.5 bpw long profile at 105.7k depth11.61 tok/sRESULTS.md:61
Prefill8k prompt, 2.5 bpw default359.5 tok/sRESULTS.md:49
105.7k prompt, 2.5 bpw long272.7 tok/sRESULTS.md:61
Needles2.5 bpw long, 3/3 at 57.4k and 108.1k3/3 foundRESULTS.md:61
Qualitycodeeval, 2.5 bpw default (3.0 bpw: 7/8)8/8 tasksRESULTS.md:52
mean KLD of 2.5 bpw vs the 3.0 bpw file, wikitext0.165308 natsRESULTS.md:105
VRAM peakcard total incl. desktop, 2.5 bpw default11,557 MiBRESULTS.md:140
Startupready, warm page cache, 2.5 bpw default1.9 sRESULTS.md:140
0Other 3060s

Reproductions

None yet. If you ran this on your own 3060, report your numbers and they appear here with your hardware.

7This recipe stands on

Thanks

→README from the repo

Full write-up

This recipe serves Nari Labs' NariQ files of Qwen3.8-27B on the RTX 3060 12 GB with every layer in VRAM, on their llama.cpp fork (required: stock llama.cpp cannot load the format).

NariQ is a trellis-coded post-training quantization (QTIP-style, in exllamav3's tile layout), calibrated on coding-agent traces. The 3.0 bpw file is 10.1 GB and the 2.5 bpw file 8.4 GB; both carry a 16-band LM head and a CPU-decoded embedding, and neither has the model's MTP layer.

Result

  • 41.9 tok/s on fresh code (thinking off) and 25.7 with thinking on, 25.1 at 60k depth, with the 2.5 bpw file, a 64k window and two kinds of speculation the fork allows: ngram-mod and a 0.8B Qwen3.5 draft model. Rewriting a file already in the context runs at ~138 tok/s. Needles 3/3 at 33k and 62k, codeeval 8/8.
  • Plain decode is 21.9 tok/s (3.0 bpw) and 23.0 (2.5 bpw), 57–65% of the bandwidth ceiling.
  • Longest window: 112k on 2.5 bpw (needles 3/3 at 108k, 11.6 tok/s there); 40k on 3.0 bpw.
  • Stock: the card's command does not start on 12 GB, and the fork's own launcher lets --fit put 16–26 layers on the CPU, where trellis decode runs at 1.7–2.8 tok/s. The tuned profiles are 12.8–15× that.
  • The two files differ: 2.5 bpw is KLD 0.165 (wiki) / 0.316 (code) from 3.0 bpw with 7.6% / 16% higher perplexity. The card reports both at BF16 level on its agent benchmarks; with no BF16 on disk that cannot be checked here. If quality matters more than speed and window, use VARIANT=3.0.

Numbers and quality are in RESULTS.md. The experiment log is PLAN.md, the ceilings are in THEORY.md, and the raw data is in runs/.

Which config

Use Command Window Decode d0 off / on Deep Quality notes
Default: coding and chat ./serve.sh 64k 41.9 / 25.7 25.1 at 60k 2.5 bpw, codeeval 8/8
Long documents NQ_PROFILE=long ./serve.sh 112k 23.0 / 23.8 11.6 at 106k 2.5 bpw, no draft model
The card's default file VARIANT=3.0 ./serve.sh 40k 21.9 / 22.7 16.4 at 38k 3.0 bpw, codeeval 7/8, closer to itself on plain text
3.0 bpw, short and fast VARIANT=3.0 NQ_PROFILE=fast ./serve.sh 8k 39.0 / 27.5 34.5 at 7.5k
Images add NQ_MMPROJ=cpu to any of these same same projector on the CPU, ~3.5 s per image

Compared with the other Qwen3.8-27B recipes on this card

Numbers are taken from each recipe's own RESULTS.md, single user, thinking off unless noted. The four recipes are not the same weights: qwen38-27b-family serves finetunes, Ternary Bonsai is a ternary re-training, Kintsugi and NariQ are post-training trellis quantizations of the base model.

qwen38-27b-family (pi IQ3_XXS) kintsugi-27b (EXL3 2.47 bpw) ternary-bonsai-27b (PTQ1_0) NariQ 2.5 bpw NariQ 3.0 bpw
File 11.4 GB 10.5 GB 6.23 GB 8.44 GB 10.12 GB
Engine stock master author's bundle PrismML fork nari-labs fork nari-labs fork
Plain decode, empty context 19.72 (16k, all on GPU); 16.62 at 32k ~16 (drafter off) 47.6 23.0 21.9
Best decode, empty context 19.72 at 16k (MTP rejected) 39.4 chat / 60.2 code (DFlash2) 89.9 (MTP n 3) 41.9 (ngram-mod + 0.8B draft) 39.0 at 8k (same)
Thinking on – – 65.7 25.7 22.7
Default window 32k 262k (most of it in RAM) 96k 64k 40k
Longest window 128k at 7.5 tok/s 262k 262k 112k at 23.0 (11.6 at 106k) 40k
Prefill 8k 543 628 (6k) 572 360 372
Quality evidence codeeval 7/8; publisher KLD 0.124 vs its own Q8_0 not measured (author's benchmarks only) codeeval 8/8; q8_0 K/V at the KLD floor codeeval 8/8; KLD 0.165 / 0.316 vs the 3.0 file codeeval 7/8
  • For speed and window, Ternary Bonsai wins on this card: half the bytes and an MTP head. NariQ's case is that it is the base model's own weights, post-training quantized, and that it fits entirely on the card with a 40–112k window, which the 11–12 GB IQ3_XXS files do not.
  • NariQ vs Kintsugi (both trellis, both forks): NariQ's plain decode is faster (21.9–23.0 vs ~16) and it keeps the whole window in VRAM; Kintsugi's DFlash2 drafter gives it more on code (60 vs 42) and a 262k window held in RAM. NariQ's fork refuses that drafter by design. Kintsugi's prefill is faster (628 vs 360–372).
  • NariQ vs the IQ3_XXS family: similar plain decode with every layer on the GPU, but NariQ keeps 40–112k of window on the card where the 11.4 GB pi IQ3_XXS needs layers in RAM past 16k, and the 0.8B draft model pays here because the verify step is nearly free (4 tokens cost 1.15× one).

What the nari-labs fork changes

nari-labs/nari-llama.cpp branch nariq/b12431 at 2644f7de4 is 19 commits on ggml-org master a946eb541 (2026-11-16). The release tag b12431-nariv0 is 9d5c990a2; the commits after it are docs, launchers and Windows fixes. Read before building:

  • ggml: six new tensor types TRL1–TRL6 (GGUF ids 44–49: trellis codes for 1–6 bits per weight, 16-weight blocks of 2 × bits bytes) and two trellis ops, with a CPU implementation (ggml-cpu/trellis.cpp).
  • CUDA: trellis.cu on top of libtrellis (Nari Labs' own CUDA library, Apache-2.0, vendored in ggml-cuda/libtrellis; it reads exllamav3's tile layout). Built for sm_80 and newer. Single-token decode fusions (ADD + RMS_NORM, ADD + softplus + MUL, a narrow get_rows) that only run in graphs containing trellis ops, and BF16 K/V in the MMA flash-attention kernel on SM90 / SM120 only (so on this SM86 card BF16 K/V is the slowest type, b02).
  • Metal: trellis products (not used here).
  • Model loading and qwen35.cpp: validates trellis metadata at load; a banded embedding and LM head (16 frequency bands); decode shortcuts for coded models (Gated DeltaNet state updated in place for one-sequence decode, fused q/k L2 norm). LoRA on coded weights is refused.
  • Speculative decoding: a check that refuses drafters which would share the target's embedding or output head (EAGLE3, DFlash), because those are trellis-coded here. A separate draft model with its own embedding is allowed.
  • Converter, tests, nariq/ tooling (run.sh launcher, release notes, a qualification record), and the upstream CI workflows removed.

A grep of the diff for network, process and file access found nothing outside upstream's own code. The only network step in a build is upstream's web-UI asset download (HF_UI_VERSION). Stock llama.cpp cannot load these files.

Use it

# 1. weights (pinned): nari-labs/Qwen3.8-27B-NariQ-GGUF @ f886dfa7581169661d218f22fc83a186b78e385a
#    -> $MODELS/qwen38-27b-nariq/nari-labs/
#      Qwen3.8-27B-NariQ-3.0bpw.gguf (10.12 GB), Qwen3.8-27B-NariQ-2.5bpw.gguf (8.44 GB),
#      Qwen3.8-27B-NariQ-mmproj-BF16.gguf (0.93 GB)
# 2. engine: nari-labs/nari-llama.cpp nariq/b12431 @ 2644f7de4, CUDA sm_86 (own worktree and build dir)
#    git -C $SCRATCH/llama.cpp/src-r2 remote add nari https://github.com/nari-labs/nari-llama.cpp
#    git -C $SCRATCH/llama.cpp/src-r2 fetch nari nariq/b12431
#    git -C $SCRATCH/llama.cpp/src-r2 worktree add $SCRATCH/llama.cpp/src-nari 2644f7de4
#    tools/build.sh                                  # -> $SCRATCH/llama.cpp/nari-2644f7de4/bin
# 3. the draft model: ggml-org/Qwen3.5-0.8B-GGUF @ 004fd086 Q8_0, requantized to Q4_K_M (8 s)
tools/make_draft.sh
# 4. serve (through gpu_run, OpenAI-compatible on 127.0.0.1:8109, model name qwen38-27b-nariq)
./serve.sh                                  # default: 2.5 bpw, 64k q4_0, ngram-mod + 0.8B draft
NQ_PROFILE=long ./serve.sh                  # 2.5 bpw, 112k q4_0, ngram-mod
VARIANT=3.0 ./serve.sh                      # 3.0 bpw, 40k q4_0, ngram-mod
VARIANT=3.0 NQ_PROFILE=fast ./serve.sh      # 3.0 bpw, 8k q4_0, ngram-mod + 0.8B draft
NQ_MMPROJ=cpu ./serve.sh                    # image input, projector on the CPU (any profile)
NQ_PROFILE=card ./serve.sh                  # the card's command (does not start on 12 GB)
NQ_PROFILE=stock ./serve.sh                 # the fork's run.sh start line (fit, 4k window, 1.7-2.8 tok/s)
NQ_DRY=1 ./serve.sh                         # print the llama-server command

The default command:

llama-server -m Qwen3.8-27B-NariQ-2.5bpw.gguf --alias qwen38-27b-nariq --no-mmproj \
  -ngl 99 --fit off -c 65536 -np 1 -t 6 -b 2048 -ub 256 -fa on -ctk q4_0 -ctv q4_0 \
  --spec-type ngram-mod,draft-simple -md Qwen3.5-0.8B-Q4_K_M-from-Q8_0-local.gguf -ngld 99 \
  --spec-draft-n-max 8 --spec-draft-n-min 0 --spec-draft-p-min 0.75 -ctkd q4_0 -ctvd q4_0 \
  --jinja --reasoning-format deepseek --reasoning on \
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 --repeat-penalty 1.0 --presence-penalty 0 --host 127.0.0.1 --port 8109

Notes for these flags: - -ub 256: the trellis prefill compute buffer grows with the ubatch; 256 costs ~2% prefill against 512 and buys window (3.0 bpw does not fit ub 512 at all). - -ctk/-ctv q4_0: costs nothing in decode speed here (b11) and KLD 0.002–0.005 (b10). - --spec-type ngram-mod,draft-simple: ngram-mod first (free, wins on text that repeats the context), then the draft model. n 8 and p-min 0.75 came out best of 4–16 and 0–0.9 (b05, b07). - -ctkd/-ctvd q4_0: the draft's own K/V; with the Q4_K_M draft this saves ~0.36 GB against the Q8_0 draft at q8_0. - -np 1: the auto setting makes 4 slots that share the window. - Samplers: the card's thinking-mode set. Thinking: on; pass "chat_template_kwargs": {"enable_thinking": false} per request, or NQ_THINK=off server-wide.

Limits

  • Prefill is slow: 360–372 tok/s at 8k and 273 at 106k (60–75% of the practical compute ceiling), so a 108k prompt takes 400 s before the first token.
  • Deep decode without the draft: 11.6 tok/s at 106k (2.5 long) and 16.4 at 38k (3.0); the attention over a long q4_0 cache is not at bandwidth.
  • The 0.8B draft model costs window: with it 2.5 bpw keeps 64k (112k without) and 3.0 bpw only 8k (40k without). It helps least with thinking on (+12% over ngram-only).
  • No layers in RAM: the CPU trellis path runs at ~6–7 GB/s, so offloading even a few layers costs more than any window it frees (b16b). Every profile keeps all 65 layers on the GPU.
  • The card's -c 131072 and BF16 K/V: 131k does not fit 12 GB with either file, and BF16 K/V is the slowest type on SM86 (the fork's BF16 flash-attention path targets SM90/SM120).
  • Not measured: error against BF16 (no reference on disk), concurrency, the 2.0 bpw file, answers above 8k tokens.
  • Memory cap: GPU_RUN_MEM=24G; the cgroup peak reached 18.7 GB with both files in the page cache.

Licences

  • The model files: Apache-2.0 (the card and its NOTICE), inherited from Qwen3.8-27B (Apache-2.0).
  • The fork: MIT like llama.cpp; the vendored libtrellis is Apache-2.0.
  • The draft model: ggml-org's GGUF of Qwen3.5-0.8B (Apache-2.0). The Q4_K_M copy is made locally by tools/make_draft.sh and not redistributed.

Tools

Tool What it does
serve.sh the launcher: VARIANT=3.0\|2.5, NQ_PROFILE=default\|fast\|long\|card\|stock, speculation, window, K/V, mmproj; holds the GPU lock while serving
tools/build.sh builds the fork in its own build dir with the box's CUDA flags; checks that the trellis kernels were configured
tools/make_draft.sh the Q4_K_M draft model from ggml-org's Q8_0
tools/srv.sh <label> [ENV=…] -- <cmd> one server start/stop through ../scripts/with_server.sh on port 8109; records the command and env in runs/
tools/gpu_batch.sh, tools/launch.sh one GPU-lock hold per batch (GPU_RUN_MEM=24G), detached, logged to runs/batches/
tools/srvtest.py prefill, decode (with draft acceptance), needle and code-edit client on llama-server's own timings
tools/measure.sh <label> <window> the measurement set: prefill 8k/32k/92%, decode empty and deep, needles 50%/95%, codeeval, greedy, memory
tools/kld.sh, tools/kld2ledger.py KL divergence of a change against the 3.0 bpw file; ledger rows from its logs
tools/bench2ledger.py ledger rows from llama-bench output in a batch log
tools/image_test.py image input check through the projector (stdlib-drawn PNG, three shapes)
tools/greedy.py, tools/longans.py, tools/codeeval_lenient.py temperature-0 answers to fixed prompts; long answers with loop flags; codeeval also counting bare code
tools/gguf_info.py GGUF header and tensor summary including the TRL types (runs/gguf-*.txt)
tools/mkconfigs.py writes configs/<label>.json from each run's command, env and ledger rows
tools/mem.sh, tools/concurrent.py memory and startup of a running server; N simultaneous requests

Credits

recipe.json · Markdown · Folder with scripts and raw runs · Full results log