Short answer. Local AI runs a model on a GPU, an Apple Silicon machine or a CPU that you operate. It suits private, offline and predictable high-volume work, but it is not automatically cheaper or more secure than a hosted API. Size the model to fast memory first, choose a runtime that serves an OpenAI-compatible endpoint, and move work to a hosted or private deployment when concurrency, context length or maintenance outgrows one machine.
Key facts
| Stack layers | Hardware, runtime, model and application interface |
|---|---|
| Memory rule | Weights plus KV cache plus overhead must fit in fast memory |
| Common runtimes | Ollama, llama.cpp, LM Studio and vLLM |
| Format choice | GGUF for CPU and Apple Silicon; GPU-native formats for server batching |
| Application interface | OpenAI-compatible /v1 keeps SDKs and tools unchanged |
| Hosted option | all public model IDs behind the same interface, from a free tier to Scale |
| Endpoint status | Chat, streaming, JSON mode, function calling, embeddings, RAG and agents are live; confirm other endpoint types in the docs |
TL;DR
- Fit the model to memory first; speed and precision come after.
- Start with Ollama or LM Studio, then move to llama.cpp or vLLM as needs grow.
- Quantize to 4-bit to run larger models on modest hardware, and test quality on your own prompts.
- Keep the interface OpenAI-compatible so local and cloud stay swappable.
- Use hybrid routing for workloads that outgrow one machine.
Compare the 10 best local AI apps →
How it works, step by step
- Define the workload: chat, document QA, coding or agents, and its privacy requirements.
- Size memory from model weights plus KV cache at your target context length.
- Install a runtime and pull a quantized model that fits.
- Serve an OpenAI-compatible endpoint and test it with your existing client code.
- Add retrieval or tools if the workload requires external knowledge or actions.
- Secure the setup: authentication, network exposure, sandboxed tools and logs.
- Set a hybrid route for overflow or hard tasks and monitor quality over time.
Try it yourself
If you want a starting point rather than a spreadsheet, the local model recommender narrows the choice by memory, platform and task.
Open the local model recommender →
The four layers of a local AI stack
Hardware comes first. Model weights plus KV cache plus runtime overhead must fit in fast memory, whether that is GPU VRAM, unified memory or system RAM. A 7B model at 4-bit needs roughly 4–5 GB before context; a 32B model needs roughly 17–19 GB. Memory bandwidth then determines how fast tokens appear, while compute matters more for prompt processing and batching.
The runtime turns weights into an API. Ollama and LM Studio are the fastest ways to start, llama.cpp gives the most control over quantization and hardware offload, and vLLM is built for concurrent GPU serving. The model layer is about capability and format: instruction-tuned models for chat and RAG, code models for development, tool-calling models for agents, and quantization levels that match your memory.
The application layer should stay portable. If your client speaks an OpenAI-compatible API, you can move between local runtimes and a hosted provider by changing a base URL and model name, which keeps hybrid routing cheap.
Operations is the layer people forget. Someone has to patch the runtime, track model licences, rotate keys, watch error rates and decide what happens when the machine reboots at 02:00. A local stack is a small platform, not a one-off install.
Local, private and cloud are three different claims
The word “local” is often used to mean “my data stays with me”. That is only true if every part of the stack is on hardware you control. A local model with a hosted retrieval service, a cloud logging agent and a vendor support tunnel is not an offline system. The honest way to describe a deployment is by its control boundary.
- Local inference. The model runs on a machine you own or lease. You control the runtime, the model artefacts and the network path. If the machine is disconnected, data can stay on it.
- Private deployment. A dedicated VPC, dedicated endpoint, on-premises installation or air-gapped environment, scoped by contract. It provides isolation and contractual terms; it does not automatically mean in-country processing, and a vendor may still operate part of it.
- Cloud API. A shared regional endpoint run by the provider. It gives elasticity and a managed service, with processing in a published region and terms that govern access, retention and subprocessors.
| Deployment | Where inference runs | Who operates it | What it proves | What it does not prove | Typical fit |
|---|---|---|---|---|---|
| Local | Hardware you own | Your team | You control the machine, runtime and model files | High availability, multi-user governance or patch discipline | Offline work, prototyping, a single team |
| Private VPC or dedicated endpoint | An isolated network boundary | Jointly defined | Isolation from other tenants and a contracted boundary | In-country processing or that support cannot reach data | Regulated workloads that need isolation, not a new country |
| On-premises | Your data centre | Your team, with vendor support as contracted | Physical and network control of the facility | That the stack is patched, monitored or highly available | Workloads that cannot use a shared control plane |
| Air-gapped | An isolated environment with no outbound path | Your team | No network path to the vendor | Fresh models, fast patching or easy support | Disconnected or highest-classification work |
| Cloud API | A provider region: Frankfurt, UAE, Singapore or Virginia | Provider and subprocessors | A documented region choice and contract terms | That support, backups and subprocessors stay in that region | Fast starts, spikes and hard reasoning |
A regional endpoint is not the same as residency. Residency is a legal and contractual commitment covering processing, storage, backups, support access and subprocessors. If you need a dedicated environment, start with the private AI deployment guide and ask which of the four private options is actually being proposed.
Hardware: size memory before you shop
The memory rule is simple arithmetic: weights plus KV cache plus runtime overhead. Weights scale with parameter count and quantization. KV cache scales with context length, batch size and model architecture. Runtime overhead covers the CUDA or Metal context, the tokenizer and the serving process. The table below is an estimate at 4-bit weights with a short context; it is a budgeting aid, not a benchmark.
| Model size | Weights | KV cache and overhead | Practical floor | What it suits |
|---|---|---|---|---|
| 3B–4B | 2–2.5 GB | 1–2 GB | 4 GB | Laptops, CPU-only tests, classification and short summaries |
| 7B–8B | 4–5 GB | 2–4 GB | 8 GB | An 8 GB GPU or a 16 GB Apple Silicon machine |
| 13B–14B | 7–9 GB | 3–5 GB | 12 GB | 12 GB GPUs, 24 GB unified memory, better drafting and RAG |
| 32B | 17–19 GB | 4–8 GB | 24 GB tight, 32 GB+ comfortable | 24 GB GPUs at short context or 32 GB unified memory |
| 70B | 35–40 GB | 8–16 GB | 48 GB+ | Multi-GPU workstations and 64 GB+ unified memory |
Two hardware choices matter more than the rest. First, fast memory capacity: a model that does not fit spills to system RAM or disk and latency collapses. Second, memory bandwidth: it sets how quickly tokens can be generated. Compute helps with prompt processing and concurrent batches, but it cannot rescue a model that has been offloaded.
- 8–16 GB consumer GPU. Good for 7B–14B quantized models, drafting, classification and a single developer.
- 24 GB GPU. The practical entry point for 32B models at short context, or for batching smaller models.
- 48 GB+ workstation or multi-GPU. Needed for 70B-class models or for serving several users at once.
- Apple Silicon with 16–64 GB unified memory. Strong for desktop inference and larger models, with the caveat that CPU and GPU share the same memory.
- CPU-only. Fine for small models, batch jobs and offline utilities; not a substitute for a GPU at interactive speed.
For per-capacity detail, see the local AI hardware guide and the VRAM guides for 8, 12, 16 and 24 GB cards.
Runtimes and model formats
The runtime determines how much control you have and how much operational work you accept. All four common choices can serve an OpenAI-compatible endpoint, but they are aimed at different users.
| Runtime | Interface | Best for | Trade-off |
|---|---|---|---|
| Ollama | CLI plus a local OpenAI-compatible subset | The fastest path from install to a working chat endpoint | A wrapper layer and fewer tuning knobs than the raw engine |
| LM Studio | Desktop app plus a local OpenAI-compatible server | Evaluating models on macOS or Windows with a GUI | Not designed as a multi-tenant production server |
| llama.cpp | GGUF engine with CPU, Metal and CUDA offload | Control over quantization, offload and small-footprint serving | You manage flags, builds and the serving wrapper |
| vLLM | GPU serving with an OpenAI-compatible server | Concurrent GPU serving and batching | GPU-heavy and more operational work than a desktop app |
Format follows runtime. GGUF is the portable choice for CPU and Apple Silicon, and it is what Ollama and llama.cpp consume. GPU serving stacks usually prefer a GPU-native format such as AWQ, GPTQ or FP8, where the weights are laid out for the card. Moving a model between formats is not a file rename: the quantization method, kernel support and output quality all change.
Quantization is the main quality lever. 4-bit levels such as Q4_K_M are the usual balance between size and fidelity. Going lower buys memory but can degrade reasoning, instruction following and structured output. Going higher costs memory for a gain you may not be able to measure on your task. Test on your own prompts rather than trusting a leaderboard.
Check the model licence before commercial use. Weight licences differ on redistribution, attribution, acceptable use and commercial terms, and they are separate from the runtime’s licence. The local AI models guide covers families, sizes and licence questions.
The software around the model
A model endpoint is not a product. Most local AI stacks add five pieces: a serving layer, a retrieval layer, a user interface, an orchestration layer and observability. The serving layer is the runtime endpoint. The retrieval layer is an embedding model plus a vector store or a keyword index. The interface is a chat UI or your own application. Orchestration is the code that handles tools, retries and state. Observability is logs, traces and cost or usage accounting.
Keep each piece replaceable. If the serving layer speaks OpenAI-compatible HTTP, the UI and orchestration do not need to know whether the model is local or hosted. If retrieval is a separate service, you can move it to a managed vector database without reworking the prompt layer. This is the same portability argument as the API, applied one level up.
Security belongs here, not in an appendix. Authenticate the endpoint, bind it to localhost or a private network, sandbox tool execution and keep secrets out of prompts and logs. The local AI security checklist is the working list.
Keep the interface portable
The cheapest architectural decision is to keep an OpenAI-compatible interface at the application boundary. The client code below works against a hosted endpoint; pointing it at a local runtime is a base URL and model-name change.
from openai import OpenAI
client = OpenAI(
base_url="https://api.plugsky.com/v1",
api_key="YOUR_PLUGSKY_KEY",
)
response = client.chat.completions.create(
model="plugsky-lite",
messages=[{"role": "user", "content": "Summarise this ticket in one line."}],
)
print(response.choices[0].message.content)
The public docs also accept https://plugsky.com/v1 as an alias; examples here use the canonical host. For a local runtime, change the base URL to the runtime’s local address and use the model tag you pulled. The surrounding application, tool schemas and tests stay the same.
That portability is what makes hybrid routing practical. A router can send routine or private requests to the local endpoint and hard reasoning, spikes or long-context work to the hosted API. The local AI API guide covers serving details and retrieval patterns.
Decisions that matter most
Most local AI projects succeed or fail on three choices. Memory sizing is first, because an oversized model produces constant offload and poor latency. Quantization is second: 4-bit levels such as Q4_K_M are the usual balance, and going lower degrades reasoning and structured output. Interface is third: an OpenAI-compatible endpoint keeps your integration work reusable across runtimes and cloud fallbacks.
- Match context length to the task and budget KV cache accordingly.
- Prefer a smaller model that fits over a larger model that spills to disk.
- Evaluate on your own prompts; public scores rarely predict your workload.
- Log tool calls and retrieval results, not just final answers.
From first model to production and hybrid
Start small: one runtime, one quantized model, one real task. Prove quality and latency before adding retrieval, tools or multi-user serving. Then harden the setup with authentication, network restrictions, sandboxed tool execution, encrypted storage and request logging. Add retrieval only when the task needs external knowledge, and add agents only when a single model call cannot complete the job.
Production local AI usually becomes hybrid. Local inference handles private, routine or high-volume work; a hosted API absorbs hard reasoning, spikes and workloads that exceed local memory. Plugsky serves all public model IDs behind an OpenAI-compatible endpoint, with chat, streaming, JSON mode, function calling, embeddings, RAG and agents live, plus cloud, VPC, on-premises and air-gapped deployment options. The main text models serve a 262,144-token context; the model page and the API response are authoritative for each ID.
What local AI costs, and when hosted is cheaper
Local AI converts a per-token bill into capital and operating cost: hardware, electricity, rack space, staff time and the cost of keeping the stack patched. That can be cheaper at steady, high utilisation and more expensive at low utilisation, because an idle GPU still costs money. Hosted pricing is easier to forecast but adds a margin and a dependency.
| Plan | Price | Requests/day | Tokens/day | Concurrency | RPM |
|---|---|---|---|---|---|
| Free | $0 | 100 | 50,000 | 2 (1 new) | 30 |
| Hobby | $8/mo | 1,000 | 2M | 4 | 120 |
| Starter | $20/mo | 2,000 | 5M | 6 | 240 |
| Builder | $60/mo | — | No monthly cap | 10 | 600 |
| Scale | $120/mo | — | No monthly cap | 16 | 1,200 |
Builder and Scale carry no monthly token cap and no per-token overage; fair-use concurrency and RPM limits still apply. Free allowances quoted here are for accounts created from 2 November 2026; older accounts keep their legacy allowances until migration. Annual billing is 20% off, and current terms live on the pricing page.
The comparison that matters is cost per completed task, not cost per token. A local model that needs three attempts, a larger prompt or a manual fix can be more expensive than a hosted call that succeeds once. Measure the whole path.
Honest comparison
| Approach | Setup cost | Privacy boundary | Elasticity | Best for |
|---|---|---|---|---|
| Fully local | Hardware purchase | Hardware you control | Limited to your machine | Private and offline workloads |
| Hybrid local plus cloud | Hardware plus plan | Policy-controlled | Elastic | Mixed sensitivity and load |
| Fully hosted API | Subscription | Provider-processed region | Elastic | Fast starts and spiky traffic |
| CPU-only local | Lowest | Hardware you control | Very limited | Small models and batch jobs |
When local wins, when cloud wins, when hybrid wins
Local wins when
- The data cannot leave a controlled machine or facility, and the workload fits the hardware.
- Utilisation is steady enough that an owned GPU is cheaper than metered inference.
- Latency to a local endpoint matters more than access to the largest model.
- You need to work offline or in a disconnected environment.
Cloud wins when
- Traffic is spiky or hard to forecast, and idle capacity would be waste.
- The task needs frontier reasoning, long context or capabilities you cannot host.
- You do not want to run a serving platform, patch GPU drivers or staff on-call.
- You need a published region and contractual terms more than physical control.
Hybrid wins when
- Most traffic is routine but a minority needs a larger model.
- Policy allows some data to leave the local boundary under defined conditions.
- You want a local fallback for outages and a hosted path for spikes.
- The application already speaks an OpenAI-compatible interface, so routing is configuration.
What we did not verify
- We did not run benchmarks on the hardware classes in this guide. The memory figures are arithmetic estimates from model size and 4-bit weights, not measured token rates.
- We did not test every runtime, quantization format or model family. Commands and interfaces come from the official documentation checked on 20 November 2026.
- We did not review model licences for commercial use. Check the licence of each weight set before deployment.
- We did not audit the security of a local stack. The checklist is a starting point, not a certification.
- We did not verify hosted-plan limits beyond the published figures in the table; contract terms and fair-use enforcement govern.
Frequently asked questions
What is local AI in simple terms?
It means the model runs on hardware you control rather than a provider's servers. Prompts and outputs stay on that machine when the stack is fully offline, and you own the runtime, model and updates.
What is the difference between local, private and cloud AI?
Local means inference runs on hardware you operate. Private means a dedicated or isolated environment, often a VPC, on-premises or air-gapped deployment scoped by contract; it may still be vendor-operated. Cloud means a shared regional endpoint run by the provider. The three describe different control boundaries, not a quality ranking.
What hardware do I need to start?
An 8 GB GPU or an Apple Silicon machine with 16 GB or more unified memory runs small and mid-size quantized models. A 24 GB GPU or 32 GB unified memory is a more comfortable floor for 32B models at short context. CPU-only works for small models and batch use.
Which runtime should I choose first?
Ollama or LM Studio for the quickest start. Move to llama.cpp for quantization and offload control, or vLLM for concurrent GPU serving.
How much does local AI cost?
You pay for hardware, electricity and operations rather than per token. Add staff time for updates, monitoring and security. Compare the total against hosted plans once you know your peak requests, tokens and concurrency.
Is local AI as good as cloud models?
Small local models are strong at routine tasks; frontier hosted models still lead on hard reasoning and very long context. Hybrid routing gets both, provided the interface stays OpenAI-compatible.
Can local AI work fully offline?
Yes, if the model, tools and data are local. Features that depend on external services, such as web search or hosted embeddings, will not work without connectivity.
How do I secure a local AI setup?
Authenticate access, avoid exposing inference ports to the internet, sandbox tool execution, encrypt storage and keep logs free of sensitive text where possible. Patch the runtime and model artefacts, and review who can reach the management interface.
When should I stop running locally?
When concurrency, context length or model size exceeds your hardware, or when operating costs exceed a hosted plan. An OpenAI-compatible API keeps the move cheap because the client code does not change.
Related pages
Start local, keep the exit cheap
Build against an OpenAI-compatible interface and you can add hosted capacity without rewriting the application.
Start free See pricingSources
Runtime and interface facts below were checked on the linked official pages on 20 November 2026. Memory figures are arithmetic estimates, not measurements.
- Ollama: OpenAI compatibility — the supported subset and the local
/v1endpoint. Checked 20 November 2026. - llama.cpp repository — GGUF inference, quantization and hardware offload. Checked 20 November 2026.
- vLLM documentation — GPU serving and the OpenAI-compatible server. Checked 20 November 2026.
- LM Studio: OpenAI compatibility — local server endpoints and supported routes. Checked 20 November 2026.
- Plugsky docs — API reference, quickstart and endpoint status. Checked 20 November 2026.
- Plugsky models — all public model IDs, context and serving engine. Checked 20 November 2026.
- Plugsky pricing — plan limits and billing terms. Checked 20 November 2026.
Last checked 20 November 2026. Plugsky’s approved facts live at /facts; plan terms live at /pricing. Legal: Terms and SLA.
All local AI guides (64)
- AnythingLLM Alternatives for Local AI
- Best Local AI Agents: Models and Stacks
- Best Local AI Assistants You Can Host
- Best Local Arabic AI Models
- Best Local Embedding Models for RAG
- Best Local Indonesian AI Models
- Best Local LLM for Coding
- Best Local LLM for RAG
- Best Local LLM for Tool Calling
- Build a Local AI Agent with Ollama
- Complete Guide to Local AI
- FP8 vs INT8 Quantization Explained
- From Local AI to Private Cloud: Migration Guide
- GGUF vs AWQ: 4-Bit Quantization Compared
- GGUF vs GPTQ Quantization Compared
- GPTQ vs AWQ: 4-Bit GPU Quantization
- KV Cache Explained: Context Memory Costs
- LLM Context Memory Calculator Guide
- LM Studio Alternatives for Local AI
- Local AI Agent with Tools: Build Guide
- Local AI Agents: Architecture and Deployment
- Local AI Agents: Run Agents on Your Hardware
- Local AI API Server: Setup and Choices
- Local AI API: OpenAI-Compatible Serving
- Local AI for 12GB VRAM: What Runs
- Local AI for 16GB VRAM: Models and Limits
- Local AI for 24GB VRAM: 32B Models
- Local AI for 8GB VRAM: What Runs Well
- Local AI for Enterprise: Deployment Guide
- Local AI Hardware Guide: GPUs and Macs
- Local AI Models: Families, Sizes and Licences
- Local AI on Apple Silicon: M-Series Guide
- Local AI on CPU: Run LLMs Without a GPU
- Local AI on Linux: Setup and Serving
- Local AI on macOS: Run LLMs on Apple Silicon
- Local AI on RTX 4060: Models and VRAM Budgets
- Local AI on RTX 4090: 24 GB VRAM Playbook
- Local AI on Windows: GPU Setup Without Guesswork
- Local AI RAG: Private Retrieval on Your Hardware
- Local AI Security Checklist: Harden Your Stack
- Local AI Without Internet: Air-Gapped Setup Guide
- Local RAG with Chroma: Documents to Answers
- Local RAG with LM Studio: Desktop Retrieval
- Local RAG with Ollama: Embeddings and Chat
- Local RAG with pgvector: Postgres for AI Retrieval
- Local RAG with Qdrant: Filters and Payloads
- Local RAG: Complete Guide to Private Retrieval
- LocalAI Alternative: Local OpenAI Servers
- Offline AI Assistant: Build One Without Internet
- Offline AI for Business: Deployment and Governance
- Offline AI for Coding: Private Code Assistance
- Offline AI for Documents: Local Chat with Files
- Ollama Alternative: Local LLM Runtimes Compared
- Ollama vs llama.cpp: Wrapper and Engine Compared
- Ollama vs LM Studio vs LocalAI Compared
- Ollama vs LM Studio: CLI Service or Desktop App?
- Ollama vs vLLM: Development or Production?
- On-Premise ChatGPT Alternative: Enterprise Guide
- Private ChatGPT Alternative: Local or Hybrid
- Q4 vs Q8 Quantization: Quality and Memory
- Run AI Agents Locally: Tools and Memory
- Self-Hosted OpenAI-Compatible API: Serve Models
- vLLM vs llama.cpp: Throughput or Portability
- vLLM vs SGLang: Choosing a GPU Serving Engine