K-quant IQ3_S build of sabicap/sabi-noema
with the retrained draft head from
xkm/qwen3.8-27b-mtp-head-retrained
fused into the checkpoint at HF level, then converted and quantized. Speculation works
straight out of the file: --spec-type draft-mtp, no sidecar drafter.
Read this first. The trunk is a standard K-quant of sabi-noema guided by ISTA's importance matrix; only the per-tensor type allocation comes from ISTA, not their GSQ-optimized weights. The MTP head is xkm's retrained head — sabi ships none. Expect sabi's behaviour plus faster decoding, not ISTA's benchmark scores. Speculative decoding is lossless: every emitted token is still verified by the full model.
| File | Size | Notes |
|---|---|---|
sabi-noema-mtp-IQ3_S-ista-map.gguf |
11.29 GiB | 866 tensors, 65 blocks, MTP head inside (blk.64.*) |
mmproj-Qwen3.8-27B-Q5_K-MIX.gguf |
332 MB | vision projector, CPU-side, from HermiHg/... |
fuse_mtp_head.py |
— | the HF-level fusion, reproducible and self-validating |
ista-recipe_types.txt |
— | the 554-entry per-tensor allocation map |
config.json |
— | the patched fused config |
report.html |
— | full measurement report (acceptance, throughput, VRAM) |
sha256 of the GGUF: 17a14c47ca0ff67d2dcb1dee3bef78b0467e9d8675d298865333723e15c6bcb8
This is the same recipe as the no-MTP build
(vmarcelo/Sabi-Noema-IQ3_S-GSQ-RCO-GGUF,
10.96 GiB) plus the fused head. If you do not want native MTP, use that file.
text_config.mtp_num_hidden_layers (0 vs 1). Patch it to 1 and write xkm's 15 tensors as
mtp.* into a new model-mtp.safetensors shard:python fuse_mtp_head.py --sabi sabi-noema --base qwen-base \
--head xkm-head/model.safetensors --out sabi-noema-mtp
xkm stores the head with the mtp. prefix stripped (MLX-side naming); every tensor maps
1:1 and is checked against the base checkpoint's shapes and dtypes before writing.--no-mtp, the config now advertises the head:python convert_hf_to_gguf.py sabi-noema-mtp --outtype bf16 --outfile sabi-noema-mtp-bf16.gguf
→ 866 tensors, block_count 65, nextn_predict_layers 1, all 15 blk.64.* nextn
tensors present. The two-dimensional head weights are bit-identical to xkm's file; the
norms pick up the converter's usual +1.0 RMSNorm offset, exactly like the trunk.llama-quantize --imatrix imatrix-qwen3.8-27b.gguf \
--tensor-type-file ista-recipe_types.txt \
sabi-noema-mtp-bf16.gguf sabi-noema-mtp-IQ3_S-ista-map.gguf IQ3_S
All 554 recipe entries applied exactly. The map reserves the eight blk.64 weights at
Q6_K and its norms at F32 — xkm's own guidance is that 4-bit draft attention
measurably hurts acceptance, and ISTA independently lands on the same choice. The head
costs ~0.42 GiB, so ~3.6 % of the file, and stays effectively lossless.Tooling: llama.cpp b12024 (ddf48f85c) for convert, quantize and serving.
# max speed: DFlash 2 external drafter (13.4 GiB peak at 32K)
llama-server -m sabi-noema-mtp-IQ3_S-ista-map.gguf \
-mm mmproj-Qwen3.8-27B-Q5_K-MIX.gguf --no-mmproj-offload \
--jinja -ngl 999 -fa on -c 32768 -np 1 -ctk q4_0 -ctv q4_0 \
--spec-type draft-dflash -md Qwen3.8-27B-DFlash2-Q4_K_M.gguf --spec-draft-n-max 4
# native MTP, head is inside this GGUF (12.4 GiB peak at 32K)
llama-server -m sabi-noema-mtp-IQ3_S-ista-map.gguf \
-mm mmproj-Qwen3.8-27B-Q5_K-MIX.gguf --no-mmproj-offload \
--jinja -ngl 999 -fa on -c 32768 -np 1 -ctk q4_0 -ctv q4_0 \
--spec-type draft-mtp --spec-draft-n-max 2
# no speculation
llama-server -m sabi-noema-mtp-IQ3_S-ista-map.gguf --jinja -ngl 999 -c 32768
--spec-type mtp is not valid; the accepted value is draft-mtp. Native MTP needs no
-md: llama.cpp creates a second MTP context against the target's own blk.64 weights.
-fa on is required with the quantized KV cache, and -np 1 matters because the hybrid
GDN trunk keeps per-slot recurrent state.
Sampling per Qwen: temperature 1.0, top_p 0.95, top_k 20, reasoning_effort via
chat_template_kwargs (xhigh is the template default).
| arm | accept len | tok/s | speedup | VRAM peak |
|---|---|---|---|---|
| spec off | 1.00 | 38.95 | — | 11.6 GiB |
| native MTP, n=2 | 1.99 | 57.76 | 1.48× | 12.4 GiB |
| native MTP, n=4 | 2.25 | 49.80 | 1.28× | 12.4 GiB |
| DFlash 2 Q4_K_M, n=4 | 2.87 | 67.09 | 1.72× | 13.5 GiB |
Greedy, same harness: base Qwen3.8-27B with its stock head reaches 2.96 tokens/verify, this trunk with xkm's head 2.39. The RL fine-tune shifts the trunk away from the head's training distribution, which costs more than the retrained head gains back — but speculation is still a clear win. Depth 2 is the throughput sweet spot on this card; deeper drafting costs more per verify row than the extra acceptance pays back.
Full numbers, per-category splits and the A/B protocol are in report.html.
Apache-2.0, inherited from the base model. The fusion script, the patched config and this card are released under the same license.
sabicap/sabi-noema