Free Practical AI Tools & 50 Field Guide Books • All 10 Free Tools • 50 Books
Home › Free AI tools › LLM VRAM Calculator: Will This Model Run on My GPU or Mac?

LLM VRAM Calculator: Will This Model Run on My GPU or Mac?

To run a model locally you need memory for its weights, for the context cache that grows with the conversation, and a little runtime overhead. Pick a model, a quantization level, a context length and your hardware to see whether it fits, roughly how fast it will run, and the Ollama command to start it.
Free, no sign-up, runs in your browser. Last checked 22 October 2026.
Quick examples:
⚙️ Model and hardware

32K tokens (about 66 pages of text)

📊 Memory needed and fit

FITS

Memory needed versus usable memory

29.8 GB needed / 36.0 GB usable

Fits on MacBook Pro M4 Max, 48 GB with 6.2 GB to spare.

Model weights 19.9 GB
Context cache 8.6 GB
Runtime overhead 1.3 GB
Model weights (32.8B at 4.85 bits per weight, Q4_K_M)19.9 GB
Context cache (32K tokens, 64 layers, 8 KV heads, f16)8.59 GB
Runtime overhead (estimate)1.3 GB
Usable memory on MacBook Pro M4 Max, 48 GB36.0 of 48 GB (macOS default GPU limit)
Rough generation speedAbout 12 tokens per second
Smallest setups on this list that fit: NVIDIA: NVIDIA RTX 5090 32 GB • Mac: Mac mini M4 Pro, 48 GB. Or rent a cloud GPU by the hour: Vast.ai or RunPod.
Ollama commands:

# macOS or Linux: start Ollama with the context window set to 32K tokens OLLAMA_CONTEXT_LENGTH=32768 ollama serve # Windows PowerShell: same thing $env:OLLAMA_CONTEXT_LENGTH="32768"; ollama serve # Then, in a second terminal, download and chat with the model ollama run qwen2.5:32b # Already chatting? You can also set the window inside the chat: /set parameter num_ctx 32768

Estimates, not guarantees. Real use varies by app, settings and model version. Speed is a rough guide based on memory bandwidth.

Put this free tool on your own site

Copy the code below and paste it into any web page or blog post. The tool runs inside your page, stays free, and updates itself when we improve it.

Why Deterministic Operator Tools Replace Trial-and-Error Prompting

❌ Broken Old Way (Ad-Hoc Trial & Error)

Downloading a 32B or 70B model onto a 16 GB or 24 GB machine without accounting for the KV context cache, causing silent swap spill into system RAM and 2 tokens/sec crawl speeds.

✅ Deterministic New Mechanism (LocalZero Workbench)

Calculating exact model weight GB + layer/KV-head context cache GB + runtime overhead against usable GPU/Mac memory before downloading, and launching Ollama with the exact context flag.

Local LLM Memory & Hardware Sizing Specification Table (Station 3)

Memory ComponentExact Sizing FormulaQwen2.5 32B (Q4_K_M @ 32K) ExampleHardware Fit Rule
Model Weights (GB)params_billions * bits_per_weight / 819.9 GB (32.8B * 4.85 / 8)Q4_K_M (~4.85 bpw) balances quality and VRAM footprint
KV Context Cache (GB)2 * layers * kv_heads * head_dim * kv_bytes * ctx_tokens / 1e98.60 GB (64 layers, 8 KV heads, 32K f16)Scales linearly with context length; halve with q8_0 cache
Runtime Overhead (GB)0.5 GB + (0.012 GB * ctx_K) + (0.02 * weights_GB)1.3 GBCovers compute buffers, activations, and scratchpad tensors
Usable Hardware MemoryGPU: VRAM - 0.5 GB | Mac: 66% (<=36 GB) or 75% (>36 GB)36.0 GB usable on 48 GB MacBook Pro M4 MaxLeaves headroom for display server and OS kernel

How this is calculated

Frequently asked questions

Can I run a 70B model on a 24 GB GPU?

Not fully in GPU memory. Llama 3.3 70B at Q4_K_M needs about 43 GB for the weights alone, so plan on two 24 GB cards, a 48 GB card, or a Mac with 64 GB or more of unified memory.

How much memory does context use?

It depends on the model's design. For Llama 3.1 8B, every 1,000 tokens of context takes about 0.13 GB at 16-bit, so a 128K context needs about 17 GB on top of the weights.

How much of a Mac's memory can the GPU use?

By default macOS lets the GPU use roughly two thirds to three quarters of unified memory. You can raise the limit, but leave room for the system and other apps.

Which quantization should I choose?

Q4_K_M is the usual balance of size and quality. Use Q5_K_M or Q6_K if you have room, and Q8_0 when you want to stay close to the original. Quality drops faster below 4 bits.

How do I set the context length in Ollama?

Start the server with OLLAMA_CONTEXT_LENGTH set, for example OLLAMA_CONTEXT_LENGTH=32768 ollama serve, or type /set parameter num_ctx 32768 inside a chat.

Sources and further reading

Related guides

More free AI tools

AI Token Cost and Context Window CalculatorFree calculator: see how full your AI model's context window is, what 1,000 runs cost, and how much prompt caching saves. Runs in your browser.LLM Temperature and Top-P Settings ToolChoose temperature and top-p for your task and copy ready API settings. A simple simulated example shows how each setting changes the model's word choices.SKILL.md Generator for AI Agent SkillsTurn a repeatable task into a SKILL.md file with a name, description, allowed tools, rules and an output schema. Copy or download it free. Runs in your browser.AI Agent Retry Cost CalculatorSee how many tokens an AI agent burns when it keeps retrying a failing step, and how much a two-strike stop rule saves. Free, runs in your browser.AI Writing Cliché CheckerPaste a draft to flag overused AI words like delve, tapestry and seamless, plus dash breaks and long sentences. Free, private, runs in your browser.Multi-Agent Task Queue PlannerPlan how long a queue of AI agent jobs takes across parallel workers and get a lock-safe dispatch schedule. Free, runs in your browser.OCR and Copy-Paste Text CleanerClean scanned or copy-pasted text: fix letter O and zero mix-ups in numbers, l and 1, curly quotes, hidden zero-width characters and extra spaces. Free and private.GEO Answer Capsule Checker for AI SearchCheck the short answer at the top of your page against a simple checklist for AI search: length, a named topic, a source link and question headings. Free.Book and Digital Product Profit CalculatorWork out profit per sale and per month for a book, ebook, workbook or digital product after store fees, printing, payment processing, royalties and a tax set-aside.