Learn
Local & edge AI

Best Open-Weight Models Under 8GB VRAM

The short answer

An 8 GB card realistically holds 6 to 6.5 GB of weights once the KV cache, compute buffer and display overhead are paid for. That means 7B to 9B models at four bits, or 12B at a squeeze, plus small 3B to 4B models at higher precision. The best choice depends on task, licence and context length, not on a single ranking.

On this page

The budget is smaller than the sticker

An 8 GB card does not give you 8 GB for weights. Take off 300 to 500 MB for the CUDA context and allocator, 300 to 800 MB for the compute buffer at a few thousand tokens of context, and the KV cache, which for a 7B model with grouped-query attention is around 128 KiB per token, or 0.5 GB at 4K and 1 GB at 8K. On a laptop, the desktop compositor and a browser can hold another 0.5 to 1.5 GB. The practical weight budget is 6 to 6.5 GB, and that is before leaving any headroom for a prefill spike.

Two consequences follow. First, Q8_0 is out of reach for a 7B model at 7.6 GB, and Q6_K at 5.9 GB leaves almost nothing for context. Second, a 12B model at Q4_K_M is roughly 7.3 GB, which fits only with a short context, no display on the card, and a runtime that does not reserve the architectural maximum. It is possible and it is not comfortable.

The parameter ceiling, in numbers

At Q4_K_M the rule of thumb is 0.58 to 0.62 bytes per parameter including scales and metadata. That gives 3.8B at 2.3 GB, 7B at 4.4 GB, 8B at 4.9 GB, 9B at 5.5 GB, 12B at 7.3 GB and 14B at 8.5 GB, which does not fit. At Q5_K_M the same models read 2.8, 5.1, 5.7, 6.4, 8.5 and 9.9 GB. At Q6_K: 3.2, 5.9, 6.6, 7.4, 9.8 and 11.4 GB. The cliff between 9B and 14B is the single most important fact about 8 GB hardware: there is no comfortable 13B or 14B deployment at four bits.

A 7B coder checkpoint such as AstraGPTCoder-7B illustrates the real footprint: about 6 GB of VRAM at four bits with a few thousand tokens of context, which is the practical ceiling for this class of card. That figure is memory arithmetic, not a performance claim. If a model is described only by its parameter count, the arithmetic above tells you more about whether it will run than any benchmark table.

What best should mean

Rankings change monthly and are usually measured at full precision with generous context, which is not the regime you will run. A more useful screen has five questions. Does the model fit at a quantisation that preserves its quality on your task? Is the licence acceptable for your use, including commercial redistribution? Is the context window long enough for your prompts after the KV cache is paid for? Does the tokenizer handle your languages efficiently, since a tokenizer that needs twice as many tokens doubles both latency and cache? And does it support the interface you need, whether that is tool calling, fill-in-the-middle or strict JSON?

A model that wins on a public benchmark and needs 40 percent more tokens for Hindi, or loses its chat template in the quantised build, is not the best model for the deployment. The rest of this piece groups candidates by the job rather than by rank.

General-purpose 7B to 9B models

This is the sweet spot for 8 GB. The current generation of 7B to 9B instruction-tuned models is competent at summarisation, extraction, drafting and light reasoning, and they fit at Q4_K_M with 8K of context to spare. The differences between them are mostly in tokenizer coverage, context length, licence and how well they follow structured output.

Llama 3.1 8B is the reference point: 8.03B parameters, 128K context, eight languages, and a community licence that permits commercial use with conditions. Qwen2.5-7B is 7.62B, Apache 2.0, 128K context and 29 languages, with a tokenizer built around a large multilingual vocabulary. Mistral 7B v0.3 is 7.25B, Apache 2.0 and 32K context, older but well supported and easy to quantise. Gemma 2 9B is 9.24B under the Gemma licence with an 8K window and a large KV cache of about 336 KiB per token because of its 42 layers and 256-wide heads, so it eats context budget faster than its size suggests. Granite 3.1 8B is Apache 2.0 with a 128K window and an enterprise-oriented training mix.

