Software Engineering 2026

Local LLMs

Local vs Cloud LLM Decision Matrix

Run models on your own hardware for privacy, offline use, or very high volume. The trade-off is quality: local models trail frontier cloud models, and the gap shows most on hard reasoning and large codebases.

The real reason to go local is data, not cost. Decide which data must never leave your machines. Then measure whether local quality holds up on those tasks. Saved API spend often loses to engineer time spent fixing weaker output.

Open-weight families worth evaluating: DeepSeek, Qwen (including Qwen Coder), Llama, Kimi, MiniMax, Mistral, and OpenAI's gpt-oss.

Inference tools

  • Ollama: simplest CLI and API
  • LM Studio: desktop GUI
  • vLLM: production serving
  • llama.cpp: CPU and Apple Silicon

Local vs cloud

LocalCloud
Data that can't leaveBest quality needed
Very high volumeSporadic usage
OfflineFrontier capabilities
Predictable fixed costComplex reasoning, large codebases

Setting up Ollama

# Install
brew install ollama                             # macOS
curl -fsSL https://ollama.com/install.sh | sh   # Linux

# Start the server
ollama serve

# Pull models
ollama pull qwen2.5-coder       # code
ollama pull deepseek-r1         # reasoning
ollama pull nomic-embed-text    # embeddings for RAG

# Run interactively
ollama run qwen2.5-coder

# OpenAI-compatible API
curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen2.5-coder", "messages": [{"role": "user", "content": "Hello"}]}'

From Python (OpenAI SDK pointed at Ollama):

from openai import OpenAI

client = OpenAI(base_url="http://localhost:11434/v1", api_key="not-needed")
response = client.chat.completions.create(
    model="qwen2.5-coder",
    messages=[{"role": "user", "content": "Explain recursion"}],
)
print(response.choices[0].message.content)

Hardware requirements

Model sizeRAMGPU VRAMQuality
3B4GB4GBSimple tasks
7-8B8GB8GBBalanced
13-14B16GB16GBGood
30-34B32GB24GBHigh
70B64GB48GB+Best local

Apple Silicon: unified memory means RAM is VRAM. Pro chips handle ~14B comfortably, Max ~34B, Ultra 70B.

Model selection guide

Use caseModel familyWhy
Code completionQwen Coder, DeepSeek CoderTrained on code
General chatLlama, MistralGood balance
Long contextKimi, QwenLarge context windows
Embeddingsnomic-embed-textFast, good quality
ReasoningDeepSeek R1Chain-of-thought

Using local LLMs with Claude Code

Route by data sensitivity and difficulty: local models for private or simple work, cloud for everything that needs frontier quality.

def route(prompt: str, sensitive: bool):
    if sensitive:
        # Never leaves the machine
        return ollama.chat.completions.create(model="qwen2.5-coder", messages=[...])
    return anthropic.messages.create(model="claude-sonnet-5", max_tokens=16000, messages=[...])

Own local models like infrastructure: someone patches, upgrades, and monitors them. Never mix local and cloud models in one workflow without knowing exactly which data goes where.

On this page