You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using standard text generation based on a LlamaCpp model, the generation is completely random and makes no sense.
Steps/code to reproduce the bug:
importoutlinesmodel=outlines.models.llamacpp("TheBloke/Mistral-7B-Instruct-v0.1-GGUF/mistral-7b-instruct-v0.1.Q4_K_M.gguf", device="cpu")
generator=outlines.generate.text(model)
sequence=generator("Q: Name the planets in the solar system? A: ", max_tokens=512)
print(sequence)
Expected result:
sequence doesn't look like this:Mercury Retro 12: What'sPyEvening.io/Lens Finallyslycrypt: https://Comm
Monkeylog= https://www.myvergeoc-go/
Coinc described here is a Minecraft_Git/
You are you already a hacking.gg/Waltbits?
Hit me being rocket Topic-Petalotanie/subscribe
A/ Telegram.toyosmc
Answer: Logout
### Error message:
```shell
llama_model_loader: loaded meta data with 20 key-value pairs and 291 tensors from /Users/maxime/.cache/lm-studio/models/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/mistral-7b-instruct-v0.1.Q4_K_M.gguf (version GGUF V2)
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 = mistralai_mistral-7b-instruct-v0.1
llama_model_loader: - kv 2: llama.context_length u32 = 32768
llama_model_loader: - kv 3: llama.embedding_length u32 = 4096
llama_model_loader: - kv 4: llama.block_count u32 = 32
llama_model_loader: - kv 5: llama.feed_forward_length u32 = 14336
llama_model_loader: - kv 6: llama.rope.dimension_count u32 = 128
llama_model_loader: - kv 7: llama.attention.head_count u32 = 32
llama_model_loader: - kv 8: llama.attention.head_count_kv u32 = 8
llama_model_loader: - kv 9: llama.attention.layer_norm_rms_epsilon f32 = 0.000010
llama_model_loader: - kv 10: llama.rope.freq_base f32 = 10000.000000
llama_model_loader: - kv 11: general.file_type u32 = 15
llama_model_loader: - kv 12: tokenizer.ggml.model str = llama
llama_model_loader: - kv 13: tokenizer.ggml.tokens arr[str,32000] = ["<unk>", "<s>", "</s>", "<0x00>", "<...
llama_model_loader: - kv 14: tokenizer.ggml.scores arr[f32,32000] = [0.000000, 0.000000, 0.000000, 0.0000...
llama_model_loader: - kv 15: tokenizer.ggml.token_type arr[i32,32000] = [2, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, ...
llama_model_loader: - kv 16: tokenizer.ggml.bos_token_id u32 = 1
llama_model_loader: - kv 17: tokenizer.ggml.eos_token_id u32 = 2
llama_model_loader: - kv 18: tokenizer.ggml.unknown_token_id u32 = 0
llama_model_loader: - kv 19: general.quantization_version u32 = 2
llama_model_loader: - type f32: 65 tensors
llama_model_loader: - type q4_K: 193 tensors
llama_model_loader: - type q6_K: 33 tensors
llm_load_vocab: special tokens definition check successful ( 259/32000 ).
llm_load_print_meta: format = GGUF V2
llm_load_print_meta: arch = llama
llm_load_print_meta: vocab type = SPM
llm_load_print_meta: n_vocab = 32000
llm_load_print_meta: n_merges = 0
llm_load_print_meta: n_ctx_train = 32768
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_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: n_ff = 14336
llm_load_print_meta: n_expert = 0
llm_load_print_meta: n_expert_used = 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 = 32768
llm_load_print_meta: rope_finetuned = unknown
llm_load_print_meta: model type = 7B
llm_load_print_meta: model ftype = Q4_K - Medium
llm_load_print_meta: model params = 7.24 B
llm_load_print_meta: model size = 4.07 GiB (4.83 BPW)
llm_load_print_meta: general.name = mistralai_mistral-7b-instruct-v0.1
llm_load_print_meta: BOS token = 1 '<s>'
llm_load_print_meta: EOS token = 2 '</s>'
llm_load_print_meta: UNK token = 0 '<unk>'
llm_load_print_meta: LF token = 13 '<0x0A>'
llm_load_tensors: ggml ctx size = 0.22 MiB
ggml_backend_metal_buffer_from_ptr: allocated buffer, size = 4095.08 MiB, ( 4095.16 / 49152.00)
llm_load_tensors: offloading 32 repeating layers to GPU
llm_load_tensors: offloading non-repeating layers to GPU
llm_load_tensors: offloaded 33/33 layers to GPU
llm_load_tensors: CPU buffer size = 70.31 MiB
llm_load_tensors: Metal buffer size = 4095.07 MiB
...............................................................................................
llama_new_context_with_model: n_ctx = 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 M3 Max
ggml_metal_init: picking default device: Apple M3 Max
ggml_metal_init: default.metallib not found, loading from source
ggml_metal_init: GGML_METAL_PATH_RESOURCES = nil
ggml_metal_init: loading '/Users/maxime/anaconda3/envs/torch/lib/python3.11/site-packages/llama_cpp/ggml-metal.metal'
ggml_metal_init: GPU name: Apple M3 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 support = true
ggml_metal_init: simdgroup matrix mul. support = true
ggml_metal_init: hasUnifiedMemory = true
ggml_metal_init: recommendedMaxWorkingSetSize = 51539.61 MB
ggml_backend_metal_buffer_type_alloc_buffer: allocated buffer, size = 64.00 MiB, ( 4165.03 / 49152.00)
llama_kv_cache_init: Metal KV buffer size = 64.00 MiB
llama_new_context_with_model: KV self size = 64.00 MiB, K (f16): 32.00 MiB, V (f16): 32.00 MiB
llama_new_context_with_model: CPU input buffer size = 9.01 MiB
ggml_backend_metal_buffer_type_alloc_buffer: allocated buffer, size = 0.02 MiB, ( 4165.05 / 49152.00)
ggml_backend_metal_buffer_type_alloc_buffer: allocated buffer, size = 80.31 MiB, ( 4245.34 / 49152.00)
llama_new_context_with_model: Metal compute buffer size = 80.30 MiB
llama_new_context_with_model: CPU compute buffer size = 8.80 MiB
llama_new_context_with_model: graph splits (measure): 3
Failed to convert token (b'\x80'): 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
Failed to convert token (b'\x81'): 'utf-8' codec can't decode byte 0x81 in position 0: invalid start byte
Failed to convert token (b'\x82'): 'utf-8' codec can't decode byte 0x82 in position 0: invalid start byte
Failed to convert token (b'\x83'): 'utf-8' codec can't decode byte 0x83 in position 0: invalid start byte
Failed to convert token (b'\x84'): 'utf-8' codec can't decode byte 0x84 in position 0: invalid start byte
Failed to convert token (b'\x85'): 'utf-8' codec can't decode byte 0x85 in position 0: invalid start byte
Failed to convert token (b'\x86'): 'utf-8' codec can't decode byte 0x86 in position 0: invalid start byte
Failed to convert token (b'\x87'): 'utf-8' codec can't decode byte 0x87 in position 0: invalid start byte
Failed to convert token (b'\x88'): 'utf-8' codec can't decode byte 0x88 in position 0: invalid start byte
Failed to convert token (b'\x89'): 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
Failed to convert token (b'\x8a'): 'utf-8' codec can't decode byte 0x8a in position 0: invalid start byte
Failed to convert token (b'\x8b'): 'utf-8' codec can't decode byte 0x8b in position 0: invalid start byte
Failed to convert token (b'\x8c'): 'utf-8' codec can't decode byte 0x8c in position 0: invalid start byte
Failed to convert token (b'\x8d'): 'utf-8' codec can't decode byte 0x8d in position 0: invalid start byte
Failed to convert token (b'\x8e'): 'utf-8' codec can't decode byte 0x8e in position 0: invalid start byte
Failed to convert token (b'\x8f'): 'utf-8' codec can't decode byte 0x8f in position 0: invalid start byte
Failed to convert token (b'\x90'): 'utf-8' codec can't decode byte 0x90 in position 0: invalid start byte
Failed to convert token (b'\x91'): 'utf-8' codec can't decode byte 0x91 in position 0: invalid start byte
Failed to convert token (b'\x92'): 'utf-8' codec can't decode byte 0x92 in position 0: invalid start byte
Failed to convert token (b'\x93'): 'utf-8' codec can't decode byte 0x93 in position 0: invalid start byte
Failed to convert token (b'\x94'): 'utf-8' codec can't decode byte 0x94 in position 0: invalid start byte
Failed to convert token (b'\x95'): 'utf-8' codec can't decode byte 0x95 in position 0: invalid start byte
Failed to convert token (b'\x96'): 'utf-8' codec can't decode byte 0x96 in position 0: invalid start byte
Failed to convert token (b'\x97'): 'utf-8' codec can't decode byte 0x97 in position 0: invalid start byte
Failed to convert token (b'\x98'): 'utf-8' codec can't decode byte 0x98 in position 0: invalid start byte
Failed to convert token (b'\x99'): 'utf-8' codec can't decode byte 0x99 in position 0: invalid start byte
Failed to convert token (b'\x9a'): 'utf-8' codec can't decode byte 0x9a in position 0: invalid start byte
Failed to convert token (b'\x9b'): 'utf-8' codec can't decode byte 0x9b in position 0: invalid start byte
Failed to convert token (b'\x9c'): 'utf-8' codec can't decode byte 0x9c in position 0: invalid start byte
Failed to convert token (b'\x9d'): 'utf-8' codec can't decode byte 0x9d in position 0: invalid start byte
Failed to convert token (b'\x9e'): 'utf-8' codec can't decode byte 0x9e in position 0: invalid start byte
Failed to convert token (b'\x9f'): 'utf-8' codec can't decode byte 0x9f in position 0: invalid start byte
Failed to convert token (b'\xa0'): 'utf-8' codec can't decode byte 0xa0 in position 0: invalid start byte
Failed to convert token (b'\xa1'): 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte
Failed to convert token (b'\xa2'): 'utf-8' codec can't decode byte 0xa2 in position 0: invalid start byte
Failed to convert token (b'\xa3'): 'utf-8' codec can't decode byte 0xa3 in position 0: invalid start byte
Failed to convert token (b'\xa4'): 'utf-8' codec can't decode byte 0xa4 in position 0: invalid start byte
Failed to convert token (b'\xa5'): 'utf-8' codec can't decode byte 0xa5 in position 0: invalid start byte
Failed to convert token (b'\xa6'): 'utf-8' codec can't decode byte 0xa6 in position 0: invalid start byte
Failed to convert token (b'\xa7'): 'utf-8' codec can't decode byte 0xa7 in position 0: invalid start byte
Failed to convert token (b'\xa8'): 'utf-8' codec can't decode byte 0xa8 in position 0: invalid start byte
Failed to convert token (b'\xa9'): 'utf-8' codec can't decode byte 0xa9 in position 0: invalid start byte
Failed to convert token (b'\xaa'): 'utf-8' codec can't decode byte 0xaa in position 0: invalid start byte
Failed to convert token (b'\xab'): 'utf-8' codec can't decode byte 0xab in position 0: invalid start byte
Failed to convert token (b'\xac'): 'utf-8' codec can't decode byte 0xac in position 0: invalid start byte
Failed to convert token (b'\xad'): 'utf-8' codec can't decode byte 0xad in position 0: invalid start byte
Failed to convert token (b'\xae'): 'utf-8' codec can't decode byte 0xae in position 0: invalid start byte
Failed to convert token (b'\xaf'): 'utf-8' codec can't decode byte 0xaf in position 0: invalid start byte
Failed to convert token (b'\xb0'): 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte
Failed to convert token (b'\xb1'): 'utf-8' codec can't decode byte 0xb1 in position 0: invalid start byte
Failed to convert token (b'\xb2'): 'utf-8' codec can't decode byte 0xb2 in position 0: invalid start byte
Failed to convert token (b'\xb3'): 'utf-8' codec can't decode byte 0xb3 in position 0: invalid start byte
Failed to convert token (b'\xb4'): 'utf-8' codec can't decode byte 0xb4 in position 0: invalid start byte
Failed to convert token (b'\xb5'): 'utf-8' codec can't decode byte 0xb5 in position 0: invalid start byte
Failed to convert token (b'\xb6'): 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte
Failed to convert token (b'\xb7'): 'utf-8' codec can't decode byte 0xb7 in position 0: invalid start byte
Failed to convert token (b'\xb8'): 'utf-8' codec can't decode byte 0xb8 in position 0: invalid start byte
Failed to convert token (b'\xb9'): 'utf-8' codec can't decode byte 0xb9 in position 0: invalid start byte
Failed to convert token (b'\xba'): 'utf-8' codec can't decode byte 0xba in position 0: invalid start byte
Failed to convert token (b'\xbb'): 'utf-8' codec can't decode byte 0xbb in position 0: invalid start byte
Failed to convert token (b'\xbc'): 'utf-8' codec can't decode byte 0xbc in position 0: invalid start byte
Failed to convert token (b'\xbd'): 'utf-8' codec can't decode byte 0xbd in position 0: invalid start byte
Failed to convert token (b'\xbe'): 'utf-8' codec can't decode byte 0xbe in position 0: invalid start byte
Failed to convert token (b'\xbf'): 'utf-8' codec can't decode byte 0xbf in position 0: invalid start byte
Failed to convert token (b'\xc0'): 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte
Failed to convert token (b'\xc1'): 'utf-8' codec can't decode byte 0xc1 in position 0: invalid start byte
Failed to convert token (b'\xc2'): 'utf-8' codec can't decode byte 0xc2 in position 0: unexpected end of data
Failed to convert token (b'\xc3'): 'utf-8' codec can't decode byte 0xc3 in position 0: unexpected end of data
Failed to convert token (b'\xc4'): 'utf-8' codec can't decode byte 0xc4 in position 0: unexpected end of data
Failed to convert token (b'\xc5'): 'utf-8' codec can't decode byte 0xc5 in position 0: unexpected end of data
Failed to convert token (b'\xc6'): 'utf-8' codec can't decode byte 0xc6 in position 0: unexpected end of data
Failed to convert token (b'\xc7'): 'utf-8' codec can't decode byte 0xc7 in position 0: unexpected end of data
Failed to convert token (b'\xc8'): 'utf-8' codec can't decode byte 0xc8 in position 0: unexpected end of data
Failed to convert token (b'\xc9'): 'utf-8' codec can't decode byte 0xc9 in position 0: unexpected end of data
Failed to convert token (b'\xca'): 'utf-8' codec can't decode byte 0xca in position 0: unexpected end of data
Failed to convert token (b'\xcb'): 'utf-8' codec can't decode byte 0xcb in position 0: unexpected end of data
Failed to convert token (b'\xcc'): 'utf-8' codec can't decode byte 0xcc in position 0: unexpected end of data
Failed to convert token (b'\xcd'): 'utf-8' codec can't decode byte 0xcd in position 0: unexpected end of data
Failed to convert token (b'\xce'): 'utf-8' codec can't decode byte 0xce in position 0: unexpected end of data
Failed to convert token (b'\xcf'): 'utf-8' codec can't decode byte 0xcf in position 0: unexpected end of data
Failed to convert token (b'\xd0'): 'utf-8' codec can't decode byte 0xd0 in position 0: unexpected end of data
Failed to convert token (b'\xd1'): 'utf-8' codec can't decode byte 0xd1 in position 0: unexpected end of data
Failed to convert token (b'\xd2'): 'utf-8' codec can't decode byte 0xd2 in position 0: unexpected end of data
Failed to convert token (b'\xd3'): 'utf-8' codec can't decode byte 0xd3 in position 0: unexpected end of data
Failed to convert token (b'\xd4'): 'utf-8' codec can't decode byte 0xd4 in position 0: unexpected end of data
Failed to convert token (b'\xd5'): 'utf-8' codec can't decode byte 0xd5 in position 0: unexpected end of data
Failed to convert token (b'\xd6'): 'utf-8' codec can't decode byte 0xd6 in position 0: unexpected end of data
Failed to convert token (b'\xd7'): 'utf-8' codec can't decode byte 0xd7 in position 0: unexpected end of data
Failed to convert token (b'\xd8'): 'utf-8' codec can't decode byte 0xd8 in position 0: unexpected end of data
Failed to convert token (b'\xd9'): 'utf-8' codec can't decode byte 0xd9 in position 0: unexpected end of data
Failed to convert token (b'\xda'): 'utf-8' codec can't decode byte 0xda in position 0: unexpected end of data
Failed to convert token (b'\xdb'): 'utf-8' codec can't decode byte 0xdb in position 0: unexpected end of data
Failed to convert token (b'\xdc'): 'utf-8' codec can't decode byte 0xdc in position 0: unexpected end of data
Failed to convert token (b'\xdd'): 'utf-8' codec can't decode byte 0xdd in position 0: unexpected end of data
Failed to convert token (b'\xde'): 'utf-8' codec can't decode byte 0xde in position 0: unexpected end of data
Failed to convert token (b'\xdf'): 'utf-8' codec can't decode byte 0xdf in position 0: unexpected end of data
Failed to convert token (b'\xe0'): 'utf-8' codec can't decode byte 0xe0 in position 0: unexpected end of data
Failed to convert token (b'\xe1'): 'utf-8' codec can't decode byte 0xe1 in position 0: unexpected end of data
Failed to convert token (b'\xe2'): 'utf-8' codec can't decode byte 0xe2 in position 0: unexpected end of data
Failed to convert token (b'\xe3'): 'utf-8' codec can't decode byte 0xe3 in position 0: unexpected end of data
Failed to convert token (b'\xe4'): 'utf-8' codec can't decode byte 0xe4 in position 0: unexpected end of data
Failed to convert token (b'\xe5'): 'utf-8' codec can't decode byte 0xe5 in position 0: unexpected end of data
Failed to convert token (b'\xe6'): 'utf-8' codec can't decode byte 0xe6 in position 0: unexpected end of data
Failed to convert token (b'\xe7'): 'utf-8' codec can't decode byte 0xe7 in position 0: unexpected end of data
Failed to convert token (b'\xe8'): 'utf-8' codec can't decode byte 0xe8 in position 0: unexpected end of data
Failed to convert token (b'\xe9'): 'utf-8' codec can't decode byte 0xe9 in position 0: unexpected end of data
Failed to convert token (b'\xea'): 'utf-8' codec can't decode byte 0xea in position 0: unexpected end of data
Failed to convert token (b'\xeb'): 'utf-8' codec can't decode byte 0xeb in position 0: unexpected end of data
Failed to convert token (b'\xec'): 'utf-8' codec can't decode byte 0xec in position 0: unexpected end of data
Failed to convert token (b'\xed'): 'utf-8' codec can't decode byte 0xed in position 0: unexpected end of data
Failed to convert token (b'\xee'): 'utf-8' codec can't decode byte 0xee in position 0: unexpected end of data
Failed to convert token (b'\xef'): 'utf-8' codec can't decode byte 0xef in position 0: unexpected end of data
Failed to convert token (b'\xf0'): 'utf-8' codec can't decode byte 0xf0 in position 0: unexpected end of data
Failed to convert token (b'\xf1'): 'utf-8' codec can't decode byte 0xf1 in position 0: unexpected end of data
Failed to convert token (b'\xf2'): 'utf-8' codec can't decode byte 0xf2 in position 0: unexpected end of data
Failed to convert token (b'\xf3'): 'utf-8' codec can't decode byte 0xf3 in position 0: unexpected end of data
Failed to convert token (b'\xf4'): 'utf-8' codec can't decode byte 0xf4 in position 0: unexpected end of data
Failed to convert token (b'\xf5'): 'utf-8' codec can't decode byte 0xf5 in position 0: invalid start byte
Failed to convert token (b'\xf6'): 'utf-8' codec can't decode byte 0xf6 in position 0: invalid start byte
Failed to convert token (b'\xf7'): 'utf-8' codec can't decode byte 0xf7 in position 0: invalid start byte
Failed to convert token (b'\xf8'): 'utf-8' codec can't decode byte 0xf8 in position 0: invalid start byte
Failed to convert token (b'\xf9'): 'utf-8' codec can't decode byte 0xf9 in position 0: invalid start byte
Failed to convert token (b'\xfa'): 'utf-8' codec can't decode byte 0xfa in position 0: invalid start byte
Failed to convert token (b'\xfb'): 'utf-8' codec can't decode byte 0xfb in position 0: invalid start byte
Failed to convert token (b'\xfc'): 'utf-8' codec can't decode byte 0xfc in position 0: invalid start byte
Failed to convert token (b'\xfd'): 'utf-8' codec can't decode byte 0xfd in position 0: invalid start byte
Failed to convert token (b'\xfe'): 'utf-8' codec can't decode byte 0xfe in position 0: invalid start byte
Failed to convert token (b'\xff'): 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
Describe the issue as clearly as possible:
When using standard text generation based on a LlamaCpp model, the generation is completely random and makes no sense.
Steps/code to reproduce the bug:
Expected result:
Outlines/Python version information:
Version information
Context for the issue:
Cannot use Outlines at all as it is on Mac
The text was updated successfully, but these errors were encountered: