unable to load model
Log start
main: build = 3503 (0fbbd884)
main: built with MSVC 19.38.33133.0 for x64
main: seed = 1723700885
llama_model_loader: loaded meta data with 42 key-value pairs and 377 tensors from D:\codebase\ai\models\bartowski\DeepSeek-Coder-V2-Lite-Instruct-GGUF\DeepSeek-Coder-V2-Lite-Instruct-IQ4_XS.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 = deepseek2
llama_model_loader: - kv 1: general.name str = DeepSeek-Coder-V2-Lite-Instruct
llama_model_loader: - kv 2: deepseek2.block_count u32 = 27
llama_model_loader: - kv 3: deepseek2.context_length u32 = 163840
llama_model_loader: - kv 4: deepseek2.embedding_length u32 = 2048
llama_model_loader: - kv 5: deepseek2.feed_forward_length u32 = 10944
llama_model_loader: - kv 6: deepseek2.attention.head_count u32 = 16
llama_model_loader: - kv 7: deepseek2.attention.head_count_kv u32 = 16
llama_model_loader: - kv 8: deepseek2.rope.freq_base f32 = 10000.000000
llama_model_loader: - kv 9: deepseek2.attention.layer_norm_rms_epsilon f32 = 0.000001
llama_model_loader: - kv 10: deepseek2.expert_used_count u32 = 6
llama_model_loader: - kv 11: general.file_type u32 = 30
llama_model_loader: - kv 12: deepseek2.leading_dense_block_count u32 = 1
llama_model_loader: - kv 13: deepseek2.vocab_size u32 = 102400
llama_model_loader: - kv 14: deepseek2.attention.kv_lora_rank u32 = 512
llama_model_loader: - kv 15: deepseek2.attention.key_length u32 = 192
llama_model_loader: - kv 16: deepseek2.attention.value_length u32 = 128
llama_model_loader: - kv 17: deepseek2.expert_feed_forward_length u32 = 1408
llama_model_loader: - kv 18: deepseek2.expert_count u32 = 64
llama_model_loader: - kv 19: deepseek2.expert_shared_count u32 = 2
llama_model_loader: - kv 20: deepseek2.expert_weights_scale f32 = 1.000000
llama_model_loader: - kv 21: deepseek2.rope.dimension_count u32 = 64
llama_model_loader: - kv 22: deepseek2.rope.scaling.type str = yarn
llama_model_loader: - kv 23: deepseek2.rope.scaling.factor f32 = 40.000000
llama_model_loader: - kv 24: deepseek2.rope.scaling.original_context_length u32 = 4096
llama_model_loader: - kv 25: deepseek2.rope.scaling.yarn_log_multiplier f32 = 0.070700
llama_model_loader: - kv 26: tokenizer.ggml.model str = gpt2
llama_model_loader: - kv 27: tokenizer.ggml.pre str = deepseek-llm
llama_model_loader: - kv 28: tokenizer.ggml.tokens arr[str,102400] = ["!", """, "#", "$", "%", "&", "'", ...
llama_model_loader: - kv 29: tokenizer.ggml.token_type arr[i32,102400] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv 30: tokenizer.ggml.merges arr[str,99757] = ["Ġ Ġ", "Ġ t", "Ġ a", "i n", "h e...
llama_model_loader: - kv 31: tokenizer.ggml.bos_token_id u32 = 100000
llama_model_loader: - kv 32: tokenizer.ggml.eos_token_id u32 = 100001
llama_model_loader: - kv 33: tokenizer.ggml.padding_token_id u32 = 100001
llama_model_loader: - kv 34: tokenizer.ggml.add_bos_token bool = true
llama_model_loader: - kv 35: tokenizer.ggml.add_eos_token bool = false
llama_model_loader: - kv 36: tokenizer.chat_template str = {% if not add_generation_prompt is de...
llama_model_loader: - kv 37: general.quantization_version u32 = 2
llama_model_loader: - kv 38: quantize.imatrix.file str = /models/DeepSeek-Coder-V2-Lite-Instru...
llama_model_loader: - kv 39: quantize.imatrix.dataset str = /training_data/calibration_datav3.txt
llama_model_loader: - kv 40: quantize.imatrix.entries_count i32 = 293
llama_model_loader: - kv 41: quantize.imatrix.chunks_count i32 = 139
llama_model_loader: - type f32: 108 tensors
llama_model_loader: - type q6_K: 1 tensors
llama_model_loader: - type iq4_nl: 27 tensors
llama_model_loader: - type iq4_xs: 241 tensors
llama_model_load: error loading model: error loading model vocabulary: bad conversion
llama_load_model_from_file: failed to load model
llama_init_from_gpt_params: error: failed to load model 'D:\codebase\ai\models\bartowski\DeepSeek-Coder-V2-Lite-Instruct-GGUF\DeepSeek-Coder-V2-Lite-Instruct-IQ4_XS.gguf'
main: error: unable to load model
Can you share your full command and system info? I was able to download it and run it without issue
llama-cli -m "D:\codebase\ai\models\bartowski\DeepSeek-Coder-V2-Lite-Instruct-GGUF\DeepSeek-Coder-V2-Lite-Instruct-IQ4_XS.gguf" -ngl -30 -p "write a hello world program in python"
OS: Window 11 pro 10.0.22631
RAM: 64G
Graphics: NVIDIA GeForce RTX 4070 Ti
Below is another model's logs that is successful:
PS C:\Users\Admin> llama-cli -m "D:\codebase\ai\models\bartowski\gemma-2-2b-it-GGUF\gemma-2-2b-it-Q6_K.gguf" -ngl 33 -p "Write a hello world program in python"
Log start
main: build = 3503 (0fbbd884)
main: built with MSVC 19.38.33133.0 for x64
main: seed = 1723728292
llama_model_loader: loaded meta data with 39 key-value pairs and 288 tensors from D:\codebase\ai\models\bartowski\gemma-2-2b-it-GGUF\gemma-2-2b-it-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 = gemma2
llama_model_loader: - kv 1: general.type str = model
llama_model_loader: - kv 2: general.name str = Gemma 2 2b It
llama_model_loader: - kv 3: general.finetune str = it
llama_model_loader: - kv 4: general.basename str = gemma-2
llama_model_loader: - kv 5: general.size_label str = 2B
llama_model_loader: - kv 6: general.license str = gemma
llama_model_loader: - kv 7: general.tags arr[str,2] = ["conversational", "text-generation"]
llama_model_loader: - kv 8: gemma2.context_length u32 = 8192
llama_model_loader: - kv 9: gemma2.embedding_length u32 = 2304
llama_model_loader: - kv 10: gemma2.block_count u32 = 26
llama_model_loader: - kv 11: gemma2.feed_forward_length u32 = 9216
llama_model_loader: - kv 12: gemma2.attention.head_count u32 = 8
llama_model_loader: - kv 13: gemma2.attention.head_count_kv u32 = 4
llama_model_loader: - kv 14: gemma2.attention.layer_norm_rms_epsilon f32 = 0.000001
llama_model_loader: - kv 15: gemma2.attention.key_length u32 = 256
llama_model_loader: - kv 16: gemma2.attention.value_length u32 = 256
llama_model_loader: - kv 17: general.file_type u32 = 18
llama_model_loader: - kv 18: gemma2.attn_logit_softcapping f32 = 50.000000
llama_model_loader: - kv 19: gemma2.final_logit_softcapping f32 = 30.000000
llama_model_loader: - kv 20: gemma2.attention.sliding_window u32 = 4096
llama_model_loader: - kv 21: tokenizer.ggml.model str = llama
llama_model_loader: - kv 22: tokenizer.ggml.pre str = default
llama_model_loader: - kv 23: tokenizer.ggml.tokens arr[str,256000] = ["", "", "", "", ...
llama_model_loader: - kv 24: tokenizer.ggml.scores arr[f32,256000] = [-1000.000000, -1000.000000, -1000.00...
llama_model_loader: - kv 25: tokenizer.ggml.token_type arr[i32,256000] = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...
llama_model_loader: - kv 26: tokenizer.ggml.bos_token_id u32 = 2
llama_model_loader: - kv 27: tokenizer.ggml.eos_token_id u32 = 1
llama_model_loader: - kv 28: tokenizer.ggml.unknown_token_id u32 = 3
llama_model_loader: - kv 29: tokenizer.ggml.padding_token_id u32 = 0
llama_model_loader: - kv 30: tokenizer.ggml.add_bos_token bool = true
llama_model_loader: - kv 31: tokenizer.ggml.add_eos_token bool = false
llama_model_loader: - kv 32: tokenizer.chat_template str = {{ bos_token }}{% if messages[0]['rol...
llama_model_loader: - kv 33: tokenizer.ggml.add_space_prefix bool = false
llama_model_loader: - kv 34: general.quantization_version u32 = 2
llama_model_loader: - kv 35: quantize.imatrix.file str = /models_out/gemma-2-2b-it-GGUF/gemma-...
llama_model_loader: - kv 36: quantize.imatrix.dataset str = /training_dir/calibration_datav3.txt
llama_model_loader: - kv 37: quantize.imatrix.entries_count i32 = 182
llama_model_loader: - kv 38: quantize.imatrix.chunks_count i32 = 128
llama_model_loader: - type f32: 105 tensors
llama_model_loader: - type q6_K: 183 tensors
llm_load_vocab: special tokens cache size = 249
llm_load_vocab: token to piece cache size = 1.6014 MB
llm_load_print_meta: format = GGUF V3 (latest)
llm_load_print_meta: arch = gemma2
llm_load_print_meta: vocab type = SPM
llm_load_print_meta: n_vocab = 256000
llm_load_print_meta: n_merges = 0
llm_load_print_meta: vocab_only = 0
llm_load_print_meta: n_ctx_train = 8192
llm_load_print_meta: n_embd = 2304
llm_load_print_meta: n_layer = 26
llm_load_print_meta: n_head = 8
llm_load_print_meta: n_head_kv = 4
llm_load_print_meta: n_rot = 256
llm_load_print_meta: n_swa = 4096
llm_load_print_meta: n_embd_head_k = 256
llm_load_print_meta: n_embd_head_v = 256
llm_load_print_meta: n_gqa = 2
llm_load_print_meta: n_embd_k_gqa = 1024
llm_load_print_meta: n_embd_v_gqa = 1024
llm_load_print_meta: f_norm_eps = 0.0e+00
llm_load_print_meta: f_norm_rms_eps = 1.0e-06
llm_load_print_meta: f_clamp_kqv = 0.0e+00
llm_load_print_meta: f_max_alibi_bias = 0.0e+00
llm_load_print_meta: f_logit_scale = 0.0e+00
llm_load_print_meta: n_ff = 9216
llm_load_print_meta: n_expert = 0
llm_load_print_meta: n_expert_used = 0
llm_load_print_meta: causal attn = 1
llm_load_print_meta: pooling type = 0
llm_load_print_meta: rope type = 2
llm_load_print_meta: rope scaling = linear
llm_load_print_meta: freq_base_train = 10000.0
llm_load_print_meta: freq_scale_train = 1
llm_load_print_meta: n_ctx_orig_yarn = 8192
llm_load_print_meta: rope_finetuned = unknown
llm_load_print_meta: ssm_d_conv = 0
llm_load_print_meta: ssm_d_inner = 0
llm_load_print_meta: ssm_d_state = 0
llm_load_print_meta: ssm_dt_rank = 0
llm_load_print_meta: model type = 2B
llm_load_print_meta: model ftype = Q6_K
llm_load_print_meta: model params = 2.61 B
llm_load_print_meta: model size = 2.00 GiB (6.56 BPW)
llm_load_print_meta: general.name = Gemma 2 2b It
llm_load_print_meta: BOS token = 2 ''
llm_load_print_meta: EOS token = 1 ''
llm_load_print_meta: UNK token = 3 ''
llm_load_print_meta: PAD token = 0 ''
llm_load_print_meta: LF token = 227 '<0x0A>'
llm_load_print_meta: EOT token = 107 ''
llm_load_print_meta: max token length = 48
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 4070 Ti, compute capability 8.9, VMM: yes
llm_load_tensors: ggml ctx size = 0.26 MiB
llm_load_tensors: offloading 26 repeating layers to GPU
llm_load_tensors: offloading non-repeating layers to GPU
llm_load_tensors: offloaded 27/27 layers to GPU
llm_load_tensors: CPU buffer size = 461.43 MiB
llm_load_tensors: CUDA0 buffer size = 2045.99 MiB
..................................................................
llama_new_context_with_model: n_ctx = 8192
llama_new_context_with_model: n_batch = 2048
llama_new_context_with_model: n_ubatch = 512
llama_new_context_with_model: flash_attn = 0
llama_new_context_with_model: freq_base = 10000.0
llama_new_context_with_model: freq_scale = 1
llama_kv_cache_init: CUDA0 KV buffer size = 832.00 MiB
llama_new_context_with_model: KV self size = 832.00 MiB, K (f16): 416.00 MiB, V (f16): 416.00 MiB
llama_new_context_with_model: CUDA_Host output buffer size = 0.98 MiB
llama_new_context_with_model: CUDA0 compute buffer size = 504.50 MiB
llama_new_context_with_model: CUDA_Host compute buffer size = 36.51 MiB
llama_new_context_with_model: graph nodes = 1050
llama_new_context_with_model: graph splits = 2
system_info: n_threads = 14 / 28 | AVX = 1 | AVX_VNNI = 0 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | AVX512_BF16 = 0 | FMA = 1 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 |
sampling:
repeat_last_n = 64, repeat_penalty = 1.000, frequency_penalty = 0.000, presence_penalty = 0.000
top_k = 40, tfs_z = 1.000, top_p = 0.950, min_p = 0.050, typical_p = 1.000, temp = 0.800
mirostat = 0, mirostat_lr = 0.100, mirostat_ent = 5.000
sampling order:
CFG -> Penalties -> top_k -> tfs_z -> typical_p -> top_p -> min_p -> temperature
generate: n_ctx = 8192, n_batch = 2048, n_predict = -1, n_keep = 1
Write a hello world program in python.
print("Hello, World!")
Explanation:
print()
is a built-in function in Python used to display output on the console."Hello, World!"
is a string literal, enclosed in double quotes, which is the text we want to print.
To run the program:
- Save the code in a file named
hello_world.py
. - Open a terminal or command prompt.
- Navigate to the directory where you saved the file using the
cd
command. - Execute the program using the command
python hello_world.py
.
You should see the output "Hello, World!" printed on the console.
[end of text]
llama_print_timings: load time = 966.05 ms
llama_print_timings: sample time = 16.41 ms / 154 runs ( 0.11 ms per token, 9385.09 tokens per second)
llama_print_timings: prompt eval time = 11.61 ms / 8 tokens ( 1.45 ms per token, 689.36 tokens per second)
llama_print_timings: eval time = 1071.28 ms / 153 runs ( 7.00 ms per token, 142.82 tokens per second)
llama_print_timings: total time = 1138.75 ms / 161 tokens
Log end
very strange.. I literally re-downloaded and ran on latest and it was fine :/
Can you try sha256sum for the file to make sure the download didn't get corrupted?
I am also constantly running into the same issue:
llama_model_load: error loading model: error loading model vocabulary: wstring_convert::from_bytes
llama_load_model_from_file: failed to load model
llama_init_from_gpt_params: error: failed to load model
I tried re-downloading multiple times. I'm using the current version of llama.cpp on Windows. Also tried with llamafile, same error
@bartowski
The sha256 of my downloaded file is the same as the file in HF.
PS C:\Users\Admin> certutil -hashfile "D:\codebase\ai\models\bartowski\DeepSeek-Coder-V2-Lite-Instruct-GGUF\DeepSeek-Coder-V2-Lite-Instruct-IQ4_XS.gguf" SHA256
SHA256 的 D:\codebase\ai\models\bartowski\DeepSeek-Coder-V2-Lite-Instruct-GGUF\DeepSeek-Coder-V2-Lite-Instruct-IQ4_XS.gguf 哈希:
ac0a996714d4e8ed06b4398096bae88a32c349ceab42ffe629c2ddf4c4e0706c
CertUtil: -hashfile 命令成功完成。