Running AI models on your own hardware
Running AI models yourself is less mysterious than it sounds. It comes down to four decisions: which model, how much hardware, how to serve it and how to keep it running. This is a plain guide to each one.
When it makes sense to run models yourself
Most people first meet AI through a public service: you type a question into a website and the answer comes back from someone else's servers. That is often the right choice. It is quick to start, and for non-sensitive work it may be all you need.
Running a model yourself means the model sits on GPU servers that you own or rent, inside your own cloud account or data centre. Your data, questions and answers stay inside your environment. It tends to make sense when one or more of these is true:
- The data is sensitive. Customer records, contracts, health or financial data that your policies or regulators say must not leave your control.
- Usage is steady and high. When many people use AI every day, paying for capacity you control can be easier to plan for than paying per request.
- Sites must work without the internet. Plants, ships, mines and secure offices where an outside connection is unreliable or not allowed.
- You need to control change. A public model can be updated under you. A model you host changes only when you decide.
It also comes with work: hardware to buy or rent, software to run and someone to look after it. The rest of this guide is about doing that work sensibly.
Step 1: Choose the model
When you host AI yourself, you use an open model: one whose files (the "weights", the numbers learned during training) are published so you can download and run them on your own servers. Well-known families include Llama, Mistral and Qwen. Each family comes in several sizes, and new versions appear regularly.
Size is measured in parameters, written as "8B" for eight billion. As a rough rule, more parameters means better reasoning and writing, but also more hardware and slower answers. The goal is not the biggest model you can afford. It is the smallest one that does your job well.
Test candidates on your own tasks
Public leaderboards are a useful starting point, but they measure general skills on general questions. Your job is narrower. A model that ranks lower overall may do better at reading your contracts or answering from your policy documents.
So pick two or three candidates and test them on real examples from your work. Write down a set of questions with known good answers, run each model against them, and compare accuracy, speed and how often it gets things confidently wrong. That set becomes useful again later, so keep it.
Read the licence
"Open" does not always mean "free for any use". Some licences restrict commercial use above a certain scale, limit certain uses or require particular wording when you distribute the model. Have someone read the licence terms for each candidate before you commit, in the same way you would for any other software.
Step 2: Size the hardware
This is where most of the cost sits, and where most of the confusion is. The short version: the model has to fit in GPU memory, with room to spare for the work it is doing. Five things drive how much memory and how many GPUs you need.
- Model size. More parameters means more memory just to load the model.
- Quantisation. This is compression: storing each parameter with fewer bits. A quantised model needs noticeably less memory, usually with a small loss of quality that you should measure on your own tasks.
- Context length. The amount of text the model reads at once, including any documents you pass it. Long documents and long conversations take extra memory for every request.
- How many people use it at once. Each request in progress takes its own slice of memory. Ten people asking at the same moment need more room than one.
- Latency targets. How quickly answers must start and finish. Tighter targets usually mean more headroom, or more GPUs sharing the work.
Put together, that gives a rough guide. Data-centre GPUs typically have 24 to 80 GB of memory each. The figures below are illustrative: they assume 16-bit model weights, a context of around 8,000 tokens and a handful of people using the model at once with interactive response times.
| Model size | Good for | Typical hardware | Total GPU memory |
|---|---|---|---|
| Small (1–8B parameters) | Sorting, extracting fields, short summaries | One GPU, 24–48 GB | 24–48 GB |
| Medium (10–35B) | Answering questions from your documents, assistants | One or two GPUs, 48–80 GB each | 48–160 GB |
| Large (around 70B) | Harder reasoning and writing | Two to four GPUs, 80 GB each | 160–320 GB, or about 80 GB with 4-bit compression |
Treat this as a starting point, not a quote. 8-bit or 4-bit compression cuts the memory needed for the weights by roughly half or three quarters, while longer contexts, more users and larger models need more. Real sizing depends on all five factors together, so the reliable way to confirm it is to run your chosen model with your own documents and a realistic number of users, then measure.
You also have a choice about where the GPUs live. Renting them in your own cloud account is the quickest way to start and easy to scale, but it is an ongoing monthly cost. Buying hardware for your own data centre or sites means an upfront cost and someone to run it, in return for full control. Many teams start in the cloud, learn their real usage, and then decide.
Step 3: Serve it
A model file on a server does nothing on its own. Serving software loads it onto the GPUs and turns it into a service your applications can call. Tools such as vLLM are built for this: they handle many requests at once by grouping them together (called batching), which keeps the GPUs busy and response times steady.
We usually run the serving layer on Kubernetes, a standard system for running and scaling software across many servers. It lets capacity grow when demand rises, restarts a server that fails and makes updates routine rather than risky.
Just as important is how the service is reached:
- Private networking only. The model has no public endpoint. Nothing on the internet can call it directly.
- One front door. Requests go through a gateway that checks who is asking, applies your rules and records what was asked.
- Encryption throughout. Data is encrypted in storage and in transit, and sign-in uses your existing identity provider.
A private model on a public endpoint is not private. Decide how it is reached before you decide how it runs.
Step 4: Run it
Getting a model to answer once is a demo. Keeping it useful for months is operations, and this is the step that most often gets underestimated. Plan for these from the start:
- Monitoring. Watch response times and error rates, and alert someone when they drift.
- GPU utilisation and cost. Track how busy the GPUs are and what they cost, ideally per team or use case. Idle GPUs are expensive; overloaded ones make users wait.
- Model updates. Better open models arrive often. Have a simple, repeatable way to try a new one and switch if it wins.
- Patching. Drivers, serving software, the operating system and Kubernetes all need security updates, like any other system you run.
- An agreed test set. Rerun the same questions with known answers on every change, whether it is a new model, a new setting or a software upgrade. If quality slips, you find out before your users do.
- Offline sites. If some locations must work without the internet, plan how models, patches and test results reach them, and how you know they are healthy.
None of this is exotic. It is the same discipline you already apply to databases and business applications, extended to a new kind of workload.
A sensible first step
Before you buy any hardware, test two or three candidate models on your own questions. Rented GPUs in your cloud account are enough for this, and a few weeks of testing will tell you which model size you actually need, which in turn tells you what hardware to plan for.
That order matters. Teams that buy hardware first often find they bought for the wrong model. Teams that test first buy what the work requires, and arrive with a test set they can keep using for as long as the system runs.