[GH-ISSUE #4220] modify template, system,or params on webpage #49141

Open
opened 2026-04-28 10:49:20 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @taozhiyuai on GitHub (May 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4220

after pushing a model, sometimes I hope to modify template, system,or params on webpage.

Originally created by @taozhiyuai on GitHub (May 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4220 after pushing a model, sometimes I hope to modify template, system,or params on webpage.
GiteaMirror added the feature request label 2026-04-28 10:49:20 -05:00
Author
Owner

@alwqx commented on GitHub (May 7, 2024):

You can change template, system and params in Modelfile, then recreate model and repush model to ollama.

Or use a base model, then create a new model with different template, system and params.

FROM baseModel
PARAMETER temperature 1
# sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token
PARAMETER num_ctx 4096

# sets a custom system message to specify the behavior of the chat assistant
SYSTEM You are Mario from super mario bros, acting as an assistant.

and then ollama create newModel -f Modelfile

<!-- gh-comment-id:2098173456 --> @alwqx commented on GitHub (May 7, 2024): You can change template, system and params in Modelfile, then recreate model and repush model to ollama. Or use a base model, then create a new model with different template, system and params. ```dockerfile FROM baseModel PARAMETER temperature 1 # sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token PARAMETER num_ctx 4096 # sets a custom system message to specify the behavior of the chat assistant SYSTEM You are Mario from super mario bros, acting as an assistant. ``` and then `ollama create newModel -f Modelfile`
Author
Owner

@taozhiyuai commented on GitHub (May 7, 2024):

You can change template, system and params in Modelfile, then recreate model and repush model to ollama.

Or use a base model, then create a new model with different template, system and params.

FROM baseModel
PARAMETER temperature 1
# sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token
PARAMETER num_ctx 4096

# sets a custom system message to specify the behavior of the chat assistant
SYSTEM You are Mario from super mario bros, acting as an assistant.

and then ollama create newModel -f Modelfile

so i must re-push all files,especially that big model. what i wish is to just push a file which contain necessary modification only.

<!-- gh-comment-id:2098356555 --> @taozhiyuai commented on GitHub (May 7, 2024): > You can change template, system and params in Modelfile, then recreate model and repush model to ollama. > > Or use a base model, then create a new model with different template, system and params. > ```dockerfile > FROM baseModel > PARAMETER temperature 1 > # sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token > PARAMETER num_ctx 4096 > > # sets a custom system message to specify the behavior of the chat assistant > SYSTEM You are Mario from super mario bros, acting as an assistant. > ``` > and then `ollama create newModel -f Modelfile` so i must re-push all files,especially that big model. what i wish is to just push a file which contain necessary modification only.
Author
Owner

@Skarian commented on GitHub (May 8, 2024):

You can change template, system and params in Modelfile, then recreate model and repush model to ollama.

Or use a base model, then create a new model with different template, system and params.

FROM baseModel
PARAMETER temperature 1
# sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token
PARAMETER num_ctx 4096

# sets a custom system message to specify the behavior of the chat assistant
SYSTEM You are Mario from super mario bros, acting as an assistant.

and then ollama create newModel -f Modelfile

so i must re-push all files,especially that big model. what i wish is to just push a file which contain necessary modification only.

If you do the FROM baseModel approach it should actually use the same model files on the system in the model cache folder but only override parameters you are manually setting as needed. Should not have an impact on your storage.

<!-- gh-comment-id:2101674510 --> @Skarian commented on GitHub (May 8, 2024): > > You can change template, system and params in Modelfile, then recreate model and repush model to ollama. > > > > Or use a base model, then create a new model with different template, system and params. > > ```dockerfile > > FROM baseModel > > PARAMETER temperature 1 > > # sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token > > PARAMETER num_ctx 4096 > > > > # sets a custom system message to specify the behavior of the chat assistant > > SYSTEM You are Mario from super mario bros, acting as an assistant. > > ``` > > and then `ollama create newModel -f Modelfile` > > so i must re-push all files,especially that big model. what i wish is to just push a file which contain necessary modification only. If you do the FROM baseModel approach it should actually use the same model files on the system in the model cache folder but only override parameters you are manually setting as needed. Should not have an impact on your storage.
Author
Owner

@taozhiyuai commented on GitHub (May 9, 2024):

You can change template, system and params in Modelfile, then recreate model and repush model to ollama.
Or use a base model, then create a new model with different template, system and params.

FROM baseModel
PARAMETER temperature 1
# sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token
PARAMETER num_ctx 4096

# sets a custom system message to specify the behavior of the chat assistant
SYSTEM You are Mario from super mario bros, acting as an assistant.

and then ollama create newModel -f Modelfile

so i must re-push all files,especially that big model. what i wish is to just push a file which contain necessary modification only.

If you do the FROM baseModel approach it should actually use the same model files on the system in the model cache folder but only override parameters you are manually setting as needed. Should not have an impact on your storage.

for example, I push a model A + template A to ollama.com; then I modify template A to B, and create a model A + template B on my laptop, if I want to push new one to ollama.com, I must re-push model A again. it is time consuming. so , I wish I can modify template A which I have uploaded to ollama.com to template B.so I need not to re-push model A.

<!-- gh-comment-id:2101820026 --> @taozhiyuai commented on GitHub (May 9, 2024): > > > You can change template, system and params in Modelfile, then recreate model and repush model to ollama. > > > Or use a base model, then create a new model with different template, system and params. > > > ```dockerfile > > > FROM baseModel > > > PARAMETER temperature 1 > > > # sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token > > > PARAMETER num_ctx 4096 > > > > > > # sets a custom system message to specify the behavior of the chat assistant > > > SYSTEM You are Mario from super mario bros, acting as an assistant. > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and then `ollama create newModel -f Modelfile` > > > > > > so i must re-push all files,especially that big model. what i wish is to just push a file which contain necessary modification only. > > If you do the FROM baseModel approach it should actually use the same model files on the system in the model cache folder but only override parameters you are manually setting as needed. Should not have an impact on your storage. for example, I push a model A + template A to ollama.com; then I modify template A to B, and create a model A + template B on my laptop, if I want to push new one to ollama.com, I must re-push model A again. it is time consuming. so , I wish I can modify template A which I have uploaded to ollama.com to template B.so I need not to re-push model A.
Author
Owner

@taozhiyuai commented on GitHub (May 9, 2024):

You can change template, system and params in Modelfile, then recreate model and repush model to ollama.
Or use a base model, then create a new model with different template, system and params.

FROM baseModel
PARAMETER temperature 1
# sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token
PARAMETER num_ctx 4096

# sets a custom system message to specify the behavior of the chat assistant
SYSTEM You are Mario from super mario bros, acting as an assistant.

and then ollama create newModel -f Modelfile

so i must re-push all files,especially that big model. what i wish is to just push a file which contain necessary modification only.

If you do the FROM baseModel approach it should actually use the same model files on the system in the model cache folder but only override parameters you are manually setting as needed. Should not have an impact on your storage.

for example, I push a model A + template A to ollama.com; then I modify template A to B, and create a model A + template B on my laptop, if I want to push new one to ollama.com, I must re-push model A again. it is time consuming. so , I wish I can modify template A which I have uploaded to ollama.com to template B.so I need not to re-push model A.

<!-- gh-comment-id:2101820529 --> @taozhiyuai commented on GitHub (May 9, 2024): > > > You can change template, system and params in Modelfile, then recreate model and repush model to ollama. > > > Or use a base model, then create a new model with different template, system and params. > > > ```dockerfile > > > FROM baseModel > > > PARAMETER temperature 1 > > > # sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token > > > PARAMETER num_ctx 4096 > > > > > > # sets a custom system message to specify the behavior of the chat assistant > > > SYSTEM You are Mario from super mario bros, acting as an assistant. > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and then `ollama create newModel -f Modelfile` > > > > > > so i must re-push all files,especially that big model. what i wish is to just push a file which contain necessary modification only. > > If you do the FROM baseModel approach it should actually use the same model files on the system in the model cache folder but only override parameters you are manually setting as needed. Should not have an impact on your storage. for example, I push a model A + template A to ollama.com; then I modify template A to B, and create a model A + template B on my laptop, if I want to push new one to ollama.com, I must re-push model A again. it is time consuming. so , I wish I can modify template A which I have uploaded to ollama.com to template B.so I need not to re-push model A.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#49141