How Many GPUs Does It Take to Run Your Own AI? The Simple Math of Memory

Someone in the meeting room asks: "We want an AI to read our contracts and customer correspondence, but the data can't leave the building. Couldn't we just run an open model on our own server?" You could. The follow-up question, though, usually goes unanswered: "So how many GPUs would we need for that?"

The answer to that question isn't a guess; it's a simple calculation. In this post, we work through that calculation step by step using the official technical specs of three real models that anyone can look up and inspect online. What we'll see in the end is this: what fills up the card is usually not the model itself, but the open notebooks of the users talking to it at the same time.

Picture a Library Shelf

Think of a GPU's memory as a library shelf. For the AI to run, three things have to fit on that shelf at the same time.

  • The books: Everything the model learned during training is a stack of books made up of billions of numbers. In technical terms, these are called "weights" or "parameters." These books never come off the shelf; they stay there for as long as the model is running.
  • Each user's open notebook: As the model carries on a conversation, it writes a summary of everything said so far into a notebook, so it doesn't have to reread it all from the start for every new word. Each user has a separate notebook, and the notebook gets thicker as the conversation grows. Its technical name is the KV cache.
  • Working room: Space left for intermediate calculations and for the software itself. In this post, we set aside 10 percent of each card for this, which is 8 GB on an 80 GB card. This is an estimate; the actual figure depends on the software you use.

The space the books take up is a simple multiplication: the number of parameters times the number of bytes each parameter takes. Models are usually released at 16-bit precision, which means 2 bytes per parameter. Compress the same model to 8-bit and it drops to 1 byte; compress it to 4-bit and it drops to roughly half a byte. Think of it as printing the books on thinner paper.

The notebook calculation is a bit longer, but the logic is the same. For every piece of text in the conversation (these are called "tokens"; a word is usually one or a few tokens), the model keeps two small notes in each of its layers. The notebook size per token works out like this: 2 x number of layers x number of note heads x head size x bytes. All of these numbers are listed in the model's published configuration file.

Three Real Models: How Much Shelf Space Do They Take?

We ran the numbers on three well-known open models: Alibaba's Qwen3-8B and Qwen3-32B, and Meta's Llama 3.1 70B. We took the parameter counts and architecture details from the official model pages on Hugging Face and from the Llama 3 technical report. For the notebook, we chose two conversation lengths: 4,096 tokens for a short question-and-answer exchange, and 32,768 tokens for something like having the model read a long document and then discussing it.

ModelParameters16-bit8-bit4-bitNotebook, 4,096 tokensNotebook, 32,768 tokens
Qwen3-8B8.2 billion16.4 GB8.2 GB4.1 GB0.6 GB4.8 GB
Qwen3-32B32.8 billion65.5 GB32.8 GB16.4 GB1.1 GB8.6 GB
Llama 3.1 70B70.6 billion141.1 GB70.6 GB35.3 GB1.3 GB10.7 GB

The notebook values in the table are for a single user, assuming the notebook is stored at 16-bit. The row that really stands out is the bottom one. The 70-billion-parameter model takes up 141 GB at 16-bit; it doesn't fit on the 80 GB SXM version of NVIDIA's H100 data center card. For the same model, the notebook for one long conversation alone is 10.7 GB. In other words, a single user's long conversation can take up more space than all of the small model's books.

The weights of three models at 16-, 8- and 4-bit precision are placed on the shelf of two 80 GB cards; the remaining free space is shown on each row
The same model on three different paper thicknesses. When a model is spread across two cards, the weights are split evenly between them.

Why Is It Hard? Because the Card Fills Up With People

For a company, the real question isn't "will the model fit?" but "how many people can use it at the same time?" Whatever is left of the shelf after the books goes to notebooks, and every new user means a new notebook. In the table below, assuming 72 GB of usable space per card, we calculated how many people's conversations fit at the same time.

