Skip to content

How-ToGPU

How to Run Hugging Face GGUF Models in Ollama

You don't need to download files or write a Modelfile to use Hugging Face's huge range of GGUF models in Ollama. We show the one-line hf.co command, how to pick a quantisation, run private repos and import GGUFs you already have.

By , Systems & Technical Editor

5 min read

How to Run Hugging Face GGUF Models in Ollama

The commands and behaviour described come from Hugging Face's Hub documentation on using Ollama with GGUF models and its GGUF guide, plus Ollama's own CLI reference and model import guide, all read on 27 November 2026.

Ollama's own library covers the popular models, but Hugging Face hosts far more, including community quantisations of almost every open model. You don't need to download files by hand or write a Modelfile to use them. Hugging Face's documentation says you can run any public GGUF checkpoint on the Hub "with a single ollama run command". If you haven't installed Ollama yet, start with our guide to running AI models locally.

What you need

  • Ollama installed and running.

  • A model repository on Hugging Face that contains GGUF files. GGUF is the format used by llama.cpp, which Ollama is based on. Hugging Face lets you browse every model with GGUF files using the GGUF library filter (hf.co/models?library=gguf). This method is for GGUF repos, not repos that only contain Safetensors weights; our GGUF vs Safetensors explainer covers the difference.

  • Enough VRAM or system memory for the file you choose. Our guide on checking whether a model fits your GPU uses Hugging Face's own tools to help.

Step 1: Run a model straight from Hugging Face

Open a terminal (PowerShell or Command Prompt on Windows) and use this format:

ollama run hf.co/{username}/{repository}

For example, Hugging Face's documentation uses:

ollama run hf.co/bartowski/Llama-3.2-1B-Instruct-GGUF

Ollama downloads the model and opens a chat prompt, just as it does for library models. Hugging Face notes that you can use either hf.co or huggingface.co as the domain. The first run has to download the whole file, so a large model can take a while; after that it's stored locally and doesn't need downloading again.

If you'd rather copy the command than type it, Hugging Face can generate it for you. Enable Ollama under Local Apps settings in your Hugging Face account, then open a model page and choose ollama from the Use this model drop-down.

Step 2: Choose a quantisation

Most GGUF repos contain several versions of the same model at different quantisation levels. Smaller quantisations use less memory but lose some quality. According to Hugging Face, Ollama uses Q4_K_M by default when the repo has it; if not, it picks "one reasonable quant type present inside the repo".

To choose a specific one, add it as a tag after a colon:

ollama run hf.co/{username}/{repository}:{quantization}

Hugging Face's examples include:

ollama run hf.co/bartowski/Llama-3.2-3B-Instruct-GGUF:IQ3_M
ollama run hf.co/bartowski/Llama-3.2-3B-Instruct-GGUF:Q8_0

The quantisation name is case-insensitive, so :iq3_m works too, and you can also use the full GGUF filename as the tag. To see which quantisations a repo offers, open its Files and versions tab. Opening the GGUF viewer on a particular file and choosing ollama from Use this model gives you the command with that quantisation already added. For what the labels mean, read our GGUF quantisation explainer.

Hugging Face's table of GGUF quantisation types lists Q8_0 as 8-bit and Q4_K as 4-bit, so by our own arithmetic a Q8_0 file of the same model needs roughly twice the memory of a Q4 version.

Step 3: Manage the model like any other

Once downloaded, a Hugging Face model behaves like a library model. Ollama's CLI reference lists the main commands:

  • ollama ls lists your downloaded models.

  • ollama ps shows which models are currently loaded.

  • ollama stop followed by the model name stops a running model.

  • ollama rm followed by the model name deletes it.

The full model name is long, so you may want to give it a shorter one. Ollama's import guide shows ollama cp copying a model to a new name. Our guide to managing Ollama models covers these commands in more detail.

Chat templates, system prompts and settings

Every model expects its prompts in a particular chat format. Hugging Face says Ollama picks a template automatically from a list of commonly used templates, based on the tokenizer.chat_template metadata stored inside the GGUF file. That works for most popular models.

If a model gives garbled or rambling answers, the template is the first thing to suspect. Repository owners can add a file called template (which must be a Go template, not a Jinja template), a file named system for a default system prompt, and a file named params in JSON format for sampling settings. If you don't own the repo, the simpler fix is to build your own version with a Modelfile, which lets you set a system prompt and parameters such as context length; see our Modelfile guide and our guide to setting Ollama's context length.

Running private models

Hugging Face says you can also run private GGUFs from your own account or an organisation you belong to. Copy your Ollama public SSH key (Hugging Face's example reads it from ~/.ollama/id_ed25519.pub), then add it in your Hugging Face account settings with Add new SSH key. After that, the same ollama run hf.co/{username}/{repository} command works for your private repos.

Using a GGUF file you've already downloaded

If you've already downloaded a GGUF file, perhaps using our guide to downloading models from Hugging Face, you can import it instead. Ollama's import guide says to create a Modelfile containing a FROM line pointing at the file:

FROM /path/to/file.gguf

Then build it with ollama create my-model and run it with ollama run my-model. For a split GGUF model, keep the original split filenames and use a wildcard that matches every shard, such as FROM /path/to/model-*.gguf. Note that Ollama doesn't quantise GGUF models during import, so download the quantisation you want in the first place.

Our verdict

The quickest way to run almost any GGUF model from Hugging Face is ollama run hf.co/{username}/{repository}, which downloads and starts it with no Modelfile needed. Ollama uses Q4_K_M when the repo has it, and you can add a tag such as :Q8_0 or :IQ3_M to pick a different quantisation that fits your VRAM. After that, manage it with ollama ls, ollama ps and ollama rm as normal. If answers look wrong, check the chat template, and use a Modelfile to set your own system prompt and settings.

The bottom line

The quickest way to run almost any GGUF model from Hugging Face is ollama run hf.co/{username}/{repository}, which downloads and starts it with no Modelfile needed. Ollama uses Q4_K_M when the repo has it, and you can add a tag such as :Q8_0 or :IQ3_M to pick a different quantisation that fits your VRAM. After that, manage it with ollama ls, ollama ps and ollama rm as normal. If answers look wrong, check the chat template, and use a Modelfile to set your own system prompt and settings.

Sources

  1. 01Hugging Face, Use Ollama with any GGUF Model on Hugging Face Hub
  2. 02Hugging Face, GGUF (Hub documentation)
  3. 03Ollama, Importing a Model
  4. 04Ollama, CLI Reference

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best Free App Launchers for Windows in 2026

Best Picks

Best Free App Launchers for Windows in 2026

The best free keyboard app launchers for Windows in 2026: PowerToys Command Palette, Flow Launcher, Listary, Raycast for Windows and Keypirinha, compared from official documentation.

Hannah Vance6 min

How to Fix Brightness Not Working in Windows 11

How-To

How to Fix Brightness Not Working in Windows 11

Brightness slider missing, greyed out or doing nothing in Windows 11? How to fix it on laptops and desktop monitors: adaptive brightness, energy saver, display drivers and DDC/CI apps.

Marcus Thorne6 min

How to Check if Your PC Is a Copilot+ PC

How-To

How to Check if Your PC Is a Copilot+ PC

Not every AI PC is a Copilot+ PC. We show how to check Microsoft's three requirements, a 40+ TOPS NPU processor, 16GB of RAM and 256GB of storage, in Settings and Task Manager, on your own PC or one you're buying.

Marcus Thorne5 min