Can't convert to GGUF with llama.cpp
#35
by
bradhutchings
- opened
Ubuntu Linux on x86 VM.
linux@llama-cpp:~$ python $BUILDING_DIR/convert_hf_to_gguf.py ./$MODEL --outfile ~/models/$MODEL-$MODEL_TYPE.gguf --outtype $MODEL_TYPE
INFO:hf-to-gguf:Loading model: Microsoft-Phi-mini-3.8B-Instruct-v4
INFO:hf-to-gguf:Model architecture: Phi3ForCausalLM
INFO:gguf.gguf_writer:gguf: This GGUF file is for Little Endian only
INFO:hf-to-gguf:Exporting model...
INFO:hf-to-gguf:rope_factors_long.weight, torch.float32 --> F32, shape = {48}
INFO:hf-to-gguf:rope_factors_short.weight, torch.float32 --> F32, shape = {48}
INFO:hf-to-gguf:gguf: loading model weight map from 'model.safetensors.index.json'
INFO:hf-to-gguf:gguf: loading model part 'model-00001-of-00002.safetensors'
Traceback (most recent call last):
File "/home/linux/GGUF/convert_hf_to_gguf.py", line 8479, in <module>
main()
File "/home/linux/GGUF/convert_hf_to_gguf.py", line 8473, in main
model_instance.write()
File "/home/linux/GGUF/convert_hf_to_gguf.py", line 410, in write
self.prepare_tensors()
File "/home/linux/GGUF/convert_hf_to_gguf.py", line 259, in prepare_tensors
for name, data_torch in chain(self.generate_extra_tensors(), self.get_tensors()):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/linux/GGUF/convert_hf_to_gguf.py", line 178, in get_tensors
ctx = cast(ContextManager[Any], safe_open(self.dir_model / part_name, framework="pt", device="cpu"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer