[GH-ISSUE #12500] How to create a new model without a parameter using a Modelfile and ollama create from an existing parameterized model? #8298

Closed
opened 2026-04-12 20:51:01 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @sunhy0316 on GitHub (Oct 4, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12500

I have an existing model that is set up with parameters(num_gpu, for example). I want to create a new model without a specific parameter by using a Modelfile and the ollama create command.
How to write the Modelfile that removes the parameter?

Originally created by @sunhy0316 on GitHub (Oct 4, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12500 I have an existing model that is set up with parameters(num_gpu, for example). I want to create a new model without a specific parameter by using a Modelfile and the ollama create command. How to write the Modelfile that removes the parameter?
Author
Owner

@rick-github commented on GitHub (Oct 4, 2025):

Linux/MacOS

$ ollama show --modelfile old-model | grep -v num_gpu > Modelfile
$ ollama create new-model

Windows:

C:\> ollama show --modelfile old-model | findstr /v num_gpu > Modelfile
C:\> ollama create new-model
<!-- gh-comment-id:3368221522 --> @rick-github commented on GitHub (Oct 4, 2025): Linux/MacOS ```console $ ollama show --modelfile old-model | grep -v num_gpu > Modelfile $ ollama create new-model ``` Windows: ```console C:\> ollama show --modelfile old-model | findstr /v num_gpu > Modelfile C:\> ollama create new-model ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#8298