Q8_0 spine + GSQ IQ3_XXS experts: same speed, fewer agent mistakes in my tests, faster and better results

#65
by Throghar - opened

I kept your routed experts and replaced every other tensor (attention, shared expert, router, embeddings, output) with the Q8_0 tensors from unsloth/Qwen3.8-Flash-Next-GGUF. Your spine is a 3.83 GiB mix of BF16, Q6_K, Q5_K, IQ4_XS and IQ3_S; the Q8_0 one is 5.09 GiB. I downloaded only those byte ranges (about 5 GB). My engine (Strata) loads experts and dense tensors from different GGUFs; with llama.cpp you would need a merged file.

Setup: RX 9070 XT 16 GB, 64 GB RAM, experts resident in RAM with a GPU expert cache, Pi coding agent, temperature 1.0.

Speed is unchanged. The bigger spine shrinks the GPU expert cache (4069 → 3150 slots, hit rate 81 % → 73 %), but decode stays at 62–64 tok/s and prompt processing at about 1670 tok/s. Missed experts run on the CPU in parallel with the GPU.

Results, GSQ spine → Q8_0 spine:

GSQ Q8_0
Seeded-bug tasks solved (9 tasks × 2 runs) 18/18 18/18
Tool calls per task 18.2 15.2
Tokens generated per task, incl. thinking 6.4k 5.7k
Wrong claims per fix (blind review) 0.72 0.28
Claim error rate, open-ended repo review (4 vs 3 runs) 29.0 % 26.1 %
High-confidence errors per review 6.0 4.7
Perplexity, 5k-token mix 4.166 4.173
Perplexity did not move, yet on agent transcripts the top-1 token differs from your quant in about 20 % of positions, so the swap changes behaviour more than likelihood. The samples are small (p ≈ 0.04 for fewer tool calls, 0.09 for fewer wrong claims), so please read this as a field report.

Note: I did much more tests and in every one of them model was more token efficient and made less mistakes.

A longer real session. One task this morning: find why playback stops on Android and make it reconnect until it works. It ran about 160 tool calls up to 205k tokens of context and changed about 1,500 lines in 12 files, ending with all tests and the Android build green. It checked its claims against the decompiled MediaElement toolkit and the Media3 bindings instead of assuming, and it caught a regression in its own plan (unplugging a headset would have restarted audio on the speaker) before I did. A review still found one design flaw (its focus-recovery loop would have taken audio from other apps), one wrong library detail and one missed edge case, and it fixed each correctly once pointed out. Compared with the GSQ spine I see fewer small mistakes and more verification in sessions like this; that part is my impression, not a measurement.

Does GSQ tune the spine together with the experts? And would you consider a variant with a Q8_0 spine?

hi, please show : how to you do it in detail , so we could reproduce the "running better" part, so we will then have more people testing for evidence

Swapping the ISTA spine for unsloth's Q8_0 (Strata), plus original BF16 SSM gates

What this builds: ISTA's routed experts (*_exps in shard 1) stay as they are. Every other tensor (attention, linear attention / SSM, shared expert, router, embeddings, output, norms; about 5.1 GiB)
comes from unsloth/Qwen3.8-Flash-Next-GGUF, folder Q8_0. The PLE table keeps coming from your --ple-gguf.

Tested with Strata engine 0.1.47 (repo at 011c9e60) on Windows. Paths are examples.

1. Get the Q8_0 shards (Qwen3.8-Flash-Next-Q8_0-0000{1..6}-of-00006.gguf, 188 GB) into a new folder, e.g. C:\models\FlashNext-Q8spine\.
Only their headers and non-expert tensors are ever read. Instead of the full download you can fetch just those byte ranges (about 5.1 GiB) with HTTP Range requests into sparse files; shard 3 holds no spine
tensors at all. On Windows, mark each file sparse and set its size with SetEndOfFile: Python's f.truncate() writes zeros there and the files end up taking the full 188 GB.

