Skip to content

Im getting this error while trying to convert .pth to .bin #659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Shreyas-ITB opened this issue Mar 31, 2023 · 1 comment
Closed

Im getting this error while trying to convert .pth to .bin #659

Shreyas-ITB opened this issue Mar 31, 2023 · 1 comment

Comments

@Shreyas-ITB
Copy link

Error that im getting

`shreyas@ATLAS-AHQVOLJ9A:/mnt/c/Users/Shreyas-ITB/Downloads/llama.cpp$ python3 convert-pth-to-ggml.py models/7B/ 1
{'dim': 4096, 'multiple_of': 256, 'n_heads': 32, 'n_layers': 32, 'norm_eps': 1e-06, 'vocab_size': -1}
Namespace(dir_model='models/7B/', ftype=1, vocab_only=0)
n_parts = 1

Processing part 1 of 1

Traceback (most recent call last):
File "/mnt/c/Users/Shreyas-ITB/Downloads/llama.cpp/convert-pth-to-ggml.py", line 274, in
main()
File "/mnt/c/Users/Shreyas-ITB/Downloads/llama.cpp/convert-pth-to-ggml.py", line 267, in main
model = torch.load(fname_model, map_location="cpu")
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 809, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1172, in _load
result = unpickler.load()
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1142, in persistent_load
typed_storage = load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1112, in load_tensor
storage = zip_file.get_storage_from_record(name, numel, torch.UntypedStorage)._typed_storage()._untyped_storage
OSError: [Errno 14] Bad address`

Command used: python3 convert-pth-to-ggml.py models/7B/ 1

Can someone help me please?

janekb04 added a commit to janekb04/llama.cpp that referenced this issue Apr 6, 2023
Port changes from whisper.cpp PR ggml-org#659
@prusnak
Copy link
Collaborator

prusnak commented Apr 16, 2023

The scripts have been rewritten from scratch. Try the new convert.py script from master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants