Qwen3.8-Flash-Next-Magma-Coder-GGUF

Unofficial community quantization; not affiliated with or endorsed by Qwen or Alibaba.

Q4-uniform: the best build we've measured. Runs in stock llama.cpp (LM Studio, Ollama).

A quantization of Qwen/Qwen3.8-Flash-Next, calibrated for programming and agentic use. It isn't fine-tuned and isn't pruned: every weight comes from the original model, and all 512 routed experts of all 48 layers are kept, plus the MTP head. The calibration is an importance matrix (imatrix) collected on coding, tool-calling, reasoning and agent text instead of generic web text. It decides which weights keep the most precision when the experts go to 4 bits.

Files

File What it is
Qwen3.8-Flash-Next-Magma-Coder-Q4-uniform-0000{1..6}-of-00006.gguf The model, 130.9 GB (121.9 GiB). Routed experts: gate/up Q4_K and down IQ4_NL (imatrix); the rest Q8_0
mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf The MTP draft head (Unsloth's Q8_0)
mmproj-F16.gguf The vision projector (Unsloth's)

Run

llama-server -m Qwen3.8-Flash-Next-Magma-Coder-Q4-uniform-00001-of-00006.gguf \
  -ngl 999 -ot 'per_layer_token_embd\.weight=CPU' -fa on --jinja -c 32768

This needs a llama.cpp with qwen4exp. It uses about 72 GB of VRAM, with the 54 GB n-gram table on the CPU. On smaller GPUs, add --n-cpu-moe N.

Measured quality

KL divergence against a matched reference: the Q8_0 with its own Q8_0 n-gram table, so only the expert quantization differs. Text: mixed held-out coding, tool-call, reasoning, agent and chat text, 2 chunks of 4,096 tokens, about 4K scored positions. --parse-special was on.

Build KLD mean KLD median KLD p99 Top-1 same RMS ฮ”p PPL ratio
Q4-uniform 0.207 ยฑ 0.011 0.0085 3.24 86.83 ยฑ 0.53% 12.23% 0.965
PerExpert (experimental) 0.221 ยฑ 0.012 0.0089 3.49 86.37 ยฑ 0.54% 12.72% 1.112
Per-layer mix (not published) 0.262 ยฑ 0.012 0.0108 3.82 85.83 ยฑ 0.55% 14.37% 1.082
  • Sample size: two chunks is a small sample, so differences of about one ฯƒ are noise. The reference path is deterministic: the Q8_0 scored against itself gives KLD 0.000000 and 100% top-1.
  • The n-gram table: the Q8_0 n-gram (PLE) table alone, against the lossless BF16 table, costs KLD 0.171 and 13 points of top-1 on our text. That's a bigger effect than any expert quantization we tried, and it's the next thing we're looking at.

Smoke tests (llama-server with --jinja, on one RTX PRO 6000):

  • Q4-uniform: a correct merge_intervals with passing test asserts at 57 tok/s, and a correct structured get_weather tool call at 55 tok/s.
  • PerExpert (Q8_0 container, with experts partly on the CPU): the same correct answers, at 6-9 tok/s.

Mac (MLX Q4-uniform, Magma's magma-mlx): prefill about 1,300 tok/s, decode 37-57 tok/s. The same Mac running llama.cpp Metal on the GGUF: prefill 140, decode 11.4.

About PerExpert (experimental)

PerExpert gives every routed-expert projection its own bit width, 2 to 8 bits, at the same total size as Q4-uniform:

  • The 73,728 projections are 512 experts ร— 3 projections ร— 48 layers.
  • The widths come from an imatrix proxy: routing-weighted reconstruction error per expert.
  • An allocation by an imatrix proxy; in our KL test it did not beat uniform 4-bit.
  • It's published as a Magma feature (per-expert bit widths) and for experiments, not as a quality claim.
  • A better allocation, measured by each layer's effect on the output, is being worked on.

The Magma-Coder family

Repo Build Runs in
Qwen3.8-Flash-Next-Magma-Coder-GGUF Q4-uniform GGUF (recommended) Stock llama.cpp, LM Studio, Ollama
Qwen3.8-Flash-Next-Magma-Coder-MLX Q4-uniform MLX Stock mlx-lm / mlx-serve, and Magma
Qwen3.8-Flash-Next-Magma-Coder-W4A16 Q4-uniform W4A16 (compressed-tensors) vLLM
Qwen3.8-Flash-Next-Magma-Coder-GGUF-PerExpert PerExpert (experimental) in a Q8_0 container Stock llama.cpp
Qwen3.8-Flash-Next-Magma-Coder-MLX-PerExpert PerExpert (experimental), compact Magma only
Qwen3.8-Flash-Next-Base-GGUF The untouched 8-bit original (Unsloth's Q8_0) Stock llama.cpp

Calibration

  • Corpus: about 1.5M tokens, every document rendered through Qwen3.8's chat template (XML tool calls, <tool_response>, thinking blocks).
    • agent, 40%: about 60% from the author's own private coding-agent session transcripts (secret-filtered, not distributed), and about 40% KannaCode agent-benchmark trajectories.
    • code, 25%: SWE-bench Lite issues with their gold patches, plus Magma and KannaCode source files.
    • tool calling, 15%: NousResearch hermes-function-calling-v1.
    • reasoning, 15%: MATH-500 and GSM8K.
    • general, 5%: ultrachat_200k.
  • Not distributed: the calibration text and the imatrix are kept private. A 10% held-out split per category was used only for evaluation.

License

Qwen Community License 1.0 (see LICENSE, included verbatim). In short:

  • Clause 1: keep the copyright and license notice in all copies. A commercial product or service with more than 100M monthly active users or US$20M monthly revenue must prominently display the model name.
  • Clause 2: a licensee (or affiliate) running a Model-as-a-Service or AI Work Assistant business (an AI-coding or office-productivity assistant) needs a separate license from Qwen before any commercial Use. Purely internal use that exposes nothing to third parties is exempt.
  • No warranty: the software and its outputs are provided "as is".

This summary isn't legal advice; the LICENSE text governs.

Credits

  • Model: Qwen3.8-Flash-Next by Qwen (Qwen/Qwen3.8-Flash-Next).
  • Unsloth (unsloth/Qwen3.8-Flash-Next-GGUF), for the Q8_0 build, MTP head and vision projector.
  • mlx-serve by ddalcu (github.com/ddalcu/mlx-serve, MIT), for:
    • the qwen4_exp MLX checkpoint layout, including ngram_table.bin
    • the iQ-MLX imatrix approach and KL methodology we compared against
    • the MTP + prompt-lookup drafting approach that Magma adopted
  • llama.cpp: quantization and evaluation tooling.
Downloads last month
31
GGUF
Model size
177B params
Architecture
qwen4exp
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for darrellbest/Qwen3.8-Flash-Next-Magma-Coder-GGUF

Quantized
(719)
this model