[GH-ISSUE #7662] How can I remove specific PARAMETER from model? #51400

Closed
opened 2026-04-28 19:50:46 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @wwjCMP on GitHub (Nov 14, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7662

How can I remove specific PARAMETER from model

For example, delete PARAMETER num_gpu 30 from qwen2.5-coder:32b-instruct-q8_0

ollama show qwen2.5-coder:32b-instruct-q8_0
Model
architecture qwen2
parameters 32.8B
context length 32768
embedding length 5120
quantization Q8_0

Parameters
num_ctx 16000
num_gpu 30

System
You are Qwen, created by Alibaba Cloud. You are a helpful assistant.

License
Apache License
Version 2.0, January 2004

Originally created by @wwjCMP on GitHub (Nov 14, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7662 How can I remove specific PARAMETER from model For example, delete PARAMETER num_gpu 30 from qwen2.5-coder:32b-instruct-q8_0 ollama show qwen2.5-coder:32b-instruct-q8_0 Model architecture qwen2 parameters 32.8B context length 32768 embedding length 5120 quantization Q8_0 Parameters num_ctx 16000 num_gpu 30 System You are Qwen, created by Alibaba Cloud. You are a helpful assistant. License Apache License Version 2.0, January 2004
GiteaMirror added the feature request label 2026-04-28 19:50:46 -05:00
Author
Owner

@rick-github commented on GitHub (Nov 14, 2024):

The model in the library doesn't have these parameters, so you just need to reverse the steps that were taken to add them in.

$ ollama show --modelfile qwen2.5-coder:32b-instruct-q8_0 > NewModelfile
$ vi NewModelfile
# delete `PARAMETER num_gpu 30`
$ ollama create -f NewModelfile qwen2.5-coder:32b-instruct-no-gpu-q8_0
<!-- gh-comment-id:2476285340 --> @rick-github commented on GitHub (Nov 14, 2024): The model in the library doesn't have these parameters, so you just need to reverse the steps that were taken to add them in. ```console $ ollama show --modelfile qwen2.5-coder:32b-instruct-q8_0 > NewModelfile $ vi NewModelfile # delete `PARAMETER num_gpu 30` $ ollama create -f NewModelfile qwen2.5-coder:32b-instruct-no-gpu-q8_0 ```
Author
Owner

@wwjCMP commented on GitHub (Nov 14, 2024):

The model in the library doesn't have these parameters, so you just need to reverse the steps that were taken to add them in.

$ ollama show --modelfile qwen2.5-coder:32b-instruct-q8_0 > NewModelfile
$ vi NewModelfile
# delete `PARAMETER num_gpu 30`
$ ollama create -f NewModelfile qwen2.5-coder:32b-instruct-no-gpu-q8_0

It works, thanks

<!-- gh-comment-id:2476468933 --> @wwjCMP commented on GitHub (Nov 14, 2024): > The model in the library doesn't have these parameters, so you just need to reverse the steps that were taken to add them in. > > ``` > $ ollama show --modelfile qwen2.5-coder:32b-instruct-q8_0 > NewModelfile > $ vi NewModelfile > # delete `PARAMETER num_gpu 30` > $ ollama create -f NewModelfile qwen2.5-coder:32b-instruct-no-gpu-q8_0 > ``` It works, thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#51400