[GH-ISSUE #8427] 0.5.5 Model Creation on Windows Seems Broken #51927

Closed
opened 2026-04-28 21:16:08 -05:00 by GiteaMirror · 13 comments
Owner

Originally created by @github-pmj on GitHub (Jan 14, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8427

Originally assigned to: @pdevine on GitHub.

What is the issue?

Version 0.5.5 seems to have broken create functionality on Windows. I use a PowerShell script to create new models with different templates. The first step in the script is to run
ollama create '<model name>' -f <full path to model file>

The model file is a one line file
FROM <full path to GGUF>

With 0.5.5 it errors on model creation as it mangles the file path (seems to pre-pend the OLLAMA_MODELS environment variable to the GGUF path). When I modify the model file to take this into account and run
ollama create 'testmodel1' -f <full path to model file>
directly I get an 'Invalid model name' error.

Rolling back to 0.5.4 resolves the issue.

I'm using the Ollama setup installer.

OS

Windows

GPU

Nvidia

CPU

AMD

Ollama version

0.5.5

Originally created by @github-pmj on GitHub (Jan 14, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8427 Originally assigned to: @pdevine on GitHub. ### What is the issue? Version 0.5.5 seems to have broken create functionality on Windows. I use a PowerShell script to create new models with different templates. The first step in the script is to run ` ollama create '<model name>' -f <full path to model file>` The model file is a one line file ` FROM <full path to GGUF>` With 0.5.5 it errors on model creation as it mangles the file path (seems to pre-pend the OLLAMA_MODELS environment variable to the GGUF path). When I modify the model file to take this into account and run ` ollama create 'testmodel1' -f <full path to model file>` directly I get an 'Invalid model name' error. Rolling back to 0.5.4 resolves the issue. I'm using the Ollama setup installer. ### OS Windows ### GPU Nvidia ### CPU AMD ### Ollama version 0.5.5
GiteaMirror added the bug label 2026-04-28 21:16:09 -05:00
Author
Owner

@iSevenDays commented on GitHub (Jan 14, 2025):

I can confirm on Linux it is broken too

(base) root@725870ad64ad:~# cat /tmp/modelfile 
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this, replace FROM with:
# FROM hf.co/bartowski/glm-4-9b-chat-1m-GGUF:Q5_K_M

FROM /root/.ollama/models/blobs/sha256-3c874d569aef8e0b7be7d46aa6bc1d274630eafaaa65f54107151be4ef868e7e
PARAMETER num_ctx 409600
TEMPLATE "[gMASK]<sop>{{ if .System }}<|system|>
{{ .System }}{{ end }}{{ if .Prompt }}<|user|>
{{ .Prompt }}{{ end }}<|assistant|>
{{ .Response }}"
PARAMETER stop <|system|>
PARAMETER stop <|user|>
PARAMETER stop <|assistant|>

(base) root@725870ad64ad:~# ollama create example -f /tmp/modelfile 
gathering model components 
Error: invalid model name
(base) root@725870ad64ad:~# echo $MODEL_NAME
hf.co/bartowski/glm-4-9b-chat-1m-GGUF:Q5_K_M
(base) root@725870ad64ad:~# ollama show "$MODEL_NAME" --modelfile > /tmp/modelfile
(base) root@725870ad64ad:~# cat /tmp/modelfile 
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this, replace FROM with:
# FROM hf.co/bartowski/glm-4-9b-chat-1m-GGUF:Q5_K_M

FROM /root/.ollama/models/blobs/sha256-3c874d569aef8e0b7be7d46aa6bc1d274630eafaaa65f54107151be4ef868e7e
TEMPLATE "[gMASK]<sop>{{ if .System }}<|system|>
{{ .System }}{{ end }}{{ if .Prompt }}<|user|>
{{ .Prompt }}{{ end }}<|assistant|>
{{ .Response }}"
PARAMETER stop <|system|>
PARAMETER stop <|user|>
PARAMETER stop <|assistant|>

(base) root@725870ad64ad:~# ollama create example -f /tmp/modelfile 
gathering model components 
Error: invalid model name
(base) root@725870ad64ad:~# 
<!-- gh-comment-id:2591185444 --> @iSevenDays commented on GitHub (Jan 14, 2025): I can confirm on Linux it is broken too ``` (base) root@725870ad64ad:~# cat /tmp/modelfile # Modelfile generated by "ollama show" # To build a new Modelfile based on this, replace FROM with: # FROM hf.co/bartowski/glm-4-9b-chat-1m-GGUF:Q5_K_M FROM /root/.ollama/models/blobs/sha256-3c874d569aef8e0b7be7d46aa6bc1d274630eafaaa65f54107151be4ef868e7e PARAMETER num_ctx 409600 TEMPLATE "[gMASK]<sop>{{ if .System }}<|system|> {{ .System }}{{ end }}{{ if .Prompt }}<|user|> {{ .Prompt }}{{ end }}<|assistant|> {{ .Response }}" PARAMETER stop <|system|> PARAMETER stop <|user|> PARAMETER stop <|assistant|> (base) root@725870ad64ad:~# ollama create example -f /tmp/modelfile gathering model components Error: invalid model name (base) root@725870ad64ad:~# echo $MODEL_NAME hf.co/bartowski/glm-4-9b-chat-1m-GGUF:Q5_K_M (base) root@725870ad64ad:~# ollama show "$MODEL_NAME" --modelfile > /tmp/modelfile (base) root@725870ad64ad:~# cat /tmp/modelfile # Modelfile generated by "ollama show" # To build a new Modelfile based on this, replace FROM with: # FROM hf.co/bartowski/glm-4-9b-chat-1m-GGUF:Q5_K_M FROM /root/.ollama/models/blobs/sha256-3c874d569aef8e0b7be7d46aa6bc1d274630eafaaa65f54107151be4ef868e7e TEMPLATE "[gMASK]<sop>{{ if .System }}<|system|> {{ .System }}{{ end }}{{ if .Prompt }}<|user|> {{ .Prompt }}{{ end }}<|assistant|> {{ .Response }}" PARAMETER stop <|system|> PARAMETER stop <|user|> PARAMETER stop <|assistant|> (base) root@725870ad64ad:~# ollama create example -f /tmp/modelfile gathering model components Error: invalid model name (base) root@725870ad64ad:~# ```
Author
Owner

@chllei commented on GitHub (Jan 15, 2025):

The NVIDIA Jetson gets the same issue.

<!-- gh-comment-id:2593641483 --> @chllei commented on GitHub (Jan 15, 2025): The NVIDIA Jetson gets the same issue.
Author
Owner

@pdevine commented on GitHub (Jan 15, 2025):

@chllei Please try 0.5.6. It should be fixed.

<!-- gh-comment-id:2594169915 --> @pdevine commented on GitHub (Jan 15, 2025): @chllei Please try 0.5.6. It should be fixed.
Author
Owner

@lilyrosecarnation commented on GitHub (Jan 20, 2025):

@chllei Please try 0.5.6. It should be fixed.

Not yet. Still yield the error.

<!-- gh-comment-id:2601830221 --> @lilyrosecarnation commented on GitHub (Jan 20, 2025): > [@chllei](https://github.com/chllei) Please try 0.5.6. It should be fixed. Not yet. Still yield the error.
Author
Owner

@pdevine commented on GitHub (Jan 21, 2025):

Just make certain both the client and the server are up-to-date. Can you do ollama -v?

<!-- gh-comment-id:2605680937 --> @pdevine commented on GitHub (Jan 21, 2025): Just make certain both the client and the server are up-to-date. Can you do `ollama -v`?
Author
Owner

@Sherlock-Holo commented on GitHub (Feb 3, 2025):

problem still exists, I am running ollama on Windows

ollama create DeepSeek-R1-Distill-Llama-8B -f .\Modelfile
gathering model components
Error: invalid model name

ollama -v

ollama version is 0.5.7

<!-- gh-comment-id:2630602385 --> @Sherlock-Holo commented on GitHub (Feb 3, 2025): problem still exists, I am running ollama on Windows > ollama create DeepSeek-R1-Distill-Llama-8B -f .\Modelfile > gathering model components > Error: invalid model name `ollama -v` > ollama version is 0.5.7
Author
Owner

@JiweiZh commented on GitHub (Feb 7, 2025):

same in 0.5.7 linux

<!-- gh-comment-id:2642089856 --> @JiweiZh commented on GitHub (Feb 7, 2025): same in 0.5.7 linux
Author
Owner

@versus666jzx commented on GitHub (Feb 10, 2025):

same in 0.5.7 ubuntu 22.04 WSL

<!-- gh-comment-id:2646735355 --> @versus666jzx commented on GitHub (Feb 10, 2025): same in 0.5.7 ubuntu 22.04 WSL
Author
Owner

@amehrez commented on GitHub (Feb 15, 2025):

Same issue here in windows 11. ollama version is 0.5.11

<!-- gh-comment-id:2660955538 --> @amehrez commented on GitHub (Feb 15, 2025): Same issue here in windows 11. ollama version is 0.5.11
Author
Owner

@phiwi commented on GitHub (Mar 10, 2025):

Same issue on Linux with 0.5.13

<!-- gh-comment-id:2709909532 --> @phiwi commented on GitHub (Mar 10, 2025): Same issue on Linux with 0.5.13
Author
Owner

@jarricd commented on GitHub (Mar 23, 2025):

The issue persist - I have a similar error:

PS K:\fine-tuned\out\model\Qwen2.5-Coder-14B-QLoRA> ollama create qwen2.5-coder-quantized-lora -f .\Modelfile                     
gathering model components
copying file sha256:a9bbddd3861635ab6453c042aef7c822cd1af1ee31d869e1f3b7413d4c1d7a76 100%
Error: invalid model name

Windows 10, Ollama 0.6.2
Modelfile:

FROM ../../base_models/qwen-2.5-coder-14b-Q8_0.gguf
ADAPTER ./Model-Q8_0-LoRA.gguf
<!-- gh-comment-id:2746348831 --> @jarricd commented on GitHub (Mar 23, 2025): The issue persist - I have a similar error: ``` PS K:\fine-tuned\out\model\Qwen2.5-Coder-14B-QLoRA> ollama create qwen2.5-coder-quantized-lora -f .\Modelfile gathering model components copying file sha256:a9bbddd3861635ab6453c042aef7c822cd1af1ee31d869e1f3b7413d4c1d7a76 100% Error: invalid model name ``` Windows 10, Ollama 0.6.2 Modelfile: ``` FROM ../../base_models/qwen-2.5-coder-14b-Q8_0.gguf ADAPTER ./Model-Q8_0-LoRA.gguf ```
Author
Owner

@bb1 commented on GitHub (Oct 29, 2025):

This is STILL broken on 0.12.6 using the latest Docker container from ollama/ollama:latest!
Also on WSL and ollama 5.5.7.

Why is this closed?

<!-- gh-comment-id:3461959861 --> @bb1 commented on GitHub (Oct 29, 2025): This is STILL broken on 0.12.6 using the latest Docker container from ollama/ollama:latest! Also on WSL and ollama 5.5.7. Why is this closed?
Author
Owner

@huythai855 commented on GitHub (Jan 14, 2026):

Same issue on Mac Mini M4 with ollama/ollama:latest

<!-- gh-comment-id:3747625993 --> @huythai855 commented on GitHub (Jan 14, 2026): Same issue on Mac Mini M4 with ollama/ollama:latest
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#51927