[GH-ISSUE #9760] how to export ollama models to safetensors or gguf? #52890

Closed
opened 2026-04-29 01:16:47 -05:00 by GiteaMirror · 2 comments
Owner

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

ollama uses those sha256xxxx files as model files. Now I need to export them to safetensors or gguf files. I know "ollama create" command can import safetensors or gguf files to ollama, but how to do the reverse thing?

Originally created by @hahakid20 on GitHub (Mar 14, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9760 ollama uses those sha256xxxx files as model files. Now I need to export them to safetensors or gguf files. I know "ollama create" command can import safetensors or gguf files to ollama, but how to do the reverse thing?
Author
Owner

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

There is currently no way to do that; we do use GGUF under the hood for models currently (even w/ the new engine) however this is being changed as we adopt our own internal format.

I'm going to go ahead and close this as a dupe for now.

<!-- gh-comment-id:2725951443 --> @pdevine commented on GitHub (Mar 14, 2025): There is currently no way to do that; we do use GGUF under the hood for models currently (even w/ the new engine) however this is being changed as we adopt our own internal format. I'm going to go ahead and close this as a dupe for now.
Author
Owner

@kalle07 commented on GitHub (Apr 16, 2026):

more googel and it works ;)

https://github.com/mattjamo/OllamaToGGUF/blob/main/OllamaToGGUF.py

<!-- gh-comment-id:4260033046 --> @kalle07 commented on GitHub (Apr 16, 2026): more googel and it works ;) https://github.com/mattjamo/OllamaToGGUF/blob/main/OllamaToGGUF.py
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#52890