[GH-ISSUE #6566] Ollama can't import safetensor of mistral 7B v0.1 #4133

Closed
opened 2026-04-12 15:02:47 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @ZhoraZhang on GitHub (Aug 30, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6566

What is the issue?

I have written modelfile:
FROM /data/models/Mistral-7B-v0.1 (path of mistral's safetensor files)
I tried to import model using /api/create but failed.
{"error":"read /data/models/Mistral-7B-v0.1: is a directory"}

OS

Linux

GPU

Nvidia

CPU

No response

Ollama version

No response

Originally created by @ZhoraZhang on GitHub (Aug 30, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6566 ### What is the issue? I have written modelfile: FROM /data/models/Mistral-7B-v0.1 (path of mistral's safetensor files) I tried to import model using /api/create but failed. {"error":"read /data/models/Mistral-7B-v0.1: is a directory"} ### OS Linux ### GPU Nvidia ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-12 15:02:47 -05:00
Author
Owner

@rick-github commented on GitHub (Aug 30, 2024):

At a guess I'd say because the low-level /api/create doesn't have all of the extra processing that ollama create does.

Remote model creation must also create any file blobs, fields such as FROM and ADAPTER

<!-- gh-comment-id:2320525531 --> @rick-github commented on GitHub (Aug 30, 2024): At a guess I'd say because the low-level `/api/create` doesn't have all of the extra processing that `ollama create` does. [`Remote model creation must also create any file blobs, fields such as FROM and ADAPTER`](https://github.com/ollama/ollama/blob/main/docs/api.md#create-a-model:~:text=Remote%20model%20creation%20must%20also%20create%20any%20file%20blobs%2C%20fields%20such%20as%20FROM%20and%20ADAPTER)
Author
Owner

@igorschlum commented on GitHub (Sep 1, 2024):

Hi @ZhoraZhang Way mistral v01 and not v03?

<!-- gh-comment-id:2323515555 --> @igorschlum commented on GitHub (Sep 1, 2024): Hi @ZhoraZhang Way mistral v01 and not v03?
Author
Owner

@pdevine commented on GitHub (Sep 1, 2024):

@ZhoraZhang you need to create the blobs first as @rick-github mentioned. You can look in cmd/cmd.go to see how it is calling api.CreateBlob().

I'm going to go ahead and close the issue.

<!-- gh-comment-id:2323532689 --> @pdevine commented on GitHub (Sep 1, 2024): @ZhoraZhang you need to create the blobs first as @rick-github mentioned. You can look in `cmd/cmd.go` to see how it is calling `api.CreateBlob()`. I'm going to go ahead and close the issue.
Author
Owner

@ZhoraZhang commented on GitHub (Sep 2, 2024):

我猜想,这是因为 low-level 没有所有的额外处理。/api/create``ollama create

Remote model creation must also create any file blobs, fields such as FROM and ADAPTER

Thank you! I will try it.

<!-- gh-comment-id:2324039336 --> @ZhoraZhang commented on GitHub (Sep 2, 2024): > 我猜想,这是因为 low-level 没有所有的额外处理。`/api/create``ollama create` > > [`Remote model creation must also create any file blobs, fields such as FROM and ADAPTER`](https://github.com/ollama/ollama/blob/main/docs/api.md#create-a-model:~:text=Remote%20model%20creation%20must%20also%20create%20any%20file%20blobs%2C%20fields%20such%20as%20FROM%20and%20ADAPTER) Thank you! I will try it.
Author
Owner

@ZhoraZhang commented on GitHub (Sep 2, 2024):

如前所述,您需要先创建 blob。您可以查看它如何调用 .cmd/cmd.go``api.CreateBlob()

我将继续关闭该问题。

Thank you

<!-- gh-comment-id:2324039791 --> @ZhoraZhang commented on GitHub (Sep 2, 2024): > 如前所述,您需要先创建 blob。您可以查看它如何调用 .`cmd/cmd.go``api.CreateBlob()` > > 我将继续关闭该问题。 Thank you
Author
Owner

@ZhoraZhang commented on GitHub (Sep 2, 2024):

Hi @ZhoraZhang Way mistral v01 and not v03?

Hello, because I fine-tuned mistral v0.1 before and tried to use different way to deploy.

<!-- gh-comment-id:2324043666 --> @ZhoraZhang commented on GitHub (Sep 2, 2024): > Hi @ZhoraZhang Way mistral v01 and not v03? Hello, because I fine-tuned mistral v0.1 before and tried to use different way to deploy.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4133