Running large language models on your own hardware gives you three things cloud APIs cannot: total privacy, zero recurring cost, and no rate limits. In 2026, local LLMs have reached a quality threshold where 7B-70B parameter models handle most coding, writing, and reasoning tasks competently.
This guide covers the 5 best tools for running LLMs locally, walks through a complete Ollama setup, recommends models by use case, and specifies the hardware you need.
| Tool | Interface | OS Support | GPU Required | Best For |
|---|---|---|---|---|
| Ollama | CLI + API | macOS, Linux, Windows | No (CPU ok) | Developers, API integration |
| LM Studio | Desktop GUI | macOS, Linux, Windows | No (CPU ok) | Non-technical users |
| llama.cpp | CLI | All (compile) | No (CPU ok) | Maximum performance tuning |
| GPT4All | Desktop GUI | macOS, Linux, Windows | No (CPU ok) | Offline chat |
| Jan | Desktop GUI | macOS, Linux, Windows | No (CPU ok) | ChatGPT-like UI locally |
Ollama is the most popular tool for running LLMs locally. It wraps llama.cpp in a Docker-like experience: pull a model with one command, run it immediately. It exposes an OpenAI-compatible API, making it a drop-in replacement for cloud APIs in your applications.
Install Ollama:
# macOS / Linux
curl -fsSL https://ollama.com/install.sh | sh
# Windows — download from ollama.com
# Verify installation
ollama --version
Pull and run your first model:
# Pull Llama 3.3 (8B parameters, ~4.7GB)
ollama pull llama3.3
# Start a chat session
ollama run llama3.3
# Pull a coding-focused model
ollama pull deepseek-coder-v3:6.7b
# Pull a small, fast model
ollama pull phi-4-mini
Use the API in your applications:
# Ollama exposes an OpenAI-compatible API
curl http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "llama3.3",
"messages": [
{"role": "user", "content": "Explain reentrancy in Solidity"}
]
}'
Manage your models:
# List downloaded models
ollama list
# Show model details
ollama show llama3.3
# Remove a model
ollama rm phi-4-mini
# Copy and customize a model
ollama cp llama3.3 my-custom-model
LM Studio provides a polished desktop application for downloading, configuring, and chatting with local models. If you want the ChatGPT experience without sending data to the cloud, LM Studio is the easiest path.
The built-in model browser lets you search Hugging Face directly, filter by size and quantization, and download with one click. The chat interface supports multiple conversations, system prompts, and parameter tuning.
LM Studio also exposes a local API server compatible with the OpenAI SDK, so you can switch between LM Studio and Ollama depending on preference.
llama.cpp is the C/C++ inference engine that powers both Ollama and LM Studio under the hood. Running it directly gives you maximum control over quantization, memory mapping, batch sizes, and threading.
# Build from source
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make -j$(nproc)
# Run a GGUF model
./llama-cli -m models/llama-3.3-8b-q4_k_m.gguf \
-p "Explain smart contract reentrancy" \
-n 512 -t 8
Use llama.cpp directly when you need to squeeze every token/second out of your hardware, run custom quantizations, or integrate into C/C++ applications.
GPT4All emphasizes working completely offline. The application bundles everything needed — no internet connection required after initial model download. It is designed for users in air-gapped environments or those who want guaranteed privacy.
GPT4All includes a local document indexing feature that lets you chat with your files (PDFs, text, code). It builds a local vector database and uses RAG to answer questions about your documents.
Jan is an open-source desktop app that replicates the ChatGPT interface while running models locally. It supports both local models (via llama.cpp) and remote APIs (OpenAI, Anthropic) in the same interface, letting you switch between them per conversation.
Jan's extension system allows community plugins for features like image generation, voice chat, and tool use. The UI is clean and familiar to anyone who has used ChatGPT.
| Model | Size | RAM Needed | Notes |
|---|---|---|---|
| DeepSeek Coder V3 6.7B | 4GB | 8GB | Best small coding model |
| CodeLlama 34B | 20GB | 24GB | Strong multi-language support |
| DeepSeek Coder V3 33B | 20GB | 24GB | Closest to cloud quality |
| Qwen2.5-Coder 7B | 4.5GB | 8GB | Fast, good at completions |
| Model | Size | RAM Needed | Notes |
|---|---|---|---|
| Llama 3.3 8B | 4.7GB | 8GB | Best balance of quality and speed |
| Llama 3.3 70B | 40GB | 48GB | Near cloud-level reasoning |
| Mistral 7B | 4.1GB | 8GB | Fast, good for quick tasks |
| Phi-4-mini 3.8B | 2.2GB | 4GB | Surprisingly capable for size |
| Model | Size | RAM Needed | Notes |
|---|---|---|---|
| Qwen2.5 72B | 42GB | 48GB | Top local reasoning model |
| Llama 3.3 70B | 40GB | 48GB | Strong general reasoning |
| DeepSeek-R1 8B (distilled) | 4.9GB | 8GB | Chain-of-thought reasoning |
| Gemma 2 27B | 16GB | 20GB | Good mid-range option |
Once you have Ollama running, you can build applications that use AI without any API costs or data privacy concerns. The OpenAI-compatible API means existing libraries and frameworks work without modification.
A real-world example: spectr-ai is an open-source smart contract audit engine that uses Ollama to run security analysis locally. Your contract code never leaves your machine, and there is no per-query cost. It demonstrates the power of local LLMs for domain-specific applications.
# Example: Using Ollama with Python
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:11434/v1",
api_key="ollama" # Ollama doesn't need a real key
)
response = client.chat.completions.create(
model="llama3.3",
messages=[
{"role": "system", "content": "You are a Solidity expert."},
{"role": "user", "content": "Review this contract for vulnerabilities..."}
]
)
print(response.choices[0].message.content)
ollama run llama3.3 --num-ctx 8192spectr-ai uses Ollama to audit Solidity contracts locally. No API keys, no data leaving your machine, no per-query cost. Open source.
Try spectr-ai with Ollama ->