Skip to content

Eval bug: when image is to big the vision model crash #20418

Closed as not planned
Closed as not planned

Description

@feyleth

Name and Version

ggml_vulkan: Found 1 Vulkan devices:
ggml_vulkan: 0 = AMD Radeon RX 5700 XT (RADV NAVI10) (radv) | uma: 0 | fp16: 1 | bf16: 0 | warp size: 32 | shared memory: 65536 | int dot: 0 | matrix cores: none
version: 8252 (a241b0b)
built with GNU 15.2.1 for Linux x86_64

Operating systems

Linux

GGML backends

Vulkan

Hardware

AMD Radeon RX 5700 XT + AMD Ryzen 5 3600X 6-Core Processor

Models

Qwen3.5 35B A3B, Qwen3-Vl-30B-A3B-Thinking, Qwen3-Vl-4B-Thinking

Problem description & steps to reproduce

run inference with image a large image and got crash

First Bad Commit

No response

Relevant log output

ggml_vulkan: Found 1 Vulkan devices:
ggml_vulkan: 0 = AMD Radeon RX 5700 XT (RADV NAVI10) (radv) | uma: 0 | fp16: 1 | bf16: 0 | warp size: 32 | shared memory: 65536 | int dot: 0 | matrix cores: none
common_download_file_single_online: no previous model file found /home/feyleth/.cache/llama.cpp/unsloth_Qwen3.5-35B-A3B-GGUF_preset.ini
common_download_file_single_online: HEAD failed, status: 404
no remote preset found, skipping
common_download_file_single_online: using cached file (same etag): /home/feyleth/.cache/llama.cpp/unsloth_Qwen3.5-35B-A3B-GGUF_Qwen3.5-35B-A3B-MXFP4_MOE.gguf
common_download_file_single_online: using cached file (same etag): /home/feyleth/.cache/llama.cpp/unsloth_Qwen3.5-35B-A3B-GGUF_mmproj-F16.gguf
main: n_parallel is set to auto, using n_parallel = 4 and kv_unified = true
build: 8252 (a241b0b) with GNU 15.2.1 for Linux x86_64
system info: n_threads = 6, n_threads_batch = 6, total_threads = 12

system_info: n_threads = 6 (n_threads_batch = 6) / 12 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | REPACK = 1 |

