How to import custom GGUF model files into Ollama
GGUF model file downloaded, Ollama installed and verified working
What this does
Registers a downloaded GGUF model file as a runnable model in Ollama's local library. After completing this guide the custom model will appear in ollama list and respond to inference requests alongside library-sourced models.
Steps
Place the GGUF file in a working directory. Creates a clean directory for the Modelfile and model blob.
mkdir -p ~/ollama-models/my-model && cp /path/to/model.gguf ~/ollama-models/my-model/Create a Modelfile referencing the GGUF file. The FROM directive must point to the GGUF relative path.
cat > ~/ollama-models/my-model/Modelfile << 'EOF' FROM ./model.gguf TEMPLATE """{{ .Prompt }}""" PARAMETER temperature 0.7 PARAMETER num_ctx 4096 EOFRegister the model with Ollama. Analyzes the GGUF metadata and adds the model to the local registry.
cd ~/ollama-models/my-model && ollama create my-custom-model -f ModelfileExpected output:
transferring model datafollowed bysuccess.Verify the model is available. Confirms the model registered correctly.
ollama listExpected output: A row with name
my-custom-modeland a valid size.
Verification
ollama run my-custom-model "Hello, describe yourself in one sentence."
# Expected: a coherent text response generated by the imported model
Common failures
FROM path error- Relative path in FROM is incorrect; use an absolute path to the GGUF file.unable to determine architecture- GGUF format is not recognized; verify the file is a valid GGUF and not a PyTorch or Safetensors checkpoint.disk full during create- Ollama copies the GGUF internally; free space before retrying.template mismatch- Output is garbled or repetitive; adjust the TEMPLATE directive for the specific model architecture.
Operator checkpoint
Before treating this as solved, write down the local runtime, model or package version, hardware/backend if relevant, and the verification output. This keeps the guide useful as a Will-It-Run style decision instead of a one-off command transcript.