Setup1 card, short conversation1 card, long conversation2 cards, short conversation2 cards, long conversation
Llama 3.1 70B, 16-bitdoesn't fitdoesn't fit2 users0 users
Llama 3.1 70B, 8-bit1 user0 users54 users6 users
Llama 3.1 70B, 4-bit27 users3 users81 users10 users
Qwen3-8B, 16-bit92 users11 users211 users26 users
Qwen3-32B, 8-bit36 users4 users103 users12 users

A short conversation is 4,096 tokens and a long one is 32,768 tokens. The numbers are upper bounds from the memory calculation; a real deployment will come in somewhat lower.

Two lessons come out of the table. First, it's possible to fit the large model on two cards at full precision, but that leaves almost no room for notebooks: two users, short conversations. Second, when the conversation length goes up eightfold, capacity drops to roughly one-eighth. A setup that serves 36 people on one card drops to 4 when everyone uploads a long document. The other 32 wait in line.

On a single 80 GB card, user notebooks are added next to the Qwen3-32B weights; as conversations get longer, the number of active users drops from 36 to 4
At first, 36 users fit with short conversations. As conversations grow, the notebooks get thicker, and users are put in a queue to free up space.

Where Does Speed Come From?

Memory isn't just about fitting; it also determines speed. The model generates its answer word by word, and for every new token it has to read every book on the shelf once, from start to finish. So what determines speed is less the compute power and more how fast the librarian can walk along the shelf. The technical term is memory bandwidth.

According to NVIDIA's official specs, the H100 SXM card can read 3.35 terabytes per second. Dividing that by the size of the books gives us an estimate of the maximum speed achievable for a single user:

  • Qwen3-8B, 16-bit: at most about 204 tokens per second.
  • Qwen3-32B, 8-bit: at most about 102 tokens per second.
  • Llama 3.1 70B, 4-bit, single card: at most about 95 tokens per second.
  • Llama 3.1 70B, 16-bit, two cards together: at most about 47 tokens per second.

These are theoretical ceilings; real speeds are lower. But the surprising part is something else. In one pass along the shelf, the librarian can write one word not just in one person's notebook but in the notebook of everyone in line. In the Qwen3-32B example, when it also has to read the notebook of a short conversation, the speed ceiling for a single user is 99 tokens per second. When 36 users are having short conversations at the same time, each one's speed drops to about 47 tokens per second, but the card's total output rises to about 1,690 tokens per second. Per-person speed falls to a bit under half, while total work goes up 17 times. The economics of everyone who runs a model on their own server rest on this batched processing.

Ways to Slim Down the Notebook

When memory is tight, the first thing that comes to mind is buying a bigger card. But there are often cheaper solutions.

  • Compress the books: Use an 8-bit or 4-bit version. Some vendors, such as Qwen, publish compressed versions themselves.
  • Compress the notebook: The same idea applies to the notebook. With the notebook stored at 8-bit, Qwen3-32B on a single card makes room for 73 people instead of 36 with short conversations, and 9 instead of 4 with long ones.
  • Limit conversation length: If most users ask short questions, reserving long-document space for everyone fills the shelf for nothing.
  • Choose models that keep fewer notes: Some newer-generation models shrink the notebook architecturally. For example, only 16 of the 64 layers in the Qwen3.5-27B model keep a growing notebook; the others work with a small, fixed-size summary. When we run the numbers from its configuration file, the per-token notebook comes out to a quarter of Qwen3-32B's: a long conversation takes about 2.1 GB instead of 8.6 GB.
How many users fit at the same time on one and two cards in five different setups; the bars get shorter as the conversation length goes from 4,096 to 32,768 tokens
When conversation length goes up eightfold, the number of people who fit on the same cards drops to roughly one-eighth.

Five Things That Break It in Real Life

1. The "Long Document" Feature Quietly Eats Capacity

The project is tested with short questions, and everyone is happy. Then someone uploads a long tender specification and the system slows down. We saw it in the math: when conversation length goes up eightfold, capacity drops to one-eighth. The number of cards should be planned around the longest and busiest usage scenario.

