[GH-ISSUE #1765] Can't pull .ggml local model #1012

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

Originally created by @reddiamond1234 on GitHub (Jan 3, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/1765

Hi, I created Modelfile:
FROM /models/phi-2.Q4_0.gguf
TEMPLATE "[INST] {{ .Prompt }} [/INST]"
PARAMETER temperature 0
PARAMETER num_ctx 2048
PARAMETER num_thread 6
PARAMETER top_k 40
PARAMETER top_p 0.95

when i use command to create my custom model ollama create phi2-SC -f ./models/modelfiles/Modelfile, i get this error: Error: pull model manifest: Get "https://v2/models/phi-2.Q4_0.gguf/manifests/latest": dial tcp: lookup v2 on 172.20.80.1:53: server misbehaving

Originally created by @reddiamond1234 on GitHub (Jan 3, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/1765 Hi, I created Modelfile: <code>FROM /models/phi-2.Q4_0.gguf TEMPLATE "[INST] {{ .Prompt }} [/INST]" PARAMETER temperature 0 PARAMETER num_ctx 2048 PARAMETER num_thread 6 PARAMETER top_k 40 PARAMETER top_p 0.95 </code> when i use command to create my custom model <code>ollama create phi2-SC -f ./models/modelfiles/Modelfile</code>, i get this error: Error: pull model manifest: Get "https://v2/models/phi-2.Q4_0.gguf/manifests/latest": dial tcp: lookup v2 on 172.20.80.1:53: server misbehaving
GiteaMirror added the bug label 2026-04-12 10:43:58 -05:00
Author
Owner

@BruceMacD commented on GitHub (Jan 3, 2024):

Hi @reddiamond1234 there is a bug here that it shouldn't be trying to pull that URL, but it looks like the file path may not be specified correctly. /models/phi-2.Q4_0.gguf is looking in the root of your filesystem, when it doesn't find the file it tries to pull it from a URL.

The path to the gguf file should be relative to the Modelfile location. Based on the path specified in your command try this:

FROM ../phi-2.Q4_0.gguf
TEMPLATE "[INST] {{ .Prompt }} [/INST]"
PARAMETER temperature 0
PARAMETER num_ctx 2048
PARAMETER num_thread 6
PARAMETER top_k 40
PARAMETER top_p 0.95

Or if that doesn't work specify the absolute path.

Hope that helps.

<!-- gh-comment-id:1875389389 --> @BruceMacD commented on GitHub (Jan 3, 2024): Hi @reddiamond1234 there is a bug here that it shouldn't be trying to pull that URL, but it looks like the file path may not be specified correctly. `/models/phi-2.Q4_0.gguf` is looking in the root of your filesystem, when it doesn't find the file it tries to pull it from a URL. The path to the gguf file should be relative to the Modelfile location. Based on the path specified in your command try this: ``` FROM ../phi-2.Q4_0.gguf TEMPLATE "[INST] {{ .Prompt }} [/INST]" PARAMETER temperature 0 PARAMETER num_ctx 2048 PARAMETER num_thread 6 PARAMETER top_k 40 PARAMETER top_p 0.95 ``` Or if that doesn't work specify the absolute path. Hope that helps.
Author
Owner

@reddiamond1234 commented on GitHub (Jan 4, 2024):

ollama create phi2-SC -f ./models/modelfiles/Modelfile

It works now, thanks.

<!-- gh-comment-id:1876704119 --> @reddiamond1234 commented on GitHub (Jan 4, 2024): > ollama create phi2-SC -f ./models/modelfiles/Modelfile It works now, thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1012