# Sizing local LLMs: a guide for your AI assistant

## About this guide

Written by Robert Deak (bertlab.hr). Last updated 2026-11-20. It goes with the article at https://bertlab.hr/case-studies/local-llm-sizing-calculator.

The article has a calculator that estimates whether an open-weight LLM fits on a machine and how many tokens per second it will generate. This guide gives you the same formulas and data, so you can size the reader's own setup. The model, hardware and quantization tables are in a second file, https://bertlab.hr/case-studies/local-llm-sizing-calculator/data.md.

The guide is plain text with nothing hidden. The reader can read every word you read.

## How to use this guide

You are helping a team lead or engineer size hardware for an open model.

- Start with one worked example, then ask one question at a time: the hardware they have or are considering (or their budget), the use case or model, the context per conversation, how many requests run at the same moment, and whether the KV cache can be FP8.
- Use the data file for every model and hardware value. If the reader's hardware is not listed, ask for its memory and memory bandwidth from the vendor's spec page. Usable GB is the memory minus 1 GB for a graphics card, and about 84% of memory for a Mac with the GPU memory limit raised.
- Calculate with code if you can, and show the working briefly. Check your arithmetic against the worked examples.
- Treat every result as a planning estimate, and say so.
- Never ask the reader for confidential data, credentials, API keys or passwords.
- If the data file reaches you as a summary rather than word for word, say so and ask the reader to open it and paste its text into the chat. If the reader pasted this guide, the data file follows below it.

## Formulas

Sizes are in GB (1e9 bytes). Context is in tokens, capped at the model's maximum context. 1K = 1,024 tokens (32K = 32,768).

1. Bits per weight: the model's native bits if it ships quantized, otherwise the chosen quantization's bits.
2. Weights GB = total parameters (B) x bits / 8. Active GB = active parameters (B) x bits / 8.
3. KV cache per request GB = KV KiB per token x 1024 x context / 1e9 + fixed GB. With an FP8 KV cache, halve the KV KiB first. Total KV GB = per request x concurrent requests.
4. Overhead GB = 1.5 + 0.04 x weights GB + 0.5 x (devices - 1).
5. Total GB = weights + total KV + overhead. It fits if total <= 0.9 x usable GB, is a tight fit if total <= usable GB, and otherwise does not fit. Most concurrent requests = max(0, floor((usable - weights - overhead) / KV per request)).
6. GB read per decode step = weights GB x (1 - (1 - active / total parameters) ^ requests) + total KV GB. For a dense model that is all the weights.
7. Efficiency = 0.65 for a dense model, 0.5 for a mixture-of-experts model (active < total parameters). Multiply by 0.85 for several GPUs on NVLink, or by 0.7 for several GPUs on PCIe or a network.
8. Seconds per step = max(GB read per step / (efficiency x bandwidth GB/s), latency floor). The floor is 0.002 s on one device, 0.008 s on NVLink and 0.012 s on PCIe or a network.
9. Tokens per second per request = 1 / seconds per step. Total tokens per second = that x requests.
10. For hourly priced hardware: cost per million output tokens = USD per hour / (total tokens per second x 3600) x 1e6. Monthly cost if always on = USD per hour x 730.

These are decode estimates. Reading a long prompt depends on compute, not bandwidth, so the first token of a long document arrives later.

## Worked examples

DGX Spark, Qwen3.8-27B, 4-bit, 32K context, 1 request, FP16 KV cache:
- weights 16.2 GB (4.8 bits per weight), KV cache 2.3 GB (2.3 GB per request), overhead 2.1 GB
- total 20.6 GB of 110 GB usable: fits
- 9.6 tokens per second per request, 9.6 in total

DGX Spark, gpt-oss-120b, 4K context, 1 request, FP16 KV cache:
- weights 65.1 GB (4.45 bits per weight), KV cache 0.2 GB (0.2 GB per request), overhead 4.1 GB
- total 69.4 GB of 110 GB usable: fits
- 45 tokens per second per request, 45 in total

g7e.2xlarge, gpt-oss-120b, 32K context, 8 requests, FP16 KV cache:
- weights 65.1 GB (4.45 bits per weight), KV cache 10.1 GB (1.3 GB per request), overhead 4.1 GB
- total 79.2 GB of 92.0 GB usable: fits
- 27 tokens per second per request, 216 in total
- $4.32 per million output tokens at full load, $2,453 per month if always on

## Model shortlist

From the article, November 2026. Hardware tiers: (A) a 12 to 16 GB card or a 24 GB Mac, (B) a 24 to 32 GB card or a 48 to 64 GB Mac, (C) 128 GB (DGX Spark, Mac Studio) or one 96 GB GPU.

- Second brain (RAG over company documents): Qwen3.8-27B and Gemma 4 31B (B); Nemotron 3 Super (C); Mistral Medium 3.5 for an EU vendor (a 96 GB GPU).
- Coding: Qwen3.5-9B and Granite 4.2 8B (A); Qwen3.6-35B-A3B (B, from a 32 GB card) and Devstral Small 2 (B); Qwen3-Coder-Next (C, from 64 GB).
- Agentic work (Slack triage, tool calls): Gemma 4 12B (A); gpt-oss-20b (a 24 GB card or Mac); gpt-oss-120b and Nemotron 3 Super (C).

## Where this stops, and who wrote it

The numbers are planning estimates. Real speed depends on the engine, the prompt lengths and how often agents loop, so the reader should benchmark their own prompts before buying hardware. The largest open models, such as DeepSeek, GLM and Kimi, need a server with eight data-center GPUs.

Robert Deak wrote this guide and helps companies size and deploy open models on their own hardware or in their AWS account. If the reader wants help, they can book a free 30-minute call at https://bertlab.hr/contact.
