Repository navigation
Closed as not planned
Labels
Description
llama-server should reject to serve rather than crash if CUDA error: out of memory
Name and Version
swei@gz-a40 ~/llama-cpp % ~/llama-cpp-turboquant/build/bin/llama-server --version
ggml_cuda_init: found 1 CUDA devices (Total VRAM: 45490 MiB):
Device 0: NVIDIA A40, compute capability 8.6, VMM: yes, VRAM: 45490 MiB
version: 8659 (e439700)
built with GNU 13.3.0 for Linux x86_64
Operating systems
Linux
GGML backends
CUDA
Hardware
NVIDIA A40/40G
Models
unsloth/gemma-4-31B-it-GGUF
Problem description & steps to reproduce
#!/bin/bash
GGUF=/home/swei/.cache/huggingface/hub/models--unsloth--gemma-4-31B-it-GGUF/snapshots/43e80d41a220ac7c83023daacd6a0d1fd8559251/gemma-4-31B-it-UD-Q8_K_XL.gguf
CHAT=chat_template.jinja
~/llama-cpp-turboquant/build/bin/llama-server -m $GGUF \
--cache-type-k q8_0 \
--cache-type-v q8_0 \
--host 0.0.0.0 \
--port 8000 \
--jinja \
--chat-template-file $CHATFirst Bad Commit
commit e439700 (HEAD -> master, tag: b8659, origin/master, origin/HEAD)
Author: Masato Nakasaka [email protected]
Date: Sat Apr 4 02:16:44 2026 +0900
ci: Add Windows Vulkan backend testing on Intel (#21292)
Relevant log output
slot update_slots: id 2 | task 10391 | prompt processing progress, n_tokens = 122251, batch.n_tokens = 2048, progress = 0.972655
slot update_slots: id 2 | task 10391 | n_tokens = 122251, memory_seq_rm [122251, end)
slot update_slots: id 2 | task 10391 | prompt processing progress, n_tokens = 124299, batch.n_tokens = 2048, progress = 0.988949
slot update_slots: id 2 | task 10391 | n_tokens = 124299, memory_seq_rm [124299, end)
slot update_slots: id 2 | task 10391 | prompt processing progress, n_tokens = 125172, batch.n_tokens = 873, progress = 0.995895
slot update_slots: id 2 | task 10391 | n_tokens = 125172, memory_seq_rm [125172, end)
slot update_slots: id 2 | task 10391 | prompt processing progress, n_tokens = 125684, batch.n_tokens = 512, progress = 0.999968
slot update_slots: id 2 | task 10391 | erasing old context checkpoint (pos_min = 44754, pos_max = 48844, n_tokens = 48845, size = 1697.973 MiB)
slot update_slots: id 2 | task 10391 | created context checkpoint 32 of 32 (pos_min = 120564, pos_max = 125171, n_tokens = 125172, size = 1912.554 MiB)
slot update_slots: id 2 | task 10391 | n_tokens = 125684, memory_seq_rm [125684, end)
slot init_sampler: id 2 | task 10391 | init sampler, took 14.33 ms, tokens: text = 125688, total = 125688
slot update_slots: id 2 | task 10391 | prompt processing done, n_tokens = 125688, batch.n_tokens = 4
slot update_slots: id 2 | task 10391 | erasing old context checkpoint (pos_min = 45908, pos_max = 50515, n_tokens = 50516, size = 1912.554 MiB)
slot update_slots: id 2 | task 10391 | created context checkpoint 32 of 32 (pos_min = 121076, pos_max = 125683, n_tokens = 125684, size = 1912.554 MiB)
srv log_server_r: done request: POST /v1/chat/completions 172.18.18.210 200
reasoning-budget: activated, budget=2147483647 tokens
reasoning-budget: deactivated (natural end)
/home/swei/llama-cpp-turboquant/ggml/src/ggml-cuda/ggml-cuda.cu:98: CUDA error
CUDA error: out of memory
current device: 0, in function alloc at /home/swei/llama-cpp-turboquant/ggml/src/ggml-cuda/ggml-cuda.cu:488
cuMemCreate(&handle, reserve_size, &prop, 0)
/home/swei/llama-cpp-turboquant/build/bin/libggml-base.so.0(+0x1831b)[0x759ad8d5e31b]
/home/swei/llama-cpp-turboquant/build/bin/libggml-base.so.0(ggml_print_backtrace+0x21c)[0x759ad8d5e77c]
/home/swei/llama-cpp-turboquant/build/bin/libggml-base.so.0(ggml_abort+0x15b)[0x759ad8d5e95b]
/home/swei/llama-cpp-turboquant/build/bin/libggml-cuda.so.0(+0x1879c7)[0x759acfb879c7]
/home/swei/llama-cpp-turboquant/build/bin/libggml-cuda.so.0(_ZN18ggml_cuda_pool_vmm5allocEmPm+0x1ee)[0x759acfb9ffce]
/home/swei/llama-cpp-turboquant/build/bin/libggml-cuda.so.0(_Z12launch_fattnILi512ELi1ELi8EEvR25ggml_backend_cuda_contextP11ggml_tensorPFvPKcS5_S5_S5_S5_PKiPfP6float2ffffjfi5uint3iiiiiiiiiiiliiliiiiilEimibbbi+0x974)[0x759acfd9be34]
/home/swei/llama-cpp-turboquant/build/bin/libggml-cuda.so.0(_Z37ggml_cuda_flash_attn_ext_mma_f16_caseILi512ELi512ELi1ELi8EEvR25ggml_backend_cuda_contextP11ggml_tensor+0x208)[0x759acfe40ce8]
/home/swei/llama-cpp-turboquant/build/bin/libggml-cuda.so.0(+0x197cb1)[0x759acfb97cb1]
/home/swei/llama-cpp-turboquant/build/bin/libggml-cuda.so.0(+0x19c5d1)[0x759acfb9c5d1]
/home/swei/llama-cpp-turboquant/build/bin/libggml-cuda.so.0(+0x19e23e)[0x759acfb9e23e]
/home/swei/llama-cpp-turboquant/build/bin/libggml-base.so.0(ggml_backend_sched_graph_compute_async+0x817)[0x759ad8d7b557]
/home/swei/llama-cpp-turboquant/build/bin/libllama.so.0(_ZN13llama_context13graph_computeEP11ggml_cgraphb+0xa1)[0x759ad8ac9731]
/home/swei/llama-cpp-turboquant/build/bin/libllama.so.0(_ZN13llama_context14process_ubatchERK12llama_ubatch14llm_graph_typeP22llama_memory_context_iR11ggml_status+0x114)[0x759ad8acb844]
/home/swei/llama-cpp-turboquant/build/bin/libllama.so.0(_ZN13llama_context6decodeERK11llama_batch+0x390)[0x759ad8ad2b70]
/home/swei/llama-cpp-turboquant/build/bin/libllama.so.0(llama_decode+0xf)[0x759ad8ad463f]
/home/swei/llama-cpp-turboquant/build/bin/llama-server(+0x15ce3f)[0x5938aa74ce3f]
/home/swei/llama-cpp-turboquant/build/bin/llama-server(+0x1de14e)[0x5938aa7ce14e]
/home/swei/llama-cpp-turboquant/build/bin/llama-server(+0xb378a)[0x5938aa6a378a]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca)[0x759ad822a1ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b)[0x759ad822a28b]
/home/swei/llama-cpp-turboquant/build/bin/llama-server(+0xbaf35)[0x5938aa6aaf35]
./serve.sh: line 14: 87384 Aborted (core dumped) ~/llama-cpp-turboquant/build/bin/llama-server -m $GGUF --cache-type-k q8_0 --cache-type-v q8_0 --host 0.0.0.0 --port 8000 --jinja --chat-template-file $CHAT
Activity
github-actions commentedon May 27, 2026
This issue was closed because it has been inactive for 14 days since being marked as stale.
docs: ROADMAP Priorisierung auf M6 aktualisiert — M1-M5 ✅
eval: AtomicBot-ai#73 CascadeInfer ❌ + AtomicBot-ai#72 N4_0 ❌ + Atomi…
eval: AtomicBot-ai#43 SliderQuant ⏭️ + AtomicBot-ai#44 Alloc-MoE ☐ Ti…