How to Transfer Ollama Model Settings Between Hugging Face Models

Situation

I had a model called hf.co/aaa/Example-XXX:YYY in Ollama, and I found the model at Hugging Face.

Today, I found a fine-tuned model and tried to use it, but noticed that ollama show does not show TEMPLATE etc, and the output is une…


This content originally appeared on DEV Community and was authored by Brisbane Web Developer

Situation

I had a model called hf.co/aaa/Example-XXX:YYY in Ollama, and I found the model at Hugging Face.

Today, I found a fine-tuned model and tried to use it, but noticed that ollama show does not show TEMPLATE etc, and the output is unexpected (e.g. It does not stop answering etc).

Say, ollama pull names the fine-tuned model as:
hf.co/bbb/FineTuned-Example-XXX:Q4_M.

And you decided to apply the same settings from:
hf.co/aaa/Example-XXX:YYY.

Commands

# Delete the model downloaded
# - I did this, but you can actually keep it and just replace it
#   with a new configuration
ollama rm hf.co/bbb/FineTuned-Example-XXX:Q4_M

mkdir my_modelfiles

cd my_modelfiles

ollama show --modelfile hf.co/aaa/Example-XXX:YYY > example.txt

# Amend "example.txt" to say:
# FROM hf.co/bbb/FineTuned-Example-XXX:Q4_M

# Create the model with the modified file:
ollama create hf.co/bbb/FineTuned-Example-XXX:Q4_M -f example.txt

# Check the model:
ollama show hf.co/bbb/FineTuned-Example-XXX:Q4_M

# Run the model:
ollama run hf.co/bbb/FineTuned-Example-XXX:Q4_M "Hello."


This content originally appeared on DEV Community and was authored by Brisbane Web Developer


Print Share Comment Cite Upload Translate Updates
APA

Brisbane Web Developer | Sciencx (2025-07-13T01:25:29+00:00) How to Transfer Ollama Model Settings Between Hugging Face Models. Retrieved from https://www.scien.cx/2025/07/13/how-to-transfer-ollama-model-settings-between-hugging-face-models/

MLA
" » How to Transfer Ollama Model Settings Between Hugging Face Models." Brisbane Web Developer | Sciencx - Sunday July 13, 2025, https://www.scien.cx/2025/07/13/how-to-transfer-ollama-model-settings-between-hugging-face-models/
HARVARD
Brisbane Web Developer | Sciencx Sunday July 13, 2025 » How to Transfer Ollama Model Settings Between Hugging Face Models., viewed ,<https://www.scien.cx/2025/07/13/how-to-transfer-ollama-model-settings-between-hugging-face-models/>
VANCOUVER
Brisbane Web Developer | Sciencx - » How to Transfer Ollama Model Settings Between Hugging Face Models. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/07/13/how-to-transfer-ollama-model-settings-between-hugging-face-models/
CHICAGO
" » How to Transfer Ollama Model Settings Between Hugging Face Models." Brisbane Web Developer | Sciencx - Accessed . https://www.scien.cx/2025/07/13/how-to-transfer-ollama-model-settings-between-hugging-face-models/
IEEE
" » How to Transfer Ollama Model Settings Between Hugging Face Models." Brisbane Web Developer | Sciencx [Online]. Available: https://www.scien.cx/2025/07/13/how-to-transfer-ollama-model-settings-between-hugging-face-models/. [Accessed: ]
rf:citation
» How to Transfer Ollama Model Settings Between Hugging Face Models | Brisbane Web Developer | Sciencx | https://www.scien.cx/2025/07/13/how-to-transfer-ollama-model-settings-between-hugging-face-models/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.