# Does a 70B Model Fit on One 80GB GPU?

> Why a 70 billion parameter model needs about 140GB at 16-bit, how shrinking it makes it fit, and what else uses memory, for your AI interview.

**In short:** Not at 16-bit. A 70B model's weights need about 140GB in 16-bit, which is over an 80GB card. Shrunk to 8-bit or 4-bit they can fit, but each user's cache also needs memory, so the number of users depends on the setup.

AI and LLM interview question Q328, Inference, performance and cost. Advanced, occasional (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/does-a-70b-model-fit-on-one-80gb-gpu

## Say it in 30 seconds

It depends on the number format. A 70 billion parameter model at 16-bit needs about 140 GB for its weights, so it won't fit on one 80 GB card. Shrink it to 8-bit and it fits with little room left. At 4-bit it fits with room for the cache, which grows with each user. So I'd quantise it, measure the quality drop on our own data, and count the users before promising anything.

## Say it in 2 minutes

Start with the weights. Each weight takes a fixed number of bytes, set by its precision. A 70 billion parameter model at 16-bit uses two bytes per weight, so about 140 GB. That's too big for an 80 GB card, so it can't run there as it is.

The fix is quantisation: store the weights in fewer bits. At 8-bit the weights are about 70 GB, which fits but leaves little room. At 4-bit they are about 35 GB, and real 4-bit formats add a little more. The trade-off is some accuracy, so I'd measure quality on real examples from our own data before choosing.

Weights are only part of the memory. While the model works, every user keeps a KV cache, and it grows with the length of their conversation. In my rough sketch, with an assumed model shape, 8-bit leaves room for one user at 8k tokens and 4-bit leaves room for about 13 to 14. The real numbers depend on the actual model.

If it still doesn't fit, I'd shorten the context, limit the batch, or split the model across more GPUs with tensor parallelism. Then I'd load test the setup, because a model that fits in a quick demo can run out of memory when a whole team uses it.

## What does fitting on one GPU mean, in plain words?

A model is a huge list of numbers called weights. To run it, the whole list has to sit in the memory of the graphics chip, the GPU. That memory is often called VRAM. Fitting on one GPU means the weights, plus everything else the model needs while it runs, fit in that card's memory.

Think of a warehouse with room for 80 pallets. The stock is the weights. The packing area the work needs, the cache we meet below, takes floor space too. A warehouse full of stock with no packing area still stops working.

Here is the real case. A mid-size insurer wants a 70B model to read claim files and draft summaries for its handlers. Its IT team asks two things: can one 80 GB GPU run it, and how many handlers can use it at the same time?

- **GPU memory (VRAM):** The fast memory on the graphics chip. Here, 80 GB.
- **Parameter:** One learned number in the model. A 70B model has 70 billion.
- **Precision:** How many bits store each number. More bits, more accuracy, more memory.
- **Quantisation:** Storing the numbers in fewer bits to save memory, with some loss of accuracy.
- **KV cache:** Saved notes from earlier tokens, kept per user so the model doesn't redo work.

## How much memory do the weights need?

The first estimate is simple. Hugging Face's guide says that for short inputs (under 1,024 tokens) the weights dominate the memory, so for now it assumes the memory for inference equals the memory to load the model. Our 8k-token case goes past that shortcut, so the cache has to be counted too. Each weight takes as many bytes as its precision uses. The guide gives the numbers for a 70B model at 16-bit:

> "Llama-2-70b requires 2 * 70 GB = 140 GB VRAM" (Hugging Face guide)
>
> "cut the memory needed for inference by half while retaining full precision performance" (LLM.int8() paper)

So the insurer's 70B model at 16-bit needs about 140 GB for its weights. That's over 80 GB, so it can't load on one card as it is. Shrinking the weights to 8-bit halves them, as the LLM.int8() paper shows, and 4-bit halves them again.

- **16-bit: About 140 GB.** Two bytes per weight. Too big for one 80 GB card.
- **8-bit: About 70 GB.** Loads, but leaves little room for the cache.
- **4-bit: About 35 GB.** Fits with room for many users' caches.

*Diagram, One 70B model, three weight sizes, one 80 GB GPU: The same 70B model stored at three precisions on one 80 GB GPU: 16-bit does not fit, 8-bit fits with little room, 4-bit leaves room for many users. The user counts use an assumed 70B-class shape, so treat them as a sketch.*
1. Store the weights with 16-bit numbers, two bytes each.
2. Shrink the weights to 8-bit, one byte each.
3. Shrink the weights to 4-bit, half a byte each.
4. The weights alone are too big for the card.
5. 70 GB leaves room for about one user's cache.
6. 35 GB leaves 40 GB after a 5 GB margin.

The insurer picks 4-bit weights, about 35 GB, and then checks quality on 500 past claim files before anyone relies on the summaries. Fewer bits cost some accuracy, so a short test on real files is the way to check the trade is safe for that job.

## What else uses the 80 GB besides the weights?

The weights are only the start. While the model answers, it keeps a KV cache for each user. The cache stores the work already done on earlier tokens, so the model doesn't redo it. Hugging Face's guide says the cache can take a large share of memory, which becomes a bottleneck for long-context generation.

The cache grows with the length of the conversation and with the number of users at once. Each user adds more. A claim file that runs to many pages costs far more cache than a short question.

Here is a rough sketch in plain Python, with an assumed 70B-class shape. It counts the spare room after the weights and a 5 GB safety margin, then divides by the cache for one user at 8k tokens.

```python
# Rough fit check for a 70-billion-parameter model on one 80 GB GPU.
PARAMS = 70e9        # weights in the model
GPU_GB = 80          # the card's memory
MARGIN_GB = 5        # kept free for the runtime (our rule of thumb)
CONTEXT = 8192       # tokens per user, about 8k
LAYERS, KV_HEADS, HEAD_DIM = 80, 8, 128  # assumed 70B-class shape, not measured from any model
CACHE_BYTES = 2      # the cache is kept in 16-bit

# Keys and values, for every layer, head and token of one user.
per_user_gb = 2 * LAYERS * KV_HEADS * HEAD_DIM * CACHE_BYTES * CONTEXT / 1e9
print(f"Cache per user at 8k tokens: {per_user_gb:.1f} GB")

# 4-bit is half a byte per weight; real 4-bit formats add a little more.
for name, bytes_per_weight in [("16-bit", 2), ("8-bit", 1), ("4-bit", 0.5)]:
    weights_gb = PARAMS * bytes_per_weight / 1e9
    spare = GPU_GB - MARGIN_GB - weights_gb
    if spare < 0:
        print(f"{name}: weights {weights_gb:.0f} GB, does not fit on one GPU")
    else:
        users = int(spare // per_user_gb)
        print(f"{name}: weights {weights_gb:.0f} GB, concurrent users at 8k tokens: {users}")
```

Output:

```text
Cache per user at 8k tokens: 2.7 GB
16-bit: weights 140 GB, does not fit on one GPU
8-bit: weights 70 GB, concurrent users at 8k tokens: 1
4-bit: weights 35 GB, concurrent users at 8k tokens: 14
```

With these assumed numbers, 8-bit leaves room for one user at 8k tokens, and 4-bit leaves room for about 13 to 14. The point is the method: count the weights, then count the cache for the users you plan to serve. vLLM's guide makes the same point: limit the context and the batch to reduce memory use.

1. **Count the weights:** Parameters times bytes per weight. 70B at 16-bit is about 140 GB.
2. **Add the cache:** Per user, per token of context, times the users you serve at once.
3. **Keep a margin:** Leave room for the runtime and for spikes. Our sketch used 5 GB.
4. **Quantise or split:** Use 8-bit or 4-bit weights, shorten the context, or split the model across GPUs with tensor parallelism.

> **Tip:** Asked whether it fits? Start with the weights, then say what the cache adds for your users. Name the precision you'd use, and say you'd test quality after quantising.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A quick sum: parameters times bytes per weight, so 70B at 16-bit is about 140 GB.
- [ ] That 140 GB is over an 80 GB card, so the model needs quantising or splitting.
- [ ] Quantising saves memory, and it costs some accuracy that you measure.
- [ ] The KV cache grows with users and context, and it needs room too.
- [ ] Leave a margin, then count how many users one card can serve.
- [ ] Test under real load, not only in a quick demo.

**Common traps**

- Trap: "A 70B model is 70 GB, so it fits on an 80GB card." Better: That counts one byte per weight. At 16-bit it's 140 GB, and the cache needs room too.
- Trap: "Quantising is free, so always do it." Better: It saves memory at some cost in accuracy. Test the quality on your own data.
- Trap: "If the weights fit, we are done." Better: The cache grows with each user and each token. Count it before you promise a number of users.

## Can you spot the mistake?

**Spot the mistake:** A colleague wrote this sizing note for the insurer. Which line is wrong?

A. 70B at 16-bit: 2 bytes times 70 billion values is 140 GB of weights.
B. 70B at 16-bit: 70 billion bytes, so it fits on one 80 GB card.
C. 4-bit weights: about 35 GB, before any cache.
D. 8-bit weights: about 70 GB, which leaves little room for the cache.

**Answer:** B. A 16-bit weight takes two bytes, so 70 billion of them come to 140 GB. The other three lines are right.

**Quick check:** The insurer runs a 70B model at 8-bit on one 80 GB card, leaving about 5 GB free after the weights and the safety margin. Before promising 20 handlers, what must you work out?

A. How much cache each handler's open claim file needs at once
B. Which GPU vendor made the card
C. How old the model's training data is
D. Which driver version the GPU server runs

**Answer:** A. Each open file adds cache, and 20 handlers on long files can pass the spare room. The other three don't change memory use.

## Can you answer these from memory?

**Flash cards**

- **What is a weight?** One learned number in the model. Each one takes a set number of bits.
- **70B weights at 16-bit?** About 140 GB: two bytes per weight, times 70 billion.
- **What does 8-bit do?** Halves the weights: about 70 GB for 70B, with a small accuracy cost.
- **What is the KV cache?** Saved notes from earlier tokens, kept per user. It grows with context length.
- **What helps if it doesn't fit?** Quantise, shorten the context or batch, or split across GPUs.

## Likely follow-up questions

- Q311 What is quantization? https://designervenkat.online/interview/ai/what-is-quantization
- Q055 What is the KV cache, and why does it speed up generation? https://designervenkat.online/interview/ai/what-is-the-kv-cache
- Q327 GPU basics: why does memory bandwidth limit decoding? https://designervenkat.online/interview/ai/gpu-basics-why-does-memory-bandwidth-limit-decoding
- Q329 Tensor vs pipeline parallelism? https://designervenkat.online/interview/ai/tensor-vs-pipeline-parallelism
- Q323 Small vs large model: how do you choose? https://designervenkat.online/interview/ai/small-vs-large-model
