fix: GGUF local model GPU crashes and rough edges - #3
Open
Dak0verflow wants to merge 1 commit into
Open
Conversation
Standard attention's Vulkan dispatch hits a descriptor-set accounting bug on some devices (Mali GPUs without coopmat/int-dot support) that hard-aborts the process, so the existing Vulkan-error-to-CPU fallback never sees it - it's a signal, not a catchable exception. Flash attention avoids the buggy path; quantized KV cache is required whenever flash attention is on, so both change together. No repetition penalty existed in the sampler chain, so small models would degenerate into repetitive loops. The local model UI showed raw internal blob paths instead of names, gave no feedback during multi-GB imports, and capped imports at 3 regardless of the actual 24GB storage budget - all friction against just trying more models. Sub-2B models reliably lose the thread on the full tool-call JSON protocol and degenerate into one-word non-answers; they're not capable enough to use it correctly anyway, so skip straight to a plain conversational prompt below that size.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
ggml-vulkandescriptor-set accounting bug on some GPUs (reproduced on a Mali-G715 / Tensor G4, no coopmat/int-dot support) — a hardGGML_ASSERTabort that kills the process outright. Because it's a signal, not a C++ exception, the existing Vulkan-error-to-CPU fallback (built to handle things likeVK_ERROR_DEVICE_LOST) never sees it and can't recover. Flash attention routes through a different kernel path that avoids the bug entirely. llama.cpp requires quantized KV cache whenever flash attention is enabled, so both changed together.top_k -> top_p -> temp -> dist). Small local models (sub-2B) would reliably degenerate into repetitive or self-referential loops without one.blob_<uuid>.gguf) instead of the imported file's name, and importing a multi-GB model gave zero visible feedback during the copy — it looked hung. Switching models required re-importing every time since there was no way to pick from what was already imported.maxBlobCountwas hardcoded to 3 regardless of the actual 24GB aggregate storage budget, an arbitrary extra ceiling that got in the way of trying more than 3 models.Test Plan
GGML_ASSERTfailure viallvm-addr2line/llvm-objdumpagainst the built.so, then confirmed the fix resolves it for both on GPU.