Skip to content

Eval bug: process crashes when using the LFM2-VL-3B model for Regenerate #17043

@bobwen-dev

Description

@bobwen-dev

Name and 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 GTX 1050 Ti with Max-Q Design, compute capability 6.1, VMM: yes
load_backend: loaded CUDA backend from C:\gguf-models\llama.cpp\ggml-cuda.dll
load_backend: loaded RPC backend from C:\gguf-models\llama.cpp\ggml-rpc.dll
load_backend: loaded CPU backend from C:\gguf-models\llama.cpp\ggml-cpu-haswell.dll
version: 6949 (a5c07dcd7)
built with clang version 19.1.5 for x86_64-pc-windows-msvc

Operating systems

Windows

GGML backends

CUDA

Hardware

NVIDIA GeForce GTX 1050 Ti

Models

LiquidAI/LFM2-VL-3B-GGUF

Problem description & steps to reproduce

When using the llama-server to load the LFM2-VL-3B model for inference, clicking the "Regenerate" button causes the server process to crash. Printing D:/a/llama.cpp/llama.cpp/tools/server/server.cpp:3885: GGML_ASSERT(!slot.prompt.tokens.has_mtmd) failed reveals the issue.

I have tried various parameters such as -t 1 --no-mmap --mlock --cache-ram 0 --no-mmproj-offload, but they have not prevented this problem.

First Bad Commit

No response

Relevant log output

llama-server -m ../models/LFM2-VL-3B.Q8_0.gguf --mmproj ../models/LFM2-VL-3B.mmproj.f16.gguf
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 GTX 1050 Ti with Max-Q Design, compute capability 6.1, VMM: yes
load_backend: loaded CUDA backend from C:\gguf-models\llama.cpp\ggml-cuda.dll
load_backend: loaded RPC backend from C:\gguf-models\llama.cpp\ggml-rpc.dll
load_backend: loaded CPU backend from C:\gguf-models\llama.cpp\ggml-cpu-haswell.dll
main: setting n_parallel = 4 and kv_unified = true
build: 6949 (a5c07dcd7) with clang version 19.1.5 for x86_64-pc-windows-msvc
system info: n_threads = 6, n_threads_batch = 6, total_threads = 6

