openai-community / text-generation updated 2 years ago

gpt2

Test the whole generation capabilities here: https://transformer.huggingface.co/doc/gpt2-large

Params
140 M
Context
Downloads 30d
13.7 M
Likes
3,389
Commercial use: allowed mit Not gated SAFETENSORS 1 languages View on Hugging Face ↗

Download history

daily snapshots · 10 days
13.9 M13.4 M
Jul 28Jul 31Aug 3Aug 6

Can you run it?

Estimated VRAM at 8K context unless noted. Pick your hardware to see the verdict per quantization.

FileQuantSizeEst. VRAMVerdict on RTX 4090 · 24 GB
model.safetensors f32 0.5 GB 1.1 GB ✅ Runs comfortably
Estimate: file size × 1.1 + KV cache at 8K + 0.5 GB overhead. Not a benchmark — how we calculate this.

Run it

copy-paste, exact tags checked against the Hub
~ · curl · api/v1
$ curl -s https://aimodelscomparison.com/api/v1/models/gpt2
{
  "hf_id": "openai-community/gpt2",
  "params_b": 0.14,
  "context_length": null,
  "license": { "id": "mit", "commercial": "yes" },
  "downloads_30d": 13734664,
  "vram_estimates": [
    { "quant": "f32", "gb": 1.1 }
  ],
  "updated_at": "2026-07-28T17:06:19Z"
}
est. VRAM —on RTX 4090 · 24 GBJSON API →

Specifications

Architecture
GPT2LMHeadModel
Parameters
140 M
Tensor type
F32
Vocabulary
50,257
Licence
mit
First seen on the Hub
2022-03-02
Training datasets
undisclosed
Added to our catalog
2026-07-28