At Q4_K_M these land between 4.4 and 5.6 GB, leaving 1 to 2 GB for cache and buffers. That is enough for 8K context on most of them and 16K on the ones with fewer KV heads.

Coding models

Code benefits disproportionately from a bigger model, but 7B coder models are genuinely useful for autocomplete, test generation, small refactors and explaining unfamiliar files. The important features are fill-in-the-middle training, a tokenizer that does not shred identifiers into single characters, and enough context to hold a file plus its imports.

Qwen2.5-Coder-7B is one of the strongest of the small open coder models on public evaluations, Apache 2.0, 128K context, and trained with fill-in-the-middle. DeepSeek-Coder-V2-Lite is a 16B mixture of experts with 2.4B active parameters; it is excellent, but at four bits the full 16B still has to be resident, which puts it around 10 GB and out of reach. CodeLlama 7B is older and superseded but remains well supported. AstraGPTCoder-7B sits in the same 7B class and, as noted, occupies about 6 GB at four bits with a working context, so it fits an 8 GB card without offload.

Context is the constraint that bites. A 7B coder at Q4_K_M with 8K of context fits; at 32K the cache alone is 1.75 GB for a 4-KV-head model and the total crosses 6.5 GB. Use repository-level retrieval rather than raw long context, and keep the KV cache in FP16 unless memory forces otherwise.

Small models that punch above their weight

Below 4B the economics change: you can run Q6_K or Q8_0, get lower latency, and still have room for a long context. These models are not general assistants, but they are excellent at bounded tasks. Llama 3.2 1B and 3B are strong for their size with a 128K window and a permissive-enough licence. Qwen2.5 0.5B, 1.5B and 3B cover the same range under Apache 2.0, with the 3B being a credible draft model for speculative decoding. Phi-3.5-mini at 3.82B is MIT-licensed with a 128K window and is unusually good at structured extraction for its size. Gemma 3 4B and SmolLM2 1.7B round out the options.

The best use of an 8 GB card is often a small model plus a 7B model, not one model at the edge of the budget. A 1.5B router that classifies and extracts, with a 7B called only for hard cases, gives better throughput and better answers than forcing everything through the larger model.

Reasoning models at this size

Distilled reasoning models put chain-of-thought into 7B-class weights. DeepSeek-R1-Distill-Qwen-7B is the best known, MIT-licensed, and generates long internal reasoning before answering. Qwen3 8B supports an explicit thinking mode, and Phi-4-mini-reasoning at 3.8B targets the same niche at a smaller footprint.

The catch is that reasoning traces are tokens, and tokens fill the KV cache. A model that thinks for 4,000 tokens before answering spends 4,000 tokens of context and four times the wall-clock time of a direct answer. On an 8 GB card with 8K of context, a reasoning model can talk itself out of room. Cap the thinking budget, use a 4K to 8K context, and reserve these models for problems where the extra tokens actually buy accuracy.

Mixture of experts under 8 GB

A sparse mixture of experts activates a fraction of its parameters per token, which sounds ideal for small cards. It is not, because every expert still has to be resident even if it is not used, and decode reads the weights it routes to plus the shared layers. Memory is set by total parameters, not active ones. OLMoE-1B-7B is the exception that fits: 6.9B total, 1.3B active, Apache 2.0, about 4.2 GB at Q4_K_M. It is fast for its quality and a good fit for an 8 GB card, though its 4K context is limited.

Larger MoEs do not fit. Qwen3-30B-A3B is around 18 GB at four bits and needs 24 GB of VRAM or a 32 GB unified-memory machine. DeepSeek-V2-Lite at 15.7B total is around 10 GB. The rule is simple: for an 8 GB card, total parameters decide fit and active parameters decide speed.

Quantisation choices per size class

