[GH-ISSUE #1866] Where is the model file stored? #1066

Closed
opened 2026-04-12 10:49:16 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @ParisNeo on GitHub (Jan 9, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/1866

Hi there, I need to make a modification to the model file. Can you please tell me where do you store the model file?

Best regards

Originally created by @ParisNeo on GitHub (Jan 9, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/1866 Hi there, I need to make a modification to the model file. Can you please tell me where do you store the model file? Best regards
Author
Owner

@ParisNeo commented on GitHub (Jan 9, 2024):

Ok, I found how, but it would be cool if you expose a method to change the model template.

thanks

<!-- gh-comment-id:1883070936 --> @ParisNeo commented on GitHub (Jan 9, 2024): Ok, I found how, but it would be cool if you expose a method to change the model template. thanks
Author
Owner

@luckydonald commented on GitHub (Jan 9, 2024):

@ParisNeo https://xkcd.com/979/

<!-- gh-comment-id:1883189399 --> @luckydonald commented on GitHub (Jan 9, 2024): @ParisNeo https://xkcd.com/979/
Author
Owner

@mxyng commented on GitHub (Jan 9, 2024):

Modelfiles themselves are not stored but there are multiple ways of changing a model template as well as other parameters.

Similar to Dockerfiles, you can inherit and override parts of a Modelfile. The docs describe this in detail

You can also override the template in runtime with template in the API request or with /set template in the REPL

<!-- gh-comment-id:1883490104 --> @mxyng commented on GitHub (Jan 9, 2024): Modelfiles themselves are not stored but there are multiple ways of changing a model template as well as other parameters. Similar to Dockerfiles, you can inherit and override parts of a Modelfile. The [docs](https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md) describe this in detail You can also override the template in runtime with `template` in the [API](https://github.com/jmorganca/ollama/blob/main/docs/api.md) request or with `/set template` in the REPL
Author
Owner

@ParisNeo commented on GitHub (Jan 11, 2024):

Well i found exactly where they are, they are stored in blob as json file with a hash name so i did change it and it works. My front end already does the formatting that's why i just need bare text generation with no template.
If you add an endpoint to the api /set_template for example, that would be helpful because since the file name is a hash, it is extrememy difficult for me to automate the changing of the template from the front end.
Thanks for answering.

<!-- gh-comment-id:1887564716 --> @ParisNeo commented on GitHub (Jan 11, 2024): Well i found exactly where they are, they are stored in blob as json file with a hash name so i did change it and it works. My front end already does the formatting that's why i just need bare text generation with no template. If you add an endpoint to the api /set_template for example, that would be helpful because since the file name is a hash, it is extrememy difficult for me to automate the changing of the template from the front end. Thanks for answering.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1066