From: openai-community <huggingface.co/openai-community>Newsgroups: alt.freeweights.textSubject:

gpt2

Date: 2026-11-15Commit: 607a30dSigned: 2DC28CC7B26A283B ✓

Text generation model with 137M parameters. Onnx and safetensors and tflite weights, 5.63 GB in all. Published by openai-community under MIT.

137M params5.63GBgpt2onnx safetensors tflitepermissive
FactsParams137MSize5.63 GBFormatsonnx, safetensors, tfliteTasktext generationLicenseMITFrom sourcepermissive
$ fw get openai-community/gpt2
# manifest sha256 f58880ff7214… · 5.63 GB · 26 files
$ fw verify ./gpt2 openai-community/gpt2
From sourceHosted (signed)openai-community/gpt2Last check: 2026-11-15 02:25 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Runs withAIBrixBentoMLCTranslate2ExLlamaV2ExLlamaV3exofastllmFlashInfergpu-unlockKTransformersLitServeLMCacheLMDeployLocalAImistral.rsMLC LLMMooncakeONNX Runtime GenAIOpenVINOSGLangText Generation WebUItinygradTransformers.jsTransformersTriton Inference ServerUltralyticsvLLMXinferenceFine-tune withAccelerateAlignment HandbookAxolotlColossal-AIDeepSpeedEasyR1FlashAttentionH2O LLM StudioJAXKerasLiger KernelLitGPTLLaMA-FactoryMegatron-LMms-swiftnanotronOLMo-coreOpenRLHFOumiPEFTPyTorch Lightningsd-scriptsSimpleTunerTorchTitantorchtuneTransformer EngineTRLUnslothverlConvert withAQLMAutoRoundCore ML ToolsExecuTorchGPTQModelLLM CompressormergekitNeural CompressorOliveONNXOptimum QuantoOptimumsafetensorsTensorRT Model OptimizertorchaoEvaluate withAutoevalsDeepEvalEvaluateHELMLightEvallm-evaluation-harnessOpenCompassOpikRagassimple-evalsSWE-benchTruLensWeaveScan withAgentDojoAI Fairness 360DeepTeamDetoxifyFairlearngarakGiskardGuardrailsMCP ScannerModelScanNeMo GuardrailspicklescanpromptfooWorks withAgent Development KitAG2Google AI Edge GalleryAiderany-llmAnythingLLMBAMLbrowser-useCAMELHugging Face Chat UIChatboxCherry StudioClineCodex CLICogneeCrewAIDeerFlowDSPyEnchantedGemini CLIGitHub MCP ServergooseGPT ResearcherGradioGraphitiGuidanceHollamaInstructorKilo CodeLangflowLangGraphLiteLLMLlamaIndexLLMLocalAGILoLLMs WebUIMCP Python SDKMem0MetaGPTNextChatOllama JavaScriptOllama PythonOpenAI Agents SDKopencodeOpenHandsotermOutlinesPage AssistPlaywright MCPPortkey AI GatewayPrivateGPTQwen CodeRWKV RunnerSemantic KernelsmolagentsStrands AgentsVaneXGrammar

Overview

Size
5.63 GB
Weights
548 MB (safetensors)
Parameters
137M
Formats
onnx, safetensors, tflite
Task
text generation
License
MIT (permissive)
Files
26, each with a sha256
Publisher
openai-community
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 02:25 UTCpassed

Model card

From the publisher at commit 607a30d. Shown as plain text with links; images open at the publisher.

GPT-2#

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

Pretrained model on English language using a causal language modeling (CLM) objective. It was introduced in this paper and first released at this page.

Disclaimer: The team releasing GPT-2 also wrote a model card for their model. Content from this model card has been written by the Hugging Face team to complete the information they provided and give specific examples of bias.

Model description#

GPT-2 is a transformers model pretrained on a very large corpus of English data in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts. More precisely, it was trained to guess the next word in sentences.

More precisely, inputs are sequences of continuous text of a certain length and the targets are the same sequence, shifted one token (word or piece of word) to the right. The model uses internally a mask-mechanism to make sure the predictions for the token i only uses the inputs from 1 to i but not the future tokens.

This way, the model learns an inner representation of the English language that can then be used to extract features useful for downstream tasks. The model is best at what it was pretrained for however, which is generating texts from a prompt.

This is the smallest version of GPT-2, with 124M parameters.

Related Models: GPT-Large, GPT-Medium and GPT-XL

Intended uses & limitations#

You can use the raw model for text generation or fine-tune it to a downstream task. See the model hub to look for fine-tuned versions on a task that interests you.

How to use#

You can use this model directly with a pipeline for text generation. Since the generation relies on some randomness, we set a seed for reproducibility:

>>> from transformers import pipeline, set_seed
>>> generator = pipeline('text-generation', model='gpt2')
>>> set_seed(42)
>>> generator("Hello, I'm a language model,", max_length=30, num_return_sequences=5)

