model : re-enable -sm tensor for qwen4exp - #28569
Conversation
ggml-org#27941 disabled -sm tensor for qwen4exp because test-llama-archs asserted on the Meta device once the fixture carried a PLE layer: GGML_ASSERT(ggml_backend_buffer_is_meta(tensor->buffer)) at ggml-backend-meta.cpp:476. With host-resident embeddings the PLE gather is a CPU node and hc_init (the REPEAT that fans the embedding out to the hc streams) was first reached through layer 0's PLE path, after that gather. ggml_backend_sched_split_graph pass 2 expands a device assignment upwards only until it meets a CPU node, so the REPEAT stayed on the CPU and the later reshape of hc_init inside the meta split viewed a host-resident node. Expanding hc_init right after it is built puts the REPEAT directly before the first device node, where pass 2 assigns it; the embedding reshape stays in the CPU split and is copied in as a split input, as in deepseek4.
|
Heads-up: with In router mode the instance then OOMs on load and the only trace is: Tested on an ROCm build, 2x RX 9060 XT. Edit: Additionally, tokens/s and PP speed remained nearly identical, within a fluctuation margin of ±10%. VRAM allocation is roughly 97% to 96%. However, tensor split mode seems to maintain higher stability over long context lengths. |
Similar experience to @Zerschranzer 2xMI50 32GB and I can load and run it with the following preset , doesn't quite fit in 2 cards with the MMPROJ , getting about 19t/s, 14.5t/s @ 75k context , 7.7t/s at 212k , about 6.5t/s at full context so its a bit better than -sm layer still which is I think under 5t/s at that length. |
Overview
Re-enables
-sm tensorfor qwen4exp. #27941 disabled it becausetest-llama-archs -a qwen4expasserted on the Meta device once the fixture carried a PLE layer, and removed the test's earlier Meta skip for the arch.The abort is a scheduler placement, not QSA.
test-llama-archsbuilds the model with the embeddings host-resident, so the PLE embedding gather (ggml_get_rowsonper_layer_token_embd) is a CPU node. In the qwen4exp graphhc_init(theggml_repeat_4dthat fans the embedding out to the hc streams) is first materialised inside layer 0's PLE path, after that gather.ggml_backend_sched_split_graphpass 2 expands a device assignment upwards only until it meets a CPU-assigned node, so the REPEAT is never reached from the first Meta node and "expand rest" leaves it on the CPU. The laterggml_reshape_3d(hc_init)inside the PLE query norm is then a view of a host-resident node inside the meta split, whichggml_backend_meta_graph_computeonly tolerates forview_src->op == GGML_OP_NONE:GGML_ASSERT(ggml_backend_buffer_is_meta(tensor->buffer))at ggml-backend-meta.cpp:476. deepseek4 builds the same hc init but its REPEAT is followed directly by a weight matmul, so the expansion reaches it.Fix:
ggml_build_forward_expand(gf, res_hc)right afterhc_initis built. The REPEAT then directly precedes the first device node and pass 2 assigns it there; the embedding reshape stays in the CPU split and is copied in as a split input, the same shape deepseek4's graph has.test-llama-archson this branch (master dbeb375 + the change; RelWithDebInfo, RADV gfx1151, Mesa 25.2.8):Real model: Qwen3.8-Flash-Next UD-Q4_K_XL,
-sm tensorover two RPC devices (#26610 tree with this change, one Vulkanggml-rpc-serverper Strix Halo box, ctx 65536) vs a single device, greedy: byte-identical on a short prompt and on a 1.8k-token prompt (1752 generated tokens), and identical to master's single-device output.Requirements