Start
Local AI flips the model. Your hardware, your weights, your data — no API key, no rate limits, no third party reading your prompts.
Sensitive prompts never leave the device. Crucial for legal, medical, internal, and personal data.
No per-token billing. Once you own the GPU, marginal cost approaches zero.
No network round-trip. Tools and agents respond as fast as your hardware allows.
Airplanes, secure facilities, remote sites. Inference doesn't require connectivity.
Pin a model version forever. No silent upgrades changing behavior overnight.
Fine-tune, quantize, swap samplers, edit chat templates. Frontier APIs expose only a subset of that control.
Before runtimes and quantization, three numbers define what a model is and what it can do.
7B–14B for everyday, 30B–70B for serious work."hello world" is two tokens; "antidisestablishmentarianism" may be six. Pricing, speed, and limits are all in tokens.Models train in 16-bit floats. At inference, you can compress weights to 8, 5, 4, or even 2 bits with minimal quality loss. This is the single biggest unlock for local AI.
| Precision | Bits | Quality | Size (7B) |
|---|---|---|---|
| FP16 | 16 | Reference | ~14 GB |
| Q8_0 | 8 | ~Identical | ~7.5 GB |
| Q5_K_M | 5.5 | Excellent | ~5.0 GB |
| Q4_K_M | 4.5 | Sweet spot | ~4.1 GB |
| Q2_K | 2.5 | Degraded | ~2.7 GB |
A handful of labs ship the models worth knowing. Each family has a personality, a license, and a release cadence.
Qwen3 spans dense 0.6B-32B models plus MoE 30B-A3B and 235B-A22B open weights. Qwen3.6 adds newer coding and agentic releases such as 35B-A3B and 27B Dense. Strong tool use, hybrid thinking, Apache-2.0 open-weight options, and a very fast release cadence.
K2-style MoE models are tuned for long-context coding and agent workflows. Kimi K2.7 Code is the current coding-focused entry, while K2.6 remains a strong general long-context option. Check the model list before choosing a suffix.
V4 Pro & V4 Flash, V3.2, and refreshed R1 distills. MTP pioneer at scale. The current line emphasizes long context, thinking mode, tool use, and agentic coding.
GLM-5.2 is the current flagship family, with GLM-5.1 still listed for compatibility. Strong long-context coding, tool use, and agentic workflows. Zhipu's line moves fast, so verify the exact endpoint.
Scout and Maverick are native multimodal MoEs, with Behemoth as the larger teacher/preview model. Still the West's flagship open-weight family; the community license has caveats.
Current Google open-weight family for edge, workstation, and multimodal use. Gemma 4 adds small edge variants and larger dense/MoE options; check the Gemma terms and exact model card before commercial use.
Medium 3.5, Small 4, Large 3, Devstral 2 for coding, Pixtral for vision, and Ministral edge models. Many open-weight releases use permissive licenses, but always check the individual model card.
Phi-4 (14B), Phi-4-reasoning, Phi-4-mini-instruct (3.8B, 128K, CPU-runnable), Phi-4-multimodal. Synthetic-data philosophy: textbook-quality corpora.
MiniMax M3, LG EXAONE 4.5, and IBM Granite Vision are worth tracking for long-context, enterprise, and multimodal workloads, but they are rarely the first model you pull.
Also in the mix: Nemotron (NVIDIA), OLMo (AI2 — fully open data + code), SmolLM (HF), Hermes (Nous), Command models (Cohere), Granite (IBM), and Yi (01.AI). Treat leaderboards as a weekly snapshot; verify the current Hugging Face and vendor pages before pulling.
"7B model" tells you almost nothing. What kind of 7B determines whether it fits your job. The taxonomy that matters.
Pure next-token predictor. Completes patterns, doesn't follow instructions. The starting point for fine-tuning. No "Instruct" or "Chat" suffix on the name.
Post-trained with SFT then RLHF / DPO to follow instructions and converse. What 99% of users actually want. "Instruct," "Chat," or "IT" in the name.
Emits long chains of thought before answering. Strong at math, code, logic. Slower & token-hungry. DeepSeek V4 thinking mode, Qwen3 thinking mode, Phi-4-reasoning, GLM-5.2 Think.
Continued pretraining on code, fill-in-the-middle, long-horizon agentic loops. Kimi K2.7 Code, Qwen3-Coder-Next, Qwen3.6, DeepSeek V4, Devstral 2.
Accepts images alongside text. Llama 4, Qwen-VL, Gemma, Pixtral, InternVL, EXAONE, Granite Vision. OCR, screenshots, charts, document Q&A.
Total parameters massive, only a fraction active per token. Kimi K2, GLM-5.x, DeepSeek-V4, Llama 4, Qwen3-Next, and Gemma MoE variants. High quality per active-param — but the full model still has to fit in memory.
Adjacent specialists: Embedding (retrieval), Rerankers (cross-encoders), Draft models (tiny pairs for speculative decoding), Distilled (small students of bigger teachers — DeepSeek-R1-0528-Qwen3-8B, etc.).
A runtime loads weights and turns prompts into tokens. Pick one based on your interface preference and use case.
| Runtime | Best for | Interface | Notable |
|---|---|---|---|
| llama.cpp | Maximum compatibility, CPU + GPU | CLI / C++ library | The engine under nearly everything else. GGUF native. Speculative decoding support keeps improving; check current build flags for MTP-style features. |
| Ollama | Beginners, fast setup | CLI + REST API | One-liner installs. ollama run qwen3 · ollama run gemma3 or newer model tags. |
| LM Studio | GUI users, model discovery | Desktop app | Built-in chat, model browser, OpenAI-compatible server. |
| vLLM | Production serving, throughput | Python server | PagedAttention, continuous batching. Datacenter-grade. |
| ExLlamaV2 | Single-GPU NVIDIA speed | Python library | Best raw inference speed for EXL2 quants. |
| MLX / MLX-LM | Apple Silicon native | Python framework | Uses unified memory directly. Built by Apple. |
| ONNX Runtime | Edge, mobile, Windows GPUs | Cross-platform library | Microsoft's portable inference engine. Phi ships ONNX-native. DirectML on Windows, CoreML on iOS, NPU acceleration on Snapdragon X. |
| text-generation-webui | Power-user tinkering | Web UI | Every backend, every sampler, every knob. |
More than CPU, more than RAM, more than disk: video memory determines what you can run. Compute speed determines how fast. Prices move fast, but the fit tiers are stable enough to plan around.
| GPU | VRAM | Buy | Rent / hr | Runs (Q4) |
|---|---|---|---|---|
| RTX 3060 | 12 GB | ~$250 used | spot only | 7B comfortably |
| RTX 3090 / 4090 | 24 GB | ~$700–2.3k | ~$0.20–0.80 | 13B–30B |
| RTX 5090 | 32 GB | $1,999+ street | ~$0.70–1.20 | 30B comfortable |
| A100 / H100 | 80 GB | ~$8k–25k used | ~$1–3 | 70B; Q8 tight |
| H200 | 141 GB | server/OEM | ~$3–6 | 120B–235B Q4 class |
| B200 (Blackwell) | 192 GB | server/OEM | ~$5–10 | 235B Q4 class |
| M3 Ultra Mac Studio | 96 GB current store | $3,999+ | n/a | 70B Q8 / 120B Q4 class |
Prices & rentals approximate, USD, June 2026 snapshot. Spot rates on RunPod / Vast.ai / Lambda vary 2–3× by demand. Current Mac Studio M3 Ultra store configs top out below the old 256/512 GB planning examples, so check memory options before budgeting a 405B-class local box.
Unified memory means CPU and GPU share one pool. High-memory Apple Silicon boxes are excellent for quiet local inference, but current availability changes by configuration. Do not plan a 405B-class run unless the machine actually has 256–512 GB unified memory.
Behind every "chat" is a precise string format the model was trained on. Get it wrong and quality collapses silently.
// Llama 3 chat template <|begin_of_text|><|start_header_id|>system<|end_header_id|> You are a helpful assistant.<|eot_id|> <|start_header_id|>user<|end_header_id|> What is quantization?<|eot_id|> <|start_header_id|>assistant<|end_header_id|>
// ChatML — used by Qwen, OpenAI-style <|im_start|>system You are a helpful assistant.<|im_end|> <|im_start|>user What is quantization?<|im_end|> <|im_start|>assistant
chat_template field — but you should know it's happening.system turn. Tool calls and reasoning sometimes get their own special tokens.POST /v1/chat/completions with JSON messages: [...].
Server reads each turn: system, user, assistant.
Tokenizer's chat_template wraps each turn with the model's special tokens.
Resulting string becomes token IDs — integers the model actually reads.
Forward pass, sampling, tokens stream back as text to the client.
When the base model doesn't know your stuff, you have two paths. They solve different problems and are often used together.
| Dimension | Fine-tuning | RAG |
|---|---|---|
| Changes | Model weights | Model input (prompt) |
| Best for | Style, format, behavior | Facts, documents, current data |
| Update cost | Hours of GPU time per update | Re-embed changed documents |
| Hallucinations | Can still invent | Grounded in retrieved text |
| Citations | Difficult | Built-in (you have the source) |
| Tooling | Unsloth, Axolotl, TRL, LLaMA-Factory | LangChain, LlamaIndex, Haystack |
| Use when | You need a specific tone or skill | You need the model to know things |
Rule: try RAG first. It's cheaper, more flexible, and easier to debug. Fine-tune only when prompting and retrieval have hit their limits.
Full fine-tuning of a large model requires hundreds of gigabytes of VRAM. LoRA — Low-Rank Adaptation — sidesteps it entirely.
Load the base model in 4-bit, attach a LoRA in 16-bit, train. A 70B fine-tune drops from "8× A100" to "single 24GB GPU." Released 2023, still the default approach.
An embedding model converts a chunk of text into a high-dimensional vector. Similar meanings land near each other in space. This is what powers semantic search.
Similarity = cosine distance between vectors. Closer vectors → more semantically related text.
Retrieval-Augmented Generation. Fetch relevant context, paste it into the prompt, let the model answer with sources.
PDFs, HTML, code, transcripts. Extract clean text.
Split into 256–1024 token windows with overlap.
Run each chunk through the embedding model.
Vectors + chunks + metadata in the vector DB.
Same embedding model as indexing.
Top-k nearest chunks by cosine similarity.
Optional: cross-encoder reorders for relevance.
Stuff into prompt, model answers with citations.
Advanced patterns: hybrid search (BM25 + vectors), HyDE (hypothetical answer embedding), agentic retrieval (model decides what to search for).
Free-form text is the demo. Production systems need parseable output and the ability to call code. Local runtimes support both — better than most people realize.
// Typical tool call emitted by a local model { "name": "search_web", "arguments": { "query": "stanford red hex code" } }
The Model Context Protocol is an open standard for connecting models to tools, data sources, and prompts. One protocol, many servers, any client.
Before MCP, every assistant invented its own plugin format. Now your filesystem server, your GitHub server, your Postgres server work the same way in any MCP-aware client — including local-LLM frontends.
If you remember nothing else, this is the path of least resistance from zero to running.
You can fit Q8 in VRAM, but generation will be slow. Q4_K_M is usually faster AND nearly as good. Quality vs speed isn't linear.
Manually constructing prompts without the model's expected special tokens. Output quality silently tanks.
Temperature 0.7 is fine for chat, terrible for code. Greedy (temp=0) for deterministic tasks. Learn min_p, top_p, repetition_penalty.
Loading a 7B Q4 model uses 4 GB. Then a 32K context conversation adds another 4 GB. Plan for it.
Try the same prompts across models. Use lm-eval-harness or your own test set. Benchmarks rarely reflect your workload.
A well-tuned 14B often beats a sloppy 70B for real tasks. Stop fetishizing size. Test before committing.
Install Ollama. Pull a 7B model. Ask it something. Everything in this deck makes more sense once tokens are streaming out of your own machine.