# QAT MTP Heads Upload + PARALLEL=2 Fix + 12B 2-slot Bench — retained record

> Retained reddit record from reddit:LocalLLaMA.

Canonical: https://highsignal.app/data/records/0d6dc6132eaa1cb3

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:LocalLLaMA)  published 2026-06-06 21:41 ingested 2026-06-07 08:48

[original source ↗](https://www.reddit.com/r/LocalLLaMA/comments/1tyto0j/qat_mtp_heads_upload_parallel2_fix_12b_2slot_bench/)

## retained text



```
<!-- SC_OFF --><div class="md"><hr /> <p><strong>Title:</strong> Gemma 4 QAT MTP assistant heads now public on HuggingFace + PARALLEL=2 crash fix + 12B 2-slot bench (Strix Halo / Vulkan)</p> <hr /> <p>Three things in one update: the converted QAT-matched draft heads are now uploaded for anyone to use, we found and fixed the PARALLEL=2 crash in both the Atomic fork and filed the same bug on the native llama.cpp PR, and here are the first 12B 2-slot numbers after the fix.</p> <hr /> <h2>1. QAT-matched MTP heads are now on HuggingFace</h2> <p><strong><a href="https://huggingface.co/boxwrench/gemma-4-qat-mtp-assistant-heads">boxwrench/gemma-4-qat-mtp-assistant-heads</a></strong></p> <p>Three draft heads for speculative decoding (MTP) with the official Gemma 4 QAT Q4_0 models:</p> <table><thead> <tr> <th align="left">File</th> <th align="left">Pairs with</th> <th align="right">Size</th> </tr> </thead><tbody> <tr> <td align="left"><code>gemma-4-12B-it-qat-assistant-MTP-Q8_0.gguf</code></td> <td align="left">google/gemma-4-12B-it-qat-q4_0</td> <td align="right">444 MiB</td> </tr> <tr> <td align="left"><code>gemma-4-26B-A4B-it-qat-assistant-MTP-Q8_0.gguf</code></td> <td align="left">google/gemma-4-26B-A4B-it-qat-q4_0</td> <td align="right">441 MiB</td> </tr> <tr> <td align="left"><code>gemma-4-31B-it-qat-assistant-MTP-Q8_0.gguf</code></td> <td align="left">google/gemma-4-31B-it-qat-q4_0</td> <td align="right">491 MiB</td> </tr> </tbody></table> <p>Converted from Google's official unquantized QAT assistant checkpoints (<code>google/gemma-4-{12B,26B-A4B,31B}-it-qat-q4_0-unquantized-assistant</code>) to <code>gemma4_assistant</code> GGUF Q8_0.</p> <p><strong>Why QAT-matched heads matter:</strong> A draft head guesses tokens ahead of the main model. If the head was trained against full-precision weights but the main model is a QAT quantization, their distributions diverge — the head guesses what the full-precision model would have said, and the QAT model disagrees more often. Using heads that were trained against the same QAT checkpoint closes that gap substantially:</p> <table><thead> <tr> <th align="left">Model</th> <th align="right">Non-QAT head</th> <th align="right">QAT-matched head</th> <th align="right">Change</th> </tr> </thead><tbody> <tr> <td align="left">12B QAT Q4_0</td> <td align="right">71.3%</td> <td align="right"><strong>78.4%</strong></td> <td align="right">+7 pp</td> </tr> <tr> <td align="left">26B-A4B QAT Q4_0</td> <td align="right">56.9%</td> <td align="right"><strong>91.8%</strong></td> <td align="right">+35 pp</td> </tr> <tr> <td align="left">31B QAT Q4_0</td> <td align="right">42.5%</td> <td align="right"><strong>60.4%</strong></td> <td align="right">+18 pp</td> </tr> </tbody></table> <p>The 26B-A4B gap was especially stark — nearly 35 percentage points of acceptance rate were being lost purely to the head mismatch.</p> <p><strong>Compatibility:</strong> These use the <code>gemma4_assistant</code> architecture. They load on the <a href="https://github.com/AtomicBot-ai/atomic-llama-cpp-turboquant">Atomic TurboQuant fork</a> now, and on stock llama.cpp once <a href="https://github.com/ggml-org/llama.cpp/pull/23398">PR #23398</a> merges (it uses the same architecture shape). They are <em>not</em> compatible with the <code>ik_llama</code> variant heads (<code>gemma4_mtp</code> format).</p> <hr /> <h2>2. PARALLEL=2 crash — root cause found and fixed</h2> <p>Running <code>--n-parallel 2</code> with any of these heads was crashing with an assertion failure:</p> <p><code> GGML_ASSERT(ggml_nelements(a) == ne0*ne1*ne2) </code></p> <p>in <code>ggml_reshape_3d</code>, called from <code>llm_build_gemma4_mtp</code>.</p> <p>The root cause was a single line in <code>gemma4-assistant.cpp</code>:</p> <p>```cpp // before (crashes at n_parallel=2): Qcur = ggml_reshape_3d(ctx0, Qcur, n_embd_head, n_head, n_tokens);</p> <p>// fix: Qcur = ggml_reshape_3d(ctx0, Qcur, n_embd_head, n_head, 1); ```</p> <p>The MTP draft step always processes exactly one token column regardless of how many server slots are active. Using <code>n_tokens</code> from the main forward pass worked fine with one slot (where <code>n_tokens=1</code> anyway) but crashed as soon as a second slot fired its first draft step (<code>n_tokens=2</code>, element count mismatch).</p> <p>The fix also requires <code>LLAMA_PIPELINE_DEPTH2=0</code> as an env var on Vulkan to prevent thread queue deadlocks when two slots are active simultaneously.</p> <p>Fix submitted to the Atomic fork: <a href="https://github.com/AtomicBot-ai/atomic-llama-cpp-turboquant/pull/26">AtomicBot-ai/atomic-llama-cpp-turboquant#26</a>.</p> <p><strong>The same bug is in the native llama.cpp PR #23398</strong> — identical line, identical fix. Left a <a href="https://github.com/ggml-org/llama.cpp/pull/23398#issuecomment-4640399306">comment on that PR</a> so it can be patched before merge.</p> <p>Also worth calling out: <a href="/u/janvitos">u/janvitos</a> independently did the same work for stock llama.cpp — <a href="https://github.com/ggml-org/llama.cpp/pull/23398">PR #23398</a> adds Gemma 4 MTP support to the native build. Great minds think alike. Once that merges, the heads here will load on stock llama.cpp without needing the Atomic fork.</p> <hr /> <h2>3. First 12B PARALLEL=2 bench (post-fix, Strix Halo / Vulkan)</h2> <p><strong>Hardware:</strong> AMD Ryzen AI Max+ 395, 128 GB LPDDR5X unified, Vulkan/RADV (Mesa 25.2.8)</p> <table><thead> <tr> <th align="left">Metric</th> <th align="right">12B plain 2-slot</th> <th align="right">12B MTP PARALLEL=1</th> <th align="right"><strong>12B MTP PARALLEL=2</strong></th> </tr> </thead><tbody> <tr> <td align="left">2-slot aggregate</td> <td align="right">47.6 tok/s</td> <td align="right">43.5 tok/s</td> <td align="right"><strong>62.5 tok/s</strong></td> </tr> <tr> <td align="left">Single-stream decode</td> <td align="right">—</td> <td align="right">45.6 tok/s</td> <td align="right">38.6 tok/s (48.6 eff.)</td> </tr> <tr> <td align="left">MTP acceptance</td> <td align="right">N/A</td> <td align="right">78.4%</td> <td align="right"><strong>88.6%</strong></td> </tr> <tr> <td align="left">Wall time (1150-in/2000-out)</td> <td align="right">79.5 s</td> <td align="right">46.0 s</td> <td align="right">53.9 s</td> </tr> </tbody></table> <p>MTP PARALLEL=2 aggregate <strong>+31% over plain 2-slot</strong>. Per-slot decode drops (two slots share the same bandwidth), but total output throughput improves and acceptance actually went <em>up</em> relative to single-slot — the model is doing more useful speculation per pass when it has two requests to interleave.</p> <p>26B-A4B PARALLEL=2 bench still running — expected to close or surpass the plain 2-slot 90.9 tok/s figure since the 26B-A4B has higher acceptance to start with.</p> <hr /> <h2>Full numbers and context</h2> <p>Previous QAT numbers post (plain + single-slot MTP): <a href="https://www.reddit.com/r/LocalLLaMA/comments/1tyilv7/gemma_4_qat_q4_0_bench_on_strix_halo/">Gemma 4 QAT Q4_0 bench on Strix Halo</a></p> <p>Full benchmark data, reproducibility matrix, serve scripts: <strong><a href="https://github.com/boxwrench/tesla_agent">boxwrench/tesla_agent</a></strong></p> <p>HF model card has usage examples including the <code>LLAMA_PIPELINE_DEPTH2=0</code> flag and the <code>--mtp-draft-n 3 --draft-p-min 0.75</code> settings that gave these numbers.</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/westsunset"> /u/westsunset </a> <br /> <span><a href="https://www.reddit.com/r/LocalLLaMA/comments/1tyto0j/qat_mtp_heads_upload_parallel2_fix_12b_2slot_bench/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/LocalLLaMA/comments/1tyto0j/qat_mtp_heads_upload_parallel2_fix_12b_2slot_bench/">[comments]</a></span>
```



document fetched 2026-06-07 08:48
