[GH-ISSUE #6273] unsupported content type: unknown #65967

Closed
opened 2026-05-03 23:24:37 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @little1d on GitHub (Aug 9, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6273

What is the issue?

Is ollama available to create model through safetensors file?
I run this commad, and error says unsupported content type: unknown. I have tried llama3.1 model and qwen2-0.5b, same outcome

command
ollama create mymodel2 -f ./Modelfile
image
model file
image
Modelfile
FROM ./model/llama.safetensors

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.3.4

Originally created by @little1d on GitHub (Aug 9, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6273 ### What is the issue? Is ollama available to create model through safetensors file? I run this commad, and error says unsupported content type: unknown. I have tried llama3.1 model and qwen2-0.5b, same outcome **`command`** ollama create mymodel2 -f ./Modelfile ![image](https://github.com/user-attachments/assets/c395b48d-a37b-4f5f-8c75-c60163dc8f58) **`model file`** ![image](https://github.com/user-attachments/assets/e860bd3b-e622-4a7c-acc7-07e23a4959aa) **`Modelfile`** `FROM ./model/llama.safetensors` ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.4
GiteaMirror added the bug label 2026-05-03 23:24:37 -05:00
Author
Owner

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

When importing safetensors, you specify the directory, not the full path:

FROM ./model
<!-- gh-comment-id:2277210386 --> @rick-github commented on GitHub (Aug 9, 2024): When importing safetensors, you specify the directory, not the full path: ``` FROM ./model ```
Author
Owner

@little1d commented on GitHub (Aug 9, 2024):

When importing safetensors, you specify the directory, not the full path:

FROM ./model

Thank you!
I find something intresting!
if i rename the safetensors' name,such as llama.safetensors, it goes wrong
image
but if I rename this file as model.safetensors, it works well!

<!-- gh-comment-id:2277722955 --> @little1d commented on GitHub (Aug 9, 2024): > When importing safetensors, you specify the directory, not the full path: > > ``` > FROM ./model > ``` Thank you! I find something intresting! if i rename the safetensors' name,such as llama.safetensors, it goes wrong ![image](https://github.com/user-attachments/assets/1ca17806-da0d-4790-ae89-8d8006a76c89) but if I rename this file as model.safetensors, it works well!
Author
Owner

@little1d commented on GitHub (Aug 9, 2024):

still some problems, when I created the model with modelfile
Error Message:
image
where is the config.json?

<!-- gh-comment-id:2277735360 --> @little1d commented on GitHub (Aug 9, 2024): still some problems, when I created the model with modelfile Error Message: ![image](https://github.com/user-attachments/assets/ca37aaa5-1517-47a3-9189-8b1492706410) where is the config.json?
Author
Owner

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

Where did you download the safetensor from? That's where config.json should be.

<!-- gh-comment-id:2277878149 --> @rick-github commented on GitHub (Aug 9, 2024): Where did you download the safetensor from? That's where config.json should be.
Author
Owner

@little1d commented on GitHub (Aug 9, 2024):

thank you so much!

<!-- gh-comment-id:2277979599 --> @little1d commented on GitHub (Aug 9, 2024): thank you so much!
Author
Owner

@mxyng commented on GitHub (Aug 14, 2024):

to summarize, creating an ollama model from safetensors (or pytorch) requires more than just the *.safetensors files. model metadata and vocabulary is distributed across multiple files which are all required for import. therefore, you need to specify the entire directory rather than individual files

<!-- gh-comment-id:2289849421 --> @mxyng commented on GitHub (Aug 14, 2024): to summarize, creating an ollama model from safetensors (or pytorch) requires more than just the `*.safetensors` files. model metadata and vocabulary is distributed across multiple files which are all required for import. therefore, you need to specify the entire directory rather than individual files
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#65967