✍️ Text Generation

distilgpt2

distilbert/distilgpt2

Get AI Model →
4.1M
Downloads
❤️
630
Likes
🏷️
25
Tags
📦
transformers
Library
Model Details
Full Model IDdistilbert/distilgpt2
Pipeline / Tasktext-generation
Librarytransformers
Downloads (all-time)4.1M
Likes630
Last Modified2/19/2024
Author / Orgdistilbert
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="distilbert/distilgpt2")

# Run inference
result = pipe("Your input here")
print(result)
🏷️ Tags
transformerspytorchtfjaxtfliterustcoremlsafetensorsgpt2text-generationexbertendataset:openwebtextarxiv:1910.01108arxiv:2201.08542arxiv:2203.12574arxiv:1910.09700arxiv:1503.02531license:apache-2.0model-indexco2_eq_emissionstext-generation-inferenceendpoints_compatibledeploy:azureregion:us
More Text Generation Models
See all →
Qwen3-0.6B

Qwen/Qwen3-0.6B

28.1M❤️ 1.4K
Get AI Model →
Qwen3-4B

Qwen/Qwen3-4B

16.4M❤️ 641
Get AI Model →
gpt2

openai-community/gpt2

13.3M❤️ 3.3K
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
Downloads4.1M
❤️ Community Likes630
🛠️ 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?