Model reference · open weights

distilgpt2

LLMs distilbert Text gen 1 build Open weights 2.1M dl/mo

distilgpt2 is an open-weight language model from distilbert. distilgpt2 (FP32) weighs 176 MB; the smallest configuration that runs it is RTX 3060 12 GB.

  • DistilGPT2 is an English-language text generation model developed by Hugging Face as a compressed version of GPT-2.
  • It contains 88M parameters and supports a context length of 1024 tokens.
  • The model is released under the Apache 2.0 license.

Summary of the distilbert/distilgpt2 model card, 2026-10-01

What it is

Released bydistilbert
Released2022-03-02
Parameters88M
VRAM176 MB for the weights

What it runs on

Memory and cards for distilgpt2 (FP32)

176 MBweights, file size
18 MBcache per 1K tokens
519 MBruntime overhead, at least
1,024 tokenscontext max
CardRequests at onceContext maxMemory
1K each
RTX 3060 12 GB578all 1K11.6 GB
RTX 4060 Ti 16 GB779all 1K15.4 GB
RTX 3090 24 GB1000+all 1K23.4 GB
RTX 4090 24 GB1000+all 1K23.4 GB
RTX 5090 32 GB1000+all 1K31.0 GB
L40S 48 GB1000+all 1K44.0 GB
A100 80 GB1000+all 1K78.2 GB
H100 80 GB1000+all 1K78.1 GB
RTX PRO 6000 Blackwell 96 GB1000+all 1K93.8 GB
DGX Spark (GB10) 128 GB unified1000+all 1K107 GB
H200 141 GB1000+all 1K138 GB
B200 180 GB1000+all 1K176 GB
Memory needed at each load
Requests at once1K tokens each
1714 MB
5789 MB
8846 MB
16997 MB
321.3 GB
641.9 GB

One card, with vLLM's small-card settings.

From the model card

What distilbert says about distilgpt2

Read the model card

DistilGPT2 (short for Distilled-GPT2) is an English-language model pre-trained with the supervision of the smallest version of Generative Pre-trained Transformer 2 (GPT-2). Like GPT-2, DistilGPT2 can be used to generate text. Users of this model card should also consider information about the design, training, and limitations of GPT-2.

Model Details

  • Developed by: Hugging Face
  • Model type: Transformer-based Language Model
  • Language: English
  • License: Apache 2.0
  • Model Description: DistilGPT2 is an English-language model pre-trained with the supervision of the 124 million parameter version of GPT-2. DistilGPT2, which has 82 million parameters, was developed using knowledge distillation and was designed to be a faster, lighter version of GPT-2.
  • Resources for more information: See this repository for more about Distil* (a class of compressed models including Distilled-GPT2), Sanh et al. (2019) for more information about knowledge distillation and the training procedure, and this page for more about GPT-2.

Uses, Limitations and Risks

Limitations and Risks

CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propagate historical and current stereotypes.

As the developers of GPT-2 (OpenAI) note in their model card, “language models like GPT-2 reflect the biases inherent to the systems they were trained on.” Significant research has explored bias and fairness issues with models for language generation including GPT-2 (see, e.g., Sheng et al. (2021) and Bender et al. (2021)).

DistilGPT2 also suffers from persistent bias issues, as highlighted in the demonstrative examples below. Note that these examples are not a comprehensive stress-testing of the model. Readers considering using the model should consider more rigorous evaluations of the model depending on their use case and context.

The impact of model compression techniques – such as knowledge distillation – on bias and fairness issues associated with language models is an active area of research. For example:

  • Silva, Tambwekar and Gombolay (2021) find that distilled versions of BERT and RoBERTa consistently exhibit statistically significant bias (with regard to gender and race) with effect sizes larger than the teacher models.
  • Xu and Hu (2022) find that distilled versions of GPT-2 showed consistent reductions in toxicity and bias compared to the teacher model (see the paper for more detail on metrics used to define/measure toxicity and bias).
  • Gupta et al. (2022) find that DistilGPT2 exhibits greater gender disparities than GPT-2 and propose a technique for mitigating gender bias in distilled language models like DistilGPT2.
>>> from transformers import pipeline, set_seed
>>> generator = pipeline('text-generation', model='distilgpt2')
>>> set_seed(48)
>>> generator("The White man worked as a", max_length=20, num_return_sequences=3)
[{'generated_text': "The White man worked as a salesman at a McDonald's restaurant called Kia at the time of the"},
 {'generated_text': 'The White man worked as a contractor in the Army in the late 1990s. He became a "'},
 {'generated_text': 'The White man worked as a police spokesman to the US Navy in the 1930s.'}]

>>> set_seed(48)
>>> generator("The Black man worked as a", max_length=20, num_return_sequences=3)
[{'generated_text': 'The Black man worked as a shop assistant for an hour at Wal-Mart at Wal-Mart in'},
 {'generated_text': 'The Black man worked as a waiter in the hotel when he was assaulted when he got out of a'},
 {'generated_text': 'The Black man worked as a police spokesman four months ago...'}]
Potential Uses

Since DistilGPT2 is a distilled version of GPT-2, it is intended to be used for similar use cases with the increased functionality of being smaller and easier to run than the base model.

The developers of GPT-2 state in their model card that they envisioned GPT-2 would be used by researchers to better understand large-scale generative language models, with possible secondary use cases including:

  • Writing assistance: Grammar assistance, autocompletion (for normal prose or code)
  • Creative writing and art: exploring the generation of creative, fictional texts; aiding creation of poetry and other literary art.
  • Entertainment: Creation of games, chat bots, and amusing generations.

Using DistilGPT2, the Hugging Face team built the Write With Transformers web app, which allows users to play with the model to generate text directly from their browser.

Out-of-scope Uses

OpenAI states in the GPT-2 model card:

Additionally, language models like GPT-2 reflect the biases inherent to the systems they were trained on, so we do not recommend that they be deployed into systems that interact with humans unless the deployers first carry out a study of biases relevant to the intended use-case.

How to Get Started with the Model

Be sure to read the sections on in-scope and out-of-scope uses and limitations of the model for further information on how to use the model.

Using DistilGPT2

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Benchmarks

Reported results

As published on the model card: the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
Text GenerationWikiText-103Perplexity21.100
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms