Skip to content
HUIAHUB

RoundupModels & inference

Best local LLM for 16GB VRAM, and what fits on 8, 12 and 24 GB cards

Pick the best local LLM for 16GB VRAM, or for 8, 12 or 24 GB cards, from dated Ollama and Hugging Face file sizes, then run it and check the fit.

Edited by Published 8 min read18 sourcesAI-assisted research and drafting
Four graphics cards of increasing size connect to a computer displaying a brain symbol, alongside model files, servers and a checklist.

Illustration generated with ChatGPT

For text work, the best local LLM for 16GB VRAM by published size is gpt-oss-20b in ggml-org's MXFP4 GGUF build, a 12.1 GB file on Hugging Face. OpenAI's model card says the model runs within 16 GB of memory, though Ollama's gpt-oss:20b tag is 14 GB. If you also want image input, gemma4:12b-it-q4_K_M is an 8.0 GB download and leaves room for longer context. The table below gives one starting model for 8, 12, 16 and 24 GB cards.

Every size here comes from Ollama's tag pages, Hugging Face file listings or Google's Gemma 4 memory table, all read on 2026-11-19. This guide fits models by size only. It has no speed figures and no quality ranking.

The short answer: one starting model per VRAM tier

This decision table is meant to be copied. "Fits" uses HuiaHub's 80% rule of thumb, explained further down.

Your VRAMStart withDownload sizeTakes imagesNote
8 GBgemma4:e4b-it-qat (Ollama)6.1 GBYesUnder the 6.4 GB line; 128K max context
12 GBgemma4:12b-it-qat (Ollama)7.2 GBYesAbout 2.4 GB under the 9.6 GB line; 256K max context
16 GBgpt-oss-20b MXFP4 GGUF (ggml-org, Hugging Face)12,109,566,624 bytes (12.1 GB)No, text onlyUnder the 12.8 GB line; Ollama's gpt-oss:20b tag is 14 GB, over it
16 GB, with imagesgemma4:12b-it-q4_K_M (Ollama)8.0 GBYesWell under the line, so context can grow
24 GBgemma4:26b-a4b-it-qat (Ollama)16 GBYesThe most headroom among the 24B to 31B options

Sources: the Gemma 4 and gpt-oss tag pages on ollama.com and the Hugging Face file listing for ggml-org/gpt-oss-20b-GGUF, read 2026-11-19.

How to read a model's size: parameters, quantization and file size

A tag such as gemma4:12b-it-q4_K_M packs three facts into one name. The 12b is the parameter count, 12 billion. The q4_K_M part is the quantization, meaning how many bits store each weight. The download size on the tag page is what that combination weighs on disk.

Hugging Face's GGUF documentation describes Q4_K as 4-bit quantization at 4.5 bits per weight. Q8_0 is 8-bit, and BF16 is a 16-bit format. Fewer bits mean a smaller file. Ollama's Gemma 4 12B tags show the effect: 7.2 GB for the QAT build, 8.0 GB at q4_K_M, 13 GB at q8_0 and 24 GB at bf16.

Mixture-of-experts models need care. Gemma 4 26B A4B and gpt-oss-20b only use part of their weights per token (the gpt-oss card lists 21B total and 3.6B active parameters). The download still holds every weight. Google's memory table puts the 26B A4B model at 14.4 GB in 4-bit, against 6.7 GB for the dense 12B.

Ollama and Hugging Face can disagree for what looks like the same model, because they host different builds. The gpt-oss:20b tag is 14 GB on Ollama, while the ggml-org MXFP4 GGUF on Hugging Face is 12,109,566,624 bytes. For Qwen3.8 27B it runs the other way: 18 GB on Ollama and 19,403,684,480 bytes for the ggml-org Q4_K_M file. Use the figure for the file you will actually download.

Why the file must fit with room to spare

The weights are only part of the memory bill. Ollama's context length documentation (opens in a new tab) says a larger context length increases the memory a model needs.

Google's Gemma 4 model page (opens in a new tab) is less clear. Its memory table caption says the figures include a 20% overhead for loading additional things. A note below the table says the same estimates cover only the static weights, not supporting software or the context window. The page does not resolve that conflict. It does say that memory use grows with the tokens in the prompt and the response.

Ollama picks a default context length from your VRAM:

VRAMOllama default context
Under 24 GiB4k tokens
24 to 48 GiB32k tokens
48 GiB or more256k tokens

The same page recommends at least 64000 tokens for web search, agents and coding tools. That is far above the 4k default, and it costs memory.

Because neither vendor gives a single headroom number, this guide uses HuiaHub's own rule of thumb. A model counts as fitting when its download is no more than 80% of the card's VRAM, which leaves 20% for context and other software. No vendor publishes this rule, and it is not a guarantee. The cut-offs are 6.4 GB for 8 GB cards, 9.6 GB for 12 GB, 12.8 GB for 16 GB and 19.2 GB for 24 GB.

Models that fit in 8 GB of VRAM

Ollama tagDownload sizeImagesMax contextUnder 6.4 GB?
qwen3.5:4b-q4_K_M3.3 GBYes256KYes
gemma4:e2b-it-qat4.3 GBYes128KYes
gemma4:e2b-it-q4_K_M4.6 GBYes128KYes
qwen3.5:4b-q8_05.2 GBYes256KYes
gemma4:e4b-it-qat6.1 GBYes128KYes
gemma4:e4b-it-q4_K_M6.6 GBYes128KNo, tight
qwen3.5:9b-q4_K_M6.6 GBYes256KNo, tight

Source: ollama.com/library/gemma4/tags and ollama.com/library/qwen3.5/tags, read 2026-11-19. On Hugging Face, Google's E4B Q4_0 GGUF is 5,154,941,280 bytes, plus a 991,552,256-byte vision projector (mmproj) file.

Models that fit in 12 GB of VRAM

Ollama tagDownload sizeImagesMax contextUnder 9.6 GB?
qwen3.5:9b-q4_K_M6.6 GBYes256KYes
gemma4:12b-it-qat7.2 GBYes256KYes
gemma4:12b-it-q4_K_M8.0 GBYes256KYes
gemma4:e4b-it-q8_09.0 GBYes128KYes
qwen3.5:9b-q8_010 GBYes256KNo, tight

Source: ollama.com/library/gemma4/tags and ollama.com/library/qwen3.5/tags, read 2026-11-19. Google's 12B QAT Q4_0 GGUF on Hugging Face is 6,975,879,296 bytes, and its mmproj file is 175,115,616 bytes.

Models that fit in 16 GB of VRAM: the best local LLM for 16GB VRAM by size

Model and buildDownload sizeImagesMax contextUnder 12.8 GB?
gemma4:12b-it-q4_K_M8.0 GBYes256KYes
qwen3.5:9b-q8_010 GBYes256KYes
gpt-oss-20b MXFP4 GGUF (ggml-org, Hugging Face)12,109,566,624 bytesNo128KYes
gemma4:12b-it-q8_013 GBYes256KNo, just over
gpt-oss:20b14 GBNo128KNo
mistral-small3.2:24b15 GBYes128KNo
gemma4:26b-a4b-it-qat16 GBYes256KNo

Source: Ollama tag pages for gemma4, qwen3.5, gpt-oss and mistral-small3.2, plus the Hugging Face file listing for ggml-org/gpt-oss-20b-GGUF, read 2026-11-19. The 128K context for the GGUF row is the figure Ollama lists for gpt-oss.

The two gpt-oss rows show why the build matters. By the 80% rule, the ggml-org GGUF fits a 16 GB card and Ollama's 14 GB tag does not. OpenAI's gpt-oss-20b model card (opens in a new tab) says the model can run within 16 GB of memory; that is OpenAI's own statement, separate from this guide's rule. The GGUF file needs a runner that loads GGUF files, such as llama.cpp.

Models that fit in 24 GB of VRAM

Ollama tagDownload sizeImagesMax contextUnder 19.2 GB?
mistral-small3.2:24b15 GBYes128KYes
gemma4:26b-a4b-it-qat16 GBYes256KYes
qwen3.5:27b-q4_K_M17 GBYes256KYes
qwen3.6:27b-q4_K_M17 GBYes256KYes
qwen3.8:27b18 GBYes256KYes for the Ollama tag; the ggml-org GGUF (19.4 GB) is just over
gemma4:26b-a4b-it-q4_K_M18 GBYes256KYes
gemma4:31b-it-qat19 GBYes256KYes, barely
gemma4:31b-it-q4_K_M20 GBYes256KNo
qwen3.5:35b-a3b22 GBYes256KNo
qwen3.6:35b-a3b23 GBYes256KNo

Source: Ollama tag pages for gemma4, qwen3.5, qwen3.6, qwen3.8 and mistral-small3.2, read 2026-11-19.

The Hugging Face files tell a similar story. Google's 26B A4B Q4_0 GGUF is 14,439,363,584 bytes and its 31B Q4_0 GGUF is 17,651,001,568 bytes. The ggml-org Qwen3.8 27B Q4_K_M file is 19,403,684,480 bytes, just over the 19.2 GB line, so on a 24 GB card use the 18 GB Ollama tag for Qwen3.8. On this tier, the 27B to 31B models fit at 4-bit only, with modest context.

Coding models by VRAM tier

Every model below has an Ollama page that names coding. The Gemma 4 page calls the family well suited to coding and agentic workflows. Qwen3.6's page cites upgrades in agentic coding and lists separate -coding tags. On the Qwen3.8 page, the claims are gains in coding plus launch commands for coding tools.

VRAMCoding pickDownload sizeWhy
8 GBgemma4:e4b-it-qat6.1 GBFits under 6.4 GB
12 GBgemma4:12b-it-qat7.2 GBLeaves room for a longer context
16 GBgemma4:12b-it-q4_K_M8.0 GBRoom toward the 64000 tokens Ollama suggests for coding tools
24 GBqwen3.6:27b-coding-mtp-q4_K_M18 GBCoding tag of Qwen3.6 27B
24 GBqwen3.8:27b18 GBNewest Qwen on Ollama, with coding tool launchers

Source: Ollama tag and model pages for gemma4, qwen3.6 and qwen3.8, read 2026-11-19. Coding agents want long context, so on any tier a smaller file buys more usable context than a bigger model squeezed in. The Qwen3.8 guide covers its tags in more detail.

Vision models by VRAM tier

Gemma 4, Qwen3.5, Qwen3.6, Qwen3.8 and Mistral Small 3.2 all list text and image input on their Ollama tag pages. gpt-oss lists text only. That gives image-capable picks on every tier.

VRAMVision pickDownload size
8 GBgemma4:e4b-it-qat or qwen3.5:4b-q8_06.1 GB / 5.2 GB
12 GBgemma4:12b-it-qat7.2 GB
16 GBgemma4:12b-it-q4_K_M or qwen3.5:9b-q8_08.0 GB / 10 GB
24 GBgemma4:26b-a4b-it-qat or mistral-small3.2:24b16 GB / 15 GB

If you run GGUF files directly instead of Ollama tags, image input needs the separate mmproj file, which adds to the memory bill. Google's 26B A4B mmproj is 1,194,828,160 bytes; the ggml-org Qwen3.8 Q8_0 mmproj is 629,247,008 bytes. The guide to running a vision language model locally walks through both routes.

How to run the model you picked

With Ollama installed, pull the tag from the table, run it, then confirm where it loaded:

ollama pull gemma4:12b-it-qat
ollama run gemma4:12b-it-qat
ollama ps

In the ollama ps output, the PROCESSOR column should read 100% GPU. The CONTEXT column shows the context length in use. To raise the context for every model, start the server with the variable from Ollama's docs:

OLLAMA_CONTEXT_LENGTH=64000 ollama serve

Run ollama ps again after that change. If the processor split moves off 100% GPU, the larger context no longer fits.

For a full walkthrough, see how to run a local LLM with Ollama and call it from your code. If you prefer GGUF files and another runner, llama.cpp vs Ollama vs LM Studio compares the options. The Gemma 4 local guide covers every Gemma 4 size and command.

How to measure speed on your own machine

This guide gives no tokens-per-second figures, because speed depends on your card, driver, runner and context length. Check fit first with ollama ps, then time the model on your own prompts. The LLM inference benchmark guide shows how to run local tests and read the results.

Frequently asked questions

What if a model does not fit in VRAM?

Ollama can still run it by splitting it between GPU and CPU, and `ollama ps` shows that split in the PROCESSOR column. Ollama's context length docs advise avoiding CPU offloading for best performance. Pick a smaller quantization of the same model, such as a QAT or q4_K_M tag, or lower the context length.

Is 24 GB enough for a 27B or 31B model?

At 4-bit, yes by download size: `qwen3.8:27b` is 18 GB and `gemma4:31b-it-qat` is 19 GB on Ollama. At 8-bit, no: `qwen3.8:27b-q8_0` is 30 GB and `gemma4:31b-it-q8_0` is 34 GB. Expect little spare memory for long context with the 4-bit builds.

Why does Ollama show a different size than Hugging Face for the same model?

The two sites often host different builds of a model. Ollama lists `gpt-oss:20b` at 14 GB, while the ggml-org MXFP4 GGUF on Hugging Face is about 12.1 GB. Size your choice by the file you will download.

Does a bigger card change Ollama's default context length?

Yes. Ollama's docs set 4k tokens below 24 GiB of VRAM, 32k from 24 to 48 GiB and 256k at 48 GiB or more. You can override the default with the OLLAMA_CONTEXT_LENGTH variable or the slider in the Ollama app.

Sources

  1. 1.Tags · gemma4Official docsPrimaryollama.com
  2. 2.Tags · qwen3.5Official docsPrimaryollama.com
  3. 3.Tags · qwen3.6Official docsPrimaryollama.com
  4. 4.Tags · qwen3.8Official docsPrimaryollama.com
  5. 5.Tags · gpt-ossOfficial docsPrimaryollama.com
  6. 6.Tags · mistral-small3.2Official docsPrimaryollama.com
  7. 7.Gemma 4 model overview - Gemma DocumentationOfficial docsPrimarygemma.ai
  8. 8.openai/gpt-oss-20b · Hugging FaceOfficial docsPrimaryhuggingface.co
  9. 9.Context length - OllamaOfficial docsPrimarydocs.ollama.com
  10. 10.GGUF · Hugging FaceOfficial docsPrimaryhuggingface.co
  11. 11.ollama.com/library/qwen3.6Web
  12. 12.qwen3.8Official docsPrimaryollama.com
  13. 13.huggingface.co/api/models/google/gemma-4-E4B-it-qat-q4_0-gguf/tree/mainRepositoryPrimary
  14. 14.huggingface.co/api/models/google/gemma-4-12B-it-qat-q4_0-gguf/tree/mainRepositoryPrimary
  15. 15.huggingface.co/api/models/google/gemma-4-26B-A4B-it-qat-q4_0-gguf/tree/mainRepositoryPrimary
  16. 16.huggingface.co/api/models/google/gemma-4-31B-it-qat-q4_0-gguf/tree/mainRepositoryPrimary
  17. 17.huggingface.co/api/models/ggml-org/Qwen3.8-27B-GGUF/tree/mainRepositoryPrimary
  18. 18.huggingface.co/api/models/ggml-org/gpt-oss-20b-GGUF/tree/mainRepositoryPrimary

Spotted an error? See our corrections policy.

Enjoyed this? Get the weekly brief.

New guides, Project & Tool of the Week and the AI developments that matter. One email, no spam.

Read next

More on these topics