{
  "id": "qwen38-27b-nariq",
  "title": "Qwen3.8-27B NariQ trellis files all in VRAM",
  "summary": "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.",
  "status": "measured",
  "updated": "2026-11-29",
  "use_cases": [
    "coding",
    "agents",
    "long-context",
    "dense-model",
    "vision"
  ],
  "model": {
    "name": "Qwen3.8-27B-NariQ",
    "hf_repo": "nari-labs/Qwen3.8-27B-NariQ-GGUF",
    "params": "27B",
    "architecture": "dense hybrid (Qwen3.8-27B: 3 Gated DeltaNet : 1 full attention)",
    "license": "Apache-2.0"
  },
  "weights": {
    "format": "GGUF (NariQ trellis, TRL1-TRL6 types)",
    "quant": "NariQ 2.5 bpw (default) and 3.0 bpw",
    "bpw": 2.5,
    "size_gb": 8.44,
    "source": "https://huggingface.co/nari-labs/Qwen3.8-27B-NariQ-GGUF",
    "file": "Qwen3.8-27B-NariQ-2.5bpw.gguf",
    "revision": "f886dfa7581169661d218f22fc83a186b78e385a",
    "notes": "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."
  },
  "engine": {
    "name": "nari-labs llama.cpp fork",
    "repo": "https://github.com/nari-labs/nari-llama.cpp",
    "version": "nariq/b12431 at 2644f7de4",
    "cuda": "sm_86 build"
  },
  "hardware": {
    "gpu": "NVIDIA GeForce RTX 3060",
    "vram_gb": 12,
    "ram_gb": 62,
    "cpu": "Intel Core i5-12500",
    "disk": "NVMe SSD",
    "os": "Linux",
    "driver": "615.78.08",
    "notes": "The desktop is on the same card (about 1 GB); the working limit was about 11.7 GB in use."
  },
  "serve": {
    "command": "./serve.sh",
    "script": "serve.sh",
    "port": 8109,
    "api": "OpenAI-compatible /v1 (llama-server)",
    "key_flags": [
      "VARIANT=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"
    ]
  },
  "context_tokens": 65536,
  "placement": "Every 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.",
  "results": [
    {
      "metric": "decode",
      "label": "2.5 bpw default, 64k, thinking off, fresh code",
      "value": 41.93,
      "unit": "tok/s",
      "baseline": 2.77,
      "ceiling": 40.6,
      "headline": true,
      "source": "qwen38-27b-nariq/RESULTS.md:46"
    },
    {
      "metric": "decode",
      "label": "2.5 bpw default, thinking on",
      "value": 25.65,
      "unit": "tok/s",
      "source": "qwen38-27b-nariq/RESULTS.md:47"
    },
    {
      "metric": "decode",
      "label": "2.5 bpw default at 60k depth",
      "value": 25.05,
      "unit": "tok/s",
      "source": "qwen38-27b-nariq/RESULTS.md:48"
    },
    {
      "metric": "decode",
      "label": "3.0 bpw default, 40k, no draft",
      "value": 21.9,
      "unit": "tok/s",
      "baseline": 1.71,
      "ceiling": 33.9,
      "source": "qwen38-27b-nariq/RESULTS.md:62"
    },
    {
      "metric": "decode",
      "label": "2.5 bpw long profile at 105.7k depth",
      "value": 11.61,
      "unit": "tok/s",
      "source": "qwen38-27b-nariq/RESULTS.md:61"
    },
    {
      "metric": "prefill",
      "label": "8k prompt, 2.5 bpw default",
      "value": 359.5,
      "unit": "tok/s",
      "source": "qwen38-27b-nariq/RESULTS.md:49"
    },
    {
      "metric": "prefill",
      "label": "105.7k prompt, 2.5 bpw long",
      "value": 272.7,
      "unit": "tok/s",
      "source": "qwen38-27b-nariq/RESULTS.md:61"
    },
    {
      "metric": "needles",
      "label": "2.5 bpw long, 3/3 at 57.4k and 108.1k",
      "value": "3/3",
      "unit": "found",
      "headline": true,
      "source": "qwen38-27b-nariq/RESULTS.md:61"
    },
    {
      "metric": "quality",
      "label": "codeeval, 2.5 bpw default (3.0 bpw: 7/8)",
      "value": "8/8",
      "unit": "tasks",
      "source": "qwen38-27b-nariq/RESULTS.md:52"
    },
    {
      "metric": "quality",
      "label": "mean KLD of 2.5 bpw vs the 3.0 bpw file, wikitext",
      "value": 0.165308,
      "unit": "nats",
      "source": "qwen38-27b-nariq/RESULTS.md:105"
    },
    {
      "metric": "vram_peak",
      "label": "card total incl. desktop, 2.5 bpw default",
      "value": 11557,
      "unit": "MiB",
      "source": "qwen38-27b-nariq/RESULTS.md:140"
    },
    {
      "metric": "startup",
      "label": "ready, warm page cache, 2.5 bpw default",
      "value": 1.9,
      "unit": "s",
      "source": "qwen38-27b-nariq/RESULTS.md:140"
    }
  ],
  "caveats": [
    "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."
  ],
  "credits": [
    "nari-labs",
    "qwen",
    "turboderp",
    "ggml-org",
    "llama-cpp",
    "huggingface",
    "nvidia"
  ],
  "findings": [],
  "contributor": {
    "name": "David Hatley",
    "github": "davidghatley"
  },
  "$schema": "https://davidghatley.github.io/3060-recipes/schema/recipe.schema.json",
  "url": "https://davidghatley.github.io/3060-recipes/recipes/qwen38-27b-nariq/",
  "folder": "https://github.com/davidghatley/3060-recipes/tree/main/qwen38-27b-nariq"
}