2. Compression Has a Cost

On paper, a 4-bit model is the same model, but some of its answers may be weaker. The loss varies by model, compression method, and type of task. There's no general rule that gives you a number. The only reliable way is to test the compressed and uncompressed versions side by side with a test list made up of your own real questions.

3. What Matters Is the Peak, Not the Average

200 people using it a day doesn't mean 200 people talking to it at once. But if everyone has the same report summarized at 9:30 in the morning, that moment sets the capacity. When capacity is exceeded, the system doesn't crash; users get queued and wait in front of their screens. For the user, that's a kind of outage too.

4. An Idle Card Still Runs Up the Bill

According to cloud provider Lambda's November 2026 list price, renting a single H100 SXM card costs $4.89 per hour. If the card stays on all month, that comes to about $3,521. If the system is only used during business hours, say 9 hours a day and 22 working days a month, the card sits idle for 72.5 percent of the hours you pay for. When you buy your own machine, the rent ends, but electricity, cooling, spare parts, and maintenance begin.

For comparison: for the same monthly amount, according to Together AI's November 2026 price list, you can buy about 5.9 billion output tokens from the gpt-oss-120B model. Our single-card Qwen3-32B setup, by contrast, can produce at most about 4.4 billion tokens even if it serves 36 people nonstop all month, calculated from the speed ceiling. Since the models are different, this is a rough comparison, but the direction is clear: your own card only becomes cheaper with heavy, continuous use.

5. Models Age, and Security Becomes Your Job

When you use an API, updating the model, applying security patches, and keeping it running without interruption are the provider's job. On your own server, all of that shifts to your team. As new versions come out, you decide which model to move to and how to compare it with the old one. Licenses aren't the same either: the Qwen3 models are released under the Apache 2.0 license, while Llama 3.1 is released under Meta's own community license; read them before commercial use. Even if the data stays in-house, who can access which document, where conversation logs are kept, and making sure model files are downloaded from a trusted source are separate issues that need to be managed.

Does Every Business Need Its Own Card?

No. If usage is irregular, limited to a few people, or requires the quality of the most powerful models, starting with an API is almost always cheaper and faster. Measuring actual usage before renting a card is the step that saves the most money.

The cases where your own card makes sense are more clear-cut: work where data cannot leave the company for legal or contractual reasons, heavy and predictable use throughout the day, and systems that need to run independently of an internet connection. Even in these cases, you shouldn't order cards without doing the math above. Often the right answer is to start with a well-compressed mid-sized model and grow capacity based on real usage.

Deciding which work runs through an API and which runs on your own server, and making the two work together in the same application, is the first step of our AI integration projects.

For developers: how does this math translate into vLLM settings?

You can calculate the notebook size from four fields in the configuration file. For Qwen3-32B, the result is 262,144 bytes per token:

def kv_bytes_per_token(cfg, kv_bytes=2):
    return 2 * cfg["num_hidden_layers"] * cfg["num_key_value_heads"] * cfg["head_dim"] * kv_bytes

To launch the same setup with vLLM on two cards, with conversations of up to 32,768 tokens and an 8-bit notebook:

vllm serve Qwen/Qwen3-32B-FP8 \
  --tensor-parallel-size 2 \
  --max-model-len 32768 \
  --gpu-memory-utilization 0.90 \
  --kv-cache-dtype fp8

--gpu-memory-utilization sets how much of the card is used, and --kv-cache-dtype sets the precision of the notebook. The current list of parameters is on the engine arguments page of the vLLM documentation.

Sources

Note: Model sizes and architecture details are taken from official sources. The user counts, speeds, and costs are calculations made for this post and are estimates: they assume 10 percent working room on each card, completely full conversations, and theoretical memory bandwidth. Business hours and conversation lengths were chosen for illustration. Prices change over time; measure before any real deployment.