Q4_K_M is the default for 7B to 9B and the only sane choice for a 12B on this card. Q5_K_M is worth it for a 7B if you can live with 4K context, and it recovers a measurable amount of quality on code and math. Q6_K is for 3B to 4B models where the extra precision is nearly free. Q8_0 is for 1B to 3B models and for draft models in speculative decoding. IQ4_XS is useful for squeezing a 9B or 12B, but it costs CPU speed and depends on the quality of the importance matrix.

Two related knobs matter as much as the weight format. Quantising the KV cache to 8 bits halves the context bill and is usually invisible in quality; 4-bit cache is more aggressive and worth testing. And setting the context length to what you need, rather than the model maximum, prevents the runtime from reserving cache for tokens no one will send.

Runtime settings that make the difference

  • Offload all layers (-ngl 99) and confirm none are spilling; a single spilled layer costs more than the quantisation saves.
  • Enable Flash Attention, which cuts the compute buffer and makes 8K context practical.
  • Set context to 4K or 8K explicitly; never inherit a 128K maximum on an 8 GB card.
  • Keep the display on the integrated GPU on laptops to reclaim 0.5 to 1.5 GB.
  • Use a batch size of 256 to 512 for prompt processing; larger batches raise the prefill buffer.
  • Try Q5_K_M before assuming Q4_K_M is the quality ceiling; a 7B at 5.1 GB often still fits.
  • Benchmark with your own prompts at your own context length, because public numbers rarely use either.

What does not fit, and what to buy instead

A 14B model at Q4_K_M is 8.5 to 9 GB and does not fit with any useful context; it needs a 12 GB card. A 32B model at four bits is 18 to 20 GB and needs 24 GB. A 70B at four bits is around 42 GB and needs 48 GB of VRAM, two 24 GB cards with tensor parallelism, or a 64 GB unified-memory machine at much lower speed. If your work genuinely needs a 32B model, the upgrade is a 24 GB card, not a cleverer quantisation.

The honest framing is that 8 GB is an entry point that covers 90 percent of local assistant, extraction and coding-autocomplete work. It is not a substitute for a 24 GB card, and no amount of format engineering changes the arithmetic.

A note on Indian-language tokenizers

Token counts, not word counts, are what the 8 GB budget spends. Devanagari, Tamil, Telugu and Bengali text is often fragmented into more tokens per word than English, and a tokenizer that needs 1.5 to 2.5 times as many tokens for the same content shrinks the effective context and raises latency in direct proportion. A model advertised as multilingual may cover a language without tokenizing it efficiently, and the two are different claims.

Llama 3.1 lists eight supported languages including Hindi; Qwen2.5 claims 29; Gemma models are broadly multilingual. None of those lists tells you tokens per word on your text. Measure it before committing: tokenize a few thousand words of real Hindi, Tamil or Hinglish, divide tokens by words, and multiply by your expected prompt length. Code-mixed Hinglish is the common case in Indian products and deserves its own measurement, because Latin-script Hindi transliteration tokenizes very differently from Devanagari.

A selection checklist

  • General assistant on a laptop: a 7B to 8B instruction model at Q4_K_M, 8K context, Flash Attention on.
  • Coding autocomplete: a 7B coder with fill-in-the-middle at Q4_K_M, 4K to 8K context, retrieval instead of huge prompts.
  • Extraction and classification: a 3B to 4B model at Q6_K, which is faster and often as accurate for bounded labels.
  • Long documents: a model with grouped-query attention and few KV heads, plus an 8-bit cache.
  • Reasoning: a 7B distill with a capped thinking budget, and only for problems that need it.
  • Offline or edge: GGUF, Q4_K_M, llama.cpp, context fixed at the smallest workable value.
  • Multilingual: check tokenizer efficiency on your language before comparing model quality.
  • Commercial product: verify the licence, not just the benchmark, before shipping.
Page feedback

Was this helpful?

A quick signal helps improve these notes.

Report a mistake Straight to the lab inbox

Put it to work

See the models, datasets and gateway this lab runs.