Local LLMs
Open-weight language models on your own hardware: model choice, hardware sizing, inference servers and quantization for data-sensitive applications.
Local LLM Deployment
We deploy open-weight models on your servers, workstations or edge devices, so prompts and documents do not leave your network. This matters for regulated data, trade secrets and air-gapped sites.
Cloud or local?
An honest comparison
| Cloud API | Local | |
|---|---|---|
| Data | Sent to a provider (contracts and EU regions can cover this) | Stays in your network |
| Cost | Per token, no upfront cost | Hardware and operations, cheap per token at steady high load |
| Quality | Best available models | Good to very good, depends on hardware budget |
| Latency | Network dependent | Local, predictable |
| Availability | Provider-dependent | Works offline |
| Effort | Low | Real: updates, monitoring, capacity |
Many projects use both: a local model for sensitive data and routine tasks, an API model for hard cases that contain no sensitive data.
Architecture
All common inference servers expose an OpenAI-compatible API, so applications can switch between local and cloud models by changing a URL.
Models
Open-weight releases move quickly. These are examples we use and test; we pick and benchmark on your task before recommending one. Always check the license for your use.
| Model | Size | Strength | License |
|---|---|---|---|
| Gemma 4 (Google, Apr 2026) | E2B, E4B, 26B MoE, 31B dense; 256K context on the larger two | Multimodal (image, video), small-footprint, good default | Apache 2.0 |
| Qwen3.8 27B (Alibaba, Aug 2026) | 27B dense, 262K context | Reasoning, coding, vision; fits one 48 GB GPU in 8-bit | Apache 2.0 |
| gpt-oss-20b / 120b (OpenAI, Aug 2025) | 20B and 120B MoE | Reasoning and tool use; 20B on 16 GB, 120B on one 80 GB GPU | Apache 2.0 |
| DeepSeek V4 Flash | 284B MoE, 13B active, 1M context | Near-frontier coding and agents; multi-GPU server | MIT |
Larger open models exist (DeepSeek V4 Pro, GLM 5.2, a 2.4T Qwen3.8 variant) but need multi-GPU nodes and are rarely worth self-hosting below high volume.
MoE models
For retrieval we add local embedding and reranker models, and for scanned documents a vision-language model or OCR model. See RAG systems.
Hardware Sizing
Two numbers decide: memory (the model and its KV cache must fit) and memory bandwidth (it sets tokens per second for a single user).
Rough weight memory: parameters times bytes per weight. A 27B model needs about 54 GB in 16-bit, 27 GB in 8-bit, 14 GB in 4-bit. Add KV cache, which grows with context length and with concurrent users, and can exceed the weights for long contexts.
| Class | Examples | Suitable for |
|---|---|---|
| Datacenter GPUs | NVIDIA H100/H200, B200, AMD MI300X | Many users, 100B+ models, high throughput |
| Workstation GPUs | RTX PRO 6000 Blackwell (96 GB), RTX 5090 (32 GB) | Department servers, 20-70B models |
| Unified-memory machines | NVIDIA DGX Spark (128 GB), AMD Ryzen AI Max+ systems, Apple Silicon Macs | Large models for one or few users; bandwidth is lower than on GPUs |
| Edge | NVIDIA Jetson, laptops, phones | Small models, 1-8B |
Prices are unstable
Unified-memory machines run large models that no consumer GPU can hold, but at much lower speed per token than datacenter GPUs. They suit development and small teams, not many concurrent users.
Inference Servers
| Server | Best for | Note |
|---|---|---|
| vLLM | Production serving, many users | Continuous batching, PagedAttention, wide model support |
| SGLang | Multi-turn and agent workloads with shared prefixes | Prefix caching, structured output |
| llama.cpp | CPU, Apple Silicon, edge, GGUF models | Runs almost anywhere |
| Ollama | Developer machines, quick start | Wraps llama.cpp, simple model management |
| LM Studio | Desktop use with a GUI | GGUF and MLX, local API server |
| TensorRT-LLM | Maximum speed on NVIDIA | More engineering effort |
Hugging Face’s Text Generation Inference is in maintenance mode and its docs point to vLLM and SGLang. We do not start new projects on it.
Quantization
| Method | Weight memory vs. 16-bit | Quality |
|---|---|---|
| FP8 / INT8 | about 50% | Usually near-lossless |
| 4-bit (AWQ, GPTQ, GGUF Q4, FP4) | about 25-30% | Small loss; test on your task |
| KV cache quantization | Cuts cache memory | Check long-context quality |
Other levers: speculative decoding for lower latency, prefix caching for repeated prompts, tensor parallelism for multi-GPU. We measure on your prompts, because published benchmarks rarely match real workloads.
Tool Use and Agents
Local models run agents and MCP tools. Tool-call reliability varies a lot between models and quantization levels, so we test it explicitly. Pair local models with agents or skills and MCP servers that expose your systems.
Fine-Tuning
Try prompting, retrieval and a better model first. Fine-tune when you need a fixed output format, a domain style or a smaller model that matches a larger one on one narrow task.
- LoRA / QLoRA: train small adapter weights; fits on a single GPU
- Full fine-tuning: only with large datasets and clear gains
- Preference tuning: for tone and behaviour
- Required: a few hundred to thousands of good examples and a held-out test set
Implementation Process
- Assessment: use cases, data sensitivity, users, load
- Model selection: benchmark candidates on your data
- Sizing and procurement: memory, bandwidth, concurrency
- Deployment: inference server, gateway, authentication
- Optimization: quantization, caching, batching
- Operations: monitoring, model updates, regression tests
Need private AI capabilities? Discuss your local LLM deployment with us.
Related Content
Codex-V Knowledge Engine
A Personal Technical Knowledge Engine Codex-V is a local-first knowledge management system for …
AI Agents and Skills
Agents: What Changed An agent is an LLM that runs in a loop: it decides on an action, calls a tool, …
RAG Systems
Retrieval-Augmented Generation RAG gives an LLM the right passages from your documents at question …