← All news

News / Learn / Local & open models

What hardware do you need for local AI?

You'll be able to estimate whether your computer can run a local model, and which limits matter most.

Running an AI model locally means the model runs on your own machine, not on a remote server. The model is a large file of numbers. To answer, your hardware has to load those numbers and do math with them for every word it produces.

Hardware decides what you can run, how fast it responds, and what it costs you. A model that is too large for your memory will not load, or will run so slowly it is useless. Knowing these limits lets you pick the right model size before you build around it.

The first limit is memory. A model's weights must fit in memory while it runs. On a graphics card, that means video memory (VRAM). On a Mac with Apple silicon, the chip shares one pool of unified memory with the rest of the system. On a plain CPU, the model uses system RAM. A rough rule: more parameters need more memory, and lower precision (see quantization) needs less.

The second limit is memory bandwidth. Generating each token means reading most of the model's weights from memory. So a faster memory path often matters more than raw compute for chat speed. This is why a graphics card with fast VRAM feels quick, and why a slow memory system can feel sluggish even with a strong processor.

The third limit is the context window. Longer prompts and longer answers take more memory for the attention cache, called the KV cache. A model can fit in memory and still run out of room when you give it a long document.

Finally, consider your goal. Testing and personal tasks need less than serving many users. Latency (time to first token) and throughput (tokens per second across all requests) are different targets, and each depends on the hardware in its own way.

A common rough estimate: weights take about parameters times bits per weight divided by 8, in bytes. This ignores overhead, so leave headroom. Here is a small calculator.

def weight_memory_gb(params_billions: float, bits_per_weight: float) -> float:
    # bytes = parameters * bits / 8
    bytes_total = params_billions * 1e9 * bits_per_weight / 8
    return bytes_total / 1e9

for bits in (16, 8, 4):
    gb = weight_memory_gb(7, bits)
    print(f"7B model at {bits}-bit: about {gb:.1f} GB for weights")

# Add headroom for the KV cache, runtime overhead, and the OS.

A short sketch to show the idea. Check the official docs of the tool you use.

  • Judging only by the model's file size on disk Account for the context window and runtime overhead too. Leave 20 to 30 percent memory headroom for the cache and the operating system.
  • Assuming more compute always means faster answers Chat speed often depends on memory bandwidth. Check the memory speed and capacity of your hardware, not just the processor.
  • Ignoring shared memory on laptops On integrated or unified-memory systems, the model competes with your apps for the same RAM. Close other programs before you test.
  • Choosing a model before testing your task Start with a small model and measure quality and speed on your real task. Move up in size only when the results justify the cost.

Learn how quantization changes memory needs, and how the KV cache grows with context length. Then compare inference runtimes on your own hardware.

Do I need a GPU to run a local model?

No. Smaller models run on a CPU, though slower. A GPU or unified-memory system usually gives much faster responses for the same model.

Is more VRAM always better?

More VRAM lets you load larger models or longer contexts. It does not fix slow memory bandwidth, so check both capacity and speed.

Why does my model run out of memory on long prompts?

The attention cache grows with context length. A model that fits at short lengths can exceed your memory when you send a long document.

Can I estimate memory before downloading a model?

Yes. Multiply the parameter count by the bits per weight, convert to bytes, and add headroom for the cache and overhead.

Written with AI by CapyLaunch. Spotted a mistake? Email hello@capylaunch.com.