Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify template, system,or params on webpage #4220

Open
taozhiyuai opened this issue May 7, 2024 · 5 comments
Open

modify template, system,or params on webpage #4220

taozhiyuai opened this issue May 7, 2024 · 5 comments
Labels
feature request New feature or request

Comments

@taozhiyuai
Copy link

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

@taozhiyuai taozhiyuai added the feature request New feature or request label May 7, 2024
@alwqx
Copy link
Contributor

alwqx commented 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

@taozhiyuai
Copy link
Author

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.

@Skarian
Copy link

Skarian commented 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.

@taozhiyuai
Copy link
Author

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.

1 similar comment
@taozhiyuai
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants