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

[ALPACA Q4] assert n_dims in (1, 2) when using migrate-ggml-2023-03-30-pr613.py after convert-gpt4all-to-ggml.py

Open DanielWicz opened this issue 1 year ago • 2 comments

Hello,

I was using int Q4 alpaca model, that was converted using convert-gpt4all-to-ggml.py script. It was working perfectly until an update about a week ago (2023-03-30). At the moment I use the repository as of #847.

When I freshly converted the ggml-alpaca-q4_0.bin from the scratch using convert-gpt4all-to-ggml.py, and try to start the model using resulting model, I get fallowing error:

/models/alpaca/30b/ggml-model-q4_0.bin: invalid model file (bad magic [got 0x67676d66 want 0x67676a74])
	you most likely need to regenerate your ggml files
	the benefit is you'll get 10-100x faster load times
	see https://github.com/ggerganov/llama.cpp/issues/91
	use convert-pth-to-ggml.py to regenerate from original pth
	use migrate-ggml-2023-03-30-pr613.py if you deleted originals
llama_init_from_file: failed to load model

So then I proceed with:

python migrate-ggml-2023-03-30-pr613.py models/alpaca/30b/ggml-model-q4_0.bin models/alpaca/30b/ggml-model-q4_0.bin_new

To get fallowing error:

Traceback (most recent call last):
  File "/home/chat/llama.cpp/migrate-ggml-2023-03-30-pr613.py", line 311, in <module>
    main()
  File "/home/chat/llama.cpp/migrate-ggml-2023-03-30-pr613.py", line 306, in main
    copy_tensors(fin, fout, part_id, n_parts)
  File "/home/chat/llama.cpp/migrate-ggml-2023-03-30-pr613.py", line 169, in copy_tensors
    assert n_dims in (1, 2)
AssertionError

Can't get rid of the problem, even though the model worked previously!

DanielWicz avatar Apr 08 '23 11:04 DanielWicz

@DanielWicz +1 Did you find a solution?

szeka94 avatar Apr 12 '23 10:04 szeka94

No, it still persists

DanielWicz avatar Apr 12 '23 10:04 DanielWicz

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

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