system_info: n_threads = 6 (n_threads_batch = 6) / 6 | CUDA : ARCHS = 500,610,700,750,800,860,890 | USE_GRAPHS = 1 | PEER_MAX_BATCH_SIZE = 128 | 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: 127.0.0.1, port: 8080, http threads: 6
main: loading model
srv    load_model: loading model '../models/LFM2-VL-3B.Q8_0.gguf'
llama_model_load_from_file_impl: using device CUDA0 (NVIDIA GeForce GTX 1050 Ti with Max-Q Design) (0000:01:00.0) - 3359 MiB free
llama_model_loader: loaded meta data with 34 key-value pairs and 266 tensors from ../models/LFM2-VL-3B.Q8_0.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              = lfm2
llama_model_loader: - kv   1:                               general.type str              = model
llama_model_loader: - kv   2:                               general.name str              = LFM2 VL 3B
llama_model_loader: - kv   3:                           general.basename str              = LFM2-VL
llama_model_loader: - kv   4:                         general.size_label str              = 3B
llama_model_loader: - kv   5:                            general.license str              = other
llama_model_loader: - kv   6:                       general.license.name str              = lfm1.0
llama_model_loader: - kv   7:                       general.license.link str              = LICENSE
llama_model_loader: - kv   8:                               general.tags arr[str,5]       = ["liquid", "lfm2", "lfm2-vl", "edge",...
llama_model_loader: - kv   9:                          general.languages arr[str,1]       = ["en"]
llama_model_loader: - kv  10:                           lfm2.block_count u32              = 30
llama_model_loader: - kv  11:                        lfm2.context_length u32              = 128000
llama_model_loader: - kv  12:                      lfm2.embedding_length u32              = 2048
llama_model_loader: - kv  13:                   lfm2.feed_forward_length u32              = 10752
llama_model_loader: - kv  14:                  lfm2.attention.head_count u32              = 32
llama_model_loader: - kv  15:               lfm2.attention.head_count_kv arr[i32,30]      = [0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, ...
llama_model_loader: - kv  16:                        lfm2.rope.freq_base f32              = 1000000.000000
llama_model_loader: - kv  17:      lfm2.attention.layer_norm_rms_epsilon f32              = 0.000010
llama_model_loader: - kv  18:                            lfm2.vocab_size u32              = 65536
llama_model_loader: - kv  19:                     lfm2.shortconv.l_cache u32              = 3
llama_model_loader: - kv  20:                       tokenizer.ggml.model str              = gpt2
llama_model_loader: - kv  21:                         tokenizer.ggml.pre str              = lfm2
llama_model_loader: - kv  22:                      tokenizer.ggml.tokens arr[str,65536]   = ["<|pad|>", "<|startoftext|>", "<|end...
llama_model_loader: - kv  23:                  tokenizer.ggml.token_type arr[i32,65536]   = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...
llama_model_loader: - kv  24:                      tokenizer.ggml.merges arr[str,63683]   = ["Ċ Ċ", "Ċ ĊĊ", "ĊĊ Ċ", "Ċ ...
llama_model_loader: - kv  25:                tokenizer.ggml.bos_token_id u32              = 1
llama_model_loader: - kv  26:                tokenizer.ggml.eos_token_id u32              = 7
llama_model_loader: - kv  27:            tokenizer.ggml.padding_token_id u32              = 0
llama_model_loader: - kv  28:               tokenizer.ggml.add_bos_token bool             = true
llama_model_loader: - kv  29:               tokenizer.ggml.add_sep_token bool             = false
llama_model_loader: - kv  30:               tokenizer.ggml.add_eos_token bool             = false
llama_model_loader: - kv  31:                    tokenizer.chat_template str              = {{bos_token}}{% for message in messag...
llama_model_loader: - kv  32:               general.quantization_version u32              = 2
llama_model_loader: - kv  33:                          general.file_type u32              = 7
llama_model_loader: - type  f32:   99 tensors
llama_model_loader: - type q8_0:  167 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type   = Q8_0
print_info: file size   = 2.54 GiB (8.50 BPW)
load: printing all EOG tokens:
load:   - 2 ('<|endoftext|>')
load:   - 7 ('<|im_end|>')
load: special tokens cache size = 507
load: token to piece cache size = 0.3759 MB
print_info: arch             = lfm2
print_info: vocab_only       = 0
print_info: n_ctx_train      = 128000
print_info: n_embd           = 2048
print_info: n_layer          = 30
print_info: n_head           = 32
print_info: n_head_kv        = [0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 8, 0, 0]
print_info: n_rot            = 64
print_info: n_swa            = 0
print_info: is_swa_any       = 0
print_info: n_embd_head_k    = 64
print_info: n_embd_head_v    = 64
print_info: n_gqa            = [0, 0, 4, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0]
print_info: n_embd_k_gqa     = [0, 0, 512, 0, 0, 512, 0, 0, 0, 512, 0, 0, 0, 512, 0, 0, 0, 512, 0, 0, 0, 512, 0, 0, 512, 0, 0, 512, 0, 0]
print_info: n_embd_v_gqa     = [0, 0, 512, 0, 0, 512, 0, 0, 0, 512, 0, 0, 0, 512, 0, 0, 0, 512, 0, 0, 0, 512, 0, 0, 512, 0, 0, 512, 0, 0]
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             = 10752
print_info: n_expert         = 0
print_info: n_expert_used    = 0
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        = 2
print_info: rope scaling     = linear
print_info: freq_base_train  = 1000000.0
print_info: freq_scale_train = 1
print_info: n_ctx_orig_yarn  = 128000
print_info: rope_finetuned   = unknown
print_info: model type       = 2.6B
print_info: model params     = 2.57 B
print_info: general.name     = LFM2 VL 3B
print_info: vocab type       = BPE
print_info: n_vocab          = 65536
print_info: n_merges         = 63683
print_info: BOS token        = 1 '<|startoftext|>'
print_info: EOS token        = 7 '<|im_end|>'
print_info: EOT token        = 7 '<|im_end|>'
print_info: PAD token        = 0 '<|pad|>'
print_info: LF token         = 708 'Ċ'
print_info: EOG token        = 2 '<|endoftext|>'
print_info: EOG token        = 7 '<|im_end|>'
print_info: max token length = 30
load_tensors: loading model tensors, this can take a while... (mmap = true)
load_tensors: offloading 30 repeating layers to GPU
load_tensors: offloading output layer to GPU
load_tensors: offloaded 31/31 layers to GPU
load_tensors:   CPU_Mapped model buffer size =   136.01 MiB
load_tensors:        CUDA0 model buffer size =  2604.11 MiB
.............................................................................................
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     = 1000000.0
llama_context: freq_scale    = 1
llama_context: n_ctx_seq (4096) < n_ctx_train (128000) -- the full capacity of the model will not be utilized
llama_context:  CUDA_Host  output buffer size =     1.00 MiB
llama_kv_cache:      CUDA0 KV buffer size =    64.00 MiB
llama_kv_cache: size =   64.00 MiB (  4096 cells,   8 layers,  4/1 seqs), K (f16):   32.00 MiB, V (f16):   32.00 MiB
llama_memory_recurrent:      CUDA0 RS buffer size =     1.38 MiB
llama_memory_recurrent: size =    1.38 MiB (     4 cells,  30 layers,  4 seqs), R (f32):    1.38 MiB, S (f32):    0.00 MiB
llama_context: Flash Attention was auto, set to enabled
llama_context:      CUDA0 compute buffer size =   136.02 MiB
llama_context:  CUDA_Host compute buffer size =    12.01 MiB
llama_context: graph nodes  = 1015
llama_context: graph splits = 4 (with bs=512), 5 (with bs=1)
common_init_from_params: added <|endoftext|> logit bias = -inf
common_init_from_params: added <|im_end|> logit bias = -inf
common_init_from_params: setting dry_penalty_last_n to ctx_size = 4096
common_init_from_params: warming up the model with an empty run - please wait ... (--no-warmup to disable)
clip_model_loader: model name:   LFM2 VL 3B
clip_model_loader: description:
clip_model_loader: GGUF version: 3
clip_model_loader: alignment:    32
clip_model_loader: n_tensors:    443
clip_model_loader: n_kv:         27

clip_model_loader: has vision encoder
clip_ctx: CLIP using CUDA0 backend
load_hparams: projector:          lfm2
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:         256
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:   65536
load_hparams: image_max_pixels:   262144

load_hparams: model size:         820.94 MiB
load_hparams: metadata size:      0.16 MiB
alloc_compute_meta: warmup with image size = 512 x 512
alloc_compute_meta:      CUDA0 compute buffer size =    30.31 MiB
alloc_compute_meta:        CPU compute buffer size =     3.00 MiB
alloc_compute_meta: graph splits = 1, nodes = 871
warmup: flash attention is enabled
srv    load_model: loaded multimodal model, '../models/LFM2-VL-3B.mmproj.f16.gguf'
srv          init: initializing slots, n_slots = 4
slot         init: id  0 | task -1 | new slot, n_ctx = 4096
slot         init: id  1 | task -1 | new slot, n_ctx = 4096
slot         init: id  2 | task -1 | new slot, n_ctx = 4096
slot         init: id  3 | task -1 | new slot, n_ctx = 4096
srv          init: prompt cache is enabled, size limit: 8192 MiB
srv          init: use `--cache-ram 0` to disable the prompt cache
srv          init: for more info see https://github.com/ggml-org/llama.cpp/pull/16391
srv          init: thinking = 0
main: model loaded
main: chat template, chat_template: {{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '
'}}{% if message['content'] is string %}{{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' %}{{ '<image>' }}{% elif content['type'] == 'text' %}{{ content[
'text'] }}{% endif %}{% endfor %}{% endif %}{{'<|im_end|>
'}}{% endfor %}{% if add_generation_prompt %}{{'<|im_start|>assistant
' }}{% endif %}, 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
'
main: server is listening on http://127.0.0.1:8080 - starting the main loop
srv  update_slots: all slots are idle
srv  params_from_: Chat format: Content-only
slot get_availabl: id  3 | task -1 | selected slot by LRU, t_last = -1
slot launch_slot_: id  3 | task 0 | processing task
slot update_slots: id  3 | task 0 | new prompt, n_ctx_slot = 4096, n_keep = 0, task.n_tokens = 11
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 = 1.000000
slot update_slots: id  3 | task 0 | prompt done, n_tokens = 11, batch.n_tokens = 11
srv  log_server_r: request: GET /props 127.0.0.1 200
srv  log_server_r: request: GET /slots 127.0.0.1 200
srv  log_server_r: request: GET /slots 127.0.0.1 200
srv  log_server_r: request: GET /slots 127.0.0.1 200
slot print_timing: id  3 | task 0 |
prompt eval time =      99.13 ms /    11 tokens (    9.01 ms per token,   110.96 tokens per second)
       eval time =     395.72 ms /    10 tokens (   39.57 ms per token,    25.27 tokens per second)
      total time =     494.85 ms /    21 tokens
slot      release: id  3 | task 0 | stop processing: n_tokens = 20, truncated = 0
srv  update_slots: all slots are idle
srv  log_server_r: request: POST /v1/chat/completions 127.0.0.1 200
srv  update_slots: all slots are idle
srv  log_server_r: request: GET /slots 127.0.0.1 200
srv  params_from_: Chat format: Content-only
slot get_availabl: id  3 | task -1 | selected slot by LCP similarity, sim_best = 1.000 (> 0.100 thold), f_keep = 0.550
slot launch_slot_: id  3 | task 15 | processing task
slot update_slots: id  3 | task 15 | new prompt, n_ctx_slot = 4096, n_keep = 0, task.n_tokens = 11
D:/a/llama.cpp/llama.cpp/tools/server/server.cpp:3885: GGML_ASSERT(!slot.prompt.tokens.has_mtmd) failed

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