Running without SSL
init: using 11 threads for HTTP server
start: binding port with default address family
main: loading model
srv load_model: loading model '/home/feyleth/.cache/llama.cpp/unsloth_Qwen3.5-35B-A3B-GGUF_Qwen3.5-35B-A3B-MXFP4_MOE.gguf'
common_init_result: fitting params to device memory, for bugs during this step try to reproduce them with -fit off, or provide --verbose logs if the bug only occurs with -fit on
llama_params_fit_impl: projected to use 26238 MiB of device memory vs. 7289 MiB of free device memory
llama_params_fit_impl: cannot meet free memory target of 1024 MiB, need to reduce device memory by 19972 MiB
llama_params_fit_impl: context size reduced from 262144 to 4096 -> need 5347 MiB less memory in total
llama_params_fit_impl: with only dense weights in device memory there is a total surplus of 3405 MiB
llama_params_fit_impl: filling dense-only layers back-to-front:
llama_params_fit_impl: - Vulkan0 (AMD Radeon RX 5700 XT (RADV NAVI10)): 41 layers, 3308 MiB used, 3981 MiB free
llama_params_fit_impl: converting dense-only layers to full layers and filling them front-to-back with overflow to next device/system memory:
llama_params_fit_impl: - Vulkan0 (AMD Radeon RX 5700 XT (RADV NAVI10)): 41 layers (34 overflowing), 6127 MiB used, 1161 MiB free
llama_params_fit: successfully fit params to free device memory
llama_params_fit: fitting params to free memory took 4.32 seconds
llama_model_load_from_file_impl: using device Vulkan0 (AMD Radeon RX 5700 XT (RADV NAVI10)) (0000:29:00.0) - 7553 MiB free
llama_model_loader: loaded meta data with 52 key-value pairs and 733 tensors from /home/feyleth/.cache/llama.cpp/unsloth_Qwen3.5-35B-A3B-GGUF_Qwen3.5-35B-A3B-MXFP4_MOE.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 = qwen35moe
llama_model_loader: - kv 1: general.type str = model
llama_model_loader: - kv 2: general.sampling.top_k i32 = 20
llama_model_loader: - kv 3: general.sampling.top_p f32 = 0.950000
llama_model_loader: - kv 4: general.sampling.temp f32 = 1.000000
llama_model_loader: - kv 5: general.name str = Qwen3.5-35B-A3B
llama_model_loader: - kv 6: general.basename str = Qwen3.5-35B-A3B
llama_model_loader: - kv 7: general.quantized_by str = Unsloth
llama_model_loader: - kv 8: general.size_label str = 35B-A3B
llama_model_loader: - kv 9: general.license str = apache-2.0
llama_model_loader: - kv 10: general.license.link str = https://huggingface.co/Qwen/Qwen3.5-3...
llama_model_loader: - kv 11: general.repo_url str = https://huggingface.co/unsloth
llama_model_loader: - kv 12: general.base_model.count u32 = 1
llama_model_loader: - kv 13: general.base_model.0.name str = Qwen3.5 35B A3B
llama_model_loader: - kv 14: general.base_model.0.organization str = Qwen
llama_model_loader: - kv 15: general.base_model.0.repo_url str = https://huggingface.co/Qwen/Qwen3.5-3...
llama_model_loader: - kv 16: general.tags arr[str,2] = ["unsloth", "image-text-to-text"]
llama_model_loader: - kv 17: qwen35moe.block_count u32 = 40
llama_model_loader: - kv 18: qwen35moe.context_length u32 = 262144
llama_model_loader: - kv 19: qwen35moe.embedding_length u32 = 2048
llama_model_loader: - kv 20: qwen35moe.attention.head_count u32 = 16
llama_model_loader: - kv 21: qwen35moe.attention.head_count_kv u32 = 2
llama_model_loader: - kv 22: qwen35moe.rope.dimension_sections arr[i32,4] = [11, 11, 10, 0]
llama_model_loader: - kv 23: qwen35moe.rope.freq_base f32 = 10000000.000000
llama_model_loader: - kv 24: qwen35moe.attention.layer_norm_rms_epsilon f32 = 0.000001
llama_model_loader: - kv 25: qwen35moe.expert_count u32 = 256
llama_model_loader: - kv 26: qwen35moe.expert_used_count u32 = 8
llama_model_loader: - kv 27: qwen35moe.attention.key_length u32 = 256
llama_model_loader: - kv 28: qwen35moe.attention.value_length u32 = 256
llama_model_loader: - kv 29: qwen35moe.expert_feed_forward_length u32 = 512
llama_model_loader: - kv 30: qwen35moe.expert_shared_feed_forward_length u32 = 512
llama_model_loader: - kv 31: qwen35moe.ssm.conv_kernel u32 = 4
llama_model_loader: - kv 32: qwen35moe.ssm.state_size u32 = 128
llama_model_loader: - kv 33: qwen35moe.ssm.group_count u32 = 16
llama_model_loader: - kv 34: qwen35moe.ssm.time_step_rank u32 = 32
llama_model_loader: - kv 35: qwen35moe.ssm.inner_size u32 = 4096
llama_model_loader: - kv 36: qwen35moe.full_attention_interval u32 = 4
llama_model_loader: - kv 37: qwen35moe.rope.dimension_count u32 = 64
llama_model_loader: - kv 38: tokenizer.ggml.model str = gpt2
llama_model_loader: - kv 39: tokenizer.ggml.pre str = qwen35
llama_model_loader: - kv 40: tokenizer.ggml.tokens arr[str,248320] = ["!", """, "#", "$", "%", "&", "'", ...
llama_model_loader: - kv 41: tokenizer.ggml.token_type arr[i32,248320] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv 42: tokenizer.ggml.merges arr[str,247587] = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",...
llama_model_loader: - kv 43: tokenizer.ggml.eos_token_id u32 = 248046
llama_model_loader: - kv 44: tokenizer.ggml.padding_token_id u32 = 248055
llama_model_loader: - kv 45: tokenizer.chat_template str = {%- set image_count = namespace(value...
llama_model_loader: - kv 46: general.quantization_version u32 = 2
llama_model_loader: - kv 47: general.file_type u32 = 15
llama_model_loader: - kv 48: quantize.imatrix.file str = Qwen3.5-35B-A3B-GGUF/imatrix_unsloth....
llama_model_loader: - kv 49: quantize.imatrix.dataset str = unsloth_calibration_Qwen3.5-35B-A3B.txt
llama_model_loader: - kv 50: quantize.imatrix.entries_count u32 = 510
llama_model_loader: - kv 51: quantize.imatrix.chunks_count u32 = 76
llama_model_loader: - type f32: 301 tensors
llama_model_loader: - type q8_0: 312 tensors
llama_model_loader: - type q5_K: 41 tensors
llama_model_loader: - type q6_K: 1 tensors
llama_model_loader: - type mxfp4: 78 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type = Q4_K - Medium
print_info: file size = 20.09 GiB (4.98 BPW)
load: 0 unused tokens
load: printing all EOG tokens:
load: - 248044 ('<|endoftext|>')
load: - 248046 ('<|im_end|>')
load: - 248063 ('<|fim_pad|>')
load: - 248064 ('<|repo_name|>')
load: - 248065 ('<|file_sep|>')
load: special tokens cache size = 33
load: token to piece cache size = 1.7581 MB
print_info: arch = qwen35moe
print_info: vocab_only = 0
print_info: no_alloc = 0
print_info: n_ctx_train = 262144
print_info: n_embd = 2048
print_info: n_embd_inp = 2048
print_info: n_layer = 40
print_info: n_head = 16
print_info: n_head_kv = 2
print_info: n_rot = 64
print_info: n_swa = 0
print_info: is_swa_any = 0
print_info: n_embd_head_k = 256
print_info: n_embd_head_v = 256
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-06
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 = 0
print_info: n_expert = 256
print_info: n_expert_used = 8
print_info: n_expert_groups = 0
print_info: n_group_used = 0
print_info: causal attn = 1
print_info: pooling type = 0
print_info: rope type = 40
print_info: rope scaling = linear
print_info: freq_base_train = 10000000.0
print_info: freq_scale_train = 1
print_info: n_ctx_orig_yarn = 262144
print_info: rope_yarn_log_mul = 0.0000
print_info: rope_finetuned = unknown
print_info: mrope sections = [11, 11, 10, 0]
print_info: ssm_d_conv = 4
print_info: ssm_d_inner = 4096
print_info: ssm_d_state = 128
print_info: ssm_dt_rank = 32
print_info: ssm_n_group = 16
print_info: ssm_dt_b_c_rms = 0
print_info: model type = 35B.A3B
print_info: model params = 34.66 B
print_info: general.name = Qwen3.5-35B-A3B
print_info: vocab type = BPE
print_info: n_vocab = 248320
print_info: n_merges = 247587
print_info: BOS token = 11 ','
print_info: EOS token = 248046 '<|im_end|>'
print_info: EOT token = 248046 '<|im_end|>'
print_info: PAD token = 248055 '<|vision_pad|>'
print_info: LF token = 198 'Ċ'
print_info: FIM PRE token = 248060 '<|fim_prefix|>'
print_info: FIM SUF token = 248062 '<|fim_suffix|>'
print_info: FIM MID token = 248061 '<|fim_middle|>'
print_info: FIM PAD token = 248063 '<|fim_pad|>'
print_info: FIM REP token = 248064 '<|repo_name|>'
print_info: FIM SEP token = 248065 '<|file_sep|>'
print_info: EOG token = 248044 '<|endoftext|>'
print_info: EOG token = 248046 '<|im_end|>'
print_info: EOG token = 248063 '<|fim_pad|>'
print_info: EOG token = 248064 '<|repo_name|>'
print_info: EOG token = 248065 '<|file_sep|>'
print_info: max token length = 256
load_tensors: loading model tensors, this can take a while... (mmap = true, direct_io = false)
load_tensors: offloading output layer to GPU
load_tensors: offloading 39 repeating layers to GPU
load_tensors: offloaded 41/41 layers to GPU
load_tensors: CPU_Mapped model buffer size = 20060.71 MiB
load_tensors: Vulkan0 model buffer size = 5295.65 MiB
..................................................................................................
common_init_result: added <|endoftext|> logit bias = -inf
common_init_result: added <|im_end|> logit bias = -inf
common_init_result: added <|fim_pad|> logit bias = -inf
common_init_result: added <|repo_name|> logit bias = -inf
common_init_result: added <|file_sep|> logit bias = -inf
llama_context: constructing llama_context
llama_context: n_seq_max = 4
llama_context: n_ctx = 4096
llama_context: n_ctx_seq = 4096
llama_context: n_batch = 2048
llama_context: n_ubatch = 512
llama_context: causal_attn = 1
llama_context: flash_attn = auto
llama_context: kv_unified = true
llama_context: freq_base = 10000000.0
llama_context: freq_scale = 1
llama_context: n_ctx_seq (4096) < n_ctx_train (262144) -- the full capacity of the model will not be utilized
llama_context: Vulkan_Host output buffer size = 3.79 MiB
llama_kv_cache: Vulkan0 KV buffer size = 80.00 MiB
llama_kv_cache: size = 80.00 MiB ( 4096 cells, 10 layers, 4/1 seqs), K (f16): 40.00 MiB, V (f16): 40.00 MiB
llama_memory_recurrent: Vulkan0 RS buffer size = 251.25 MiB
llama_memory_recurrent: size = 251.25 MiB ( 4 cells, 40 layers, 4 seqs), R (f32): 11.25 MiB, S (f32): 240.00 MiB
sched_reserve: reserving ...
sched_reserve: Flash Attention was auto, set to enabled
sched_reserve: layer 0 is assigned to device Vulkan0 but the fused Gated Delta Net tensor is assigned to device CPU (usually due to missing support)
sched_reserve: fused Gated Delta Net not supported, set to disabled
sched_reserve: Vulkan0 compute buffer size = 501.02 MiB
sched_reserve: Vulkan_Host compute buffer size = 16.03 MiB
sched_reserve: graph nodes = 6699 (with bs=512), 4389 (with bs=1)
sched_reserve: graph splits = 104 (with bs=512), 72 (with bs=1)
sched_reserve: reserve took 33.46 ms, sched copies = 1
common_init_from_params: warming up the model with an empty run - please wait ... (--no-warmup to disable)
clip_model_loader: model name: Qwen3.5-35B-A3B
clip_model_loader: description:
clip_model_loader: GGUF version: 3
clip_model_loader: alignment: 32
clip_model_loader: n_tensors: 334
clip_model_loader: n_kv: 35

clip_model_loader: has vision encoder
clip_ctx: CLIP using Vulkan0 backend
load_hparams: Qwen-VL models require at minimum 1024 image tokens to function correctly on grounding tasks
load_hparams: if you encounter problems with accuracy, try adding --image-min-tokens 1024
load_hparams: more info: #16842

load_hparams: projector: qwen3vl_merger
load_hparams: n_embd: 1152
load_hparams: n_head: 16
load_hparams: n_ff: 4304
load_hparams: n_layer: 27
load_hparams: ffn_op: gelu
load_hparams: projection_dim: 2048

--- vision hparams ---
load_hparams: image_size: 768
load_hparams: patch_size: 16
load_hparams: has_llava_proj: 0
load_hparams: minicpmv_version: 0
load_hparams: n_merge: 2
load_hparams: n_wa_pattern: 0
load_hparams: image_min_pixels: 8192
load_hparams: image_max_pixels: 4194304

load_hparams: model size: 857.60 MiB
load_hparams: metadata size: 0.12 MiB
warmup: warmup with image size = 1472 x 1472
alloc_compute_meta: Vulkan0 compute buffer size = 248.10 MiB
alloc_compute_meta: CPU compute buffer size = 24.93 MiB
alloc_compute_meta: graph splits = 1, nodes = 823
warmup: flash attention is enabled
srv load_model: loaded multimodal model, '/home/feyleth/.cache/llama.cpp/unsloth_Qwen3.5-35B-A3B-GGUF_mmproj-F16.gguf'
srv load_model: initializing slots, n_slots = 4
common_speculative_is_compat: the target context does not support partial sequence removal
srv load_model: speculative decoding not supported by this context
slot load_model: id 0 | task -1 | new slot, n_ctx = 4096
slot load_model: id 1 | task -1 | new slot, n_ctx = 4096
slot load_model: id 2 | task -1 | new slot, n_ctx = 4096
slot load_model: id 3 | task -1 | new slot, n_ctx = 4096
srv load_model: prompt cache is enabled, size limit: 8192 MiB
srv load_model: use --cache-ram 0 to disable the prompt cache
srv load_model: for more info see #16391
init: chat template, example_format: '<|im_start|>system
You are a helpful assistant<|im_end|>
<|im_start|>user
Hello<|im_end|>
<|im_start|>assistant
Hi there<|im_end|>
<|im_start|>user
How are you?<|im_end|>
<|im_start|>assistant

'
srv init: init: chat template, thinking = 1
main: model loaded
main: server is listening on http://127.0.0.1:8080
main: starting the main loop...
srv update_slots: all slots are idle
srv log_server_r: done request: GET / 127.0.0.1 200
srv params_from_: Chat format: peg-native
slot get_availabl: id 3 | task -1 | selected slot by LRU, t_last = -1
slot launch_slot_: id 3 | task -1 | sampler chain: logits -> ?penalties -> ?dry -> ?top-n-sigma -> top-k -> ?typical -> top-p -> min-p -> ?xtc -> temp-ext -> dist
slot launch_slot_: id 3 | task 0 | processing task, is_child = 0
slot update_slots: id 3 | task 0 | new prompt, n_ctx_slot = 4096, n_keep = 0, task.n_tokens = 4034
slot update_slots: id 3 | task 0 | n_tokens = 0, memory_seq_rm [0, end)
slot update_slots: id 3 | task 0 | prompt processing progress, n_tokens = 11, batch.n_tokens = 11, progress = 0.002727
srv log_server_r: done request: POST /v1/chat/completions 127.0.0.1 200
slot update_slots: id 3 | task 0 | n_tokens = 11, memory_seq_rm [11, end)
srv process_chun: processing image...
encoding image slice...
image slice encoded in 2260 ms
decoding image batch 1/2, n_tokens_batch = 2048
find_slot: non-consecutive token position 11 after 10 for sequence 3 with 512 new tokens
find_slot: non-consecutive token position 11 after 11 for sequence 3 with 512 new tokens
find_slot: non-consecutive token position 11 after 11 for sequence 3 with 512 new tokens
find_slot: non-consecutive token position 11 after 11 for sequence 3 with 512 new tokens
find_slot: non-consecutive token position 11 after 10 for sequence 3 with 512 new tokens
radv/amdgpu: The CS has been cancelled because the context is lost. This context is innocent.
[New LWP 64774]
[New LWP 64773]
[New LWP 64772]
[New LWP 64771]
[New LWP 64770]
[New LWP 64683]
[New LWP 64682]
[New LWP 64681]
[New LWP 64680]
[New LWP 64679]
[New LWP 64678]
[New LWP 64677]
[New LWP 64676]
[New LWP 64675]
[New LWP 64674]
[New LWP 64673]
[New LWP 64672]
[New LWP 64671]
[New LWP 64669]
[New LWP 64668]

This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.archlinux.org
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007f50a56adf32 in ?? () from /usr/lib/libc.so.6
#0 0x00007f50a56adf32 in ?? () from /usr/lib/libc.so.6
#1 0x00007f50a56a239c in ?? () from /usr/lib/libc.so.6
#2 0x00007f50a56a23e4 in ?? () from /usr/lib/libc.so.6
#3 0x00007f50a571267f in wait4 () from /usr/lib/libc.so.6
#4 0x00007f50a5f627bd in ggml_print_backtrace () from /usr/lib/libggml-base.so.0
#5 0x00007f50a5f7c76e in ?? () from /usr/lib/libggml-base.so.0
#6 0x00007f50a58b1eba in ?? () from /usr/lib/libstdc++.so.6
#7 0x00007f50a58975d9 in std::terminate() () from /usr/lib/libstdc++.so.6
#8 0x00007f50a58b2176 in __cxa_throw () from /usr/lib/libstdc++.so.6
#9 0x00007f50a1e6f5d9 in ?? () from /usr/lib/libggml-vulkan.so.0
#10 0x00007f50a1fa5378 in ?? () from /usr/lib/libggml-vulkan.so.0
#11 0x00007f50a1fa6eac in ?? () from /usr/lib/libggml-vulkan.so.0
#12 0x00007f50a5f7fcff in ggml_backend_sched_alloc_graph () from /usr/lib/libggml-base.so.0
#13 0x00007f50a5ca781c in llama_context::process_ubatch(llama_ubatch const&, llm_graph_type, llama_memory_context_i*, ggml_status&) () from /usr/lib/libllama.so.0
#14 0x00007f50a5cab45a in llama_context::decode(llama_batch const&) () from /usr/lib/libllama.so.0
#15 0x00007f50a5cb8ad6 in llama_decode () from /usr/lib/libllama.so.0
#16 0x00007f50a66c3415 in mtmd_helper_decode_image_chunk () from /usr/lib/libmtmd.so.0
#17 0x00007f50a66c48c6 in mtmd_helper_eval_chunk_single () from /usr/lib/libmtmd.so.0
#18 0x0000555a40f6a417 in ?? ()
#19 0x0000555a40fc524c in ?? ()
#20 0x0000555a40eec169 in ?? ()
#21 0x00007f50a56366c1 in ?? () from /usr/lib/libc.so.6
#22 0x00007f50a56367f9 in __libc_start_main () from /usr/lib/libc.so.6
#23 0x0000555a40ef39a5 in ?? ()
[Inferior 1 (process 64666) detached]
terminate called after throwing an instance of 'vk::DeviceLostError'
what(): vk::Queue::submit: ErrorDeviceLost

Activity

  1. nico202 commented on Mar 16, 2026

    @nico202

    Same with Qwen3.5-0.8B-Q4_0.gguf with mmproj-F16.gguf on AMD Ryzen AI 9 HX 370 (Radeon 890M)

  2. github-actions commented on Apr 30, 2026

    @github-actions
    Contributor

    This issue was closed because it has been inactive for 14 days since being marked as stale.

  3. changed the title [-]Eval bug: vision model crash[/-] [+]Eval bug: when image is to big the vision model crash[/+] on May 12, 2026
  4. feyleth commented on May 12, 2026

    @feyleth
    Author

    find that is only with large image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions