[GH-ISSUE #9756] Check the modelfile integrity #32134

Closed
opened 2026-04-22 13:05:40 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @DangGwanHou on GitHub (Mar 14, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9756

what?

add new feature to ollama

why?

After migrating the model file offline, ollama will not check the integrity of the model file according to manifests, which lead to Error: model not found.

where?

when?

In the scenario of migrating model files offline.

who?

Originally created by @DangGwanHou on GitHub (Mar 14, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9756 # what? add new feature to ollama # why? After migrating the model file offline, ollama will not check the integrity of the model file according to manifests, which lead to `Error: model not found`. # where? - # when? In the scenario of migrating model files offline. # who? -
GiteaMirror added the feature requestneeds more info labels 2026-04-22 13:05:41 -05:00
Author
Owner

@pdevine commented on GitHub (Mar 14, 2025):

Can you provide some more information about what you're requesting? Are you talking about manifests or the Modelfile? Modelfiles require you to run ollama create to build a model.

<!-- gh-comment-id:2725572700 --> @pdevine commented on GitHub (Mar 14, 2025): Can you provide some more information about what you're requesting? Are you talking about manifests or the Modelfile? Modelfiles require you to run `ollama create` to build a model.
Author
Owner

@pdevine commented on GitHub (Mar 17, 2025):

I'm going to close this for now. We can reopen it if you add some more information.

<!-- gh-comment-id:2727750662 --> @pdevine commented on GitHub (Mar 17, 2025): I'm going to close this for now. We can reopen it if you add some more information.
Author
Owner

@DangGwanHou commented on GitHub (Mar 17, 2025):

@pdevine sorry for the late reply
The situation is when I try to copy modelfiles from this device(which can connect ollama model server) to other device(which cannot connect ollama model server), I ignore to check the ^sha256-.* files intergrity, then I try to run ollama ls when files copied,the command ollama ls can successfully list local models, but failed when run ollama run, the error message is that model xxx not found.
like this:

$ ollama ls
NAME                                  ID              SIZE     MODIFIED
deepseek-r1:32b-qwen-distill-fp16     7142a798da48    65 GB    2 days ago
$ ollama run deepseek-r1:32b-qwen-distill-fp16
...
Error: model "deepseek-r1:32b-qwen-distill-fp16" not found

Then I checked the files in the manifests directory and found a 32b-QWEN-Distill-FP16, and combined with the information in it, I judged that I missed copying some ^sha256-.* files.After that I supplementary copy of the missing file, and try ollama run again, the command is success.
So I wonder whether ollama will expand and supplement the function of checking the integrity of model files according to files in manifests folder in the future?

<!-- gh-comment-id:2727827726 --> @DangGwanHou commented on GitHub (Mar 17, 2025): @pdevine sorry for the late reply The situation is when I try to copy modelfiles from this device(which can connect ollama model server) to other device(which cannot connect ollama model server), I ignore to check the `^sha256-.*` files intergrity, then I try to run `ollama ls` when files copied,the command `ollama ls` can successfully list local models, but failed when run `ollama run`, the error message is that model xxx not found. like this: ```sh $ ollama ls NAME ID SIZE MODIFIED deepseek-r1:32b-qwen-distill-fp16 7142a798da48 65 GB 2 days ago $ ollama run deepseek-r1:32b-qwen-distill-fp16 ... Error: model "deepseek-r1:32b-qwen-distill-fp16" not found ``` Then I checked the files in the manifests directory and found a ` 32b-QWEN-Distill-FP16`, and combined with the information in it, I judged that I missed copying some `^sha256-.*` files.After that I supplementary copy of the missing file, and try `ollama run` again, the command is success. So I wonder whether ollama will expand and supplement the function of checking the integrity of model files according to files in manifests folder in the future?
Author
Owner

@pdevine commented on GitHub (Mar 17, 2025):

@DangGwanHou thanks for replying. It was slightly confusing because Modelfiles are the files which you use w/ ollama create, but I think you mean the manifests and the blob files.

I'm glad you got this working. There currently isn't an ollama verify command, but it is something we've though about to check the integrity of your models. I think this will probably be more important as we break models into smaller blobs.

<!-- gh-comment-id:2728134552 --> @pdevine commented on GitHub (Mar 17, 2025): @DangGwanHou thanks for replying. It was slightly confusing because Modelfiles are the files which you use w/ `ollama create`, but I think you mean the manifests and the blob files. I'm glad you got this working. There currently isn't an `ollama verify` command, but it is something we've though about to check the integrity of your models. I think this will probably be more important as we break models into smaller blobs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#32134