ggerganov / llama.cpp

LLM inference in C/C++
MIT License
68.73k stars 9.87k forks source link

Bug: Unable to load models after ??? #9216

Closed MaggotHATE closed 3 months ago

MaggotHATE commented 3 months ago

What happened?

After https://github.com/ggerganov/llama.cpp/commit/231cff5f6f1c050bcb448a8ac5857533b4c05dc7 I'm getting errors with my app, so I decided to test compiled releases - and unable to even load the model.

Tested on llama-cli from llama-b3639-bin-win-avx2-x64.zip, model mini-magnum-12b-v1.1.Q8_0.gguf, worked correctly previously. Log: main.log

UPD: I've tested earlier releases, and avx2 bulids down to b3590 fail with the same error. This is weird, because I have 64GB RAM, which should be more than enough.

Name and Version

main: build = 3639 (20f1789d) OS: Windows 10

What operating system are you seeing the problem on?

Windows

Relevant log output

[1724830908] Log start
[1724830908] Cmd: F:\llama_chat\b3639\llama-cli.exe -m F:/GGML/mini-magnum-12b-v1.1.Q8_0.gguf
[1724830908] main: build = 3639 (20f1789d)
[1724830908] main: built with MSVC 19.29.30154.0 for x64
[1724830908] main: seed  = 1724830908
[1724830908] main: llama backend init
[1724830908] main: load the model and apply lora adapter, if any
[1724830908] llama_model_loader: loaded meta data with 42 key-value pairs and 363 tensors from F:/GGML/mini-magnum-12b-v1.1.Q8_0.gguf (version GGUF V3 (latest))
[1724830908] llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
[1724830908] llama_model_loader: - kv   0:                       general.architecture str              = llama
[1724830908] llama_model_loader: - kv   1:                               general.type str              = model
[1724830908] llama_model_loader: - kv   2:                               general.name str              = Mini Magnum 12b v1.1
[1724830908] llama_model_loader: - kv   3:                            general.version str              = v1.1
[1724830908] llama_model_loader: - kv   4:                           general.basename str              = mini-magnum
[1724830908] llama_model_loader: - kv   5:                         general.size_label str              = 12B
[1724830908] llama_model_loader: - kv   6:                            general.license str              = apache-2.0
[1724830908] llama_model_loader: - kv   7:                          general.languages arr[str,9]       = ["en", "fr", "de", "es", "it", "pt", ...
[1724830908] llama_model_loader: - kv   8:                          llama.block_count u32              = 40
[1724830908] llama_model_loader: - kv   9:                       llama.context_length u32              = 1024000
[1724830908] llama_model_loader: - kv  10:                     llama.embedding_length u32              = 5120
[1724830908] llama_model_loader: - kv  11:                  llama.feed_forward_length u32              = 14336
[1724830908] llama_model_loader: - kv  12:                 llama.attention.head_count u32              = 32
[1724830908] llama_model_loader: - kv  13:              llama.attention.head_count_kv u32              = 8
[1724830908] llama_model_loader: - kv  14:                       llama.rope.freq_base f32              = 1000000.000000
[1724830908] llama_model_loader: - kv  15:     llama.attention.layer_norm_rms_epsilon f32              = 0.000010
[1724830908] llama_model_loader: - kv  16:                 llama.attention.key_length u32              = 128
[1724830908] llama_model_loader: - kv  17:               llama.attention.value_length u32              = 128
[1724830908] llama_model_loader: - kv  18:                          general.file_type u32              = 7
[1724830908] llama_model_loader: - kv  19:                           llama.vocab_size u32              = 131073
[1724830908] llama_model_loader: - kv  20:                 llama.rope.dimension_count u32              = 128
[1724830908] llama_model_loader: - kv  21:            tokenizer.ggml.add_space_prefix bool             = false
[1724830908] llama_model_loader: - kv  22:                       tokenizer.ggml.model str              = gpt2
[1724830908] llama_model_loader: - kv  23:                         tokenizer.ggml.pre str              = tekken
[1724830908] llama_model_loader: - kv  24:                      tokenizer.ggml.tokens arr[str,131073]  = ["<unk>", "<s>", "</s>", "[INST]", "[...
[1724830908] llama_model_loader: - kv  25:                  tokenizer.ggml.token_type arr[i32,131073]  = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...
[1724830908] llama_model_loader: - kv  26:                      tokenizer.ggml.merges arr[str,269443]  = ["Ġ Ġ", "Ġ t", "e r", "i n", "Ġ Į..
[1724830908] llama_model_loader: - kv  27:                tokenizer.ggml.bos_token_id u32              = 1
[1724830908] llama_model_loader: - kv  28:                tokenizer.ggml.eos_token_id u32              = 2
[1724830908] llama_model_loader: - kv  29:            tokenizer.ggml.unknown_token_id u32              = 0
[1724830909] llama_model_loader: - kv  30:            tokenizer.ggml.padding_token_id u32              = 131072
[1724830909] llama_model_loader: - kv  31:               tokenizer.ggml.add_bos_token bool             = true
[1724830909] llama_model_loader: - kv  32:               tokenizer.ggml.add_eos_token bool             = false
[1724830909] llama_model_loader: - kv  33:                    tokenizer.chat_template str              = {{ bos_token }}{% for message in mess...
[1724830909] llama_model_loader: - kv  34:               general.quantization_version u32              = 2
[1724830909] llama_model_loader: - kv  35:                                general.url str              = https://huggingface.co/mradermacher/m...
[1724830909] llama_model_loader: - kv  36:              mradermacher.quantize_version str              = 2
[1724830909] llama_model_loader: - kv  37:                  mradermacher.quantized_by str              = mradermacher
[1724830909] llama_model_loader: - kv  38:                  mradermacher.quantized_at str              = 2024-07-24T18:52:13+02:00
[1724830909] llama_model_loader: - kv  39:                  mradermacher.quantized_on str              = db2
[1724830909] llama_model_loader: - kv  40:                         general.source.url str              = https://huggingface.co/intervitens/mi...
[1724830909] llama_model_loader: - kv  41:                  mradermacher.convert_type str              = hf
[1724830909] llama_model_loader: - type  f32:   81 tensors
[1724830909] llama_model_loader: - type q8_0:  282 tensors
[1724830909] llm_load_vocab: special tokens cache size = 1001
[1724830909] llm_load_vocab: token to piece cache size = 0.8498 MB
[1724830909] llm_load_print_meta: format           = GGUF V3 (latest)
[1724830909] llm_load_print_meta: arch             = llama
[1724830909] llm_load_print_meta: vocab type       = BPE
[1724830909] llm_load_print_meta: n_vocab          = 131073
[1724830909] llm_load_print_meta: n_merges         = 269443
[1724830909] llm_load_print_meta: vocab_only       = 0
[1724830909] llm_load_print_meta: n_ctx_train      = 1024000
[1724830909] llm_load_print_meta: n_embd           = 5120
[1724830909] llm_load_print_meta: n_layer          = 40
[1724830909] llm_load_print_meta: n_head           = 32
[1724830909] llm_load_print_meta: n_head_kv        = 8
[1724830909] llm_load_print_meta: n_rot            = 128
[1724830909] llm_load_print_meta: n_swa            = 0
[1724830909] llm_load_print_meta: n_embd_head_k    = 128
[1724830909] llm_load_print_meta: n_embd_head_v    = 128
[1724830909] llm_load_print_meta: n_gqa            = 4
[1724830909] llm_load_print_meta: n_embd_k_gqa     = 1024
[1724830909] llm_load_print_meta: n_embd_v_gqa     = 1024
[1724830909] llm_load_print_meta: f_norm_eps       = 0.0e+00
[1724830909] llm_load_print_meta: f_norm_rms_eps   = 1.0e-05
[1724830909] llm_load_print_meta: f_clamp_kqv      = 0.0e+00
[1724830909] llm_load_print_meta: f_max_alibi_bias = 0.0e+00
[1724830909] llm_load_print_meta: f_logit_scale    = 0.0e+00
[1724830909] llm_load_print_meta: n_ff             = 14336
[1724830909] llm_load_print_meta: n_expert         = 0
[1724830909] llm_load_print_meta: n_expert_used    = 0
[1724830909] llm_load_print_meta: causal attn      = 1
[1724830909] llm_load_print_meta: pooling type     = 0
[1724830909] llm_load_print_meta: rope type        = 0
[1724830909] llm_load_print_meta: rope scaling     = linear
[1724830909] llm_load_print_meta: freq_base_train  = 1000000.0
[1724830909] llm_load_print_meta: freq_scale_train = 1
[1724830909] llm_load_print_meta: n_ctx_orig_yarn  = 1024000
[1724830909] llm_load_print_meta: rope_finetuned   = unknown
[1724830909] llm_load_print_meta: ssm_d_conv       = 0
[1724830909] llm_load_print_meta: ssm_d_inner      = 0
[1724830909] llm_load_print_meta: ssm_d_state      = 0
[1724830909] llm_load_print_meta: ssm_dt_rank      = 0
[1724830909] llm_load_print_meta: ssm_dt_b_c_rms   = 0
[1724830909] llm_load_print_meta: model type       = 13B
[1724830909] llm_load_print_meta: model ftype      = Q8_0
[1724830909] llm_load_print_meta: model params     = 12.25 B
[1724830909] llm_load_print_meta: model size       = 12.12 GiB (8.50 BPW) 
[1724830909] llm_load_print_meta: general.name     = Mini Magnum 12b v1.1
[1724830909] llm_load_print_meta: BOS token        = 1 '<s>'
[1724830909] llm_load_print_meta: EOS token        = 2 '</s>'
[1724830909] llm_load_print_meta: UNK token        = 0 '<unk>'
[1724830909] llm_load_print_meta: PAD token        = 131072 '[PAD]'
[1724830909] llm_load_print_meta: LF token         = 1196 'Ä'
[1724830909] llm_load_print_meta: max token length = 150
[1724830909] llm_load_tensors: ggml ctx size =    0.17 MiB
[1724830910] llm_load_tensors: offloading 0 repeating layers to GPU
[1724830910] llm_load_tensors: offloaded 0/41 layers to GPU
[1724830910] llm_load_tensors:        CPU buffer size = 12411.59 MiB
[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] .[1724830910] 
[1724830910] llama_new_context_with_model: n_ctx      = 1024000
[1724830910] llama_new_context_with_model: n_batch    = 2048
[1724830910] llama_new_context_with_model: n_ubatch   = 512
[1724830910] llama_new_context_with_model: flash_attn = 0
[1724830910] llama_new_context_with_model: freq_base  = 1000000.0
[1724830910] llama_new_context_with_model: freq_scale = 1
[1724830910] llama_kv_cache_init: failed to allocate buffer for kv cache
[1724830910] llama_new_context_with_model: llama_kv_cache_init() failed for self-attention cache
[1724830910] main: error: unable to load model
MaggotHATE commented 3 months ago

Closed because it seems to be memory issue, not commit issue.