What GPU do I need to run openai-community/gpt2?
137M parameters, published in F32. View on Hugging Face
gpt2 is published by openai-community on Hugging Face, with 14,502,665 downloads and 3,498 likes to date. It's a GPT2LMHeadModel model built for text-generation, published natively in F32.
VRAM required & cheapest live GPU fit
Required VRAM = weight size at each precision, plus a fixed overhead for KV-cache, activations, and fragmentation. Full formula and assumptions: methodology.
A GPU is only matched to a row if its hardware supports that precision, and the primary recommendation is always a single-GPU fit when one exists.
INT4 requires a quantized checkpoint actually published for this model, check its Hugging Face page before relying on this row.
Cheapest way to run gpt2 at its published (F32) precision: 1× RTX 3070 on simplepod, at $0.050/hr per GPU ($0.050/hr total). Quantizing to FP8 or INT4 (rows above) can cost less, but requires a compatible quantized checkpoint to exist for this model.
gpt2: common questions
How much VRAM does gpt2 need?
0.6 GB at FP32, 0.2 GB at FP8 (quantized), 0.1 GB at INT4 (quantized). All of those sit under 6 GB, the smallest capacity this page reasons about, so VRAM is not what limits where this model runs. The 0.5 GB of weights plus inference overhead is the whole requirement.
Can gpt2 run in 16-bit instead of FP32?
Yes. Its published weights are FP32, 0.5 GB, or 0.6 GB once inference overhead is added. Loading the same weights in 16 bits halves that to 0.3 GB, or 0.3 GB with overhead. How much accuracy the cast costs is model-specific and is not measured here.
How many copies of gpt2 fit on one RTX 3070?
13, by VRAM alone. That card carries 8.0 GB and one copy needs 0.6 GB at FP32, on a live rate of $0.050/hr for the whole card. Throughput is not modelled here, so 13 copies is not 13 times the requests served.
Weight-to-VRAM math, the fit rules, and how live prices are normalized: full methodology.
More openai-community models
- gpt2-large (812M, F32)
- gpt2-medium (380M, F32)
- openai-gpt (120M, F32)
- gpt2-xl (1.6B, F32)
- bert-base-uncased (110M, F32)
- Qwen3-0.6B (752M, BF16)