Repository navigation
Post your Arc results #1
Replies: 7 comments 11 replies
SYCL Flash Attention on Arc 140T (Xe-LPG): oneDNN SDPA returns wrong results for quantized KV with permuted viewsSummaryOn Intel Arc 140T (Xe-LPG+, Arrow Lake-H), the SYCL backend's oneDNN SDPA path returns numerically incorrect results when the KV cache is quantized, the layout is non-contiguous ( Separately, MTP + ngram-mod speculative decoding on SYCL leaks device memory and crashes with Hardware / Software
|
| oneDNN version | ERR |
|---|---|
| oneAPI bundled (3.11) | 1.26 |
| 3.13.3 (source build) | 1.33 |
| 3.13.3 | 1.28 |
| 3.13.3 | 1.48 |
| 3.13.3 | 1.18 |
| 3.13.3 | 1.23 |
Upgrading oneDNN from 3.11 to 3.13.3 did not fix the bug. Error stays in the 1.2–1.5 range, roughly 2500× the 0.0005 tolerance.
llama-bench Results
Scope: Ternary-Bonsai 2 27B PTQ1_0 only. These numbers apply to this specific model on this specific fork. They should not be extrapolated to other models or other builds.
| KV | ONEDNN | MKL | pp512 | tg128 |
|---|---|---|---|---|
| f16 | 0 | 0 | 167.39 ± 0.89 | 7.90 ± 0.03 |
| q8_0 | 0 | 0 | 170.46 ± 1.33 | 7.85 ± 0.03 |
| q8_0 | 1 | 1 | 174.03 ± 0.06 | 7.88 ± 0.01 |
| f16 | 1 | 1 | 212.10 ± 0.84 | 7.93 ± 0.04 |
The F16 + oneDNN row is the fastest correct configuration for this model. F16 removes the quantized-KV precondition, so the broken kernel path is not taken.
The q8_0 + oneDNN row is fast but produces wrong attention output per the test-backend-ops failure above. It should not be used for correctness-sensitive work.
Server Findings
MTP memory leak
llama-server with --spec-type draft-mtp,ngram-mod crashes at ggml-sycl.cpp:2853 with UR_RESULT_ERROR_OUT_OF_RESOURCES on the first task launch. This persists with GGML_SYCL_ENABLE_VMM=0. It is separate from the FA bug.
VMM
GGML_SYCL_ENABLE_VMM=0 is required to avoid an earlier OUT_OF_RESOURCES failure at graph reserve. This aligns with the VMM disable-by-default behavior in PR ggml-org#24673 and PR ggml-org#27689.
ngram-mod behavior
ngram-mod only fires when the model echoes a long contiguous block from the prompt. In one session:
ngram-mod: #calls(b,g,a) = 3 356 2
#gen drafts = 2
#acc drafts = 2
#gen tokens = 512
#acc tokens = 301
mean acc len = 151.50
Hit rate 2/356 calls. When it fires, it carries 300+ tokens in 2 drafts. When it does not, MTP alone carries generation at ~4–7 t/s.
ngram-mod window size
| n_max | Behavior |
|---|---|
| 256 | Catches long verbatim copies; mean accepted length up to 36 |
| 48 | Catches short targeted edits; mean accepted length up to 25, acceptance up to 89% |
Neither wins universally. A middle value (128) may capture both patterns.
Conclusion
- The oneDNN SDPA path is numerically broken on Xe-LPG for quantized KV +
permute=[0,2,1,3]+kv_view=1. Matches issue SYCL: flash attention returns a silently wrong answer for a quantised, non-contiguous KV view (Arc 140T, Xe-LPG) ggml-org/llama.cpp#27769, not fixed by oneDNN 3.13.3. - F16 KV avoids the bug and is the fastest correct configuration for this model on this fork.
- MTP + ngram-mod on SYCL has a separate memory leak causing
OUT_OF_RESOURCES. GGML_SYCL_ENABLE_VMM=0is required to avoid an earlier allocation failure.
Generated with DeepSeek <3
|
System info: Context size:
In most local models I have tried, this task end up getting brute forced and often is in an infinite loop. Result from the Terminal:
|
|
Thanks for testing, and for including the full log. 55 t/s sustained across almost 6,000 generated tokens on Windows is a solid result.
The "4 tokens" isn't wrong, it's prompt caching. Your prompt was 381 tokens and 377 of them were already in the server's cache from the previous turn (f_sim_best = 1.000), so only 4 new ones needed processing. That conversation used about 6,350 tokens of context (n_tokens = 6353). The limit is set by -c, which is 131,072 (128K) in run-bonsai.bat, and the server prints it at startup as n_ctx.
A couple of questions so I can read the numbers properly: did you use run-bonsai.bat as is, or your own command? The .bat starts with thinking turned off, so the model does its working in the answer itself. And did it get the timer puzzle right (it's 9 minutes: start both, flip the 7 when it runs out at 7, then flip it again when the 4 runs out at 8, and it finishes at 9)?
|
|
Thanks for running both, that's a really useful comparison. Thinking on is the right setting for puzzles like this. It's slower per token (42 vs 55 t/s, since fewer of the drafted tokens get accepted while it's reasoning), but it needed about 1,000 tokens instead of 6,000, so the answer actually came back about 4x sooner. The .bat starts with thinking off because that's faster for coding, but I'll add a note to the guide about switching it on for reasoning tasks. Nice to hear it beat Gemma and the others on this one.
|
|
Tested the Windows System:
Builds:
I tested a regular dense GGUF rather than Bonsai first: Gemma 4 31B QAT Q4 Settings:
Results on the same B60:
Decode was essentially identical:
So on the B60, long-context decode performance for this regular Q4 dense model is effectively the same as my newer SYCL build, while prompt processing is dramatically faster. I also tested Gemma 4 MTP speculative decoding also works. I tested the QAT Q4 model with:
Reasoning budget works as well. For Gemma 4 I needed I haven't run Bonsai 2 on the B60 yet, but that's next. |
|
arc-b580 on 258v (Arc 140v): crashes on every model
|
|
Hi. Created this github account to say thank you for this fork. I've tested on B570 (linux 7.2.9, gentoo). (Each test was performed at least 2 times in a row.) For Gemma4, llama-bench is 755/36 (p/g) for kv q8_0, 755/38 for kv q4_0, 875/37 for f16, against 230/38 for kv f16 SYCL on llama-cpp 0.6.0 (pp improved significantly). Token generation stays at 55-65 with MTP when using web-ui. As for Tern-Bonsai, it will not run on 0.6.0, so I can't compare directly - but both prompt proccessing and token generation is better than "standard" Qwen-3.8-27B on any quantization: |
Uh oh!
There was an error while loading. Please reload this page.
Running the arc-b580 branch? Post your card, driver, OS, context size and the numbers you get (llama-bench tg128/pp512, or the server's t/s). Results from other setups help most.
All reactions