-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Closed
Closed
Copy link
Labels
Description
Name and Version
$ llama-cli --version
version: 5890 (982e347)
built with Apple clang version 17.0.0 (clang-1700.0.13.3) for arm64-apple-darwin24.4.0
Operating systems
Mac
GGML backends
Metal
Hardware
Apple M4 Max
Models
https://huggingface.co/LiquidAI/LFM2-1.2B-GGUF - Q6_K quanitzation
Problem description & steps to reproduce
When running llama-server with this model and specifying parallel requests (i.e. -np with 2 or more parallel requests), it crashes with an assertion failure:
ggml/src/ggml.c:2420: GGML_ASSERT(a->ne[d] == b->ne[d]) failed
The specific command I ran was:
llama-server -hf LiquidAI/LFM2-1.2B-GGUF:Q6_K -c 32678 -np 2First Bad Commit
No response
Relevant log output
$ lldb -- llama-server -hf LiquidAI/LFM2-1.2B-GGUF:Q6_K -c 32678 -np 2
(lldb) target create "llama-server"
Current executable set to '/opt/homebrew/bin/llama-server' (arm64).
(lldb) settings set -- target.run-args "-hf" "LiquidAI/LFM2-1.2B-GGUF:Q6_K" "-c" "32678" "-np" "2"
(lldb) r
Process 84371 launched: '/opt/homebrew/bin/llama-server' (arm64)
curl_perform_with_retry: HEAD https://huggingface.co/LiquidAI/LFM2-1.2B-GGUF/resolve/main/LFM2-1.2B-Q6_K.gguf (attempt 1 of 1)...
common_download_file_single: using cached file: /Users/sultan/Library/Caches/llama.cpp/LiquidAI_LFM2-1.2B-GGUF_LFM2-1.2B-Q6_K.gguf
build: 5890 (982e3472) with Apple clang version 17.0.0 (clang-1700.0.13.3) for arm64-apple-darwin24.4.0
system info: n_threads = 12, n_threads_batch = 12, total_threads = 16
system_info: n_threads = 12 (n_threads_batch = 12) / 16 | Metal : EMBED_LIBRARY = 1 | CPU : NEON = 1 | ARM_FMA = 1 | FP16_VA = 1 | DOTPROD = 1 | LLAMAFILE = 1 | ACCELERATE = 1 | REPACK = 1 |
main: binding port with default address family
main: HTTP server is listening, hostname: 127.0.0.1, port: 8080, http threads: 15
main: loading model
srv load_model: loading model '/Users/sultan/Library/Caches/llama.cpp/LiquidAI_LFM2-1.2B-GGUF_LFM2-1.2B-Q6_K.gguf'
llama_model_load_from_file_impl: using device Metal (Apple M4 Max) - 98303 MiB free
llama_model_loader: loaded meta data with 34 key-value pairs and 148 tensors from /Users/sultan/Library/Caches/llama.cpp/LiquidAI_LFM2-1.2B-GGUF_LFM2-1.2B-Q6_K.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 1.2B
llama_model_loader: - kv 3: general.basename str = LFM2
llama_model_loader: - kv 4: general.size_label str = 1.2B
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,4] = ["liquid", "lfm2", "edge", "text-gene...
llama_model_loader: - kv 9: general.languages arr[str,8] = ["en", "ar", "zh", "fr", "de", "ja", ...
llama_model_loader: - kv 10: lfm2.block_count u32 = 16
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 = 8192
llama_model_loader: - kv 14: lfm2.attention.head_count u32 = 32
llama_model_loader: - kv 15: lfm2.attention.head_count_kv arr[i32,16] = [0, 0, 8, 0, 0, 8, 0, 0, 8, 0, 8, 0, ...
llama_model_loader: - kv 16: lfm2.rope.freq_base f32 = 1000000.000000
llama_model_loader: - kv 17: lfm2.vocab_size u32 = 65536
llama_model_loader: - kv 18: lfm2.shortconv.l_cache u32 = 3
llama_model_loader: - kv 19: lfm2.attention.layer_norm_rms_epsilon f32 = 0.000010
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 = 18
llama_model_loader: - type f32: 55 tensors
llama_model_loader: - type q6_K: 93 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type = Q6_K
print_info: file size = 915.96 MiB (6.57 BPW)
load: special tokens cache size = 507
load: token to piece cache size = 0.3756 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 = 16
print_info: n_head = 32
print_info: n_head_kv = [0, 0, 8, 0, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 8, 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, 4, 0, 4, 0, 4, 0, 4, 0]
print_info: n_embd_k_gqa = [0, 0, 512, 0, 0, 512, 0, 0, 512, 0, 512, 0, 512, 0, 512, 0]
print_info: n_embd_v_gqa = [0, 0, 512, 0, 0, 512, 0, 0, 512, 0, 512, 0, 512, 0, 512, 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 = 8192
print_info: n_expert = 0
print_info: n_expert_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 = 1.2B
print_info: model params = 1.17 B
print_info: general.name = LFM2 1.2B
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 = 2 '<|endoftext|>'
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 16 repeating layers to GPU
load_tensors: offloading output layer to GPU
load_tensors: offloaded 17/17 layers to GPU
load_tensors: CPU_Mapped model buffer size = 105.01 MiB
load_tensors: Metal_Mapped model buffer size = 810.97 MiB
.......................................................................
llama_context: constructing llama_context
llama_context: n_seq_max = 2
llama_context: n_ctx = 32678
llama_context: n_ctx_per_seq = 16339
llama_context: n_batch = 2048
llama_context: n_ubatch = 512
llama_context: causal_attn = 1
llama_context: flash_attn = 0
llama_context: freq_base = 1000000.0
llama_context: freq_scale = 1
llama_context: n_ctx_per_seq (16339) < n_ctx_train (128000) -- the full capacity of the model will not be utilized
ggml_metal_init: allocating
ggml_metal_init: found device: Apple M4 Max
ggml_metal_init: picking default device: Apple M4 Max
ggml_metal_load_library: using embedded metal library
ggml_metal_init: GPU name: Apple M4 Max
ggml_metal_init: GPU family: MTLGPUFamilyApple9 (1009)
ggml_metal_init: GPU family: MTLGPUFamilyCommon3 (3003)
ggml_metal_init: GPU family: MTLGPUFamilyMetal3 (5001)
ggml_metal_init: simdgroup reduction = true
ggml_metal_init: simdgroup matrix mul. = true
ggml_metal_init: has residency sets = true
ggml_metal_init: has bfloat = true
ggml_metal_init: use bfloat = false
ggml_metal_init: hasUnifiedMemory = true
ggml_metal_init: recommendedMaxWorkingSetSize = 103079.22 MB
ggml_metal_init: skipping kernel_get_rows_bf16 (not supported)
ggml_metal_init: skipping kernel_set_rows_bf16 (not supported)
ggml_metal_init: skipping kernel_mul_mv_bf16_f32 (not supported)
ggml_metal_init: skipping kernel_mul_mv_bf16_f32_c4 (not supported)
ggml_metal_init: skipping kernel_mul_mv_bf16_f32_1row (not supported)
ggml_metal_init: skipping kernel_mul_mv_bf16_f32_l4 (not supported)
ggml_metal_init: skipping kernel_mul_mv_bf16_bf16 (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_bf16_f32 (not supported)
ggml_metal_init: skipping kernel_mul_mm_bf16_f32 (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_bf16_f16 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h64 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h80 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h96 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h112 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h128 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h192 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_hk192_hv128 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h256 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_hk576_hv512 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_bf16_h64 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_bf16_h96 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_bf16_h128 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_bf16_h192 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_bf16_hk192_hv128 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_bf16_h256 (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_bf16_hk576_hv512 (not supported)
ggml_metal_init: skipping kernel_cpy_f32_bf16 (not supported)
ggml_metal_init: skipping kernel_cpy_bf16_f32 (not supported)
ggml_metal_init: skipping kernel_cpy_bf16_bf16 (not supported)
llama_context: CPU output buffer size = 0.50 MiB
llama_kv_cache_unified: Metal KV buffer size = 383.25 MiB
llama_kv_cache_unified: size = 383.25 MiB ( 32704 cells, 6 layers, 2 seqs), K (f16): 191.62 MiB, V (f16): 191.62 MiB
llama_kv_cache_unified: LLAMA_SET_ROWS=0, using old ggml_cpy() method for backwards compatibility
llama_memory_recurrent: Metal RS buffer size = 0.31 MiB
llama_memory_recurrent: size = 0.31 MiB ( 2 cells, 16 layers, 2 seqs), R (f32): 0.31 MiB, S (f32): 0.00 MiB
/private/tmp/llama.cpp-20250713-5314-t993c8/ggml/src/ggml.c:2420: GGML_ASSERT(a->ne[d] == b->ne[d]) failed
(lldb) process attach --pid 84371
error: attach failed: tried to attach to process already being debugged
Process 84371 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x000000018afb9388 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
-> 0x18afb9388 <+8>: b.lo 0x18afb93a8 ; <+40>
0x18afb938c <+12>: pacibsp
0x18afb9390 <+16>: stp x29, x30, [sp, #-0x10]!
0x18afb9394 <+20>: mov x29, sp
Target 0: (llama-server) stopped.tdakhran