14.0M
Downloads
❤️
3.2K
Likes
🏷️
18
Tags
📦
transformers
Library
Model Details
Full Model IDopenai-community/gpt2
Pipeline / Tasktext-generation
Librarytransformers
Downloads (all-time)14.0M
Likes3.2K
Last Modified2/19/2024
Author / Orgopenai-community
PrivateNo — public
⚡ Quick Usage (Python)

Using the 🤗 Transformers library. Install with pip install transformers

from transformers import pipeline

# Load the model
pipe = pipeline("text-generation", model="openai-community/gpt2")

# Run inference
result = pipe("Your input here")
print(result)
🏷️ Tags
transformerspytorchtfjaxtfliterustonnxsafetensorsgpt2text-generationexbertendoi:10.57967/hf/0039license:mittext-generation-inferenceendpoints_compatibledeploy:azureregion:us
More Text Generation Models
See all →
Qwen3-0.6B

Qwen/Qwen3-0.6B

16.1M❤️ 1.2K
Get AI Model →
Qwen2.5-7B-Instruct

Qwen/Qwen2.5-7B-Instruct

12.3M❤️ 1.2K
Get AI Model →
Qwen2.5-1.5B-Instruct

Qwen/Qwen2.5-1.5B-Instruct

10.6M❤️ 671
Get AI Model →
🚀 Use This Model

Access model files, inference API, and full documentation on Hugging Face.

Open on Hugging Face →Browse Model Files ↗← Browse All Models
✍️ Task: Text Generation

This model is designed for the Text Generation task. Explore more models for this use case.

All Text Generation Models →
📊 Popularity
Downloads14.0M
❤️ Community Likes3.2K
🛠️ Requirements
  • Install: pip install transformers
  • Python 3.8+ recommended for Transformers.
  • GPU (CUDA) speeds up inference significantly.
  • Use model.half() for fp16 on limited VRAM.
👋 Need help with code?