Free | No tracking | Every fact with a source|German and English

AI course / Module 2: Your PC

Lesson 4/12 Why VRAM matters

VRAM, RAM, and bandwidth: why storage on the graphics card matters most for AI. · 5 min.

If you ask which PC is suitable for AI, you keep hearing the same answer: “The main thing is lots of VRAM.” In this lesson, you’ll learn why that is. And why a fast processor or lots of RAM alone is not enough.

VRAM and RAM: two different types of memory

Your PC has two important types of memory that are often confused:

  • RAM (main memory) belongs to the main processor, the CPU. Today, 16, 32, or 64 GB are typical.
  • VRAM (video RAM, graphics memory) sits directly on the graphics card, the GPU. Depending on the card, 8, 12, 16, 24 GB or more are typical.

The graphics card is the most important component for AI. It can perform many simple calculations at the same time, exactly what neural networks need. But it works fastest with data that is in its own memory. That’s why the model should fit as completely as possible into VRAM.

You can find a more detailed explanation with examples in the guide VRAM explained.

Why memory is so important

Do you remember the parameters from lesson 1? A model with 8 billion parameters has to store all those numbers somewhere. And for every single token a language model generates, all of those numbers basically have to be read once.

That’s the key point. When generating text, the bottleneck is usually not raw compute power, but this question: How fast can the data come from memory? That speed is called memory bandwidth. It is measured in gigabytes per second (GB/s).

An everyday example: You’re a very fast cook. But if your ingredients are in the basement and you have to run downstairs for every onion, your speed doesn’t help much. VRAM is the countertop right in front of you. Regular RAM is the basement.

Tip: As a rule of thumb, the graphics memory of a modern graphics card is connected many times faster than regular RAM. That’s why the same hardware produces text much faster when the model fits completely in VRAM.

What happens if it doesn’t fit?

If a model is larger than your VRAM, different things can happen depending on the program:

  • Error message: The program stops with “out of memory” or “OOM.” Typical errors and solutions are listed under error.
  • Split across memory: Programs like LM Studio or Ollama place only part of the model on the graphics card and the rest in regular RAM. This works, but it is much slower. The more that is moved out, the slower it gets.
  • Offloading with image models: ComfyUI can move parts of the model back and forth between RAM and VRAM. This often works too, but it takes time.

So it’s usually not a hard crash, but a question of speed. A model that “just barely” runs can feel very sluggish.

What “tight” means

Important: The model itself is not the only thing that needs space. There’s also:

  • the context in language models. The longer the conversation or document, the more memory is used in addition. This temporary memory is called the KV cache.
  • intermediate results during computation, especially with high-resolution images and videos.
  • the text encoder and the VAE in image models.
  • Windows and other programs. Browsers, games, or the desktop already use some graphics memory on their own.

Important: A model file that is 7 GB large does not automatically fit on a card with 8 GB. As a rule of thumb, always leave some headroom, and for long texts or large images, a lot more.

You can estimate how much memory a specific model needs with your settings using our calculator.

More RAM still helps

Regular RAM is not useless. It is needed to load models, hold offloaded parts, and handle everything else on the PC. Anyone who wants to split large models benefits from lots of RAM. It just won’t make things faster by itself.

Devices with unified memory play a special role. Here, the processor and graphics unit share one large, fast memory pool. Examples include Apple computers with M chips or compact AI machines with lots of shared memory. They can load very large models. But when it comes to pure speed, powerful standalone graphics cards are often ahead as long as the model fits into their VRAM.

How much VRAM do you need?

There is no one-size-fits-all answer. It depends on what you want to do, which models you use, and how much they are reduced in size (that’s the topic of the next lesson). Roughly speaking:

  • For first chat experiments with small models, a mid-range card is enough.
  • For larger language models and current image models, more VRAM is much more comfortable.
  • For videos and very large models, things get demanding quickly.

A hardware selection aid is available in the buying guide.

The most important points in brief

  • VRAM is the memory on the graphics card, RAM is the processor’s main memory.
  • For AI, the key thing is that the model fits completely into VRAM.
  • Memory bandwidth strongly affects how fast text is generated.
  • If a model doesn’t fit, it is moved out and becomes much slower, or it stops with an error.
  • In addition to the model, context, intermediate results, and Windows also need space.

Short quiz

1. Where should a model be for the best speed?
2. What usually happens in LM Studio or Ollama when a language model doesn’t quite fit into VRAM?
3. Why doesn’t a 7-GB model file safely fit on a card with 8 GB VRAM?