2. Put ISTA shard 1 next to Q8_0 shard 1. A hardlink is enough:

mklink /H C:\models\FlashNext-Q8spine\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf C:\models\IQ3_XXS\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf

3. Build a pack from Q8_0 shard 1:

.venv\Scripts\python.exe tools\iq_pack.py --gguf C:\models\FlashNext-Q8spine\Qwen3.8-Flash-Next-Q8_0-00001-of-00006.gguf --out C:\packs\flashnext-q8spine --compat-bf16

It exports the tokenizer as well. The unsloth chat template is identical to ISTA's.

4. Point the experts at ISTA. The new pack's native_experts.txt maps the Q8_0 experts. Replace it with your ISTA pack's map, with the ISTA shard 1 name added as the last column on every line. The
engine then reads the experts from that file beside the --native shard.

# usage: python point_experts.py <ista-pack-dir> <q8spine-pack-dir>
import sys
ista, q8 = sys.argv[1], sys.argv[2]
SHARD = "Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf"
lines = open(ista + "/native_experts.txt").read().splitlines()
out = [l if l.startswith("#") or not l.strip() else l + " " + SHARD for l in lines]
open(q8 + "/native_experts.txt", "w", newline="\n").write("\n".join(out) + "\n")

5. Config. Copy your ISTA config and change only:

  • --pack → the new pack, and tokenizer → <new pack>\tokenizer
  • --native → Q8_0 shard 1
  • the --native-dense-gguf entries → all six Q8_0 shards, in place of the two ISTA shards
  • model_name, log, and the vision model if you use vision (→ Q8_0 shard 1)

Everything else (--ple-gguf, expert cache, KV, MTP, …) stays the same.
VRAM note: the Q8_0 spine is larger than ISTA's mixed spine (5.1 vs 3.8 GiB). On my 16 GB card the expert cache went from 4040 to 3142 slots.

6. Optional: original BF16 ssm_alpha / ssm_beta. With --compat-bf16 the pack stores the 72 SSM gate tensors (alpha and beta for each of the 36 linear-attention layers) as BF16 dequantized from
Q8_0, so they carry the Q8_0 rounding. The engine reads them from the pack's dense.bin, not from the GGUF (eligible() in src/core/native_dense.cpp). ISTA kept them in BF16, and the ISTA pack's
dense.bin holds exactly the original values: byte-identical to unsloth's BF16 shards, all 72 checked. So copy them over. The sizes are the same, nothing else changes, and VRAM use stays the same. Stop
Strata and back up the new pack's dense.bin first:

# usage: python copy_ssm_gates.py <ista-pack-dir> <q8spine-pack-dir>
import re, sys
ista, q8 = sys.argv[1], sys.argv[2]

def index(pack):
    rows = {}
    for line in open(pack + "/index.txt"):
        if not line.startswith("#"):
            name, file_id, kind, offset, size = line.split()[:5]
            rows[name] = (int(file_id), int(kind), int(offset), int(size))
    return rows

a, b = index(ista), index(q8)
names = [n for n in b if re.search(r"\.ssm_(alpha|beta)\.weight$", n)]
with open(ista + "/dense.bin", "rb") as src, open(q8 + "/dense.bin", "r+b") as dst:
    for n in names:
        fa, ka, oa, sa = a[n]
        fb, kb, ob, sb = b[n]
        assert fa == fb == 0 and ka == kb == 4 and sa == sb, n   # both in dense.bin, BF16, same size
        src.seek(oa); dst.seek(ob); dst.write(src.read(sa))
print("copied %d tensors" % len(names))

It should print copied 72 tensors. conversions.json and compat-bf16.json in the pack are records written by iq_pack.py; the engine does not read them. To undo, restore the dense.bin backup.

Also im using BF16 ngram, its just some space on drive so basically a free upgrade

Sign up or log in to comment