llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Can't convert LoRA to ggml on windows, files in correct structure No such file or directory: 'lora/llama-oasst-lora-13B\\adapter_model.bin'

Open captainzero93 opened this issue 1 year ago • 2 comments

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [x] I am running the latest code. Development is very rapid so there are no tagged versions as of now.
  • [x] I carefully followed the README.md.
  • [x] I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • [x] I reviewed the Discussions, and have a new bug or useful enhancement to share.

Expected Behavior

LoRA Model converts

Current Behavior

python convert-lora-to-ggml.py lora/llama-oasst-lora-13B Traceback (most recent call last): File "C:\Users\pwnzr\Desktop\LLM\lora\convert-lora-to-ggml.py", line 83, in model = torch.load(input_model, map_location="cpu") File "C:\Users\pwnzr\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", l folder structure ine 791, in load with _open_file_like(f, 'rb') as opened_file: File "C:\Users\pwnzr\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 271, in _open_file_like return _open_file(name_or_buffer, mode) File "C:\Users\pwnzr\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 252, in init super().init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'lora/llama-oasst-lora-13B\adapter_model.bin'

Environment and Context

Windows 11, trying to convert https://huggingface.co/serpdotai/llama-oasst-lora-13B/ to be used as a LORA with ggml-vicuna-13b-1.1-q4_0

The files are in the correct structure but I don't know why it is trying to look with a double backslash? No such file or directory: 'lora/llama-oasst-lora-13B\adapter_model.bin'

captainzero93 avatar Apr 25 '23 17:04 captainzero93

It looks like the path is wrong from your screenshots. If you are running the script from that folder, you need to type

python convert-lora-to-ggml.py llama-oasst-lora-13B

You can also SHIFT-right click on the folder and "Copy As Path" then paste that on the command line.

SlyEcho avatar Apr 26 '23 22:04 SlyEcho

python convert-lora-to-ggml.py llama-oasst-lora-13B Traceback (most recent call last): File "C:\Users\pwnzr\Desktop\LLM\lora\convert-lora-to-ggml.py", line 109, in write_file_header(fout, params) File "C:\Users\pwnzr\Desktop\LLM\lora\convert-lora-to-ggml.py", line 52, in write_file_header fout.write(struct.pack("ii", params["r"], params["lora_alpha"])) struct.error: required argument is not an integer

captainzero93 avatar Apr 28 '23 20:04 captainzero93

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Apr 09 '24 01:04 github-actions[bot]