You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Eval bug: Segfault at slot initialization with CUDA on SM75 (Turing) — ngl > 0 #41
Server segfaults immediately after initializing slots when any CUDA layers are offloaded (-ngl > 0) on SM75 (Turing) hardware. CPU-only (-ngl 0) works correctly. Reproducible on both MTP and non-MTP model.
Segfaults at initializing slots with -ngl > 0
Warning: fused Gated Delta Net (chunked) not supported, set to disabled
CPU-only (-ngl 0) works fine
Reproducible on both MTP and non-MTP model
Occurs with and without --spec-type mtp
Occurs with and without --no-warmup
fused Gated Delta Net disabled warning appears consistently before crash
CPU-only run (-ngl 0) loads and serves correctly
Model: Qwopus3.5-4B-v3-MTP Q5_K_M GGUF
First Bad Commit
No response
Relevant log output
Logs
Here's the last log lines before the SegFault:W sched_reserve: layer 0 is assigned to device CPU but the fused Gated Delta Net tensor is assigned to device CUDA0W sched_reserve: fused Gated Delta Net (chunked) not supported, set to disabledI srv load_model: initializing slots, n_slots = 4[segfault]
changed the title [-]Misc. bug: Segfault at slot initialization with CUDA on SM75 (Turing) — ngl > 0[/-][+]Eval bug: Segfault at slot initialization with CUDA on SM75 (Turing) — ngl > 0[/+]on May 26, 2026
#1 (-ngl 1, no flash attn, no turbo KV) and #2 (-ngl 1, no flash attn, --parallel 1) loaded. #3 SegFault at warmup. Backtrace: null ptr in ggml_compute_forward_flash_attn_ext called from ggml_graph_compute_thread
The sched_reserve warnings about Gated Delta Net tensor CPU/CUDA conflict appearing just before the crash. Skipped #4 since #3 failed.
Backtrace:
#0 0x0000000000000000 in ?? () #1 ggml_compute_forward_flash_attn_ext ← crash here #2 ggml_graph_compute_thread
Right before the crash:
W sched_reserve: layer 0 is assigned to device CPU but the fused Gated Delta Net tensor is assigned to device CUDA0
W sched_reserve: fused Gated Delta Net (chunked) not supported, set to disabled
-ngl 1 without forced FA / TurboQuant KV loads, while the original-style command with --flash-attn on -ctk turbo4 -ctv turbo3 --parallel 1 crashes in ggml_compute_forward_flash_attn_ext. That points away from slot count and toward mixed CPU/CUDA placement plus TurboQuant FA.
Root cause: the CPU backend was reporting support for flash_attn_ext by default, even for TurboQuant K types. Those CPU TurboQuant traits do not provide a vec_dot implementation, so when a mixed -ngl graph left a layer on CPU, the scheduler could route a TurboQuant FA op to CPU and crash through a null function pointer.
Fixed in 9f268fb03: CPU now rejects unsupported FA K/V types in supports_op, and the CPU FA kernel asserts the missing K vec_dot invariant directly. Please try it.
Ok, I patched the build and got it up and running... kinda... lol. The MTP patch worked great. Then I ran into some other issues (ggml_backend_sched_split_graph).
Running Qwopus 3.5 v3 Q5km (hybrid linear_attention + full_attention architecture)
TheTom TurboQuant fork of llama.cpp (baseline) t4K/t3V - 21.7 tok/s
beellama.cpp commit 9f268fb q8K/t3V - 27.3 tok/sec (you're faster right out of the box)
Any attempts to run turbo K caused the model to crash out on inference. It would load, but dump as soon as I said hello.
Any attempt to run turbo K and/or turbo V with partial offload crashed out and wouldn't load at all. I'd get a "turbo KV cache falling back to q8_0 for CPU-bound layers" warning followed by the scheduler crash.
MTP works now. Using the MTP version of that same model. Ran mtp --spec-draft-n-max 1 However, with the MTP/context overhead and having to run q8KV, I had to run -ngl20 to avoid OOM. This of course killed my tok/s (12.6) but I had an 86% acceptance rate.
So turbo K is not working at all in any configuration for me, and turbo V only works if all layers are on the gpu.
I went back through the original repro and the follow-up report. Current status:
The original SM75/Turing crash at slot initialization was already fixed in 9f268fb03. The fused Gated Delta Net warning in the log was not the root cause; the bad path was CPU fallback for flash_attn_ext with unsupported TurboQuant K/V types, which could crash through a null function pointer. CPU now rejects those unsupported FA types instead of advertising support.
The later TurboQuant CUDA issues from your follow-up are addressed in 0776d1da9. CUDA FA execution now validates the route plan's effective K/V types instead of aborting on the raw TurboQuant pair before decode/dequant routing can run. I also hardened the TCQ set_rows path: the backtrace allocation is checked before publishing the pointer, diagnostic dump allocations are checked, and Turbo/TCQ set_rows launches go through the checked kernel-launch wrapper. That should turn the large-prefill/TCQ failure class into a clean CUDA failure instead of possible corruption or repeated-token garbage.
For partial offload: Turbo KV on CPU-bound KV layers is still not something I want to silently fake by falling back to another cache type. The intended current behavior is to fail early with a clear placement/cache-type diagnostic rather than crash in ggml_backend_sched_split_graph.
The converter side was also cleaned up in 0776d1da9. Text conversion now warns when the config contains a supported multimodal companion and the current run is only converting the text model, with guidance to use --mmproj. MTP is still included by default for the supported Qwen3.5/3.6 text path unless --no-mtp is used; if a specific community merge still drops MTP, I would need the actual tensor-name list because that would likely be a naming/remapping issue rather than the normal Qwen3.5 path.
Please retest on current v0.3.2 on the T1000. For TurboQuant/TCQ native FA pair testing, build with GGML_CUDA_FA_HALF_QUANTS=ON or GGML_CUDA_FA_ALL_QUANTS=ON.
Retested on v0.3.2 with GGML_CUDA_FA_ALL_QUANTS=ON, on the T1000 (SM75). Results:
Bug 1 (turbo K crash) — confirmed fixed.
Ran the exact previously-crashing config: -ctk turbo4 -ctv turbo3, full offload, 16k ctx. Loads clean, serves clean. 27.3 tok/s — actually faster than my TurboQuant baseline at the identical cache config (21.7 tok/s). No crash, no garbage output.
Bug 2 (TCQ + large system prompt corruption) — confirmed fixed.
Tested in stages:
Bare curl, turbo3_tcq K+V, no system prompt — clean, as expected (matches original report).
Bare curl, same TCQ config, ~4068 prompt tokens (synthetic filler standing in for a real system prompt) — clean coherent reasoning_content, no question-mark garbage. This is right in the trigger zone from my original report.
Full integration test — pointed my actual app (real persona system prompt, memory, tool schemas, the works) at the beellama server with turbo3_tcq K+V active. Multi-turn conversation, tool calls, browser navigation, screenshots, memory writes, codebase reindex, skill creation — sustained tool use and accumulated context the whole way through. Zero corruption, zero garbage tokens, coherent output start to finish.
The set_rows hardening looks like it actually fixed the corruption, not just converted it to a clean failure — every test came back coherent, not erroring.
Bonus finding: VRAM usage on the TCQ config is running ~10% lower than my TurboQuant daily driver at equivalent settings (79% vs ~89% load). Wasn't expecting that, but I'll take it.
Still open:
Bug 3 (MTP stripped on the Jackrong Qwopus3.5 merge) — I'll pull the actual tensor names from the conversion and get those to you separately, since you're right that it's probably merge-specific rather than a general beellama issue.
The mismatched K/V type crash I noted (turbo3_tcq K + turbo3 V crashing the scheduler) — didn't see this addressed in your last message. Still happening on v0.3.2, wanted to flag it again in case it's not intended behavior.
Great work on this round — two confirmed fixes and a free VRAM improvement is a hell of a release. Thanks for digging into it.
Starting with v0.4.0, BeeLlama uses upstream implementation for DFlash, with some adjustments on top of it.
TurboQuant is not supported anymore as well.
Closing this issue as it's relevant only for pre-v0.4.0.
Activity
[-]Misc. bug: Segfault at slot initialization with CUDA on SM75 (Turing) — ngl > 0[/-][+]Eval bug: Segfault at slot initialization with CUDA on SM75 (Turing) — ngl > 0[/+]Anbeeld commentedon May 26, 2026
Could you please try these variants and report which ones crash?
Also attach a backtrace from:
Bino5150 commentedon May 27, 2026
#1 (-ngl 1, no flash attn, no turbo KV) and #2 (-ngl 1, no flash attn, --parallel 1) loaded. #3 SegFault at warmup. Backtrace: null ptr in ggml_compute_forward_flash_attn_ext called from ggml_graph_compute_thread
The sched_reserve warnings about Gated Delta Net tensor CPU/CUDA conflict appearing just before the crash. Skipped #4 since #3 failed.
Backtrace:
#0 0x0000000000000000 in ?? ()
#1 ggml_compute_forward_flash_attn_ext ← crash here
#2 ggml_graph_compute_thread
Right before the crash:
W sched_reserve: layer 0 is assigned to device CPU but the fused Gated Delta Net tensor is assigned to device CUDA0
W sched_reserve: fused Gated Delta Net (chunked) not supported, set to disabled
Anbeeld commentedon May 31, 2026
Thanks, the follow-up results narrowed this down.
-ngl 1without forced FA / TurboQuant KV loads, while the original-style command with--flash-attn on -ctk turbo4 -ctv turbo3 --parallel 1crashes inggml_compute_forward_flash_attn_ext. That points away from slot count and toward mixed CPU/CUDA placement plus TurboQuant FA.Root cause: the CPU backend was reporting support for
flash_attn_extby default, even for TurboQuant K types. Those CPU TurboQuant traits do not provide avec_dotimplementation, so when a mixed-nglgraph left a layer on CPU, the scheduler could route a TurboQuant FA op to CPU and crash through a null function pointer.Fixed in
9f268fb03: CPU now rejects unsupported FA K/V types insupports_op, and the CPU FA kernel asserts the missing Kvec_dotinvariant directly. Please try it.Bino5150 commentedon May 31, 2026
Thanks again for the active support. I know you've been slammed lately. I'll give it another test run and let you know how it goes.
Anbeeld commentedon May 31, 2026
I want to ensure v0.3.0 will be a somewhat stable release so I welcome all kind of reports.
Bino5150 commentedon Jun 2, 2026
Ok, I patched the build and got it up and running... kinda... lol. The MTP patch worked great. Then I ran into some other issues (ggml_backend_sched_split_graph).
Running Qwopus 3.5 v3 Q5km (hybrid linear_attention + full_attention architecture)
TheTom TurboQuant fork of llama.cpp (baseline) t4K/t3V - 21.7 tok/s
beellama.cpp commit 9f268fb q8K/t3V - 27.3 tok/sec (you're faster right out of the box)
Any attempts to run turbo K caused the model to crash out on inference. It would load, but dump as soon as I said hello.
Any attempt to run turbo K and/or turbo V with partial offload crashed out and wouldn't load at all. I'd get a "turbo KV cache falling back to q8_0 for CPU-bound layers" warning followed by the scheduler crash.
MTP works now. Using the MTP version of that same model. Ran mtp --spec-draft-n-max 1 However, with the MTP/context overhead and having to run q8KV, I had to run -ngl20 to avoid OOM. This of course killed my tok/s (12.6) but I had an 86% acceptance rate.
So turbo K is not working at all in any configuration for me, and turbo V only works if all layers are on the gpu.
Bino5150 commentedon Jun 4, 2026
I emailed you a very detailed report with all of my findings so far. Let me know if there's anything else I can do to help out bro.
Anbeeld commentedon Jun 4, 2026
Yeah, I saw that, thanks. I'll try to fix the issues you encountered.
Fix issue 41 TurboQuant CUDA paths
Anbeeld commentedon Jun 15, 2026
I went back through the original repro and the follow-up report. Current status:
The original SM75/Turing crash at slot initialization was already fixed in
9f268fb03. The fused Gated Delta Net warning in the log was not the root cause; the bad path was CPU fallback forflash_attn_extwith unsupported TurboQuant K/V types, which could crash through a null function pointer. CPU now rejects those unsupported FA types instead of advertising support.The later TurboQuant CUDA issues from your follow-up are addressed in
0776d1da9. CUDA FA execution now validates the route plan's effective K/V types instead of aborting on the raw TurboQuant pair before decode/dequant routing can run. I also hardened the TCQset_rowspath: the backtrace allocation is checked before publishing the pointer, diagnostic dump allocations are checked, and Turbo/TCQset_rowslaunches go through the checked kernel-launch wrapper. That should turn the large-prefill/TCQ failure class into a clean CUDA failure instead of possible corruption or repeated-token garbage.For partial offload: Turbo KV on CPU-bound KV layers is still not something I want to silently fake by falling back to another cache type. The intended current behavior is to fail early with a clear placement/cache-type diagnostic rather than crash in
ggml_backend_sched_split_graph.The converter side was also cleaned up in
0776d1da9. Text conversion now warns when the config contains a supported multimodal companion and the current run is only converting the text model, with guidance to use--mmproj. MTP is still included by default for the supported Qwen3.5/3.6 text path unless--no-mtpis used; if a specific community merge still drops MTP, I would need the actual tensor-name list because that would likely be a naming/remapping issue rather than the normal Qwen3.5 path.Please retest on current
v0.3.2on the T1000. For TurboQuant/TCQ native FA pair testing, build withGGML_CUDA_FA_HALF_QUANTS=ONorGGML_CUDA_FA_ALL_QUANTS=ON.Bino5150 commentedon Jun 19, 2026
Retested on v0.3.2 with GGML_CUDA_FA_ALL_QUANTS=ON, on the T1000 (SM75). Results:
Bug 1 (turbo K crash) — confirmed fixed.
Ran the exact previously-crashing config:
-ctk turbo4 -ctv turbo3, full offload, 16k ctx. Loads clean, serves clean. 27.3 tok/s — actually faster than my TurboQuant baseline at the identical cache config (21.7 tok/s). No crash, no garbage output.Bug 2 (TCQ + large system prompt corruption) — confirmed fixed.
Tested in stages:
turbo3_tcqK+V, no system prompt — clean, as expected (matches original report).reasoning_content, no question-mark garbage. This is right in the trigger zone from my original report.turbo3_tcqK+V active. Multi-turn conversation, tool calls, browser navigation, screenshots, memory writes, codebase reindex, skill creation — sustained tool use and accumulated context the whole way through. Zero corruption, zero garbage tokens, coherent output start to finish.The
set_rowshardening looks like it actually fixed the corruption, not just converted it to a clean failure — every test came back coherent, not erroring.Bonus finding: VRAM usage on the TCQ config is running ~10% lower than my TurboQuant daily driver at equivalent settings (79% vs ~89% load). Wasn't expecting that, but I'll take it.
Still open:
turbo3_tcqK +turbo3V crashing the scheduler) — didn't see this addressed in your last message. Still happening on v0.3.2, wanted to flag it again in case it's not intended behavior.Great work on this round — two confirmed fixes and a free VRAM improvement is a hell of a release. Thanks for digging into it.
Anbeeld commentedon Jul 19, 2026
Starting with v0.4.0, BeeLlama uses upstream implementation for DFlash, with some adjustments on top of it.
TurboQuant is not supported anymore as well.
Closing this issue as it's relevant only for pre-v0.4.0.