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
I want to convert safetensors to gguf with convert.py
But I hit the issue as follow, (mlx) I542464@DY4GPKX1J0 llama.cpp % python convert.py ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned Loading model file ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/model-00001-of-00003.safetensors Loading model file ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/model-00001-of-00003.safetensors Loading model file ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/model-00002-of-00003.safetensors Loading model file ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/model-00003-of-00003.safetensors params = Params(n_vocab=32000, n_embd=4096, n_layer=32, n_ctx=32768, n_ff=14336, n_head=32, n_head_kv=8, n_experts=None, n_experts_used=None, f_norm_eps=1e-05, rope_scaling_type=None, f_rope_freq_base=10000.0, f_rope_scale=None, n_orig_ctx=None, rope_finetuned=None, ftype=None, path_model=PosixPath('../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned')) Found vocab files: {'tokenizer.model': None, 'vocab.json': None, 'tokenizer.json': PosixPath('../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/tokenizer.json')} Loading vocab file '../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/tokenizer.json', type 'spm' Traceback (most recent call last): File "/Users/I542464/mlx-test/llama.cpp/convert.py", line 1474, in <module> main() File "/Users/I542464/mlx-test/llama.cpp/convert.py", line 1442, in main vocab, special_vocab = vocab_factory.load_vocab(args.vocab_type, model_parent_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/I542464/mlx-test/llama.cpp/convert.py", line 1328, in load_vocab vocab = SentencePieceVocab( ^^^^^^^^^^^^^^^^^^^ File "/Users/I542464/mlx-test/llama.cpp/convert.py", line 394, in __init__ self.sentencepiece_tokenizer = SentencePieceProcessor(str(fname_tokenizer)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/I542464/miniconda3/envs/mlx/lib/python3.11/site-packages/sentencepiece/__init__.py", line 447, in Init self.Load(model_file=model_file, model_proto=model_proto) File "/Users/I542464/miniconda3/envs/mlx/lib/python3.11/site-packages/sentencepiece/__init__.py", line 905, in Load return self.LoadFromFile(model_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/I542464/miniconda3/envs/mlx/lib/python3.11/site-packages/sentencepiece/__init__.py", line 310, in LoadFromFile return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Internal: /Users/runner/work/sentencepiece/sentencepiece/src/sentencepiece_processor.cc(1102) [model_proto->ParseFromArray(serialized.data(), serialized.size())]
My model files is as follow, config.json model-00002-of-00003.safetensors special_tokens_map.json tokenizer_config.json model-00001-of-00003.safetensors model-00003-of-00003.safetensors tokenizer.json
The text was updated successfully, but these errors were encountered:
I want to convert safetensors to gguf with convert.py
But I hit the issue as follow,
(mlx) I542464@DY4GPKX1J0 llama.cpp % python convert.py ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned Loading model file ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/model-00001-of-00003.safetensors Loading model file ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/model-00001-of-00003.safetensors Loading model file ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/model-00002-of-00003.safetensors Loading model file ../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/model-00003-of-00003.safetensors params = Params(n_vocab=32000, n_embd=4096, n_layer=32, n_ctx=32768, n_ff=14336, n_head=32, n_head_kv=8, n_experts=None, n_experts_used=None, f_norm_eps=1e-05, rope_scaling_type=None, f_rope_freq_base=10000.0, f_rope_scale=None, n_orig_ctx=None, rope_finetuned=None, ftype=None, path_model=PosixPath('../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned')) Found vocab files: {'tokenizer.model': None, 'vocab.json': None, 'tokenizer.json': PosixPath('../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/tokenizer.json')} Loading vocab file '../mlx-examples/lora/lora_fused_model/My-Mistral-7B-fine-tuned/tokenizer.json', type 'spm' Traceback (most recent call last): File "/Users/I542464/mlx-test/llama.cpp/convert.py", line 1474, in <module> main() File "/Users/I542464/mlx-test/llama.cpp/convert.py", line 1442, in main vocab, special_vocab = vocab_factory.load_vocab(args.vocab_type, model_parent_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/I542464/mlx-test/llama.cpp/convert.py", line 1328, in load_vocab vocab = SentencePieceVocab( ^^^^^^^^^^^^^^^^^^^ File "/Users/I542464/mlx-test/llama.cpp/convert.py", line 394, in __init__ self.sentencepiece_tokenizer = SentencePieceProcessor(str(fname_tokenizer)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/I542464/miniconda3/envs/mlx/lib/python3.11/site-packages/sentencepiece/__init__.py", line 447, in Init self.Load(model_file=model_file, model_proto=model_proto) File "/Users/I542464/miniconda3/envs/mlx/lib/python3.11/site-packages/sentencepiece/__init__.py", line 905, in Load return self.LoadFromFile(model_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/I542464/miniconda3/envs/mlx/lib/python3.11/site-packages/sentencepiece/__init__.py", line 310, in LoadFromFile return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Internal: /Users/runner/work/sentencepiece/sentencepiece/src/sentencepiece_processor.cc(1102) [model_proto->ParseFromArray(serialized.data(), serialized.size())]
My model files is as follow,
config.json model-00002-of-00003.safetensors special_tokens_map.json tokenizer_config.json model-00001-of-00003.safetensors model-00003-of-00003.safetensors tokenizer.json
The text was updated successfully, but these errors were encountered: