gwenedeg

Guided tour · 1 of 3

Models & hardware

Start with the model file and CPU. Gwenedeg loads supported GGUF weights, tokenizer and hyperparameters directly; no model weights are included. The measurements below come from different machines and sessions, so do not compare across sections.

Qwen4, with its Engram table on SSD

Gwenedeg runs Qwen4 (qwen4exp) natively. Qwen4-35B-A3B has 35B parameters with about 3.8B active per token, plus a 20B-parameter per-layer n-gram table (“Engram”). It combines Gated DeltaNet layers, QSA sparse attention, 4-stream Hyper-Connections, a native 1,048,576-token context and an MTP head.

The model core stays in RAM while its 11.5 GB IQ4_NL Engram shard is memory-mapped from NVMe and read on demand. Only 10 of 40 layers keep a KV cache: at 8-bit that is 11.9 KiB per token, so a 128K-token slot takes about 1.5 GiB including DeltaNet state.

Qwen4-35B-A3B on AVX-512 VNNI

Unsloth filecore in RAMplain decodeMTP, 128K787-token prefill
UD-IQ3_XXS16.0 GiB18.4 tok/s22.6 tok/s71.9 tok/s
UD-IQ4_XS19.2 GiB25.1 tok/s30.5 tok/s84.7 tok/s

Both files use the same 11.5 GB Engram shard on SSD. MTP uses -D mtp -G 6 --tau 0.5 and an 8-bit KV cache (-k q8-dot); its output is identical to plain decoding.

Setup. 16-vCPU AMD EPYC Genoa (Zen 4) VM, 30 GiB RAM, 12 threads, warm page cache, one run per cell, 2026-12-04. Full setup and every row in BENCHMARKS.md.

ThinkingCap-Qwen3.8-Flash-Next on AVX2

This 125B model has about 6B active parameters and an 8-shard GGUF with a 29–54 GB Engram table. It was measured on a separate 32-core AMD EPYC 7502P (Zen 2) with 377 GiB RAM, 32 threads and a warm page cache on 2026-12-03.

filesize on disk672-token prefillplain decodeMTP decode, prose / code
IQ4_XS95.5 GB38.78.9–9.39.2 / 9.2
Q4_K_M113.2 GB46.89.511.8 / 11.2
Q6_K171.9 GB37.48.5–10.011.0 / 10.5
Q8_0191.0 GB51.49.0–9.511.2 / 11.6

tok/s. MTP output is byte-identical to plain decoding. A 256K-token slot with -c 262144 -k q8 takes about 4.5 GiB.

Qwen4 caveats

  • The AVX-512 VNNI kernels are not bit-identical to the FP32 path. On five test prompts the top-1 token matched every time, with cosine similarity 0.9935–0.9995 on the logits. GWENEDEG_Q4E_FP32=1 selects the exact FP32 path.
  • The server runs one active sequence at a time for Qwen4 and has no --kv-disk yet. ./launch-server qwen4-35b supplies the measured 128K configuration.
  • The Engram numbers use a warm page cache. The Genoa and Zen 2 machines are not comparable, and these Qwen4 figures have not been compared with llama.cpp or ik_llama.cpp.

Dense Qwen and smaller models

Supported model families

Qwen3 dense 0.6B, 1.7B, 4B and 8B, plus 4B-Instruct-2507 and Thinking-2507; Qwen3.5 0.8B and 4B; Qwen3.8-27B; Underdog Saluki 27B; Qwen4-35B-A3B and ThinkingCap-Qwen3.8-Flash-Next; Inkling-2-Mini.

scripts/download_models.py fetches listed models from Hugging Face at pinned revisions and checks their hashes.

GGUF formats

Q8_0, Q4_K_M, Q5_K_M, Q3_K_M and the i-quant / Q2_K mixes (IQ1_S … IQ4_XS). Qwen4 files also load Q5_0, Q5_1, IQ4_NL and BF16 matrices. Gwenedeg also reads qwen3.c's Q8_0 .bin.

Q4_0, Q4_1 and F16 matrices are rejected with a clean error.

Small-model measurements

Decode generates 128 tokens after a short prompt; prefill uses a 451-token prompt. All rows use 12 threads on a 16-vCPU AMD EPYC VM and show the best of two runs.

modelfiledecodeprefillmeasured
Qwen3-0.6BQ4_K_M373 tok/s2,338 tok/s2026-10-26
Qwen3-0.6BQ8_0165 tok/s2,287 tok/s2026-10-26
Qwen3.5-0.8BQ8_0182 tok/s2,039 tok/s2026-10-26 / 27

The Q4_K_M row used one activation scale per 32 values. The current per-256 default prefills K-quant files 4–15% faster, so that prefill figure is a floor. Q8_0 keeps per-32 activations; its figures are unchanged. All small-model rows.

Older x86 CPUs: AVX2

On x86-64 without AVX-512 VNNI, Gwenedeg compiles AVX2 + F16C (+ FMA) kernels for the supported i-quant and K-quant formats. They produce the same bits as the AVX-512 and generic builds. AVX-512 remains the primary target.

Qwen3.8-27B IQ3_S on a 32-core AMD EPYC 7502P (Zen 2)

configuration and promptprefilldecode
plain, --repack, 23 tokens34.4 tok/s5.1 tok/s
--repack, MTP -G 3, 23 tokens33.4 tok/s10.5 tok/s
--repack --act256, MTP -G 6 --tau 0.5, 23 tokens33.0 tok/s11.3–11.4 tok/s
same, 719-token prompt33.8 tok/s10.6 tok/s

MTP output is identical to plain decoding. Measured on Zen 2 only: Zen 3 and older Intel Xeons with AVX2 use the same kernels but were not measured.

Setup. 32 physical cores, AVX2 + FMA + F16C, 377 GiB RAM, 32 threads pinned to one NUMA node, gcc-12 -Ofast -march=znver2, 2026-12-01. The 12.1 GB IQ3_S file needs another 1.37 GiB with --repack. This was a different machine from the AVX-512 runs, and Gwenedeg was not compared with llama.cpp or ik_llama.cpp on this CPU. Full AVX2 setup.

Hardware and support boundaries

  • Fast paths: x86-64 with AVX-512 VNNI or AVX2 + F16C, selected at compile time, and AArch64 with the dot-product extension. Other CPUs use generic C; for K-quant files that is roughly 10× slower prefill and 3–4× slower decode.
  • Operating systems: Linux with gcc is the main platform. macOS on Apple Silicon builds and runs with NEON; eight x86-recorded text golden tests fail there because compilers round some Q8_0 sums differently. Windows paths inherited from qwen3.c remain untested.
  • Model scope: no Qwen3 / Qwen3.5 MoE architectures, other non-Qwen models, images or RoPE scaling (YaRN). Qwen3-14B and larger dense models are untested.
  • One model per process, plus its draft for speculation. Server-specific limits are on the Run it page.