Skip to content

v0.6.1 - DeepSeek-V4 wo_a no longer falls back to the CPU

Latest

Choose a tag to compare

@Nathanw1014 Nathanw1014 released this 09 Aug 23:07

One fix on top of v0.6, for the DeepSeek-V4 decode regression reported in #2 by @aic0d3r.

What was wrong

Upstream #26531 added TENSOR_ALLOW_RESHAPE, which recomputes a tensor's strides from the
shape the model code asks for:

nb[dim] = dim == 0 ? ggml_type_size(type) : ne[dim-1]*nb[dim-1]

nb[1] is a ROW stride, and a row of a block-quantised tensor is ne[0]/blck_size blocks,
not ne[0] elements. For q8_0 with ne[0]=4096 that produced 409634 = 139264 instead of
128
34 = 4352. F16 and F32 weights were unaffected, because their block size is 1, which is
why it went unnoticed.

That malformed metadata is exactly what buft_supported() probes the backend with, so the
weight looked non-contiguous, the Vulkan supports_op refused the mul_mat, and the loader
quietly put the weight in a CPU buffer.

It became reachable when #26577 gave dflash and deepseek4 a 3d wo_a. Both landed in the
upstream merge that became v0.5, which is why builds before that are unaffected.

What it cost, measured

DeepSeek-V4-Flash UD-IQ3_XXS + DSpark drafter, gfx1151/RADV:

v0.6 v0.6.1
attn_wo_a matmuls on the CPU backend all 43 attention layers none
Vulkan0 model buffers 10284.28 + 5162.99 MiB 10386.28 + 6624.99 MiB
graph splits at bs=1, main / draft 174 / 8 88 / 2

So one matmul per attention layer, plus 1462 MiB of weights, was living on the host and
being synchronised with every token. That is the reported signature: GPU utilisation down,
CPU up, decode hit hardest and prefill a little.

Generation is unchanged, this is purely about where the work runs.

Notes

The driver is unchanged from v0.6 (Mesa 26.3.0-devel RADV git-d18d598e, libdrm 2.4.133),
and the payload uses the same compiler as the v0.6 payload, so v0.6 and v0.6.1 are directly
comparable.

This is an upstream defect, not a Strix Halo one. Any Vulkan user running DeepSeek-V4 or
dflash with a quantised wo_a has been paying it since #26577. It is being reported
upstream separately.

Thanks to @aic0d3r for the report and for the clean isolation work, which is what made this
findable.