llama.cpp: Error converting GGML to GGUF

I’m on commit 519c981f8b65ee6c87c2965539685ced0a17223b and when I run

python convert-llama-ggmlv3-to-gguf.py -i ./upstage-llama-2-70b-instruct-v2.ggmlv3.q3_K_M.bin -o ./output.bin -m ./upstage --gqa 8 -c 4096

I get


=== WARNING === Be aware that this conversion script is best-effort. Use a native GGUF model if possible. === WARNING ===

* Scanning GGML input file
C:\llamacppgit\convert-llama-ggmlv3-to-gguf.py:96: RuntimeWarning: overflow encountered in long_scalars
  n_bytes = (n_elems * tysize) // blksize
Traceback (most recent call last):
  File "C:\llamacppgit\convert-llama-ggmlv3-to-gguf.py", line 333, in <module>
    main()
  File "C:\llamacppgit\convert-llama-ggmlv3-to-gguf.py", line 318, in main
    offset = model.load(data, 0)
  File "C:\llamacppgit\convert-llama-ggmlv3-to-gguf.py", line 125, in load
    offset += tensor.load(data, offset)
  File "C:\llamacppgit\convert-llama-ggmlv3-to-gguf.py", line 82, in load
    assert n_dims >= 0 and n_dims <= 4, f'Invalid tensor dimensions {n_dims}'
AssertionError: Invalid tensor dimensions 1862288276

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

I can confirm that with n_bytes = np.int64(np.int64(n_elems) * np.int64(tysize)) // np.int64(blksize)

It runs on windows, and the resulting model is an exact SHA256 match with the one generated on Linux.

I get Unexpectedly worked