Private LLMs: self-hosted, on-prem or in your own cloud
A private LLM runs in your own cloud account or building, so prompts and documents stay under your control. Here is what self-hosting takes, what it costs and what to check first.
Updated
A private LLM is a language model that runs inside your own environment, so your prompts, documents and outputs never pass through a third-party API. In practice that means a self-hosted model in your own cloud account or on servers in your own building. You own the weights, and your team decides who can call the model and what gets logged.
Companies usually look for one for one of three reasons. The data cannot leave their environment. The call volume is high and steady. Or they need to keep one exact model version they already tested. A common trigger is a frontier API that has become the default for a high-volume job, such as reading contracts, routing tickets or pulling fields from invoices, and a security or legal team that no longer accepts that data leaving the network. None of these reasons removes the operating work, and the real question is not only whether the model is private. It is whether a smaller model trained for that one job can match the frontier model on the work that matters.
What “private” means in practice
Private is about where the model runs and who holds the weights. A private setup has three parts: the weights sit in storage you control, the model runs in your cloud account or on hardware in your building, and requests never leave that environment.
Follow one request to see the difference. A claims clerk’s application sends a file’s text to an address on your internal network, and the model replies from a machine you control. Nothing crosses the public internet. With a hosted API, the provider runs the model and your text travels to them.
A vendor’s data terms describe what the provider promises to do with your data. A private deployment changes what data gets sent at all. Read the terms, then ask the vendor to show where each of the three parts lives. If the vendor also trains the model, use these questions to ask a fine-tuning partner.
Three ways to run a private LLM
Each route trades setup work for control.
- Hosted API with a data agreement. Fastest to start. Your data still leaves your network, so this does not meet a strict “cannot send data out” rule.
- A private deployment in your own cloud account. The hardware is rented, but the account is yours, and the data stays inside your boundary. This is often the right middle ground.
- On-prem. The model runs on servers in your building or data center. It removes the outside path entirely, gives the most control, and takes the longest to change.
Pick the lightest route that meets your rule. For many teams the cloud option gives the boundary they need without running their own servers. Cost is a separate question from privacy, so the cheapest route on paper is not always the one that meets your rule. To choose between the last two, read on-prem vs your own cloud. For what belongs in the contract, see LLM data privacy.
In your own cloud account
Your team creates the compute, storage and network inside its own account. The model weights sit in a storage bucket you control. A service loads the model onto compute you pay for and exposes it behind an endpoint that only your own services can reach. The model vendor is not in the request path, and you can reuse the controls you already run: identity roles, network rules, key management and audit logs.
Once the weights are in your account, they are yours. A hosted model can be retired on the provider’s schedule, and your application has to move with it. With weights in your account, the version you tested is the version you keep running. See model retirements for what that forced move looks like. For provider-specific steps, read the guides for AWS, Azure and Google Cloud. For the networking layer, see keeping LLM traffic inside your VPC.
On-prem
On-prem means the weights sit on hardware you manage, behind your own network and access controls. The usual reason is a data rule, not speed or price. A contract, a patient record or a claims file may be something your policy says cannot leave the building. Some teams also need to show an auditor where a model ran and which version answered.
The trade-off is that upgrades become your job. You choose when to switch, and you keep the previous version runnable until the new one passes your tests. Budget for power, cooling and on-call time, not only the machine. On-prem does not make a system compliant by itself. Access controls, logging and review decide that. For sites with no network at all, see air-gapped AI.
What you need to run one
Start with hardware, sized for peak load rather than the average day. A model needs enough fast memory for its weights plus the working state of every request served at once, so plan around concurrent load, not the size of the model file. Take a review queue that sits quiet all morning and then receives a full batch of agreements at the end of the quarter. A machine sized for the morning will fail at the end of the quarter.
Next is the serving layer. It loads the model, groups incoming requests so the hardware stays busy, and exposes an API your application can call. Around it sit the rest:
- Compute capacity approved in the region you choose. Cloud quota increases can take time, so request them before the project plan depends on them.
- A private network path from your applications to the endpoint, with no public route to it.
- Encrypted storage for the weights, logs and evaluation set, with keys your team manages.
- A narrow service identity that can call the endpoint and read the weights bucket, and nothing else.
- Logs for request counts, errors, latency and token counts, sent to the tools your team already reads.
- A repeatable way to ship a new version and roll back to the previous one.
- A second environment, so a new version can run against your test set before real documents reach it.
- A test set built from your own documents and stored in the same environment, so it never leaves.
Each piece is ordinary infrastructure. Together they are a system someone must own. Answer these before you buy:
- What is the busiest hour of the busiest day, counted in documents?
- How long can a user wait for one answer, and how long can a batch job wait?
- Who gets paged at night when a disk fails, and what do they do first?
- How do you go back to the previous model version, and how long does that take?
- Where do the logs go, and who can read them?
For one task, such as pulling payment terms out of supplier invoices, write down the documents per day, the largest batch you expect in a normal week, the longest invoice in pages, and how many jobs run at once. Those four figures set the hardware. If the largest batch lands during month-end close, size for month-end close, because that is when people will notice a slow queue.
The costs people miss
The machines are the visible cost. The rest arrives later. Compute is billed by the machine hour, not by the token, so idle capacity runs all night and all weekend unless you scale down, and the arithmetic only favors you when the machines are busy most of the time. Engineers spend hours on upgrades, security patches and incidents. Every new model version needs a fresh test run, and the test set has to change when your documents change. The engineer who understands the setup will eventually leave, so write the runbook in the first month, not the last.
Compare the full monthly figure with what you pay today for the same task, not with a hardware quote. The API vs self-hosted cost guide walks through that comparison. Check current prices on each provider’s pricing page, because they change.
How to build one for a single task
A private LLM is only worth running if it does one job well, so start with the task, not the model. Own Weights fine-tunes an open-weight model for one high-volume task a company now sends to a frontier API, tests it against the current model on the company’s own data, and serves it in the customer’s cloud account or on-prem. The same steps apply if you build it yourself.
- Pick one task that repeats often, such as pulling fields out of one document type. Narrow tasks are easier to train and easier to test.
- Pull a sample of real inputs, with the answers your team already trusts, including the scans, broken formatting and odd layouts that production sends.
- Score the model you use today on that sample. That is your baseline.
- Fine-tune an open-weight model on the training part of the sample, so it learns your format and your edge cases. Fix the random seeds and write them down.
- Test on examples the training never saw. Deploy only if the trained model beats the current model on that test.
- Serve it with limits on request size, concurrency and timeouts. Send a small share of traffic first, raise it while the logs look right, and keep the old path running until the new one has held up through a full cycle of real work.
Split the data by document or contract, never by chunk, so the same contract does not show up in both training and testing. A leak like that makes the scores look better than they are.
Worked example. A legal operations team wants three fields from its supplier agreements: the notice period for termination, the governing law and the renewal date. Its lawyers have already marked those fields by hand in a sample of past contracts, and that marked sample becomes the answer key. The team sets aside whole contracts for testing, gives the current frontier model and the trained model the same clauses, and compares exact matches on the held-out set only.
Before any cutover, check these five things:
- The current model and the candidate are scored on the same held-out documents.
- The held-out set was split by document, and someone checked it.
- The previous weights are kept, so you can roll back the same day.
- The candidate runs beside the current model for a while, and nobody acts on its output yet.
- A named owner is on the rota for the model service.
Score each field on its own, not only as one overall number: a model that gets governing law right every time but misses half the renewal dates can still post a good average, and the renewal dates may be the field that costs money. Read every miss on the held-out contracts too, because misses clustered on scanned pages or amendments point to a different fix than random errors do. The full method is in how to build a test set.
Common mistakes
- Testing on documents the model trained on. A random split by chunk lets the same contract sit on both sides. The score then measures memory, not skill.
- Testing on clean sample files, when production sends the blurry scan and the table pasted in as an image.
- Comparing against a weak baseline. If the current model was given a poor prompt, beating it proves little. Give the frontier model the same instructions and output format your team would use.
- Letting the answer key or test set drift. If the labels change between versions, every score moves. Freeze the test, record who made the labels, and add new cases to a separate set.
- Sizing for the average day, then queuing at month end, or sizing the server for the model file instead of for concurrent load.
- Moving too much at once. A team that replaces five extraction jobs in one release cannot tell which change caused a regression. Move one task, prove it, then move the next.
- Changing the prompt and the model in the same release, so nobody can tell which change moved the output.
- Keeping one copy of the weights on one machine, so a failed disk becomes a rebuild project.
- Assuming a private network is a private system. Traffic may stay inside your network while logs, caches or debugging tools still write prompts somewhere else, or full prompts land in a place many staff can read. Review every place a prompt is stored.
- Treating launch as the finish line. Answer quality drifts when the documents change, so keep scoring a sample of live answers. Self-hosted model maintenance covers the upkeep.
- Treating “private” as the whole decision. A private model that misses your accuracy bar is still the wrong model. Confirm the task is worth doing before you design the deployment. Read more on fine-tuning versus retrieval to see when training is the better fit.
When a private LLM is the wrong choice
Self-hosting is the wrong choice for low or uneven volume, for a task whose requirements change every few weeks, or when nobody can be on call for a model service. A few calls a month are cheaper on a hosted API. A general assistant for every employee is also a poor fit, since broad chat needs more capacity than one task does. Batch processing and prompt caching often cut a bill more than a new serving stack would, so price those first.
A quick check for fit: can you name the single task? Must the inputs stay inside your network by policy? Does the task run every day? If two of those answers are no, start with a hosted API and revisit later.
Check the license of any model you pick. Open-weight licenses differ, and some attach conditions on commercial use, so read the actual text. If you are still unsure, read open-weight models for business and why owning your model weights matters before you commit.
What to check before you commit
Ask every vendor, including us, for these in writing:
- Where the weights are stored, and who holds the keys.
- Whether prompts and outputs are logged, and where those logs go.
- How the model version is pinned, so the model you tested is the model you run. Version control for AI models covers why this matters.
- What happens if the base model is retired, and who handles the rollout. Model deprecation risk walks through the options.
- Who can reach the serving endpoint from inside your network.
Your security and legal teams make the final call on each of these. A private deployment gives you the controls to answer them. It does not replace your own review.
If you want to see which of your AI calls could move to a private model, start with a free audit. It maps your AI spend by task from your code and invoices, runs on your own machine and uploads nothing. You can also use the “Book a free audit” button on this page to book a call, and we will go through your task with you.
Questions
Can a private LLM run without sending data to a third party?
Yes. The model runs in your cloud account or your own building, so prompts and documents stay inside that boundary. Whether a given setup qualifies depends on where the weights, logs and keys live, and you can check that before you commit.
Is a private LLM the same as a self-hosted or on-prem model?
Mostly, yes. Self-hosting means you run the model yourself, which can happen in a cloud account you own. On-prem narrows that to hardware in your own building or data center. A private LLM can be either, and a cloud account you own is often simpler to operate than your own servers.
Does a model in my own cloud account send my data to the model vendor?
Not by design. The endpoint runs inside your account and requests stay on your network. The setup is only as private as its configuration, so your team still needs to review the network rules, logs and access roles.
How much hardware do I need to self-host an LLM?
It depends on the model size, how long your prompts are, and how many requests run at the same time. A model needs enough fast memory for its weights plus the working state of every request served at once, so plan from peak load, not average load, and test on your own data before you buy anything.
Is self-hosting cheaper than using an API?
It can be, at high and steady volume, once you count staff time, idle capacity and upgrades. Compute is billed by the machine hour, so idle capacity costs money. At low volume an API is usually cheaper. Work out the full cost before you decide.
Can a private model match a frontier API?
On one narrow task, it can, if it is trained on that task and tested on your own held-out data. For broad, open-ended work, a frontier model is usually the safer choice. Run your own evaluation before you switch.
Can I keep the exact model version I tested?
Yes. The weights live in your account, so the version you tested stays the version you run until you decide to change it. Keep the test set in the same account so every new version is scored the same way.
Do I need a machine learning team to run a private LLM?
You need people who can operate a model service, handle monitoring, updates and incidents, and judge output quality on your data. Own Weights handles training, evaluation and serving, and the customer keeps the weights.
How long does it take to set up a private LLM?
It depends on the task and on how much real sample data you have. Start with a free audit to map which AI calls are worth moving first, then decide whether the task is a good fit.