[GH-ISSUE #8109] Edit a saved models parameters #5184

Closed
opened 2026-04-12 16:18:50 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @belfie13 on GitHub (Dec 15, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/8109

Currently you would have to create a new model to change any parameters and it's not possible to edit the template at all.

I'm not sure what use the ollama cp function has as you can't edit during or after copying so you end up with two identical models.

Would be great to create a model, then be able to edit the models parameters, template, system etc... without having to load it and save

you can set the system and parameters while it's loaded, why not have the ability to edit the models in ollama list

Originally created by @belfie13 on GitHub (Dec 15, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/8109 Currently you would have to create a new model to change any parameters and it's not possible to edit the template at all. I'm not sure what use the `ollama cp` function has as you can't edit during or after copying so you end up with two identical models. Would be great to `create` a model, then be able to edit the models `parameters`, `template`, `system` etc... without having to load it and save you can set the `system` and `parameters` while it's loaded, why not have the ability to edit the models in `ollama list`
GiteaMirror added the feature request label 2026-04-12 16:18:50 -05:00
Author
Owner

@rick-github commented on GitHub (Dec 15, 2024):

$ ollama cp model model-orig
$ ollama rm model
$ ollama show --modelfile model-orig > Modelfile
$ vi Modelfile
$ ollama create model
<!-- gh-comment-id:2544056562 --> @rick-github commented on GitHub (Dec 15, 2024): ```sh $ ollama cp model model-orig $ ollama rm model $ ollama show --modelfile model-orig > Modelfile $ vi Modelfile $ ollama create model ```
Author
Owner

@pdevine commented on GitHub (Dec 17, 2024):

Hey @belfie13 thanks for the issue. As @rick-github mentioned, you can essentially do everything that you're asking for, you just have to use the ollama create command. I'll go ahead and close the issue, but feel free to keep commenting if you feel like I'm missing something.

<!-- gh-comment-id:2549435588 --> @pdevine commented on GitHub (Dec 17, 2024): Hey @belfie13 thanks for the issue. As @rick-github mentioned, you can essentially do everything that you're asking for, you just have to use the `ollama create` command. I'll go ahead and close the issue, but feel free to keep commenting if you feel like I'm missing something.
Author
Owner

@belfie13 commented on GitHub (Dec 18, 2024):

so thats cool but the only way to edit a model file for an existing model is to create a new model from the existing one and then remove it? is there no way of changing any parameters on model that has been created? im just wanting to reduce the [copy modelfile / edit parameters / create model / remove old model] workflow to just [edit parameters]

<!-- gh-comment-id:2550964988 --> @belfie13 commented on GitHub (Dec 18, 2024): so thats cool but the only way to edit a model file for an existing model is to create a new model from the existing one and then remove it? is there no way of changing any parameters on model that has been created? im just wanting to reduce the [**copy modelfile** / **edit parameters** / **create model** / **remove old model**] workflow to just [**edit parameters**]
Author
Owner

@rick-github commented on GitHub (Dec 18, 2024):

Wrap it in a shell script.

<!-- gh-comment-id:2551000652 --> @rick-github commented on GitHub (Dec 18, 2024): Wrap it in a shell script.
Author
Owner

@belfie13 commented on GitHub (Dec 18, 2024):

yeah but isn't anyone concerned about writing and erasing gigabytes of data to disk pointlessly? not to mention the 20 seconds of precious time it takes to copy and delete.

<!-- gh-comment-id:2552244110 --> @belfie13 commented on GitHub (Dec 18, 2024): yeah but isn't anyone concerned about writing and erasing gigabytes of data to disk pointlessly? not to mention the 20 seconds of precious time it takes to copy and delete.
Author
Owner

@rick-github commented on GitHub (Dec 18, 2024):

The only thing being copied and deleted is the manifest file, a few hundred bytes that points to the blobs that compose the model (weights, parameters, etc). They are quick and cheap operations. When you edit the Modelfile, pay attention to the instructions at the top, it will re-use the existing blob and the create will also be quick.

<!-- gh-comment-id:2552380529 --> @rick-github commented on GitHub (Dec 18, 2024): The only thing being copied and deleted is the manifest file, a few hundred bytes that points to the blobs that compose the model (weights, parameters, etc). They are quick and cheap operations. When you edit the Modelfile, pay attention to the instructions at the top, it will re-use the existing blob and the create will also be quick.
Author
Owner

@belfie13 commented on GitHub (Dec 20, 2024):

oh damn i did not realize thank you so much for your patience!

<!-- gh-comment-id:2557039588 --> @belfie13 commented on GitHub (Dec 20, 2024): oh damn i did not realize thank you so much for your patience!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5184