# VRAM Calculator — Will This Model Fit On My GPU?

> Work out exactly how much video memory a local model needs, including the KV cache that scales with context length.

A local model needs memory for three things: the weights (parameters × bits per weight ÷ 8), the KV cache (2 × layers × KV heads × head dimension × context length × concurrent sequences × bytes per element), and about a gigabyte of runtime overhead. This calculator computes all three for twelve real architectures at eight quantisation levels, and shows how the requirement grows with context length — the part every VRAM table omits.

**URL:** https://convertto.tech/t/llm-vram-calculator
**Category:** AI & LLM Tools (https://convertto.tech/c/ai-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Rule of thumb:** Parameters in billions × 0.6 ≈ GB at Q4_K_M, before the KV cache
- **The trap:** The KV cache grows linearly with context and can exceed the weights past 32k tokens
- **Best trade:** A larger model at Q4 usually beats a smaller model at Q8 for the same memory
- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## How to use

1. Choose the model.
2. Choose the quantisation.
3. Set the context length.
4. Choose the kv cache precision.
5. Set the concurrent sequences.
6. Turn "Fine-tuning rather than inference" on or off as needed.
7. Set the parameters (billions).
8. Set the layers.
9. Set the hidden size.
10. Set the attention heads.
11. Set the key/value heads.
12. The result appears immediately — copy or download it.

## FAQ

### Why does my model fit at 4k context but run out of memory at 32k?

The KV cache. It stores a key and value vector for every token in the context, in every layer, and it scales linearly — eight times the context is eight times the cache. On a 70B model at 32k that can be tens of gigabytes on top of the weights.

### Is a bigger model at Q4 better than a smaller one at Q8?

Almost always, down to about Q4. A 70B at Q4_K_M consistently outperforms a 34B at Q8 in the same memory. Below Q3 the relationship breaks down — the degradation becomes severe enough that the smaller, better-quantised model wins.

### What is grouped-query attention and why does it matter here?

It lets several attention heads share one set of key and value projections, so an 8-KV-head model caches a quarter of what a 32-KV-head model of the same size would. It is the single biggest factor in whether long context is affordable, which is why an older 7B model can need more cache than a newer 8B one.

### How much extra memory does fine-tuning need?

Full fine-tuning needs roughly four times the weights on top: gradients at the weight precision plus two fp32 optimiser moments per parameter. LoRA avoids nearly all of it by training a small adapter and freezing the base weights — which is why almost nobody full-fine-tunes on consumer hardware.

## Sources

- [GQA: Training Generalized Multi-Query Transformer Models](https://arxiv.org/abs/2305.13245) — arXiv
- [llama.cpp — quantisation formats](https://github.com/ggml-org/llama.cpp) — ggml

## Related tools

- [GGUF Quantisation Size Calculator](https://convertto.tech/t/gguf-size-calculator): Work out the download size of a quantised model at every GGUF level, and what quality each one costs you.
- [LLM Model Comparison](https://convertto.tech/t/llm-model-comparison): Every current model side by side: price per million tokens, context window, max output, modalities and cache rates.
- [What Is My Screen Resolution?](https://convertto.tech/t/screen-resolution-checker): Check your screen resolution, browser viewport, device pixel ratio, colour depth and GPU.
- [AI API Cost Calculator](https://convertto.tech/t/ai-api-cost-calculator): Work out what a prompt costs per call, per day and per month, and compare the same workload across every major model.
- [AI Writing Pattern Checker](https://convertto.tech/t/ai-writing-pattern-checker): Measure sentence-length variance, vocabulary richness, marker phrases and typographic tells, with per-sentence scoring.
- [Chat Export Formatter](https://convertto.tech/t/chat-export-formatter): Drop in an exported conversations file and get clean Markdown, HTML or plain text — one document per conversation.
- [Context Window Calculator](https://convertto.tech/t/context-window-calculator): Paste a document and see which models it fits inside, how much of each window it fills, and what is left for the reply.
- [Embedding Similarity Calculator](https://convertto.tech/t/embedding-similarity-calculator): Paste embedding vectors and get every pairwise cosine, dot product, Euclidean and Manhattan distance, ranked.
