Local and cloud inference
Downloading the weights is the easy part. Getting them to answer a question at a speed anyone will tolerate is where the decision gets made.
What running it yourself requires
Local inferencerunning a model on hardware you control, so that no prompt or document leaves your network.Full glossary entryIntroduced in Local and cloud inference means the weights are on hardware you control and no request leaves it. The first constraint is memory. All of the weights have to be resident before a single token comes out, and they have to be resident in the memory attached to whatever does the arithmetic. A CPU will do it out of system RAM and you will wait a long time. A GPU does it out of its own memory, which is much faster and much smaller.
So the first calculation anybody does is parameters times bytes per parameter. A model trained and released in 16-bit precision uses two bytes per parameter, so a 70B model needs about 140 GB just for the weights. Say the card you have has 80 GB of memory on it. That model does not fit on one of those, and you are now buying two or four and dealing with the fact that they have to talk to each other.
Quantization, and what it costs
Quantizationstoring each weight in fewer bits, such as 4-bit instead of 16-bit, to cut memory and raise speed. The cost is accuracy, and the damage is uneven.Full glossary entryIntroduced in Local and cloud inference is the lever on that calculation. It stores each weight in fewer bits: 8-bit instead of 16, or 4-bit, or lower. The arithmetic follows directly. That 70B model is roughly 70 GB at 8-bit and roughly 35 GB at 4-bit, and the 4-bit version fits on one card a mid-sized company can afford. Smaller weights also move faster from memory into the compute units, and since generating a token is mostly a memory-bandwidth problem rather than a compute problem, quantization usually makes the model faster as well as smaller.
What it costs is accuracy. Each weight is being rounded, and the rounding shows up as degradation that is mild at 8-bit, noticeable at 4-bit, and severe below that. The damage is uneven, which is the annoying part. A heavily quantized model will often chat perfectly well and then fall apart on the things you are relying on it for: long chains of reasoning, exact code, careful instruction following. A benchmark run at 4-bit can look almost unchanged while the model has got measurably worse at your task.
That sets up a trade a practitioner has to make on purpose. Quantizing hard enough brings a 70B model down into roughly the memory a much smaller model at full precision would ask for, so on one card the choice is between the large model with fewer bits per weight and the small one with all of them. Which is better depends on the work, and the only way to know is to run your own evaluation set against both. The general shape is that the larger quantized model wins on breadth of knowledge and the smaller full-precision one wins on precision and consistency, but treat that as a hypothesis to test rather than a rule.
The context window is not free either
Weights are the fixed cost. On top of them, every request in flight holds a cache of intermediate state for the tokens it has already processed, and that cache grows with the conversation. A short prompt costs almost nothing. A long document, or a coding session forty turns deep, costs real memory. That cost repeats for every concurrent user.
So a machine that loads a model happily can fall over the first time ten people use it with long contexts. The weights fit, the weights plus the cache do not, and the failure looks like the server refusing requests rather than like anything to do with memory sizing. When you plan capacity, budget for the weights and the working memory of the traffic you expect at the same time.
What an inference server does
Loading a file and running one request at a time is a demo. An Inference serverthe software that keeps weights resident, exposes an API, manages the per-request caches, and batches many requests into one pass over the weights.Full glossary entryIntroduced in Local and cloud inference is the software that makes it a service. It holds the weights resident, exposes an HTTP API, manages the caches described above, and above all it batches.
Batching is the part that decides what the hardware costs you. Generating one token means moving the entire weights file from memory through the compute units. Doing that for one user wastes almost all of the machine, because the arithmetic finishes long before the next chunk of weights arrives. Do it for thirty users at once and the same pass over the weights serves all thirty. The hardware cost per token drops by something close to that factor. Continuous batchingadding new requests to a batch that is already generating, as slots free up, so a card is rarely producing tokens for a single user.Full glossary entryIntroduced in Local and cloud inference is the refinement that made this practical: rather than waiting for a batch to fill and then running it to completion, the server adds new requests to the running batch as slots free up, so a request that arrives mid-flight does not wait for the previous batch to finish.
The consequence is the one people find counter-intuitive. A single-user local setup has terrible cost per token even though the electricity bill is small, because a GPU serving one person is running at a few percent of what it could do. The idle hardware is the problem. A hosted API is cheap per token partly because the vendor has thousands of requests to pack onto every card.
Speed, and which number you mean
Tokens per secondthroughput. It means either what one request feels like as text appears, or what the machine produces across every request at once, and the two differ a lot.Full glossary entryIntroduced in Local and cloud inference is the throughput measure, and it means two different things depending on who is asking.
Per-request throughput is what one user feels: how fast text appears once it starts. People read at something like ten tokens per second, so a model producing thirty or forty feels immediate and one producing five feels broken. Aggregate throughput is what the machine does across every request at once, and with a full batch it is many times the per-request figure. A serving setup tuned for aggregate throughput will often make each individual request slightly slower, because bigger batches help the total and hurt the individual. Which one you optimise for is a product decision. An interactive assistant needs per-request speed. An overnight job that classifies two million documents needs aggregate, and does not care if any single one takes a while.
Then there is the Cold startthe delay while a weights file is loaded into memory before the model can answer anything. It is the reason a model is usually kept resident.Full glossary entryIntroduced in Local and cloud inference. Loading a 40 GB file off disk into GPU memory takes tens of seconds at best, and until it finishes the model answers nothing. So either you keep the model resident and pay for hardware that is idle between requests, or you let it unload and make somebody wait. There is no third option, so "just spin it up when we need it" does not survive contact with a real workload.
Which one, then
Local wins on four things.
The data never leaves. Where a data residency law applies, as it does to a hospital or a defence contractor, that is a requirement rather than a preference to be traded off against cost, and it settles the question before anything else gets considered.
Nothing bills per token. A steady high-volume workload can be dramatically cheaper once the hardware is paid for, because the marginal cost of the ten millionth token is electricity.
No rate limit applies. No vendor decides that the model your product is built on retires in ninety days.
It works with no network. That matters on a ship or in a factory, and in any building where the link is the thing that fails.
The cloud side of the list looks nothing like it. The frontier models are only there, so if your task needs the best available reasoning, local is not on the menu at any price. Capacity is elastic, so a workload that is quiet all week and enormous on Monday morning pays for Monday morning rather than for hardware sized to it. There is nothing to operate: no drivers, no toolkit versions, no card that fails at the weekend, no upgrade to the serving stack. And far less engineering effort stands between a team and a working feature, which is what settles it for most of them.
The cost comparison is where people go wrong. The comparison is total cost against total cost, not the vendor's price per token against your electricity per token, and the local side of it includes the GPUs amortised over the two or three years before they are obsolete, the power and the cooling, the rack or the cloud instance they sit in, the engineer who keeps the serving stack alive, the evaluation work to find out which quantized model is good enough, and the value of whatever quality gap remains. Nobody prices that last item, and it is often the largest. Local becomes cheap at high, steady volume on a task a mid-sized model handles well. At low volume, or on a task that needs the best model available, it costs more than the API and the arithmetic is not close.
Most organisations land on a mix. The usual split puts bulk work on local models: classification, extraction, summarising, embedding, redaction, anything high-volume and well-defined where a good mid-sized model is sufficient and the volume makes per-token pricing hurt. It puts the hard reasoning, the customer-facing product, and anything a harness drives through many turns on a hosted frontier model. Regulated data goes local by default whatever the task. An LLM gateway in front of both is what makes the split manageable, because the calling code then names a capability rather than a machine.
Start from the constraint that cannot move.
- Check whether the data may leave your control. Run the model locally if it may not.
- Check whether the task needs frontier quality. Call a hosted API if it does.
- Measure the tokens per day from a real week of traffic. Do not estimate.
- Check whether the load is steady or spiky. Buy hardware for steady load only.
- Cost the local option in full. Include hardware, power, staff, and the quality gap.
- Evaluate a quantized model on your own task before you buy any hardware.
- Put a gateway in front of both. Name a capability in your code, not a machine.
Terms introduced
- Local inference: running a model on hardware you control, so no request leaves your network.
- Quantization: storing each weight in fewer bits to cut memory and raise speed, at some cost in quality.
- Inference server: the software that keeps weights resident, serves an API, and batches requests together.
- Tokens per second: throughput, meaning either what one request feels like or what the machine does in total.
- Continuous batching: adding new requests to a batch already running, so a card is never generating for one user.
- Cold start: the delay while weights are loaded into memory before the model can answer anything.
How providers do it
One of these three publishes a file you can run. The other two answer the question in different ways: by moving the hosting into your cloud account, or by being the runtime.
| Provider | Can it run outside the vendor's service? | Option short of full local | Status |
|---|---|---|---|
| Anthropic | No weights. Hosted only | Bedrock, Google Cloud, Microsoft Foundry or Claude Platform on AWS, with regional endpoints for data routing | confirmed |
| Meta | Yes. Weights download from Meta, Hugging Face or Kaggle | Managed hosting of Llama on a cloud catalogue | confirmed for download; unconfirmed for which clouds list which generation |
| Ollama | It is the local runtime. Serves models on localhost:11434 | Ollama Cloud offloads a larger model while the local tooling stays the same | confirmed |
Still open: which Llama generations each managed cloud currently lists, and what concurrency Ollama's built-in server handles.
The middle column is the one most teams should read first. "Local or cloud" is usually presented as a choice about hardware, and for a regulated workload it is really a choice about where the data goes. A hosted model running on a regional endpoint inside your own cloud account answers that question without anybody buying a GPU.
- Anthropic
- Meta
- Ollama
What this maps to: Claude cannot be run on hardware you own. What Anthropic sells instead is a set of hosted deployments, some of which sit inside a cloud account you already control, which covers a lot of what teams want local inference for.
| Question | Answer | Status |
|---|---|---|
| Can the models run outside Anthropic's own service? | Yes, but only on another vendor's managed service. There is no downloadable artefact and no self-hosted option | confirmed |
| Where, exactly? | Claude API, Amazon Bedrock, Google Cloud (Vertex AI), Microsoft Foundry, and Claude Platform on AWS. Each has its own model IDs, listed per model on the models overview | confirmed |
| What is the option short of local? | Running inference through Bedrock, Vertex AI or Foundry, so the calls, the billing and the identity sit inside your existing cloud account rather than in a separate vendor relationship | confirmed |
| Data residency | Bedrock offers global endpoints with dynamic routing and regional endpoints with guaranteed data routing, for Claude Sonnet 4.5 and later. Google Cloud offers global, multi-region and regional endpoints | confirmed |
| Who controls model retirement? | Anthropic publishes retirement commitments for Anthropic-operated platforms, being the Claude API, Claude Platform on AWS and Microsoft Foundry. Amazon Bedrock and Google Cloud set their own lifecycle dates | confirmed |
| Cold starts, batching, tokens per second | Not exposed. These are the vendor's problem, which is the trade you are making | unconfirmed; no published figures were read today |
| Cheaper modes for non-interactive work | The Message Batches API is priced at 50% off the base rate, and prompt cache reads cost 10% of base input | confirmed |
Their vocabulary
| Standard term | Their term |
|---|---|
| Running inside your own cloud account | Claude on Amazon Bedrock, Claude on Google Cloud, Claude in Microsoft Foundry, Claude Platform on AWS |
| Aggregate throughput work | Message Batches API |
| Cold start | No equivalent. Capacity is the vendor's concern |
Where to look
The models overview lists a model ID column per platform, so it doubles as the availability matrix. If the constraint driving you towards local inference is a data residency rule rather than a cost model, the regional endpoint rows on Bedrock and Google Cloud are the thing to read first.
Last verified: 2026-09-09 against https://platform.claude.com/docs/en/about-claude/models/overview.
What this maps to: Llama is the case where local inference is straightforwardly possible, because the weights are a file you download. Meta publishes the weights and leaves the serving to you, to a local runtime, or to a cloud that hosts them.
| Question | Answer | Status |
|---|---|---|
| Can the models run outside Meta's own service? | Yes. The weights are downloadable from Meta, Hugging Face and Kaggle after licence acceptance, and run wherever you can fit them | confirmed |
| Where do people run them? | On their own GPUs through an inference server, on a local runtime such as Ollama or llama.cpp, and on managed cloud services that host Llama | confirmed for download and local runtimes; unconfirmed for the managed services, see below |
| Which managed cloud services host Llama? | Commonly reported to include Amazon Bedrock, Google Cloud Vertex AI Model Garden and Microsoft Foundry | unconfirmed; only secondary sources were read today. Open question is which Llama generations each of those lists in its own current model catalogue |
| Formats the weights ship in | Hugging Face publishes them in both transformers format and native Llama format. Community GGUF conversions are what local runtimes usually consume | confirmed for the two Hugging Face formats; unconfirmed that Meta itself publishes GGUF |
| Does the licence constrain where it runs? | The Llama 4 Community License does not restrict where you run it. It restricts what you use it for, what you must display, and who has to ask for a separate agreement. See the open and closed models page | confirmed |
| Anything short of full local? | Yes, in the ordinary sense that any cloud GPU instance is somebody else's hardware in your own account. The weights and the serving stack are still yours | confirmed |
Their vocabulary
| Standard term | Their term |
|---|---|
| Weights and everything shipped with them | Llama Materials |
| Getting the weights | "Getting the models", the docs section covering Meta, Hugging Face and Kaggle |
Where to look
The "Getting the models" pages on developer.meta.com give the three download routes and the licence gate on each. What they do not give is any sizing guidance, so the parameters times bytes per parameter arithmetic on the core page is still where the decision starts.
Last verified: 2026-09-09 against https://developer.meta.com/ai/docs/getting-the-models/hugging-face/ and https://developer.meta.com/ai/llama4/license/.
What this maps to: Ollama is the easiest way to get local inference working. It is an open source runtime you install on your own machine that pulls a model, keeps it resident, and serves it over HTTP on port 11434. It is the inference server and the model distribution in one command.
| Question | Answer | Status |
|---|---|---|
| What is it? | Software you run locally that downloads open-weights models and serves them. Open source, published on GitHub. Built on the llama.cpp project | confirmed |
| What does it run? | Open-weights models pulled from its own library, such as ollama run gemma4. It also ships an ollama launch command that starts coding agents including Claude Code and Codex against a local model | confirmed |
| What formats does it accept? | Safetensors weights and adapters, and GGUF models and adapters, imported through a Modelfile | confirmed |
| What quantizations? | The import docs list q8_0, q4_K_S and q4_K_M as the quantization options when creating a model | confirmed |
| What is a Modelfile? | A configuration file in the style of a Dockerfile. A FROM line names the base weights, an optional ADAPTER line names fine-tuned adapter files, then ollama create builds the model | confirmed |
| What interface does it expose? | A REST API on http://localhost:11434, with native endpoints under /api such as /api/generate and /api/chat | confirmed |
| Is it OpenAI-compatible? | Yes, partially, on http://localhost:11434/v1/. Chat completions, completions, embeddings, responses and models endpoints are supported. Logprobs, tool choice and logit bias are not, vision takes base64 images only, and the responses endpoint is not stateful | confirmed |
| Is any of it not local? | Ollama Cloud offloads a model to Ollama's own service so a larger model can run from the same local tooling. There is a local-only mode that disables the cloud features | confirmed |
| Continuous batching and aggregate throughput | Not documented in the pages read today. Ollama is aimed at one machine and a small number of users, which is exactly the case where cost per token is worst | unconfirmed; open question is what concurrency the built-in server supports |
Their vocabulary
| Standard term | Their term |
|---|---|
| Inference server | Ollama itself, run as ollama serve behind the CLI |
| Model definition and build | Modelfile, then ollama create |
| Pulling weights | ollama pull |
| Aliasing a model to another name | ollama cp, used to answer to an OpenAI model name |
Where to look
docs.ollama.com/import for the formats and quantization levels, and docs.ollama.com/openai for exactly which parts of the OpenAI API are and are not implemented. That second page is the one that matters when you are pointing an existing harness at a local model, because the gaps are where it will break.
Last verified: 2026-09-09 against https://docs.ollama.com/import, https://docs.ollama.com/openai, https://docs.ollama.com/cloud, https://docs.ollama.com/api and https://github.com/ollama/ollama/blob/main/README.md.