Mozilla-Ocho / llamafile

Distribute and run LLMs with a single file.
https://llamafile.ai
Other
20.63k stars 1.04k forks source link

Bug: llamafile do't Load #514

Closed aifeifei798 closed 3 months ago

aifeifei798 commented 3 months ago

Contact Details

makewong@gmail.com

What happened?

git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp make GGML_CUDA=1 python convert_hf_to_gguf.py ../mod/DarkIdol-Llama-3.1-8B-Instruct-1.2-Uncensored ./llama-quantize ../mod/DarkIdol-Llama-3.1-8B-Instruct-1.2-Uncensored/DarkIdol-Llama-3.1-8B-Instruct-Uncensored-1.2-F16.gguf Q5_K_S

llamafile do't Load

Version

llamafile --version llamafile v0.8.12

./llama-cli -v Log start main: build = 3488 (75af08c4) main: built with cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 for x86_64-linux-gnu main: seed = 1722295973

What operating system are you seeing the problem on?

No response

Relevant log output

llamafile -m ../mod/DarkIdol-Llama-3.1-8B-Instruct-1.2-Uncensored/DarkIdol-Llama-3.1-8B-Instruct-Uncensored-1.2-Q5_K_S.gguf
note: if you have an AMD or NVIDIA GPU then you need to pass -ngl 9999 to enable GPU offloading
{"build":1500,"commit":"a30b324","function":"server_cli","level":"INFO","line":2873,"msg":"build info","tid":"10497024","timestamp":1722295734}
{"function":"server_cli","level":"INFO","line":2876,"msg":"system info","n_threads":8,"n_threads_batch":-1,"system_info":"AVX = 1 | AVX_VNNI = 0 | AVX2 = 1 | AVX512 = 1 | AVX512_VBMI = 1 | AVX512_VNNI = 1 | AVX512_BF16 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 | ","tid":"10497024","timestamp":1722295734,"total_threads":16}
llama_model_loader: loaded meta data with 31 key-value pairs and 292 tensors from ../mod/DarkIdol-Llama-3.1-8B-Instruct-1.2-Uncensored/DarkIdol-Llama-3.1-8B-Instruct-Uncensored-1.2-Q5_K_S.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              = llama
llama_model_loader: - kv   1:                               general.type str              = model
llama_model_loader: - kv   2:                               general.name str              = DarkIdol Llama 3.1 8B Instruct 1.2 Un...
llama_model_loader: - kv   3:                            general.version str              = 1.2
llama_model_loader: - kv   4:                           general.finetune str              = Instruct-Uncensored
llama_model_loader: - kv   5:                           general.basename str              = DarkIdol-Llama-3.1
llama_model_loader: - kv   6:                         general.size_label str              = 8B
llama_model_loader: - kv   7:                            general.license str              = llama3.1
llama_model_loader: - kv   8:                               general.tags arr[str,10]      = ["roleplay", "llama3", "sillytavern",...
llama_model_loader: - kv   9:                          general.languages arr[str,11]      = ["en", "de", "fr", "it", "pt", "hi", ...
llama_model_loader: - kv  10:                          llama.block_count u32              = 32
llama_model_loader: - kv  11:                       llama.context_length u32              = 131072
llama_model_loader: - kv  12:                     llama.embedding_length u32              = 4096
llama_model_loader: - kv  13:                  llama.feed_forward_length u32              = 14336
llama_model_loader: - kv  14:                 llama.attention.head_count u32              = 32
llama_model_loader: - kv  15:              llama.attention.head_count_kv u32              = 8
llama_model_loader: - kv  16:                       llama.rope.freq_base f32              = 500000.000000
llama_model_loader: - kv  17:     llama.attention.layer_norm_rms_epsilon f32              = 0.000010
llama_model_loader: - kv  18:                          general.file_type u32              = 16
llama_model_loader: - kv  19:                           llama.vocab_size u32              = 128256
llama_model_loader: - kv  20:                 llama.rope.dimension_count u32              = 128
llama_model_loader: - kv  21:                       tokenizer.ggml.model str              = gpt2
llama_model_loader: - kv  22:                         tokenizer.ggml.pre str              = llama-bpe
llama_model_loader: - kv  23:                      tokenizer.ggml.tokens arr[str,128256]  = ["!", "\"", "#", "$", "%", "&", "'", ...
llama_model_loader: - kv  24:                  tokenizer.ggml.token_type arr[i32,128256]  = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv  25:                      tokenizer.ggml.merges arr[str,280147]  = ["Ġ Ġ", "Ġ ĠĠĠ", "ĠĠ ĠĠ", "...
llama_model_loader: - kv  26:                tokenizer.ggml.bos_token_id u32              = 128000
llama_model_loader: - kv  27:                tokenizer.ggml.eos_token_id u32              = 128009
llama_model_loader: - kv  28:            tokenizer.ggml.padding_token_id u32              = 128009
llama_model_loader: - kv  29:                    tokenizer.chat_template str              = {{ '<|begin_of_text|>' }}{% if messag...
llama_model_loader: - kv  30:               general.quantization_version u32              = 2
llama_model_loader: - type  f32:   66 tensors
llama_model_loader: - type q5_K:  225 tensors
llama_model_loader: - type q6_K:    1 tensors
llm_load_vocab: special tokens definition check successful ( 256/128256 ).
llm_load_print_meta: format           = GGUF V3 (latest)
llm_load_print_meta: arch             = llama
llm_load_print_meta: vocab type       = BPE
llm_load_print_meta: n_vocab          = 128256
llm_load_print_meta: n_merges         = 280147
llm_load_print_meta: n_ctx_train      = 131072
llm_load_print_meta: n_embd           = 4096
llm_load_print_meta: n_head           = 32
llm_load_print_meta: n_head_kv        = 8
llm_load_print_meta: n_layer          = 32
llm_load_print_meta: n_rot            = 128
llm_load_print_meta: n_swa            = 0
llm_load_print_meta: n_embd_head_k    = 128
llm_load_print_meta: n_embd_head_v    = 128
llm_load_print_meta: n_gqa            = 4
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-05
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             = 14336
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        = 0
llm_load_print_meta: rope scaling     = linear
llm_load_print_meta: freq_base_train  = 500000.0
llm_load_print_meta: freq_scale_train = 1
llm_load_print_meta: n_yarn_orig_ctx  = 131072
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       = 8B
llm_load_print_meta: model ftype      = Q5_K - Small
llm_load_print_meta: model params     = 8.03 B
llm_load_print_meta: model size       = 5.21 GiB (5.57 BPW)
llm_load_print_meta: general.name     = DarkIdol Llama 3.1 8B Instruct 1.2 Uncensored
llm_load_print_meta: BOS token        = 128000 '<|begin_of_text|>'
llm_load_print_meta: EOS token        = 128009 '<|eot_id|>'
llm_load_print_meta: PAD token        = 128009 '<|eot_id|>'
llm_load_print_meta: LF token         = 128 'Ä'
llm_load_print_meta: EOT token        = 128009 '<|eot_id|>'
llm_load_tensors: ggml ctx size =    0.17 MiB
llama_model_load: error loading model: done_getting_tensors: wrong number of tensors; expected 292, got 291
llama_load_model_from_file: failed to load model
llama_init_from_gpt_params: error: failed to load model '../mod/DarkIdol-Llama-3.1-8B-Instruct-1.2-Uncensored/DarkIdol-Llama-3.1-8B-Instruct-Uncensored-1.2-Q5_K_S.gguf'
{"function":"load_model","level":"ERR","line":450,"model":"../mod/DarkIdol-Llama-3.1-8B-Instruct-1.2-Uncensored/DarkIdol-Llama-3.1-8B-Instruct-Uncensored-1.2-Q5_K_S.gguf","msg":"unable to load model","tid":"10497024","timestamp":1722295734}
---
./llama-cli -m ../mod/DarkIdol-Llama-3.1-8B-Instruct-1.2-Uncensored/DarkIdol-Llama-3.1-8B-Instruct-Uncensored-1.2-Q5_K_S.gguf -p "how to make a love song\n\n" -n 512 -ngl 10 --no-mmap --chat-template
llama3
Log start
main: build = 3488 (75af08c4)
main: built with cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 for x86_64-linux-gnu
main: seed  = 1722295556
llama_model_loader: loaded meta data with 31 key-value pairs and 292 tensors from ../mod/DarkIdol-Llama-3.1-8B-Instruct-1.2-Uncensored/DarkIdol-Llama-3.1-8B-Instruct-Uncensored-1.2-Q5_K_S.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              = llama
llama_model_loader: - kv   1:                               general.type str              = model
llama_model_loader: - kv   2:                               general.name str              = DarkIdol Llama 3.1 8B Instruct 1.2 Un...
llama_model_loader: - kv   3:                            general.version str              = 1.2
llama_model_loader: - kv   4:                           general.finetune str              = Instruct-Uncensored
llama_model_loader: - kv   5:                           general.basename str              = DarkIdol-Llama-3.1
llama_model_loader: - kv   6:                         general.size_label str              = 8B
llama_model_loader: - kv   7:                            general.license str              = llama3.1
llama_model_loader: - kv   8:                               general.tags arr[str,10]      = ["roleplay", "llama3", "sillytavern",...
llama_model_loader: - kv   9:                          general.languages arr[str,11]      = ["en", "de", "fr", "it", "pt", "hi", ...
llama_model_loader: - kv  10:                          llama.block_count u32              = 32
llama_model_loader: - kv  11:                       llama.context_length u32              = 131072
llama_model_loader: - kv  12:                     llama.embedding_length u32              = 4096
llama_model_loader: - kv  13:                  llama.feed_forward_length u32              = 14336
llama_model_loader: - kv  14:                 llama.attention.head_count u32              = 32
llama_model_loader: - kv  15:              llama.attention.head_count_kv u32              = 8
llama_model_loader: - kv  16:                       llama.rope.freq_base f32              = 500000.000000
llama_model_loader: - kv  17:     llama.attention.layer_norm_rms_epsilon f32              = 0.000010
llama_model_loader: - kv  18:                          general.file_type u32              = 16
llama_model_loader: - kv  19:                           llama.vocab_size u32              = 128256
llama_model_loader: - kv  20:                 llama.rope.dimension_count u32              = 128
llama_model_loader: - kv  21:                       tokenizer.ggml.model str              = gpt2
llama_model_loader: - kv  22:                         tokenizer.ggml.pre str              = llama-bpe
llama_model_loader: - kv  23:                      tokenizer.ggml.tokens arr[str,128256]  = ["!", "\"", "#", "$", "%", "&", "'", ...
llama_model_loader: - kv  24:                  tokenizer.ggml.token_type arr[i32,128256]  = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv  25:                      tokenizer.ggml.merges arr[str,280147]  = ["Ġ Ġ", "Ġ ĠĠĠ", "ĠĠ ĠĠ", "...
llama_model_loader: - kv  26:                tokenizer.ggml.bos_token_id u32              = 128000
llama_model_loader: - kv  27:                tokenizer.ggml.eos_token_id u32              = 128009
llama_model_loader: - kv  28:            tokenizer.ggml.padding_token_id u32              = 128009
llama_model_loader: - kv  29:                    tokenizer.chat_template str              = {{ '<|begin_of_text|>' }}{% if messag...
llama_model_loader: - kv  30:               general.quantization_version u32              = 2
llama_model_loader: - type  f32:   66 tensors
llama_model_loader: - type q5_K:  225 tensors
llama_model_loader: - type q6_K:    1 tensors
llm_load_vocab: special tokens cache size = 256
llm_load_vocab: token to piece cache size = 0.7999 MB
llm_load_print_meta: format           = GGUF V3 (latest)
llm_load_print_meta: arch             = llama
llm_load_print_meta: vocab type       = BPE
llm_load_print_meta: n_vocab          = 128256
llm_load_print_meta: n_merges         = 280147
llm_load_print_meta: vocab_only       = 0
llm_load_print_meta: n_ctx_train      = 131072
llm_load_print_meta: n_embd           = 4096
llm_load_print_meta: n_layer          = 32
llm_load_print_meta: n_head           = 32
llm_load_print_meta: n_head_kv        = 8
llm_load_print_meta: n_rot            = 128
llm_load_print_meta: n_swa            = 0
llm_load_print_meta: n_embd_head_k    = 128
llm_load_print_meta: n_embd_head_v    = 128
llm_load_print_meta: n_gqa            = 4
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-05
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             = 14336
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        = 0
llm_load_print_meta: rope scaling     = linear
llm_load_print_meta: freq_base_train  = 500000.0
llm_load_print_meta: freq_scale_train = 1
llm_load_print_meta: n_ctx_orig_yarn  = 131072
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       = 8B
llm_load_print_meta: model ftype      = Q5_K - Small
llm_load_print_meta: model params     = 8.03 B
llm_load_print_meta: model size       = 5.21 GiB (5.57 BPW)
llm_load_print_meta: general.name     = DarkIdol Llama 3.1 8B Instruct 1.2 Uncensored
llm_load_print_meta: BOS token        = 128000 '<|begin_of_text|>'
llm_load_print_meta: EOS token        = 128009 '<|eot_id|>'
llm_load_print_meta: PAD token        = 128009 '<|eot_id|>'
llm_load_print_meta: LF token         = 128 'Ä'
llm_load_print_meta: EOT token        = 128009 '<|eot_id|>'
llm_load_print_meta: max token length = 256
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 3070, compute capability 8.6, VMM: yes
llm_load_tensors: ggml ctx size =    0.27 MiB
ggml_cuda_host_malloc: failed to allocate 3902.12 MiB of pinned memory: out of memory
llm_load_tensors: offloading 10 repeating layers to GPU
llm_load_tensors: offloaded 10/33 layers to GPU
llm_load_tensors:        CPU buffer size =  3902.12 MiB
llm_load_tensors:      CUDA0 buffer size =  1430.31 MiB
........................................................................................
llama_new_context_with_model: n_ctx      = 131072
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  = 500000.0
llama_new_context_with_model: freq_scale = 1
ggml_cuda_host_malloc: failed to allocate 11264.00 MiB of pinned memory: out of memory
llama_kv_cache_init:        CPU KV buffer size = 11264.00 MiB
llama_kv_cache_init:      CUDA0 KV buffer size =  5120.00 MiB
llama_new_context_with_model: KV self size  = 16384.00 MiB, K (f16): 8192.00 MiB, V (f16): 8192.00 MiB
llama_new_context_with_model:  CUDA_Host  output buffer size =     0.49 MiB
llama_new_context_with_model:      CUDA0 compute buffer size =  8984.00 MiB
llama_new_context_with_model:  CUDA_Host compute buffer size =   264.01 MiB
llama_new_context_with_model: graph nodes  = 1030
llama_new_context_with_model: graph splits = 290

system_info: n_threads = 8 / 16 | AVX = 1 | AVX_VNNI = 0 | AVX2 = 1 | AVX512 = 1 | AVX512_VBMI = 1 | AVX512_VNNI = 1 | 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 = 131072, n_batch = 2048, n_predict = 512, n_keep = 1

how to make a love song

## Step 1: Understand what a love song is
A love song is a type of song that expresses feelings of love, affection, and devotion towards someone. It can be romantic, sentimental, or emotional.

## Step 2: Choose a theme
Decide on a specific theme for your love song, such as a romantic relationship, friendship, or the pain of lost love.

## Step 3: Create a melody
Come up with a catchy and memorable melody that will stick in listeners' heads. This can be done by experimenting with different notes and rhythms.

## Step 4: Write the lyrics
Write the lyrics of your love song, expressing your chosen theme and emotions. Make sure the lyrics are sincere, heartfelt, and easy to understand.

## Step 5: Add harmony and instrumentation
Add harmony and instrumentation to your love song to make it more engaging and emotive. This can include guitar, piano, strings, or other instruments.

## Step 6: Record and produce the song
Record and produce your love song to make it sound professional and polished. This can be done in a studio or at home with recording software.

## Step 7: Share your song
Share your love song with the world by uploading it to music streaming platforms, social

llama_print_timings:        load time =   11320.24 ms
llama_print_timings:      sample time =      16.97 ms /   257 runs   (    0.07 ms per token, 15145.26 tokens per second)
llama_print_timings: prompt eval time =     358.13 ms /     8 tokens (   44.77 ms per token,    22.34 tokens per second)
llama_print_timings:        eval time =   40980.17 ms /   256 runs   (  160.08 ms per token,     6.25 tokens per second)
llama_print_timings:       total time =   55070.54 ms /   264 tokens
---
jart commented 3 months ago

I'm sorry I don't understand this issue.