-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Description
Name and Version
llama-cli --version
ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 1 CUDA devices:
Device 0: NVIDIA GeForce RTX 3090, compute capability 8.6, VMM: yes
version: 5292 (2f54e34)
built with cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 for x86_64-linux-gnu
Operating systems
Linux
Which llama.cpp modules do you know to be affected?
llama-server
Command line
./llama.cpp/build/bin/llama-server --timeout 3000 --n-gpu-layers 999 --host 0.0.0.0 --port 9999 --ctx_size 24576 --flash_attn --temp 1.00 --top_k 0.00 --top_p 1.00 --min_p 0.00 --model /home/p/.cache/llama.cpp/unsloth/gpt-oss-20b-F16.gguf
Problem description & steps to reproduce
updated and compiled latest build, getting CUDA errors on both gpt-oss and qwen3 models:
CUDA error: ggml_cuda_compute_forward: MUL_MAT failed
CUDA error: device kernel image is invalid
First Bad Commit
was running this commit before updating to latest, when issues showed up:
1425f58 (tag: b6117) CUDA: attention sinks for mma FlashAttention (#15177
Relevant log output
ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 1 CUDA devices:
Device 0: NVIDIA GeForce RTX 3090, compute capability 8.6, VMM: yes
build: 6214 (ec5ab1a3) with cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 for x86_64-linux-gnu
system info: n_threads = 8, n_threads_batch = 8, total_threads = 16
system_info: n_threads = 8 (n_threads_batch = 8) / 16 | CUDA : ARCHS = 860 | F16 = 1 | USE_GRAPHS = 1 | PEER_MAX_BATCH_SIZE = 128 | FA_ALL_QUANTS = 1 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | REPACK = 1 |
main: binding port with default address family
main: HTTP server is listening, hostname: 0.0.0.0, port: 9999, http threads: 15
main: loading model
srv load_model: loading model '/home/p/.cache/llama.cpp/unsloth/gpt-oss-20b-F16.gguf'
llama_model_load_from_file_impl: using device CUDA0 (NVIDIA GeForce RTX 3090) - 23870 MiB free
llama_model_loader: loaded meta data with 37 key-value pairs and 459 tensors from /home/p/.cache/llama.cpp/unsloth/gpt-oss-20b-F16.gguf (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv 0: general.architecture str = gpt-oss
llama_model_loader: - kv 1: general.type str = model
llama_model_loader: - kv 2: general.name str = Gpt-Oss-20B
llama_model_loader: - kv 3: general.basename str = Gpt-Oss-20B
llama_model_loader: - kv 4: general.quantized_by str = Unsloth
llama_model_loader: - kv 5: general.size_label str = 20B
llama_model_loader: - kv 6: general.license str = apache-2.0
llama_model_loader: - kv 7: general.repo_url str = https://huggingface.co/unsloth
llama_model_loader: - kv 8: general.tags arr[str,2] = ["vllm", "text-generation"]
llama_model_loader: - kv 9: gpt-oss.block_count u32 = 24
llama_model_loader: - kv 10: gpt-oss.context_length u32 = 131072
llama_model_loader: - kv 11: gpt-oss.embedding_length u32 = 2880
llama_model_loader: - kv 12: gpt-oss.feed_forward_length u32 = 2880
llama_model_loader: - kv 13: gpt-oss.attention.head_count u32 = 64
llama_model_loader: - kv 14: gpt-oss.attention.head_count_kv u32 = 8
llama_model_loader: - kv 15: gpt-oss.rope.freq_base f32 = 150000.000000
llama_model_loader: - kv 16: gpt-oss.attention.layer_norm_rms_epsilon f32 = 0.000010
llama_model_loader: - kv 17: gpt-oss.expert_count u32 = 32
llama_model_loader: - kv 18: gpt-oss.expert_used_count u32 = 4
llama_model_loader: - kv 19: gpt-oss.attention.key_length u32 = 64
llama_model_loader: - kv 20: gpt-oss.attention.value_length u32 = 64
llama_model_loader: - kv 21: general.file_type u32 = 1
llama_model_loader: - kv 22: gpt-oss.attention.sliding_window u32 = 128
llama_model_loader: - kv 23: gpt-oss.expert_feed_forward_length u32 = 2880
llama_model_loader: - kv 24: gpt-oss.rope.scaling.type str = yarn
llama_model_loader: - kv 25: gpt-oss.rope.scaling.factor f32 = 32.000000
llama_model_loader: - kv 26: gpt-oss.rope.scaling.original_context_length u32 = 4096
llama_model_loader: - kv 27: general.quantization_version u32 = 2
llama_model_loader: - kv 28: tokenizer.ggml.model str = gpt2
llama_model_loader: - kv 29: tokenizer.ggml.pre str = gpt-4o
llama_model_loader: - kv 30: tokenizer.ggml.tokens arr[str,201088] = ["!", "\"", "#", "$", "%", "&", "'", ...
llama_model_loader: - kv 31: tokenizer.ggml.token_type arr[i32,201088] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv 32: tokenizer.ggml.merges arr[str,446189] = ["Ġ Ġ", "Ġ ĠĠĠ", "ĠĠ ĠĠ", "...
llama_model_loader: - kv 33: tokenizer.ggml.bos_token_id u32 = 199998
llama_model_loader: - kv 34: tokenizer.ggml.eos_token_id u32 = 200002
llama_model_loader: - kv 35: tokenizer.ggml.padding_token_id u32 = 200017
llama_model_loader: - kv 36: tokenizer.chat_template str = {# Chat template fixes by Unsloth #}\n...
llama_model_loader: - type f32: 289 tensors
llama_model_loader: - type f16: 98 tensors
llama_model_loader: - type mxfp4: 72 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type = F16
print_info: file size = 12.83 GiB (5.27 BPW)
load: printing all EOG tokens:
load: - 199999 ('<|endoftext|>')
load: - 200002 ('<|return|>')
load: - 200007 ('<|end|>')
load: - 200012 ('<|call|>')
load: special_eog_ids contains both '<|return|>' and '<|call|>' tokens, removing '<|end|>' token from EOG list
load: special tokens cache size = 21
load: token to piece cache size = 1.3332 MB
print_info: arch = gpt-oss
print_info: vocab_only = 0
print_info: n_ctx_train = 131072
print_info: n_embd = 2880
print_info: n_layer = 24
print_info: n_head = 64
print_info: n_head_kv = 8
print_info: n_rot = 64
print_info: n_swa = 128
print_info: is_swa_any = 1
print_info: n_embd_head_k = 64
print_info: n_embd_head_v = 64
print_info: n_gqa = 8
print_info: n_embd_k_gqa = 512
print_info: n_embd_v_gqa = 512
print_info: f_norm_eps = 0.0e+00
print_info: f_norm_rms_eps = 1.0e-05
print_info: f_clamp_kqv = 0.0e+00
print_info: f_max_alibi_bias = 0.0e+00
print_info: f_logit_scale = 0.0e+00
print_info: f_attn_scale = 0.0e+00
print_info: n_ff = 2880
print_info: n_expert = 32
print_info: n_expert_used = 4
print_info: causal attn = 1
print_info: pooling type = 0
print_info: rope type = 2
print_info: rope scaling = yarn
print_info: freq_base_train = 150000.0
print_info: freq_scale_train = 0.03125
print_info: n_ctx_orig_yarn = 4096
print_info: rope_finetuned = unknown
print_info: model type = 20B
print_info: model params = 20.91 B
print_info: general.name = Gpt-Oss-20B
print_info: n_ff_exp = 2880
print_info: vocab type = BPE
print_info: n_vocab = 201088
print_info: n_merges = 446189
print_info: BOS token = 199998 '<|startoftext|>'
print_info: EOS token = 200002 '<|return|>'
print_info: EOT token = 199999 '<|endoftext|>'
print_info: PAD token = 200017 '<|reserved_200017|>'
print_info: LF token = 198 'Ċ'
print_info: EOG token = 199999 '<|endoftext|>'
print_info: EOG token = 200002 '<|return|>'
print_info: EOG token = 200012 '<|call|>'
print_info: max token length = 256
load_tensors: loading model tensors, this can take a while... (mmap = true)
load_tensors: offloading 24 repeating layers to GPU
load_tensors: offloading output layer to GPU
load_tensors: offloaded 25/25 layers to GPU
load_tensors: CUDA0 model buffer size = 12036.68 MiB
load_tensors: CPU_Mapped model buffer size = 1104.61 MiB
....................................................................................
llama_context: constructing llama_context
llama_context: n_seq_max = 1
llama_context: n_ctx = 24576
llama_context: n_ctx_per_seq = 24576
llama_context: n_batch = 2048
llama_context: n_ubatch = 512
llama_context: causal_attn = 1
llama_context: flash_attn = 1
llama_context: kv_unified = false
llama_context: freq_base = 150000.0
llama_context: freq_scale = 0.03125
llama_context: n_ctx_per_seq (24576) < n_ctx_train (131072) -- the full capacity of the model will not be utilized
llama_context: CUDA_Host output buffer size = 0.77 MiB
llama_kv_cache_unified_iswa: creating non-SWA KV cache, size = 24576 cells
llama_kv_cache_unified: CUDA0 KV buffer size = 576.00 MiB
llama_kv_cache_unified: size = 576.00 MiB ( 24576 cells, 12 layers, 1/1 seqs), K (f16): 288.00 MiB, V (f16): 288.00 MiB
llama_kv_cache_unified_iswa: creating SWA KV cache, size = 768 cells
llama_kv_cache_unified: CUDA0 KV buffer size = 18.00 MiB
llama_kv_cache_unified: size = 18.00 MiB ( 768 cells, 12 layers, 1/1 seqs), K (f16): 9.00 MiB, V (f16): 9.00 MiB
llama_context: CUDA0 compute buffer size = 398.38 MiB
llama_context: CUDA_Host compute buffer size = 55.15 MiB
llama_context: graph nodes = 1352
llama_context: graph splits = 2
common_init_from_params: added <|endoftext|> logit bias = -inf
common_init_from_params: added <|return|> logit bias = -inf
common_init_from_params: added <|call|> logit bias = -inf
common_init_from_params: setting dry_penalty_last_n to ctx_size = 24576
common_init_from_params: warming up the model with an empty run - please wait ... (--no-warmup to disable)
/home/p/ml/llama.cpp/ggml/src/ggml-cuda/ggml-cuda.cu:85: CUDA error
ggml_cuda_compute_forward: MUL_MAT failed
CUDA error: device kernel image is invalid
current device: 0, in function ggml_cuda_compute_forward at /home/p/ml/llama.cpp/ggml/src/ggml-cuda/ggml-cuda.cu:2493
err
/home/p/ml/llama.cpp/build/bin/libggml-base.so(+0x1695b)[0x7b2808ac995b]
/home/p/ml/llama.cpp/build/bin/libggml-base.so(ggml_print_backtrace+0x21c)[0x7b2808ac9dbc]
/home/p/ml/llama.cpp/build/bin/libggml-base.so(ggml_abort+0x15b)[0x7b2808ac9f9b]
/home/p/ml/llama.cpp/build/bin/libggml-cuda.so(_Z15ggml_cuda_errorPKcS0_S0_iS0_+0xb7)[0x7b2805d212f7]
/home/p/ml/llama.cpp/build/bin/libggml-cuda.so(+0x131e71)[0x7b2805d31e71]
/home/p/ml/llama.cpp/build/bin/libggml-base.so(ggml_backend_sched_graph_compute_async+0x463)[0x7b2808ae26e3]
/home/p/ml/llama.cpp/build/bin/libllama.so(_ZN13llama_context13graph_computeEP11ggml_cgraphb+0xa1)[0x7b280889c641]
/home/p/ml/llama.cpp/build/bin/libllama.so(_ZN13llama_context14process_ubatchERK12llama_ubatch14llm_graph_typeP22llama_memory_context_iR11ggml_status+0x104)[0x7b280889dd54]
/home/p/ml/llama.cpp/build/bin/libllama.so(_ZN13llama_context6decodeERK11llama_batch+0x3cd)[0x7b28088a3b8d]
/home/p/ml/llama.cpp/build/bin/libllama.so(llama_decode+0xf)[0x7b28088a4adf]
./llama.cpp/build/bin/llama-server(+0x1d211e)[0x5e2f2dbd411e]
./llama.cpp/build/bin/llama-server(+0xb0fa1)[0x5e2f2dab2fa1]
./llama.cpp/build/bin/llama-server(+0x50938)[0x5e2f2da52938]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca)[0x7b280802a1ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b)[0x7b280802a28b]
./llama.cpp/build/bin/llama-server(+0x52e75)[0x5e2f2da54e75]
./run_gpt_oss.sh: line 12: 3768 Aborted (core dumped) ./llama.cpp/build/bin/llama-server --timeout 3000 --n-gpu-layers 999 --host 0.0.0.0 --port 9999 --ctx_size 24576 --flash_attn --temp 1.00 --top_k 0.00 --top_p 1.00 --min_p 0.00 --model /home/p/.cache/llama.cpp/unsloth/gpt-oss-20b-F16.gguf