How to Run an LLM Locally in 2026 (Windows, Mac & Linux)
Running an AI model on your own computer is no longer something reserved for researchers with expensive graphics cards. You can download a language model, disconnect from the internet and continue chatting with it, provided the model and software are already installed.
The difficult part is choosing the right model. A laptop with 8GB of RAM cannot handle the same workload as a desktop with 64GB of RAM and a dedicated GPU. Even two computers with similar specifications can deliver very different results.
This guide explains how to run an LLM locally on Windows, macOS and Linux, which software to choose, how much memory you need, and what to do when a model runs slowly or fails to load.
Quick recommendation: Start with LM Studio if you prefer a graphical interface. Choose Ollama if you want a lightweight runtime that can connect to other applications. Both are good starting points for local AI.
Why Run an LLM Locally?
Cloud AI services are convenient, but they require an internet connection and send prompts to an external service. Local models offer another way to work with artificial intelligence.
1. Better control over your data
When a model runs entirely on your computer, prompts and documents can remain on that machine. This is useful when working with private notes, internal documents, source code or sensitive business information.
There is an important distinction: local inference does not automatically make every part of an application private. Web searches, external plugins, telemetry and cloud-connected features may still transmit information. Check the software’s settings and network behaviour before using confidential data.
2. No per-token API bill
Once you have downloaded a model, you generally do not pay a provider for each question or generated token. You still pay for electricity, hardware, storage and possibly software services.
3. Work without an internet connection
A downloaded model can generate responses offline. This makes local AI useful when travelling, working in locations with poor connectivity or operating in environments where internet access is restricted.
4. Experiment without API limits
You can test prompts, change model settings, experiment with different models and build applications without managing an external API account. The practical limit becomes your computer’s available resources.
When should you NOT run an LLM locally?
Local AI is not automatically better than cloud AI.
- You need the strongest available reasoning models.
- Your computer has limited RAM and storage.
- You need fast responses from large models.
- You do not want to troubleshoot drivers, memory or software.
- You need reliable access to current internet information.
For these situations, a cloud service may offer better value. A sensible approach is to use local models for routine tasks and cloud models for difficult work.
What Hardware Do You Actually Need to Run an LLM Locally?
Before installing anything, check your RAM, GPU memory and available storage. These specifications determine which models you can run and how comfortably they will operate.
Local LLM hardware requirements by computer type
| Hardware | Practical starting point | Expected experience |
|---|---|---|
| 8GB RAM, CPU only | Small 1B–3B models | Basic chat; memory constrained |
| 16GB RAM | Small models; selected 7B–8B quantized models | Useful general-purpose local AI |
| 32GB RAM | 7B–14B quantized models | More comfortable experimentation |
| 64GB RAM | Larger quantized models, depending on architecture | More flexibility |
| 8–12GB VRAM | Selected 7B–8B models | Good GPU acceleration |
| 24GB VRAM | Larger quantized models, including some 30B-class models | Powerful local inference |
These are planning ranges, not guaranteed compatibility specifications. Model architecture, quantization, context length, runtime overhead and other applications affect actual memory requirements.
How much RAM does a local LLM need?
Model parameters are often described in billions. A 7B model has approximately seven billion parameters. However, its parameter count alone does not tell you how much memory the computer needs.
Quantization reduces the number of bits used to represent model weights. A Q4 model uses approximately four bits per weight, although actual file sizes vary because of metadata, mixed-precision layers and the quantization format.
A useful rough estimate for ordinary four-bit model weights is:
Weight memory in GB ≈ parameter count × 0.5 to 0.7
This is only a first estimate. You must also reserve memory for the operating system, runtime, context cache and other applications.
What is quantization?
Think of quantization as compressing a model’s numerical weights. Instead of storing every weight at a higher precision, the software stores them using fewer bits.
This makes models smaller and easier to run, although aggressive quantization can reduce accuracy. For many everyday applications, a good four-bit model offers a useful balance between memory consumption and output quality.
Does a local LLM need a dedicated GPU?
No. Many local language models can run on a CPU. However, CPU inference is often slower, particularly with larger models.
A dedicated GPU can accelerate inference when the runtime supports it and the model layers fit in available VRAM. Some systems also distribute model processing between RAM and VRAM.
For beginners, having 16GB or more of system RAM is generally a better starting point than buying an expensive graphics card immediately.
Choose Your Local LLM Software
There are several ways to run a language model locally. The right choice depends less on which application has the longest feature list and more on how you intend to use AI.
Which local LLM software should you choose?
| Your requirement | Recommended software | Reason |
|---|---|---|
| No terminal commands | LM Studio | Graphical model discovery and chat |
| Command-line user | Ollama | Simple commands and local API |
| Maximum control | llama.cpp | Detailed inference configuration |
| Browser-based chat interface | Ollama + Open WebUI | Self-hosted web interface |
| IDE integration | Ollama + Continue | Local model integration with coding workflows |
Ollama vs LM Studio
Ollama is a model runner designed for straightforward local inference and application integration. It provides a command-line interface and an HTTP API, making it particularly useful for developers.
LM Studio provides a graphical application for discovering, downloading and running compatible local models. Its interface is more comfortable for people who prefer not to work in a terminal.
| Feature | Ollama | LM Studio |
|---|---|---|
| Graphical interface | Separate interface or integrations | Built in |
| Command line | Yes | Not required for ordinary use |
| Local API | Yes | Yes |
| Model formats | Ollama-supported models | Multiple supported formats |
| Best for | Developers and automation | Beginners and graphical workflows |
Both are useful. There is no need to install every local AI application at once. Start with one, learn how it works and add other tools when you have a reason.
How to Run an LLM Locally on Mac
Apple Silicon Macs are attractive for local AI because their unified memory architecture allows the CPU and GPU to access the same memory pool. The amount of memory available still determines which models you can comfortably run.
Method 1: Install Ollama on macOS
- Visit the official Ollama download page.
- Download the macOS application.
- Install and open Ollama.
- Open Terminal.
- Download a suitable model.
For a small starting model, use a compatible model tag such as:
ollama run qwen2.5:3bThe first run downloads the model. Subsequent runs use the downloaded copy.
When the model finishes loading, enter a prompt:
Explain how a computer processor works in simple English.You should receive a response directly from your local model.
Method 2: Install LM Studio on Mac
- Visit the LM Studio website.
- Download the macOS version compatible with your computer.
- Install and open the application.
- Search its model catalogue for a small instruct model.
- Choose a compatible quantized version.
- Download the model and load it into the chat interface.
- Enter your first prompt.
LM Studio is a sensible option if you want to experiment with different models without learning command-line operations.
Can you run an LLM on a MacBook Air?
Yes. Apple Silicon MacBook Air models can run compatible local models. A machine with 16GB unified memory is a more comfortable starting point than an 8GB model.
Remember that a MacBook Air uses passive cooling. Sustained heavy inference can cause thermal throttling, reducing performance during long sessions.
How to Run an LLM Locally on Windows
Windows users can run local models using either Ollama or LM Studio. You do not need Windows Subsystem for Linux for the standard Ollama Windows installation.
Method 1: Install Ollama on Windows
- Open Ollama’s official download page.
- Select Windows.
- Download the installer.
- Run the installer and follow the instructions.
- Open PowerShell or Command Prompt.
To run a small model, enter:
ollama run qwen2.5:3bOllama downloads the required model if it is not already available locally.
Try this prompt:
Write a Python program that calculates the average of five numbers. Explain each line.To see which models are installed:
ollama listTo check whether the Ollama service is responding, use:
ollama --versionMethod 2: Install LM Studio on Windows
- Visit the official LM Studio website.
- Download the Windows installer.
- Install the application.
- Search for a small instruct model compatible with your hardware.
- Download the quantized version.
- Load it and start chatting.
For beginners, this is often the simplest route because model discovery, downloading and chatting are handled through one application.
How to check whether Windows is using your GPU
Open Task Manager and select Performance. Look at the GPU section while generating a response. You can also inspect dedicated GPU memory usage.
For NVIDIA graphics cards, the following command displays GPU utilisation and memory usage:
nvidia-smiIf the GPU is idle while the model is generating text, the model may be running primarily on the CPU, or the runtime may not be configured to use the GPU.
How to Run an LLM Locally on Linux
Linux is particularly useful for developers, home servers and people who want to run local AI applications continuously.
Install Ollama on Linux
Use the official installation instructions from Ollama. The standard installation command is:
curl -fsSL https://ollama.com/install.sh | shReview the installation script and official documentation before running it, particularly on production systems.
After installation, run:
ollama run qwen2.5:3bEnter a prompt and wait for the response.
Check the Ollama service
systemctl status ollamaIf the service is running, you should see its active status.
Check NVIDIA GPU availability
nvidia-smiIf this command reports the graphics card and its memory, the NVIDIA driver is available to the operating system. It does not by itself guarantee that Ollama is using the GPU.
Consult the official llama.cpp documentation if you want more control over model loading, hardware acceleration and inference parameters.
Which Local LLM Should You Download?
Choosing the right model is more important than installing several different model runners. A smaller model that responds quickly can be more useful than a large model that repeatedly runs out of memory.
Recommended models by use case
| Use case | Model family to investigate | Reason |
|---|---|---|
| Small general chat | Qwen 2.5 3B Instruct | Compact starting model |
| General-purpose tasks | Llama 3.1 8B Instruct | Established 8B model family |
| Coding | Qwen Coder family | Code-oriented model variants |
| Multilingual work | Qwen and Gemma families | Compare language coverage for your needs |
| Small and fast | Smaller Qwen or Gemma models | Lower memory requirements |
These are model families to evaluate, not a universal ranking. Check the current model release, licence, quantization, supported context length and actual download size before selecting a specific version.
How to select the correct model size
Start with the memory available to the model rather than the maximum RAM printed on the computer’s specification sheet.
- 8GB RAM: Begin with 1B–3B models and modest context settings.
- 16GB RAM: Try a 3B model first; then evaluate selected 7B–8B quantized models.
- 32GB RAM: Experiment with 7B–14B quantized models.
- 64GB RAM: Explore larger quantized models, checking their actual memory requirements.
Do not assume a model will work simply because its file size is smaller than your computer’s available RAM. Inference requires additional memory.
How to Benchmark a Local LLM on Your Own Computer
Two computers running the same model can produce different results. CPU architecture, memory bandwidth, GPU acceleration, quantization and context length all influence performance.
That is why a benchmark without the exact hardware and software configuration is of limited value.
What should you measure?
| Measurement | What it tells you |
|---|---|
| Model loading time | How long the model takes to become ready |
| Prompt processing speed | How quickly the model processes input tokens |
| Generation speed | Generated tokens per second |
| Peak RAM usage | System memory required during inference |
| Peak VRAM usage | GPU memory consumed |
Run a repeatable test with Ollama
First, download a model:
ollama pull qwen2.5:3bRun a controlled test:
ollama run qwen2.5:3bUse the same prompt for each model, such as:
Explain the difference between RAM and storage in 200 words. Include three practical examples.Record the generation speed shown by the runtime, if available, and monitor memory consumption through your operating system. Repeat the test several times because initial model loading and subsequent generation have different costs.
Benchmark reporting template
| Test item | Result |
|---|---|
| Computer and processor | Record actual hardware |
| RAM and GPU | Record actual specifications |
| Model and quantization | Record exact model file or tag |
| Load time | Measure in seconds |
| Generation speed | Measure in tokens/second |
| Peak memory | Record RAM and VRAM |
| Quality observation | Record strengths and failures |
Editorial note: No first-hand hardware benchmarks are claimed in this article. Populate this table with measured results before presenting it as a comparative benchmark. This avoids misleading readers with figures taken from unrelated machines.
Make Your Local LLM Actually Useful
A local model becomes considerably more valuable when you connect it to other software. A chat window is only the beginning.
1. Connect Ollama to a Python application
Ollama provides a local HTTP API. The following Python example sends a question to the locally running model.
import requests
url = "http://localhost:11434/api/generate"
data = {
"model": "qwen2.5:3b",
"prompt": "Explain artificial intelligence in simple English.",
"stream": False
}
response = requests.post(url, json=data)
response.raise_for_status()
print(response.json()["response"])Install the required Python package if necessary:
pip install requestsStart Ollama before running the Python program. The API address is local to your computer.
2. Use a local LLM for coding
Local models can assist with code explanations, simple functions, debugging suggestions and documentation. Coding extensions such as Continue can connect supported local model providers to a development environment.
Do not expect a small model to replace a strong cloud coding assistant. Test it on your own programming tasks and check every generated change.
3. Create a browser-based AI interface
Open WebUI can provide a browser-based interface for supported local model backends, including Ollama.
This is useful if several people need a familiar chat interface on a private network. Configure authentication and network access carefully. A local service should not be exposed publicly without appropriate security controls.
4. Ask questions about your own documents
A local language model can be combined with retrieval-augmented generation (RAG) to answer questions about PDF files, technical manuals and internal documents.
RAG retrieves relevant passages from your documents and supplies them to the model as context. The model then generates an answer using those passages.
This is particularly useful when you want to search a collection of documents without sending the entire collection to an external AI provider. Retrieval quality, document parsing and source verification still matter.
Local LLM Troubleshooting: Common Problems and Fixes
Why does my local LLM fail to load?
The most common cause is insufficient available memory. The model’s weights, context cache and runtime overhead may exceed what your computer can provide.
- Choose a smaller model.
- Use a more memory-efficient quantization.
- Close unnecessary applications.
- Reduce the context length.
- Check available RAM and VRAM.
Why is my local LLM painfully slow?
A model may be running on the CPU instead of the GPU, or it may be too large for the available hardware.
Check GPU activity, reduce model size and try a shorter context. Also remember that prompt processing and text generation have different performance characteristics.
Why is Ollama not recognised on Windows?
If Windows displays an error that Ollama is not recognised, first confirm that installation completed successfully.
Close and reopen PowerShell or Command Prompt so the updated environment variables can be loaded. If the error remains, check whether the Ollama installation directory is available in the PATH environment variable.
Restarting the terminal is often enough after installation.
Why does my local model give poor answers?
Not every model is designed for the same tasks. A small base model may not follow instructions as well as an instruction-tuned model.
- Choose an instruct or chat model.
- Use the correct model-specific chat template.
- Provide a clear prompt.
- Check the model’s language and task capabilities.
- Adjust temperature where supported.
Lower temperature generally makes responses more predictable, but it does not fix an unsuitable model.
Why is my NVIDIA GPU not detected?
Start by checking whether the operating system can see the GPU.
nvidia-smiIf the command fails, investigate the NVIDIA driver installation first. Then check the runtime’s GPU support and compatibility with the installed driver.
Do not assume that installing a GPU driver automatically guarantees that every model runner will use the graphics card.
Why does a model stop responding during long conversations?
Long conversations consume context memory. If the conversation exceeds the model’s available context window, the application may truncate older messages or encounter memory pressure.
Start a fresh conversation, reduce the context setting or use a model and configuration that support a larger context window.
Frequently Asked Questions About Running an LLM Locally
Can I run an LLM on my laptop?
Yes. Many laptops can run smaller language models locally, including computers without dedicated GPUs. Start with a small quantized model and check available RAM before attempting larger models.
How much RAM do I need to run an LLM locally?
8GB RAM can handle some small models, while 16GB provides a more practical starting point for everyday local AI. Larger models and longer contexts require more memory. The exact requirement depends on model architecture, quantization and runtime settings.
Is it free to run an LLM locally?
Many local model runners and downloadable model weights are available without a purchase price. However, electricity, computer hardware, storage and some software services can involve costs. Always check the licence of the particular model you download.
Which local LLM is best for coding?
Qwen Coder models are one family worth evaluating for local coding tasks. The best choice depends on model size, quantization, available memory and programming language. Compare models using the same real coding problems rather than relying only on general benchmark rankings.
Does running an LLM locally use a lot of electricity?
Power consumption depends on the processor, GPU, model size and workload. A laptop running a small model will generally consume less power than a desktop with a powerful graphics card. Measure the actual computer’s power consumption if electricity cost is important.
Is a local LLM as good as ChatGPT?
Not necessarily. Small local models are useful for routine questions, coding assistance and private document work, but they generally have less reasoning capacity than the strongest cloud models. Larger local models can perform well on selected tasks, provided the hardware can run them efficiently.
Final Recommendation: Start Small and Test Your Computer
You do not need an expensive graphics card to experiment with local AI. A modest computer can run a small language model and teach you how inference, quantization and model integration work.
My recommendation is straightforward: install Ollama if you want to learn how local AI applications work, or choose LM Studio if you prefer a graphical interface. Start with a small instruct model, test it on tasks you actually perform and upgrade only when you reach a genuine hardware limitation.
Do not download a 30B model simply because somebody says it is better. A model that runs comfortably and produces useful answers is more valuable than one that overwhelms your computer.
Useful official resources
- Ollama – Local model runner
- LM Studio – Desktop local AI application
- llama.cpp – Local inference engine
- Hugging Face – Model catalogue
- Open WebUI – Self-hosted AI interface
- Continue – AI coding assistant
Article update record
- 13 November 2026 – Initial publication and technical review.
Model availability, software requirements and installation commands can change. Check the official documentation before installing or upgrading.







