[GH-ISSUE #8456] ollama create fails for GGUF files with unaligned tensors #51948

Closed
opened 2026-04-28 21:19:07 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @rick-github on GitHub (Jan 16, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8456

What is the issue?

$ ollama show --modelfile minicpm-v > Modelfile
$ ollama create minicpm-v:test
gathering model components 
copying file sha256:262843d4806aeb402336980badd414a72576b20b1e5d537647da15f16c4a4df0 100% 
copying file sha256:f8a805e9e62085805c69c427287acefc284932eb4abfe6e1b1ce431d27e2f4e0 100% 
parsing GGUF 
Error: invalid file magic

The tensors in some GGUF files are not aligned with general.alignment and when imported, the alignment bytes at the end of the file are treated as the start of a new GGUF, resulting in a failed file magic match.

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.5.6

Originally created by @rick-github on GitHub (Jan 16, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8456 ### What is the issue? ``` $ ollama show --modelfile minicpm-v > Modelfile $ ollama create minicpm-v:test gathering model components copying file sha256:262843d4806aeb402336980badd414a72576b20b1e5d537647da15f16c4a4df0 100% copying file sha256:f8a805e9e62085805c69c427287acefc284932eb4abfe6e1b1ce431d27e2f4e0 100% parsing GGUF Error: invalid file magic ``` The tensors in some GGUF files are not aligned with `general.alignment` and when imported, the alignment bytes at the end of the file are treated as the start of a new GGUF, resulting in a failed `file magic` match. ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.5.6
GiteaMirror added the bug label 2026-04-28 21:19:07 -05:00
Author
Owner

@rick-github commented on GitHub (May 21, 2025):

Fixed via #10722

<!-- gh-comment-id:2899283206 --> @rick-github commented on GitHub (May 21, 2025): Fixed via #10722
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#51948