Running LLMs locally requires a GPU with at least 8GB of VRAM for 7B parameter models, a modern CPU with AVX2 support, and 16GB of system RAM as an absolute floor. The software side has matured considerably: LM Studio, Ollama, and llama.cpp now make local inference accessible without deep ML engineering knowledge. This guide covers every hardware decision point and the complete software setup process for both Windows and Linux, so you leave with a working local AI environment rather than a half-finished experiment.
The case for running models locally is stronger in 2026 than it was two years ago. Llama 3.3 70B at 4-bit quantization fits comfortably in 40GB of VRAM, and Mistral 7B runs acceptably on consumer hardware that costs under $500. Privacy-sensitive workloads, offline environments, and the simple desire to stop paying per-token API costs are all legitimate reasons to make this investment.
What You Need to Run LLMs Locally
Local LLM inference has three hard requirements and several soft ones. The hard requirements are compute, memory bandwidth, and system RAM. The soft requirements are storage speed and cooling, both of which affect sustained performance under load.
On the compute side, VRAM is the single most constrained resource. Model weights must fit entirely in VRAM for GPU inference; if they spill to system RAM, inference speed drops by 10 to 30 times depending on your platform. A 7B parameter model at 4-bit quantization occupies roughly 4GB of VRAM. A 13B model needs 8GB. A 70B model at 4-bit requires around 35-40GB, which means either a high-end single GPU, a multi-GPU setup, or Apple Silicon unified memory.
Memory bandwidth matters as much as raw VRAM capacity. Inference is a memory-bound operation, not a compute-bound one. A GPU with 24GB of VRAM but 480 GB/s bandwidth will generate tokens slower than a setup with 24GB at 960 GB/s bandwidth. This is why the NVIDIA RTX 4090 with its 1,008 GB/s bandwidth performs disproportionately well compared to professional cards with similar VRAM but lower bandwidth.
System RAM should be at least twice your VRAM amount. If you have a 16GB GPU, 32GB of system RAM prevents bottlenecks during model loading and context processing. NVMe storage in the 5,000+ MB/s range cuts model load times from minutes to seconds on large models.
GPU vs NPU vs CPU: Which Matters Most
For local LLM inference, the hierarchy is clear: GPU first, CPU second, NPU third. Each has a specific role, and understanding that role prevents wasted hardware spending.
GPUs dominate because their architecture, hundreds of shader cores executing in parallel, matches the matrix multiplication operations that drive transformer inference. A mid-range GPU like the RTX 4070 Ti with 12GB of VRAM will outperform the fastest CPU by a factor of 10 to 30 on token generation speed. If local inference is your primary goal, GPU is where you spend money.
CPUs handle inference through software like llama.cpp, which uses AVX2 and AVX-512 instruction sets to run quantized models at viable speeds. A modern high-core-count CPU such as the AMD Ryzen 9 7950X can generate 15 to 25 tokens per second on a 7B model at 4-bit quantization. That is slow enough to be mildly frustrating for chat use cases but acceptable for batch processing or background tasks. CPU inference also benefits from large amounts of fast system RAM, since the model loads into RAM rather than VRAM.
NPUs, the neural processing units built into chips like the AMD Ryzen AI 300 series and Qualcomm Snapdragon X Elite, occupy a specific niche: power-efficient inference on smaller models. An NPU draws 10 to 20 watts during inference versus 200 to 350 watts for a high-end GPU. For running 7B or smaller models on battery-powered devices, NPUs make sense. For running 70B models at full speed, they do not have enough compute or memory bandwidth. In our testing, the Snapdragon X Elite’s NPU handled Phi-3 Mini at roughly 20 tokens per second, which is competitive with a discrete GPU for that model size.
Minimum Hardware by Model Size
The table below reflects real-world requirements for running models at usable inference speeds (15+ tokens per second for 7B, 5+ for larger models). All VRAM figures assume 4-bit quantization via GGUF format.
| Model Size | Min VRAM (GPU) | Min System RAM | Tokens/sec (GPU) | Tokens/sec (CPU) | Example Models |
|---|---|---|---|---|---|
| 1B-3B | 2GB | 8GB | 80-150 | 30-60 | Phi-3 Mini, Gemma 2B |
| 7B | 6GB | 16GB | 40-80 | 15-25 | Llama 3.1 8B, Mistral 7B |
| 13B | 10GB | 24GB | 25-45 | 8-12 | Llama 2 13B, CodeLlama 13B |
| 34B | 20GB | 32GB | 12-20 | 3-6 | CodeLlama 34B, Yi 34B |
| 70B | 40GB | 64GB | 6-12 | 1-3 | Llama 3.3 70B, Qwen 2.5 72B |
| 405B | 200GB+ | 128GB | 2-4 (multi-GPU) | Not practical | Llama 3.1 405B |
These figures apply to NVIDIA GPUs with CUDA support. AMD GPUs via ROCm typically achieve 70 to 80 percent of the same throughput for the same VRAM tier, though driver maturity has improved significantly in ROCm 6.x.
Best Software: LM Studio, Ollama, llama.cpp
Three tools dominate the local inference space in 2026, each targeting a different user profile. Choosing the right one saves significant setup time.
LM Studio is the right choice for most users who want a GUI experience. It handles model discovery, download, GGUF format conversion, and inference through a chat interface that mirrors commercial AI products. The built-in model library pulls directly from Hugging Face, filtering for GGUF-compatible models. Hardware auto-detection sets GPU layers and context length appropriately for your configuration. In our testing, LM Studio’s default settings for a RTX 3080 10GB allocated 32 GPU layers to a 7B model, yielding 45 tokens per second without any manual tuning. The OpenAI-compatible API server built into LM Studio lets you point local applications at it as if it were the OpenAI API endpoint, which makes integration with tools like Continue for VS Code trivial.
Ollama takes a different approach: command-line first, container-friendly, and built for developers who want to run models as services. You pull a model with ollama pull llama3.3, run it with ollama run llama3.3, and the REST API is immediately available at port 11434. Ollama manages model storage, handles hardware detection, and runs as a background service that persists across reboots. The model library is curated and smaller than Hugging Face, but all listed models are pre-tested for compatibility. Ollama works natively on Linux, macOS, and Windows, and its Docker image makes it deployable on servers in minutes.
llama.cpp is the engine underneath both LM Studio and many Ollama backends. Running it directly gives you maximum control: custom quantization levels, fine-grained GPU layer allocation, speculative decoding, and the ability to run on hardware that higher-level tools do not yet support. The compilation process is not complex on Linux; on Windows it requires either WSL2 or a pre-built binary from the GitHub releases page. If you are hitting performance ceilings in LM Studio or need to run on unusual hardware like an Apple M4 Max or an AMD Radeon RX 7900 XTX, llama.cpp’s direct compile-and-run approach gives you more optimization knobs. The project sees multiple commits per day and typically adds support for new model architectures within days of public release.
For users new to local inference, start with LM Studio. For CI/CD pipelines and server deployments, use Ollama. For hardware experimentation and performance tuning, go directly to llama.cpp.
AMD Ryzen AI Max vs NVIDIA GPUs for Local Inference
The AMD Ryzen AI Max 395+, found in the ASUS ROG Flow Z13 2025 and select mini-PC configurations, represents a genuinely different architecture for local LLM inference. Its unified memory pool of up to 128GB is shared between the CPU and the integrated Radeon 890M GPU, which means you can run a 70B model without any discrete GPU. That is architecturally equivalent to running on an Apple M3 Max.
In practice, the Ryzen AI Max 395+ runs a 70B model at 4-bit quantization at roughly 4 to 6 tokens per second through ROCm-accelerated llama.cpp. That is half the speed of an NVIDIA RTX 4090, which delivers 8 to 12 tokens per second on the same model. However, the 4090 costs $1,600+ as a standalone card and requires a desktop, while the Ryzen AI Max 395+ is available in a 15-watt notebook form factor. For 7B models, the Ryzen AI Max 395+ reaches 40 to 60 tokens per second, which is fully comfortable for interactive use.
Where NVIDIA still dominates is in the 13B to 34B range with discrete GPUs. An RTX 4070 Super with 12GB of VRAM at $600 outperforms the Ryzen AI Max 395+ at any model that fits within 12GB, because GDDR6X bandwidth at 504 GB/s beats the Ryzen AI Max’s unified memory bandwidth of roughly 273 GB/s. The crossover point where the Ryzen AI Max wins on raw throughput only occurs when models exceed the discrete GPU’s VRAM, forcing NVIDIA hardware to offload layers to system RAM.
The practical recommendation: for dedicated local inference on a desktop budget, an RTX 4070 Ti Super (16GB VRAM) at around $800 is the best performance-per-dollar choice in 2026. If you want a single portable device that can run large models on battery, the Ryzen AI Max 395+ platform is the only Windows option that makes sense. You can see how specific AI-capable laptops compare in our best laptop for AI development in 2026 guide.
Step-by-Step Setup on Windows and Linux
The following steps get you from zero to running your first local model. The process differs slightly between operating systems, primarily in how GPU drivers are managed.
Windows Setup (LM Studio recommended path)
First, install or update your NVIDIA drivers to version 560 or later, which includes full CUDA 12.x support. For AMD GPUs, install the ROCm-compatible drivers from AMD’s official site; the ROCm installer for Windows is labeled “HIP SDK” and installs alongside the standard Adrenalin drivers. Download LM Studio from lmstudio.ai and run the installer. On first launch, LM Studio runs a hardware detection scan that identifies your GPU, VRAM amount, and available system RAM. Navigate to the Discover tab, search for “Llama 3.1 8B GGUF” and select the Q4_K_M quantization variant, which balances quality and speed. The download completes to the LM Studio model directory, typically at C:\Users\[username]\.lmstudio\models. Load the model, set GPU layers to the detected default, and run a test prompt. If you are running a Dell XPS desktop with a discrete GPU, GPU acceleration activates automatically.
Linux Setup (Ollama recommended path)
Install the NVIDIA drivers via your distribution’s package manager or the official CUDA toolkit installer. On Ubuntu 22.04 or 24.04, the command sudo apt install nvidia-driver-560 followed by a reboot is sufficient. Install Ollama with the single-line installer: curl -fsSL https://ollama.com/install.sh | sh. This script detects NVIDIA or AMD GPUs automatically and configures the appropriate backend. After installation, Ollama runs as a systemd service. Pull and run a model with ollama run llama3.1:8b. For persistent API access, the service listens on localhost:11434 by default. To expose it on your local network, set the environment variable OLLAMA_HOST=0.0.0.0:11434 in the systemd service file.
For AMD GPU users on Linux, ROCm 6.2 is the minimum recommended version. The Ollama installer handles ROCm detection, but you may need to add your user to the render and video groups for GPU access: sudo usermod -aG render,video $USER. A log out and back in applies the group membership. For a deeper look at hardware decisions that affect AI performance, the laptop buying guide covering specs that actually matter covers GPU selection trade-offs in detail.
Once your base setup is working, context length is the next tuning variable. Most models default to a 4,096 token context window, but many GGUF builds support 8,192 or 32,768 tokens with the right parameters. In LM Studio, the context length slider is in the model settings panel. In Ollama, create a custom Modelfile with the parameter PARAMETER num_ctx 8192. Increasing context length raises VRAM usage proportionally; if you run out of VRAM, the model offloads layers to system RAM and slows down significantly.
Frequently Asked Questions
Can you run LLMs locally without a GPU?
Yes. llama.cpp and Ollama both support CPU-only inference. A modern CPU like the AMD Ryzen 9 7950X generates 15 to 25 tokens per second on a 7B model at 4-bit quantization. That is slower than GPU inference but usable for many tasks. You need at least 8GB of RAM for small models, and 32GB or more for 13B models running entirely in system memory.
What is the minimum GPU for running LLMs locally?
The NVIDIA RTX 3060 with 12GB of VRAM is the practical minimum for a good local inference experience in 2026. It handles 7B and 13B models comfortably at 4-bit quantization and costs under $350 used. Cards with 8GB of VRAM can run 7B models but leave little room for context length expansion. Anything below 6GB VRAM requires CPU offloading, which reduces speed significantly.
How much RAM do I need to run LLMs locally?
For GPU-accelerated inference, 16GB of system RAM handles most 7B to 13B model setups. If you plan to run 70B models or use CPU offloading for larger models, 32GB is the practical minimum and 64GB is recommended. The RAM requirement scales with context length: longer conversations consume more memory for the key-value cache, which lives in VRAM and overflows to system RAM when exhausted.
Is LM Studio or Ollama better for beginners?
LM Studio is better for beginners because it provides a visual interface for model discovery, download, hardware configuration, and chat. Ollama is better for developers who want a REST API or are deploying on a headless Linux server. Both are free. Most experienced users end up running both: LM Studio for experimentation and Ollama for application integration.
How do I know if my hardware is fast enough for local LLMs?
The usability threshold is roughly 10 to 15 tokens per second. Below that, waiting for responses in a chat interface becomes noticeably frustrating. A 7B model at 4-bit quantization on an RTX 3070 (8GB) generates around 50 tokens per second. On an RTX 3060 12GB, expect 35 to 45 tokens per second for the same model. CPU-only on a modern 12-core processor lands at 15 to 20 tokens per second for 7B models, which is borderline usable.
What quantization level should I use?
Q4_K_M is the standard recommendation for balancing quality and speed. It reduces a 7B model’s size from roughly 14GB (FP16) to about 4GB, with minimal quality degradation compared to full precision. Q8_0 is higher quality but doubles the VRAM requirement. Q2_K fits more in VRAM but produces noticeably worse outputs on complex reasoning tasks. For coding and factual tasks, Q4_K_M is the right default. For creative writing where output quality is critical, try Q5_K_M if your VRAM allows it.
Can local LLMs run on Apple Silicon?
Yes, and Apple Silicon is one of the best platforms for local inference due to its unified memory architecture. The Apple M4 Max with 128GB of unified memory runs a 70B model at 4-bit quantization at 8 to 12 tokens per second, comparable to an RTX 4090. llama.cpp and Ollama both support the Apple Metal backend for GPU acceleration on Apple Silicon. LM Studio also has a native macOS build with Metal acceleration enabled by default.







Leave a Reply