Ollama’s library covers the common models, but not every GGUF file is in it. A Modelfile can build from a GGUF file on disk instead: the FROM instruction takes a path to the file, and ollama create wraps it into a named model you can run, chat with and call through the API like any other.
Write the Modelfile and create the model
Download the GGUF file and note its absolute path. Write a Modelfile whose FROM line is that path — the reference says the GGUF location should be an absolute path or relative to the Modelfile, and for a split GGUF model you keep the original shard filenames and use a wildcard that matches every shard. Then create and run it: ollama create my-gguf-model -f Modelfile followed by ollama run my-gguf-model.
FROM /home/user/models/my-model.Q4_K_M.gguf
PARAMETER temperature 0.7
PARAMETER num_ctx 4096
# then:
ollama create my-gguf-model -f Modelfile
ollama run my-gguf-model
Not every GGUF file works: the weights must be a supported architecture, and a file converted for another runtime may load and then answer badly. If the model loads but the answers are nonsense, the file’s quantisation or architecture is the first suspect. Check the file’s licence before importing it, especially if you later push the model anywhere.
Try it: four checks
| Check | What you should see | If you do not see it |
|---|---|---|
| File present | The GGUF path in FROM exists on disk | Use an absolute path |
| Create succeeds | ollama create finishes without an error | Check the architecture is supported |
| Model listed | ollama list shows my-gguf-model | Re-run create if it is missing |
| Chat works | ollama run starts a chat that answers sanely | Suspect the GGUF file if answers are nonsense |
Expected result. We checked the Ollama Modelfile reference, which says FROM can take a GGUF file by absolute or relative path and describes the split-model wildcard rule. We did not import a GGUF file on this machine.
Limits
This guide covers importing a GGUF file only. Architecture support and file quality decide whether the result is usable, and a split model needs its shards named correctly. We did not test any import ourselves.