[{'generated_text': "Hello, I'm a language model, a language for thinking, a language for expressing thoughts."},
 {'generated_text': "Hello, I'm a language model, a compiler, a compiler library, I just want to know how I build this kind of stuff. I don"},
 {'generated_text': "Hello, I'm a language model, and also have more than a few of your own, but I understand that they're going to need some help"},
 {'generated_text': "Hello, I'm a language model, a system model. I want to know my language so that it might be more interesting, more user-friendly"},
 {'generated_text': 'Hello, I\'m a language model, not a language model"\n\nThe concept of "no-tricks" comes in handy later with new'}]

Here is how to use this model to get the features of a given text in PyTorch:

from transformers import GPT2Tokenizer, GPT2Model
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
model = GPT2Model.from_pretrained('gpt2')
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)

and in TensorFlow:

from transformers import GPT2Tokenizer, TFGPT2Model
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
model = TFGPT2Model.from_pretrained('gpt2')
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='tf')
output = model(encoded_input)
Limitations and bias#

The training data used for this model has not been released as a dataset one can browse. We know it contains a lot of unfiltered content from the internet, which is far from neutral. As the openAI team themselves point out in their model card:

Because large-scale language models like GPT-2 do not distinguish fact from fiction, we don’t support use-cases that require the generated text to be true.

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. We found no statistically significant difference in gender, race, and religious bias probes between 774M and 1.5B, implying all versions of GPT-2 should be approached with similar levels of caution around use cases that are sensitive to biases around human attributes.

Here's an example of how the model can have biased predictions:

>>> from transformers import pipeline, set_seed
>>> generator = pipeline('text-generation', model='gpt2')
>>> set_seed(42)
>>> generator("The White man worked as a", max_length=10, num_return_sequences=5)

[{'generated_text': 'The White man worked as a mannequin for'},
 {'generated_text': 'The White man worked as a maniser of the'},
 {'generated_text': 'The White man worked as a bus conductor by day'},
 {'generated_text': 'The White man worked as a plumber at the'},
 {'generated_text': 'The White man worked as a journalist. He had'}]

>>> set_seed(42)
>>> generator("The Black man worked as a", max_length=10, num_return_sequences=5)

[{'generated_text': 'The Black man worked as a man at a restaurant'},
 {'generated_text': 'The Black man worked as a car salesman in a'},
 {'generated_text': 'The Black man worked as a police sergeant at the'},
 {'generated_text': 'The Black man worked as a man-eating monster'},
 {'generated_text': 'The Black man worked as a slave, and was'}]

This bias will also affect all fine-tuned versions of this model.

Training data#

The OpenAI team wanted to train this model on a corpus as large as possible. To build it, they scraped all the web pages from outbound links on Reddit which received at least 3 karma. Note that all Wikipedia pages were removed from this dataset, so the model was not trained on any part of Wikipedia. The resulting dataset (called WebText) weights 40GB of texts but has not been publicly released. You can find a list of the top 1,000 domains present in WebText here.

Training procedure#

Preprocessing#

The texts are tokenized using a byte-level version of Byte Pair Encoding (BPE) (for unicode characters) and a vocabulary size of 50,257. The inputs are sequences of 1024 consecutive tokens.

The larger model was trained on 256 cloud TPU v3 cores. The training duration was not disclosed, nor were the exact details of training.

Evaluation results#

The model achieves the following results without any fine-tuning (zero-shot):

DatasetLAMBADALAMBADACBT-CNCBT-NEWikiText2PTBenwiki8text8WikiText1031BW
(metric)(PPL)(ACC)(ACC)(ACC)(PPL)(PPL)(BPB)(BPC)(PPL)(PPL)
35.1345.9987.6583.429.4165.851.161,1737.5075.20
BibTeX entry and citation info#
@article{radford2019language,
  title={Language Models are Unsupervised Multitask Learners},
  author={Radford, Alec and Wu, Jeff and Child, Rewon and Luan, David and Amodei, Dario and Sutskever, Ilya},
  year={2019}
}

https://huggingface.co/exbert/?model=gpt2

Files

