Hardware
VRAM for AI: How Much Do You Need to Run Models?
VRAM for AI explained: how much GPU memory you need to run LLMs and image models locally, with simple math, real examples, and tips for smaller cards.
If you want to run AI models on your own computer, one number matters more than almost anything else: how much memory your graphics card has. VRAM for AI is the space where a model has to live while it works. If the model doesn't fit, it either won't run at all or it will crawl. The good news is that you can work out what you need with simple math, no guesswork required.
This guide shows you how to calculate it, what different amounts of VRAM can handle, and how to stretch a smaller card further than you might expect.
What Is VRAM for AI, and Why Does It Matter?
VRAM is video memory, the fast memory built onto a graphics card (GPU). It was designed to hold textures and frames for games. Today it's also the main limit on which AI models you can run locally.
Here's why. An AI model is mostly a giant list of numbers called parameters (or weights). To generate each word or image, the GPU has to read through those numbers again and again, very fast. That only works if they sit in VRAM, right next to the GPU's cores.
If the model is bigger than your VRAM, part of it has to live in slower system memory. Speed drops sharply, sometimes by ten times or more.
Speed vs fit
It helps to separate two questions:
- Does it fit? That depends on VRAM.
- How fast does it run? That depends on the GPU's power and memory speed.
A slower card with enough VRAM often beats a faster card that's too small, because the small card has to keep fetching data from elsewhere.
How to Calculate VRAM for AI Models (Step by Step)
You don't need a lookup table for every model. Three steps get you a solid estimate.
Step 1: Find the parameter count
Model names usually tell you this. A "7B" model has about 7 billion parameters. A "70B" model has about 70 billion.
Step 2: Multiply by the size of each parameter
Each parameter takes up a certain number of bits, depending on its format:
- 16-bit (FP16 or BF16): 2 bytes per parameter. This is the "full quality" format most models are released in.
- 8-bit: 1 byte per parameter.
- 4-bit: about half a byte per parameter. In practice, popular 4-bit formats use slightly more.
So the formula is:
VRAM for weights (GB) ≈ parameters in billions × bytes per parameter
A 7B model at 16-bit needs about 7 × 2 = 14 GB. The same model at 4-bit needs about 7 × 0.5 = 3.5 GB.
Step 3: Add room for context and overhead
The weights aren't everything. The model also needs working memory:
- Context memory (the KV cache): this stores the conversation so far. It grows as the chat gets longer. If you want long chats or big documents, plan for more. Our guide on what a context window is explains why longer context costs more memory.
- Overhead: the software, the GPU driver, and your desktop all take a slice.
A simple rule of thumb: add about 20% on top of the weights for short chats, and more for long ones.
How Much VRAM Do I Need? A Quick Guide by Model Size
So, how much VRAM do I need for a specific model? Using the formula, here is the space the weights alone take up at each format. Remember to add room for context and overhead on top.
| Model size | 16-bit | 8-bit | 4-bit |
|---|---|---|---|
| 3B | ~6 GB | ~3 GB | ~1.5 GB |
| 7–8B | ~14–16 GB | ~7–8 GB | ~3.5–4 GB |
| 13–14B | ~26–28 GB | ~13–14 GB | ~6.5–7 GB |
| 30–34B | ~60–68 GB | ~30–34 GB | ~15–17 GB |
| 70B | ~140 GB | ~70 GB | ~35 GB |
What this means by card size
Putting the table together with the 20% rule, here's roughly what each VRAM tier can run comfortably at 4-bit:
- 8 GB: models up to about 7–8B, with modest context.
- 12 GB: 7–8B models with longer context, or 13–14B models.
- 16 GB: 14B models comfortably, with some headroom.
- 24 GB: models up to about 30–34B.
- 48 GB or more (one large card or two smaller ones): 70B models.
Treat these as starting points, not guarantees. Different software and model designs can shift the numbers a little.
VRAM for LLM vs Image Models
Not all AI models use memory the same way.
Language models
When people talk about VRAM for LLM use, the formula above does most of the work. Language models are mostly weights, so model size and format decide almost everything. Long conversations add to it through the context memory.
Image generation models
Image models like Stable Diffusion are smaller in parameter count than most chatbots, but generating an image needs a lot of working memory. That use grows with image resolution and batch size.
Older, smaller image models can run on modest cards. Newer, larger ones generally want more VRAM to run smoothly. Most image tools also offer low-memory modes that trade speed for a smaller footprint.
Training vs running
Everything above is about running a model (often called inference). Training or fine-tuning a model needs far more memory, because the GPU also tracks extra data for every parameter. Lighter methods like LoRA and QLoRA cut this down a lot, which is how hobbyists fine-tune models on a single consumer card.
What Can You Do With 8GB VRAM?
A lot of people own a card with 8GB VRAM, so it deserves its own section. The honest answer: more than you'd think, as long as you choose models wisely.
What works well
- Small chat models at 4-bit: 7–8B models fit, and many are good at writing, summarizing, and coding help.
- Very small models: 1–4B models run fast and leave plenty of room for longer context.
- Image generation: older, smaller image models run well, and many newer ones work with low-memory settings.
- Speech-to-text: transcription models are usually small enough to fit easily.
What struggles
- Models of 13B and up, unless part of the model is moved to system memory.
- Very long conversations or big documents, since the context memory competes for space.
- High-resolution image generation with larger, newer models.
If you're working on a laptop, our guide on how to run an LLM locally covers the easiest apps for getting started and which models fit 8, 16 or 32 GB of memory.
VRAM vs RAM: Can System Memory Help?
This is one of the most common questions, so let's clear up VRAM vs RAM.
The difference
- VRAM sits on the graphics card and is extremely fast for the GPU to read.
- RAM is your computer's main memory. It's usually larger and cheaper, but the GPU reads from it much more slowly.
Splitting a model between them
Popular local AI apps like Ollama, LM Studio, and llama.cpp can put part of a model in VRAM and the rest in RAM. This is called offloading. It lets you run models bigger than your VRAM, but every part that sits in RAM slows things down.
A model that's mostly in VRAM with a small slice in RAM can still feel usable. A model that's mostly in RAM will often be painfully slow.
Running with no GPU at all
You can run smaller models on the CPU alone, using only system RAM. It works, especially for small models, but expect slower responses than on a decent GPU.
Apple Silicon and unified memory
Macs with Apple chips work differently. The CPU and GPU share one pool of unified memory, so the GPU can use a large share of the system's total memory. That's why a Mac with a lot of memory can run models that would need a very large graphics card on a PC. It's not always as fast as a high-end PC GPU, but the extra room makes a big difference.
How to Run Bigger Models on Less VRAM
Short on memory? These tricks help most.
1. Use quantized models
Quantization stores each parameter with fewer bits, such as 4-bit instead of 16-bit. That cuts memory use by roughly three quarters. Quality drops a little, but for most everyday tasks, a 4-bit version of a bigger model often beats a 16-bit version of a smaller one.
2. Keep context shorter
If you're tight on space, lower the context length setting in your app. Shorter context means less memory for the KV cache.
3. Pick the right model, not the biggest one
A well-made small model can be better for your task than a large one squeezed onto your card. Try a few sizes and compare.
4. Give the model knowledge instead of size
Instead of running a huge model that "knows" more, you can pair a smaller model with your own documents. This approach, called retrieval-augmented generation (RAG), feeds relevant information to the model when it needs it.
5. Close other GPU-hungry apps
Games, video editors, and even browsers with many tabs use VRAM. Closing them frees memory for your model.
FAQ
Is 8GB VRAM enough for AI?
Yes, for many uses. With 8GB VRAM you can run 7–8B language models at 4-bit, small image models, and speech-to-text. Larger models need more memory or offloading to system RAM.
How much VRAM do I need for a 7B model?
About 4 GB for the weights at 4-bit, or about 14 GB at 16-bit. Add roughly 20% for context and overhead. A 6–8 GB card handles a 4-bit 7B model well.
How much VRAM does a 70B model need?
About 35 GB for the weights at 4-bit, plus room for context. In practice, that means 48 GB of VRAM, two cards, a Mac with plenty of unified memory, or offloading part of the model to system RAM.
Can I run AI models without a GPU?
Yes. Smaller models run on the CPU using system RAM. They work fine for testing and light use, but responses are slower than on a GPU.
Is more VRAM or a faster GPU better for AI?
For running local models, VRAM usually comes first. Enough VRAM decides whether a model fits at all. Once it fits, a faster GPU makes it respond more quickly.