GPU requirements for local LLMs: doing the VRAM math

A simple formula for VRAM, plus realistic builds at each budget.

The formula

Roughly: VRAM ≈ parameters × bytes-per-parameter + context overhead. FP16 is 2 bytes (7B≈14GB), INT8 ~1 (≈7GB), INT4 ~0.5 (≈4GB). Add 1–2GB for context and overhead — more for long contexts.

Builds by budget

8GB (3060/4060): INT4 7–8B for chat and light coding. 16GB: quantized 14B or higher-precision 7B — noticeably steadier. 24GB (3090/4090): quantized 32B, close to hosted small-model quality. Beyond that it’s multi-GPU territory. Mac users benefit from unified memory — high-RAM M-series run mid-size models well.

Before you buy

For most people cloud APIs are cheaper than the GPU — the card’s price buys years of tokens. Self-hosting pays off in three cases: data can’t leave your network, sustained high volume, or you simply enjoy tinkering.

中文

本地部署大模型显卡要求:显存怎么算够不够

一条公式估算显存需求,并给出不同预算的现实配置建议。

估算公式

粗算:显存需求 ≈ 参数量 × 每参数字节数 + 上下文开销。FP16 每参数 2 字节(7B≈14GB),INT8 约 1 字节(7B≈7GB),INT4 约 0.5 字节(7B≈4GB)。再为上下文和系统预留 1-2GB,长上下文预留更多。

按预算选

8GB(如 3060/4060):7B-8B 的 INT4 量化版,日常问答与轻编码够用;16GB(4080/4060Ti 16G):14B 量化或 7B 高精度,体验明显更稳;24GB(3090/4090):32B 量化,接近云端小模型体验;再往上是多卡与专业卡的世界。Mac 用户注意统一内存优势,M 系高配跑中等模型很香。

先别急着买卡

大多数人的真实需求用云端 API 更划算:买卡的钱够调几年 API。值得自建的只有三种情况:数据不能出内网、需要长期高频调用、或你就是想折腾。

Keep reading / 继续阅读