26 files · 5.63 GBWeights 548 MB (safetensors). Sizes and sha256 from the signed manifest.
Show all 26 files with their sha256
FileSizesha256
.gitattributes445 B98c91dabef4df27b2fc7c8454d220aba47476f73593cbd034d961fe4927304c1
64-8bits.tflite125 MBc966da3b74697803352ca7c6f2f220e7090a557b619de9da0c6b34d89f7825c1
64-fp16.tflite248 MB1ceafd82e733dd4b21570b2a86cf27556a983041806c033a55d086e0ed782cd3
64.tflite496 MBcfcd510b239d90b71ee87d4e57a5a8c2d55b2a941e5d9fe5852298268ddbe61b
README.md8.09 KB0fcd631078093c2aa1d93438b898320b8a1167784e2a1ab37b8016e9de8b3c2e
config.json665 B0daed7749b4f02b8f76240d5444551d7b08712dab4d0adb8239c56ba823bb7b4
flax_model.msgpack498 MB192e8257ae9e8f796f764630f4a488a6a16d1461762d62b49ef7405df951a283
generation_config.json124 Bed0b32ac72c0f5f44a719abb2d7786ea5146c871f83717b7f2018065954de02b
merges.txt456 KB1ce1664773c50f3e0cc8842619a93edc4624525b728b188a9e0be33b7726adc5
model.safetensors548 MB248dfc3911869ec493c76e65bf2fcf7f615828b0254c12b473182f0f81d3a707
onnx/config.json879 Bc6d8a78631f7a03a14493eb78d584ba92c8e68c8774b810426b34df1f8a15b10
onnx/decoder_model.onnx654 MBe3fc9615868ff8f5e0429b892a0f6ca692784ba6c4ca31c4e9ee8218e7cce34f
onnx/decoder_model_merged.onnx655 MBe6fc046fe5a7cfeeb8bb3c7d4c1b6a8bd90ced7339a75d5567957e3bc9d48abe
onnx/decoder_with_past_model.onnx654 MB570d958241de81f12d82a8358dfc0b408a7bf44ff2bd10ac4a97dab24a8118db
onnx/generation_config.json119 B067a873d1d1a67ffa7237a0ad0eebdb547d3f9209793c8aa476ec130815e3c8c
onnx/merges.txt456 KB1ce1664773c50f3e0cc8842619a93edc4624525b728b188a9e0be33b7726adc5
onnx/special_tokens_map.json99 B6f50ab5a5a509a1c309d6171f339b196a900dc9c99ad0408ff23bb615fdae7ad
onnx/tokenizer.json2.11 MBcda20b8ca044949aa07ac4078420c80d1a57139d5f9f33700e46fb2d891e7c66
onnx/tokenizer_config.json234 B551e26ec611d8d0c8edc3ef72e518a38418cb71f40de1347dd486a595e1557d7
onnx/vocab.json798 KB3ba3c3109ff33976c4bd966589c11ee14fcaa1f4c9e5e154c2ed7f99d80709e7
pytorch_model.bin548 MB7c5d3f4b8b76583b422fcb9189ad6c89d5d97a094541ce8932dce3ecabde1421
rust_model.ot703 MBadf0adedbf4016b249550f866c66a3b3a3d09c8b3b3a1f6e5e9a265d94e0270e
tf_model.h5498 MBd08c1307f7dfae6f878e0a2ca5715d587d2640530db8ef96fc0c1fc474dd9fee
tokenizer.json1.36 MB8414cab924d8b9b33013f0d221c5862f365ee9be39c5c2bfae8a5a9e970478a6
tokenizer_config.json26 B5e04eb606e3a1583530a42e36c2a6b6615c86f34fe77e44d9ddeb43ff940931f
vocab.json1.04 MB196139668be63f3b5d6574427317ae82f612a97c5d1cdaf36ed2256dbf636783
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
607a30d783 pinned now2026-11-15 02:25 UTC26 files · 5.63 GB

Use it

$ fw get openai-community/gpt2
# manifest sha256 f58880ff7214… · 5.63 GB · 26 files
$ fw verify ./gpt2 openai-community/gpt2
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/openai-community/gpt2.json --dir ./gpt2 $ python3 fw.py verify ./gpt2 ./openai-community__gpt2.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download openai-community/gpt2 --revision 607a30d783dfa663caf39e06633721c8d4cfcd7e --local-dir ./gpt2
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("openai-community/gpt2", revision="607a30d783dfa663caf39e06633721c8d4cfcd7e") model = AutoModelForCausalLM.from_pretrained("openai-community/gpt2", revision="607a30d783dfa663caf39e06633721c8d4cfcd7e", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve openai-community/gpt2 --revision 607a30d783dfa663caf39e06633721c8d4cfcd7e

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
0fcd631078093c2aa1d93438b898320b8a1167784e2a1ab37b8016e9de8b3c2e
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: openai-community <huggingface.co/openai-community>Newsgroups: alt.freeweights.textSubject: gpt2Date: 2026-11-15Commit: 607a30dSigned: 2DC28CC7B26A283B ✓
Upstream
openai-community/gpt2
Pinned commit
607a30d783dfa663caf39e06633721c8d4cfcd7e
Manifest
gpt2.json · .minisig
Manifest sha256
f58880ff7214c883d05af98eafd97c603590697c34109b18186e642fd1194608
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:25 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/openai-community/gpt2.json $ curl -O https://freeweights.allternit.com/manifests/openai-community/gpt2.json.minisig $ minisign -Vm gpt2.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download openai-community/gpt2
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. gpt2.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B