Home / Free AI tools / LLM VRAM calculator

Can I run this LLM? VRAM calculator

Pick a model and your graphics card or Mac to see whether it fits, which quantisation to download, and roughly how fast it will run. Everything is calculated in your browser.

Every quantisation of this model

Biggest listed models that fit

    Model not listed? Choose "Custom model" and copy num_hidden_layers, num_key_value_heads and head_dim from its config.json on Hugging Face.

    How the estimate works

    A model on your computer needs memory for three things:

    1. The weights. Parameters × bits per weight ÷ 8. An 8-billion-parameter model at 16 bits is 8 × 16 ÷ 8 = 16 GB. At 4.85 bits (Q4_K_M) it is about 4.9 GB.
    2. The KV cache. For every token in the conversation, each layer stores a key and a value: 2 × layers × KV heads × head size × tokens × 2 bytes. For Llama 3.1 8B with 8,192 tokens that is about 1.1 GB, and four times that at 32K.
    3. The runtime. The program itself and its working buffers, about 0.5–1 GB.

    Speed when writing is limited mostly by how fast the device can read the weights from memory: roughly memory bandwidth ÷ model size. That is why an RTX 3090 (936 GB/s) writes much faster than a laptop CPU (about 60 GB/s) even when both can hold the model. To learn why the KV cache exists, see how transformers work.

    Quick guide: memory by model size

    SizeExamplesQ4_K_MQ8_0FP16
    1B–4BLlama 3.2 1B/3B, Qwen3 4B2–4.5 GB2.5–6.5 GB4–10 GB
    7B–9BLlama 3.1 8B, Qwen3 8B, Mistral 7B6–9 GB9–13 GB16–22 GB
    12B–14BGemma 3 12B, Qwen3 14B10–12 GB15–19 GB26–33 GB
    27B–32BGemma 3 27B, Qwen3 32B21–23 GB34–38 GB60–69 GB
    70B–72BLlama 3.3 70B, Qwen2.5 72B46–48 GB79–81 GB145+ GB

    With an 8K context. Ranges are wider for models with large KV caches, such as Gemma. Add more for longer contexts.

    How to run a model on your computer

    Ollama (easiest from the terminal)Install it from ollama.com, then run ollama run qwen3:8b. It downloads a Q4 version and opens a chat. It also gives your own code a local API.
    LM Studio (easiest with a window)A desktop app: search for a model, and it marks which downloads fit your machine. Then chat, or start a local server.
    llama.cpp (most control)The engine underneath many tools. Download a GGUF file and run llama-server -m model.gguf, with full control over context, offloading and KV-cache settings.

    Then learn to call the model from your own Python code in Run LLMs on your own computer, part of the free Generative AI course.

    Common questions

    How much VRAM do I need to run an LLM?

    Roughly the number of parameters in billions, times the bits per weight, divided by 8, plus 1 to 3 GB for the context and runtime. At the popular Q4_K_M setting, an 8B model needs about 6–7 GB, a 14B model about 11 GB, a 32B model about 23 GB and a 70B model about 46 GB (with an 8K context).

    Can I run an LLM without a graphics card?

    Yes. Tools like Ollama, LM Studio and llama.cpp run models on the CPU using system RAM. It works well for 1B–8B models, but writing is slower, often 3 to 15 tokens per second, because RAM is much slower than graphics memory.

    What does Q4_K_M mean?

    It is a quantisation level in the GGUF file format. The weights are stored with about 4 to 5 bits each instead of 16, which makes the model about a third of its full size. Q4_K_M is the usual sweet spot: much smaller, with only a small drop in quality. Q8_0 is almost identical to the full model; Q3 and Q2 save more memory but lose noticeably more quality.

    Why does a longer context need more memory?

    The model keeps a key and a value vector for every token it has seen, in every layer: the KV cache. It grows in a straight line with the context length, so going from 8K to 32K tokens makes it four times bigger. Quantising the KV cache to 8 bits halves it.

    Is a Mac good for running local LLMs?

    Apple Silicon Macs share one pool of memory between the CPU and GPU, so a 64 GB or 128 GB Mac can hold models that would need several graphics cards. By default macOS lets the GPU use about two thirds to three quarters of that memory. A Mac usually writes more slowly than an NVIDIA card with the same memory.

    How accurate is this calculator?

    It is an estimate, usually within about 10–15%. Real use depends on the exact file, the tool, its settings (such as batch size and flash attention) and other apps using memory. Leave some headroom.