Always speaks in latin?

#1
by tomasmcm - opened

What am I doing wrong? I've tried with both LM Studio and llama.cpp, but the Q5_K_M just speaks what looks like to be latin?

<|im_start|>system\nYou are a helpful assistant. Perform the task to the best of your ability.<|im_end|>\n<|im_start|>user\nHi there, how are you doing?<|im_end|>\n<|im_start|>assistant\n
reluct increa accla secon encomp inev desir emphat affor fuf guarante maneu squa fta embra unden effe perfet strick purcha disagre milf depic impra inconce ftu volunte alre ?... shenan erad accla increa reluct increa accla secon encomp inev desir emphat affor fuf guarante maneu squa fta embra unden effe perfet

Seems to be a problem with the GGUF quantisation because the original model is working well here https://huggingface.co/spaces/tomasmcm/sam-dolphin-2.8-gemma-2b

Owner

Hi thanks more notice this let me take a look on this :)

can you try dolphin-2.8-gemma-2b.fp16.bin directly... I would test it from my side also. maybe is that 2B is very small

Same thing:

Log start
main: build = 2439 (4e9a7f7f)
main: built with Apple clang version 15.0.0 (clang-1500.3.9.4) for arm64-apple-darwin23.2.0
main: seed  = 1711481172
llama_model_loader: loaded meta data with 24 key-value pairs and 165 tensors from ~/Downloads/dolphin-2.8-gemma-2b.fp16.bin (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.name str              = .
llama_model_loader: - kv   2:                           llama.vocab_size u32              = 256000
llama_model_loader: - kv   3:                       llama.context_length u32              = 8192
llama_model_loader: - kv   4:                     llama.embedding_length u32              = 2048
llama_model_loader: - kv   5:                          llama.block_count u32              = 18
llama_model_loader: - kv   6:                  llama.feed_forward_length u32              = 16384
llama_model_loader: - kv   7:                 llama.rope.dimension_count u32              = 256
llama_model_loader: - kv   8:                 llama.attention.head_count u32              = 8
llama_model_loader: - kv   9:              llama.attention.head_count_kv u32              = 1
llama_model_loader: - kv  10:     llama.attention.layer_norm_rms_epsilon f32              = 0.000001
llama_model_loader: - kv  11:                       llama.rope.freq_base f32              = 10000.000000
llama_model_loader: - kv  12:                          general.file_type u32              = 1
llama_model_loader: - kv  13:                       tokenizer.ggml.model str              = llama
llama_model_loader: - kv  14:                      tokenizer.ggml.tokens arr[str,256000]  = ["<pad>", "<eos>", "<bos>", "<unk>", ...
llama_model_loader: - kv  15:                      tokenizer.ggml.scores arr[f32,256000]  = [-1000.000000, -1000.000000, -1000.00...
llama_model_loader: - kv  16:                  tokenizer.ggml.token_type arr[i32,256000]  = [3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv  17:                tokenizer.ggml.bos_token_id u32              = 2
llama_model_loader: - kv  18:                tokenizer.ggml.eos_token_id u32              = 1
llama_model_loader: - kv  19:            tokenizer.ggml.unknown_token_id u32              = 3
llama_model_loader: - kv  20:            tokenizer.ggml.padding_token_id u32              = 0
llama_model_loader: - kv  21:               tokenizer.ggml.add_bos_token bool             = false
llama_model_loader: - kv  22:               tokenizer.ggml.add_eos_token bool             = false
llama_model_loader: - kv  23:                    tokenizer.chat_template str              = {% if not add_generation_prompt is de...
llama_model_loader: - type  f32:   37 tensors
llama_model_loader: - type  f16:  128 tensors
llm_load_vocab: mismatch in special tokens definition ( 413/256000 vs 261/256000 ).
llm_load_print_meta: format           = GGUF V3 (latest)
llm_load_print_meta: arch             = llama
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: n_ctx_train      = 8192
llm_load_print_meta: n_embd           = 2048
llm_load_print_meta: n_head           = 8
llm_load_print_meta: n_head_kv        = 1
llm_load_print_meta: n_layer          = 18
llm_load_print_meta: n_rot            = 256
llm_load_print_meta: n_embd_head_k    = 256
llm_load_print_meta: n_embd_head_v    = 256
llm_load_print_meta: n_gqa            = 8
llm_load_print_meta: n_embd_k_gqa     = 256
llm_load_print_meta: n_embd_v_gqa     = 256
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: n_ff             = 16384
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  = 10000.0
llm_load_print_meta: freq_scale_train = 1
llm_load_print_meta: n_yarn_orig_ctx  = 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       = ?B
llm_load_print_meta: model ftype      = F16
llm_load_print_meta: model params     = 3.03 B
llm_load_print_meta: model size       = 5.64 GiB (16.00 BPW)
llm_load_print_meta: general.name     = .
llm_load_print_meta: BOS token        = 2 '<bos>'
llm_load_print_meta: EOS token        = 1 '<eos>'
llm_load_print_meta: UNK token        = 3 '<unk>'
llm_load_print_meta: PAD token        = 0 '<pad>'
llm_load_print_meta: LF token         = 227 '<0x0A>'
llm_load_tensors: ggml ctx size =    0.13 MiB
ggml_backend_metal_buffer_from_ptr: allocated buffer, size =  4780.31 MiB, ( 4780.38 / 21845.34)
llm_load_tensors: offloading 18 repeating layers to GPU
llm_load_tensors: offloading non-repeating layers to GPU
llm_load_tensors: offloaded 19/19 layers to GPU
llm_load_tensors:      Metal buffer size =  4780.30 MiB
llm_load_tensors:        CPU buffer size =  1000.00 MiB
.............................................................
llama_new_context_with_model: n_ctx      = 512
llama_new_context_with_model: n_batch    = 512
llama_new_context_with_model: n_ubatch   = 512
llama_new_context_with_model: freq_base  = 10000.0
llama_new_context_with_model: freq_scale = 1
ggml_metal_init: allocating
ggml_metal_init: found device: Apple M1 Max
ggml_metal_init: picking default device: Apple M1 Max
ggml_metal_init: default.metallib not found, loading from source
ggml_metal_init: GGML_METAL_PATH_RESOURCES = nil
ggml_metal_init: loading '~/llama.cpp/ggml-metal.metal'
ggml_metal_init: GPU name:   Apple M1 Max
ggml_metal_init: GPU family: MTLGPUFamilyApple7  (1007)
ggml_metal_init: GPU family: MTLGPUFamilyCommon3 (3003)
ggml_metal_init: GPU family: MTLGPUFamilyMetal3  (5001)
ggml_metal_init: simdgroup reduction support   = true
ggml_metal_init: simdgroup matrix mul. support = true
ggml_metal_init: hasUnifiedMemory              = true
ggml_metal_init: recommendedMaxWorkingSetSize  = 22906.50 MB
ggml_backend_metal_buffer_type_alloc_buffer: allocated buffer, size =     9.00 MiB, ( 4791.19 / 21845.34)
llama_kv_cache_init:      Metal KV buffer size =     9.00 MiB
llama_new_context_with_model: KV self size  =    9.00 MiB, K (f16):    4.50 MiB, V (f16):    4.50 MiB
llama_new_context_with_model:        CPU  output buffer size =   500.00 MiB
ggml_backend_metal_buffer_type_alloc_buffer: allocated buffer, size =   508.00 MiB, ( 5299.19 / 21845.34)
llama_new_context_with_model:      Metal compute buffer size =   508.00 MiB
llama_new_context_with_model:        CPU compute buffer size =     5.00 MiB
llama_new_context_with_model: graph splits: 2

system_info: n_threads = 8 / 10 | AVX = 0 | AVX_VNNI = 0 | AVX2 = 0 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 0 | NEON = 1 | ARM_FMA = 1 | F16C = 0 | FP16_VA = 1 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 0 | SSSE3 = 0 | VSX = 0 | MATMUL_INT8 = 0 |
sampling:
    repeat_last_n = 64, repeat_penalty = 1.100, 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 = 512, n_batch = 2048, n_predict = -1, n_keep = 0


<|im_start|>system\nYou are a helpful assistant. Perform the task to the best of your ability.<|im_end|>\n<|im_start|>user\nHi there, how are you doing?<|im_end|>\n<|im_start|>assistant\n encomp reluct increa desir accla fuf inev guarante maneu unden perfet emphat affor secon embra squa milf fta effe disagre depic strick purcha ?... impra ftu volunte accla accla erad alre accla fto encomp reluct increa desir accla fuf inev guarante maneu unden perfet emphat affor secon embra squa milf fta effe disagre depic strick increa purcha impra accla volunte increa accla ?... alre shenan inconce encomp reluct ftu desir thut fuf inev guarante maneu unden perfet emphat affor secon embra squa milf fta effe disagre depic strick increa purcha accla increa impra increa increa volunte increa accla shenan encomp reluct alre desir accla fuf inev guarante maneu unden perfet emphat affor secon embra squa milf fta effe disagre depic increa strick purcha ?... ftu impra increa increa inconce volunte accla shenan encomp reluct alre desir intersper fuf inev guarante maneu unden perfet emphat affor secon embra squa accla fta effe disagre depic milf strick purcha increa thut impra excru increa accla volunte increa accla encomp reluct accla desir shenan fuf inev guarante maneu unden perfet emphat affor secon embra squa inconce fta effe disagre depic milf increa purcha strick increa impra alre ftu increa indestru increa accla encomp reluct volunte desir shenan fuf inev guarante maneu unden perfet emphat affor secon embra squa increa fta effe disagre depic accla accla purcha milf strick increa impra alre increa increa inconce erad encomp reluct accla desir increa fuf inev guarante maneu unden perfet emphat affor secon embra squa volunte fta effe disagre depic accla shenan purcha milf strick increa impra alre accla accla intersper inconce encomp reluct increa desir ftu fuf inev guarante maneu unden perfet emphat affor secon embra squa volunte fta effe disagre depic accla shenan purcha milf strick excru impra accla alre thut accla increa encomp reluct increa desir inconce fuf inev guarante maneu unden perfet emphat affor secon embra squa volunte fta

llama_print_timings:        load time =    5272.94 ms
llama_print_timings:      sample time =     336.13 ms /   630 runs   (    0.53 ms per token,  1874.30 tokens per second)
llama_print_timings: prompt eval time =      70.98 ms /    42 tokens (    1.69 ms per token,   591.75 tokens per second)
llama_print_timings:        eval time =   11520.48 ms /   629 runs   (   18.32 ms per token,    54.60 tokens per second)
llama_print_timings:       total time =   12343.51 ms /   671 tokens
Owner

totally right! let me quantize again everything of this gemma I suspect is the trick. also 7B has this issue I tested both

@tomasmcm for now gemma mess up weight for quants so is possible to create gguf but unusable. You can use is directly.. I would keep an eye if there is a PR to fix it (same as merge models) I would delete the all repo of gemma gguf for now

I think I saw an issue on llama.cpp that mentioned something similar regarding quantizing finetunes. Because the base gemma quantizes fine, it's just the lora finetunes that are not working.
Also, I saw that when I tried to quantize it, I had to download tokenizer.model from the original model, do you know if dolphin-2.8-gemma is based on base gemma-2b or gemma-2b-it? Not sure if the tokenizer.model is the same for both.

Sign up or log in to comment