[GH-ISSUE #4002] Error: exception error loading model architecture: unknown model architecture: 'phi3' #48991

Closed
opened 2026-04-28 10:33:43 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @atb29 on GitHub (Apr 28, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4002

Originally assigned to: @BruceMacD on GitHub.

What is the issue?

when trying to import a custom gguf model that i downloaded locally and import it to ollama ,i got this error
"(myenv) E:\phi3-mini-128k-gguf\model>ollama list
NAME ID SIZE MODIFIED
phi-3-mini-128k-Q4_K_S:latest 31a2fd935902 2.2 GB 3 minutes ago

(myenv) E:\phi3-mini-128k-gguf\model>ollama run phi-3-mini-128k-Q4_K_S:latest
Error: exception error loading model architecture: unknown model architecture: 'phi3'
"
here is the modelfile used
FROM ./Phi-3-mini-128k-instruct.Q4_K_S.gguf

TEMPLATE """
{{ if .System }}<|system|>
{{ .System }}<|end|>
{{ end }}{{ if .Prompt }}<|user|>
{{ .Prompt }}<|end|>
{{ end }}<|assistant|>
{{ .Response }}<|end|>
"""

PARAMETER stop <|user|>
PARAMETER stop <|assistant|>
PARAMETER stop <|system|>
PARAMETER stop <|end|>
PARAMETER stop <|endoftext|>

note : everything was fine when i used the ollama create phi-3-mini-128k-Q4_K_S ./Modelfile

OS

Windows

GPU

No response

CPU

No response

Ollama version

0.1.31

Originally created by @atb29 on GitHub (Apr 28, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4002 Originally assigned to: @BruceMacD on GitHub. ### What is the issue? when trying to import a custom gguf model that i downloaded locally and import it to ollama ,i got this error "(myenv) E:\phi3-mini-128k-gguf\model>ollama list NAME ID SIZE MODIFIED phi-3-mini-128k-Q4_K_S:latest 31a2fd935902 2.2 GB 3 minutes ago (myenv) E:\phi3-mini-128k-gguf\model>ollama run phi-3-mini-128k-Q4_K_S:latest Error: exception error loading model architecture: unknown model architecture: 'phi3' " here is the modelfile used FROM ./Phi-3-mini-128k-instruct.Q4_K_S.gguf TEMPLATE """ {{ if .System }}<|system|> {{ .System }}<|end|> {{ end }}{{ if .Prompt }}<|user|> {{ .Prompt }}<|end|> {{ end }}<|assistant|> {{ .Response }}<|end|> """ PARAMETER stop <|user|> PARAMETER stop <|assistant|> PARAMETER stop <|system|> PARAMETER stop <|end|> PARAMETER stop <|endoftext|> note : everything was fine when i used the ollama create phi-3-mini-128k-Q4_K_S ./Modelfile ### OS Windows ### GPU _No response_ ### CPU _No response_ ### Ollama version 0.1.31
GiteaMirror added the bug label 2026-04-28 10:33:43 -05:00
Author
Owner

@BruceMacD commented on GitHub (May 1, 2024):

Hi @atb29, sorry about this. It will be fixed in the next release (very soon), we just needed to update our version of llama.cpp.

Resolving this one for now since the release is coming very soon, the v0.1.33 pre-release is at the top of the releases page if you'd like to keep track of it:
https://github.com/ollama/ollama/releases

<!-- gh-comment-id:2089118729 --> @BruceMacD commented on GitHub (May 1, 2024): Hi @atb29, sorry about this. It will be fixed in the next release (very soon), we just needed to update our version of llama.cpp. Resolving this one for now since the release is coming very soon, the `v0.1.33` pre-release is at the top of the releases page if you'd like to keep track of it: https://github.com/ollama/ollama/releases
Author
Owner

@atb29 commented on GitHub (May 6, 2024):

Thanks guys for your replay 🙏:)

<!-- gh-comment-id:2096736612 --> @atb29 commented on GitHub (May 6, 2024): Thanks guys for your replay 🙏:)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48991