How to pick a local LLM for your GPU or Mac
TL;DR. Match the model to your usable GPU VRAM or Mac unified memory first, leaving room for the context window and KV cache. Start with 4-bit quantization (Q4_K_M) at a realistic context length like 16K or 32K, then check estimated token speed before downloading.
How do you pick a local LLM? Start from your hardware's usable memory, not the model's headline benchmark score. A smaller model that stays completely inside GPU memory runs much faster than a larger model that spills onto system RAM or disk. Once you know your memory ceiling, pick the strongest open-weight model that fits with your target context window.
Running a model locally avoids per-token API fees and keeps code or documents on your own machine. The catch is that memory and memory bandwidth set hard limits on what feels usable.
1. Check your real usable memory
On a discrete graphics card, your budget is the card's dedicated VRAM (such as 8 GB, 16 GB, or 24 GB). On an Apple Silicon Mac, the GPU shares unified memory with macOS, so only part of total RAM is available to the model. As a working estimate in TopLLM's local simulator, usable memory is about 67% of total RAM on Macs with 36 GB or less, and about 75% on larger Macs.
Open the local LLM VRAM calculator and select your exact GPU or Mac to see how much memory is actually available before picking a model.
2. Size weights plus KV cache, not weights alone
A model's file size is only part of its memory footprint. Every token in your prompt and reply adds to the KV cache, which grows with your context window (4K, 8K, 16K, 32K, 64K, or 128K tokens).
If a model barely fits at 4K context, raising the context window to 32K for coding or document review can push it over your VRAM limit. Test the context size you actually plan to use rather than the smallest default.
3. Start with 4-bit quantization (Q4_K_M)
Quantization shrinks model weights so larger models fit in less memory with a small quality tradeoff. For most consumer GPUs and Macs, 4-bit (Q4_K_M) is the practical baseline because it cuts memory use sharply while keeping strong reasoning and coding quality.
Higher precision (such as 8-bit) helps only when you have spare memory left over after sizing your context window. Lower bit widths can squeeze a model onto smaller cards, though output quality usually drops faster on coding and math tasks.
| Hardware tier | Example hardware | Typical local role |
|---|---|---|
| 8GB VRAM | RTX 4060, RTX 3070, RX 7600 | Small fast assistants, autocomplete, and light Q&A |
| 16GB VRAM | RTX 4060 Ti 16GB, RTX 4080, RTX 5080 | Mid-sized open models with comfortable 16K to 32K context |
| 24GB VRAM | RTX 3090, RTX 4090, RX 7900 XTX | Stronger coding and reasoning models at Q4_K_M |
| 32GB+ VRAM or high-memory Mac | RTX 5090, dual 24GB GPUs, 64GB+ Macs | Larger open-weight models and longer context windows |
4. Check speed and memory bandwidth
Fitting in memory does not guarantee a fast reply. Token generation speed depends heavily on memory bandwidth, which is why a high-bandwidth card like an RTX 4090 24GB generates tokens much faster than a lower-bandwidth laptop GPU holding the same model.
Compare shortlisted models on the best local LLM picks page and browse the wider best open source LLMs list if you also consider self-hosting on cloud GPUs.
5. Know when a cheap API beats local hardware
Local models shine when privacy, offline access, or predictable hardware cost matters most. When a task needs frontier coding accuracy or very long context that will not fit on your machine, renting an API is often faster and cheaper than upgrading hardware.
Compare your local shortlist against hosted rates on the LLM API pricing table, or check our guide on how to cut LLM API costs if you plan to mix local and hosted models.
What to do next
Pick your exact GPU or Mac in the VRAM simulator, set quantization to Q4_K_M and context to your real prompt length, and shortlist two models that stay comfortably inside usable memory. Run a handful of your own prompts on both before committing to a daily driver.
Frequently asked questions
Why does a model run slowly even when it loads on my computer?
When weights plus KV cache exceed your GPU's VRAM, the runtime offloads layers to system RAM and the CPU. That prevents a crash but drops token speed sharply compared to running fully in VRAM.
How much RAM does a Mac need to run a local LLM?
Because macOS shares unified memory with the GPU, leave headroom for the operating system and your apps. A 16 GB Mac handles small quantized models, while 32 GB to 64 GB Macs give far more room for larger models and longer context.
Is 4-bit quantization good enough for coding?
For most local setups, Q4_K_M gives the best balance of speed, memory fit, and accuracy. A larger model at 4-bit usually outperforms a much smaller model at 8-bit inside the same VRAM budget.