How to Pick a Local AI Model for Your GPU or Mac
In this article
Running a large language model (LLM) locally on your own PC or Mac gives you privacy, offline access, and no usage limits. The key is matching the model's size and requirements to your hardware's memory and compute. This guide walks you through the exact steps to choose a model that runs smoothly on your system, whether you have an NVIDIA GPU, an AMD card, or an Apple Silicon Mac.
What You'll Need
- Your computer's GPU model and VRAM (for PCs) or unified memory (for Macs). On Windows, open Task Manager > Performance > GPU; on Mac, click the Apple menu > About This Mac.
- An idea of your available storage space (models range from 1 GB to over 100 GB).
- A model runner app (e.g., Ollama, LM Studio, llama.cpp) – these are free and open-source.
Step-by-Step
- Check your VRAM or unified memory. This is the single most important factor. For a PC, note the VRAM on your graphics card (e.g., 8 GB, 12 GB, 24 GB). For a Mac, note the total unified memory (e.g., 16 GB, 32 GB, 64 GB) – the GPU shares this with the system, so you can't use all of it for the model.
- Estimate the model size you can fit. A rule of thumb: a model with 7 billion parameters (7B) quantized to 4-bit takes about 4 GB of memory. A 13B model takes about 8 GB, and a 70B model takes about 40 GB. You need enough memory for the model plus a small overhead for context (the text you input). For a Mac, subtract about 4–6 GB for the OS and other apps.
- Decide what you want the model to do. If you need general chat, coding help, or creative writing, a 7B or 13B model is usually enough. For complex reasoning or specialized tasks, you might need a 30B or 70B model, but only if your hardware can handle it.
- Choose a model family. Popular families include Llama 3, Mistral, and Phi. Llama 3 and Mistral are well-rounded; Phi is small but surprisingly capable for its size. For coding, try CodeLlama or DeepSeek Coder. For Macs, Apple's own models (like Apple Foundation Models) are optimized for Metal, but they are not widely available yet – stick with the open-source ones.
- Pick a quantized version. Quantization reduces the model's precision (e.g., from 16-bit to 4-bit) to save memory. Look for files labeled with "Q4_K_M" or "Q5_K_M" – these are good balances of quality and size. Avoid "Q2" or "Q3" unless you're desperate, as quality drops noticeably.
- Download and test. Use a runner like Ollama (run
ollama run llama3to get the 8B version) or LM Studio (browse models in its interface). Start with a smaller model than you think you need, test it, and then scale up if it runs smoothly. - Monitor performance. If the model runs but is slow (more than a few seconds per response), try a smaller model or a more aggressive quant. If it crashes, you likely ran out of memory – reduce the context length or switch to a smaller model.
Common Mistakes
- Buying a GPU based on raw compute instead of VRAM. For LLMs, VRAM is king. A GTX 1060 6GB will run a 7B model, but a RTX 4060 8GB will run it better. Don't get a card with huge compute but only 8GB VRAM if you want 70B models.
- Ignoring the context window. If you set a huge context (e.g., 32k tokens), it eats up memory. Start with 2k or 4k tokens.
- Assuming all models are the same. A 7B model from one family can be much worse than another. Read the model card on Hugging Face or the runner's page for benchmarks.
- Forgetting about the OS overhead on Macs. With 16GB unified memory, you can't run a 13B model that needs 8GB plus the OS – you'll run out and the system will swap to disk, making it painfully slow.
Tips
- Use Ollama's library to see the exact file sizes for each model and quant. The sizes listed are the download size, which is roughly the memory needed.
- On a Mac, make sure you have enough free storage – models are downloaded to your disk, and you need room for the file plus the running copy.
- If you have an AMD GPU on Windows, check if the runner supports ROCm (AMD's compute platform). Many runners now do, but it's less tested than NVIDIA's CUDA.
- For older GPUs with less than 6GB VRAM, stick to 3B or 4B models like Phi-3-mini or Gemma-2-2B.
- If you're unsure, start with a 7B model and a Q4 quant – it's the sweet spot for most people.
Troubleshooting
- Model won't load or crashes immediately: You don't have enough memory. Reduce the context length, choose a smaller model, or use a more aggressive quant (e.g., Q4 instead of Q8).
- Responses are very slow: Your GPU is not being used. Check that the runner is using CUDA (on NVIDIA) or Metal (on Mac). In LM Studio, go to Settings and enable GPU offload. In Ollama, run
ollama psto see if the model is running on GPU. - Output is garbled or nonsensical: The quant might be too aggressive, or the model is too small for your task. Try a higher quant (Q5 or Q6) or a larger model.
- Mac is swapping heavily (beach ball, slow): Close other apps, reduce the context, or use a smaller model. Your unified memory is full.
- AMD GPU not recognized: Update your drivers, and check if the runner supports ROCm. Some runners have separate builds for AMD.
Frequently Asked Questions
How much VRAM do I need for a 7B model?
About 4 GB for a 4-bit quant, 6 GB for a 8-bit quant, and 8 GB for the full 16-bit version. Add a bit extra for context.
Can I run an LLM on a Mac with 8GB RAM?
Yes, but only small models like 3B or 4B. You'll have about 4GB left for the model after the OS. Expect slow performance.
What's the difference between GGUF and other formats?
GGUF is the file format used by llama.cpp and most runners. It's optimized for CPU/GPU inference and supports quantization. Other formats like safetensors are for training, not running.
Is it safe to overclock my GPU to run larger models?
Overclocking can cause instability and may affect your warranty. It won't increase VRAM, so it won't help with memory limits. Stick to stock settings.
Do I need to unplug my PC before installing a GPU?
Yes, always unplug the power cord and ground yourself (touch a metal part of the case) before opening your PC. Never open the power supply.
Can I use a model that's larger than my VRAM?
Yes, but it will partially run on CPU/RAM, which is much slower. It's often better to use a smaller model that fits entirely in VRAM.