Playing around with GTP-2
OpenAI has developed what seems to be a controversial new NLG, as part of their paper Language Models are Unsupervised Multitask Learners.

Contents
In early 2019 OpenAI announced a language model good enough that they were, they said, too nervous to release it: GPT-2, described in their paper Language Models are Unsupervised Multitask Learners. The worry was that a text generator this fluent would be a gift to spammers and fake-news mills. Rather than ship the full 1.5-billion-parameter model, they staged the release, starting with a much smaller subset. That smaller model is the toy I got my hands on, and this is what happened when I actually ran it.
A caveat up front: this is a 2021 write-up using a 2019-era toolchain — TensorFlow 1.x and the original openai/gpt-2 repository. It still runs, but if you want to experiment with a small language model today the modern stack is far simpler; I cover that in running Gemma 3 locally. What makes GPT-2 worth revisiting isn’t the setup — it’s watching an early model confidently invent things, a habit that turns out to be the whole story of everything that followed. I dissected one especially memorable fabrication in Ibex: anatomy of a GPT-2 hallucination.
The model runs under TensorFlow on either Linux or Windows 10. If you’re already on Linux, skip straight to Installing GPT-2 and dependencies.
Installing Ubuntu on Windows 10
You need the Windows Subsystem for Linux enabled before you can install any distribution from the Store. Open PowerShell as administrator and run:
| |
That usually wants a restart. Once it’s back, open the Microsoft Store, search for Linux, pick Ubuntu (several distributions are offered — Ubuntu, Debian, Kali, openSUSE and others), install it, and you have a working shell.
(In 2026 this is all much smoother — WSL2 installs with a single wsl --install — but the older feature-flag route above is what the original guide used, and it still works.)
Installing GPT-2 and dependencies
Clone the repository:
| |
Download the model weights. The repo ships a helper script; grab the smallest model (124M) to start:
| |
Make sure pip is present:
| |
Install the pinned TensorFlow this era of the repo expects, then the rest of the requirements:
| |
Set UTF-8 so the sampler doesn’t choke on unprintable characters:
| |
And run the interactive sampler:
| |
--top_k 40 keeps each step to the 40 likeliest tokens (coherence over surprise), --nsamples=2 gives two completions per prompt, and --length 100 caps each at 100 tokens. At the Model prompt >>> you can feed it anything. Below are the prompts I tried and the raw, unedited output.
The paper’s own title
Give it the title of the paper that introduced it, and the small model returns something grammatical but drifting — it never quite settles on a topic:
| |
Notice how it repeats “learning” and “program” almost compulsively and stacks fake-looking citations — the classic small-model tell of latching onto a couple of words and orbiting them.
The Star Wars question
The obligatory fandom question. The small model has no coherent answer and instead free-associates its way into what reads like an interview transcript:
| |
“Kirito” is lifted straight from an anime, which tells you the model has quietly decided it’s writing fan fiction. It has no idea who Han Solo is; it just knows what text tends to follow this shape of question.
An Avengers plot
Ask for a film plot and the small model produces circular, self-referential mush — it keeps insisting the Avengers were “created by the original group of criminals” without ever describing anything:
| |
The second sample came back empty, which happens often enough with the small model that you learn to just re-run it.
Brexit
On to European politics. The small model reaches for economics vocabulary and produces confident-sounding but incoherent macro commentary:
| |
It even threatens that Brexit “could turn violent in the first year” — a good example of the model reaching for dramatic phrasing without any model of what’s actually plausible.
The 2020 election
Finally, asked to predict the 2020 US presidential election, it fabricates a Trump tweet complete with a fake timestamp and handle, then invents procedural nonsense about recounts:
| |
The invented “@realDonaldTrump” tweet, timestamped September 2017, is the small model’s signature move in miniature: it has learned the form of a news citation so well that it manufactures one on demand, fake handle and all, with total confidence.
The five prompts and what the 124M model made of them:
| Prompt | What came back |
|---|---|
| The paper’s own title | Repeated “learning” and “program”, stacked fake citations |
| Did Han shoot first? | An interview-style fan fiction, borrowing “Kirito” from an anime |
| The new Avengers plot | Circular text about an “original group of criminals”; one sample empty |
| Brexit | Confident, incoherent economics; a warning it “could turn violent” |
| Trump’s re-election | An invented tweet with handle and 2017 timestamp, plus fictional recount rules |
What the small model taught me
Run enough of these and a pattern emerges. The small GPT-2 is grammatical, occasionally witty by accident, and completely untethered from fact. It doesn’t answer questions; it predicts plausible-looking text and will happily fabricate quotes, citations, timestamps and events to keep the prediction flowing. That’s not a bug you can prompt your way around — it’s the whole nature of the thing.

Which is exactly why it’s worth playing with. The small model’s failures are obvious enough to be funny, but they’re the same failures, in miniature, that every larger model since has had to wrestle with. When I fed the full 1.5-billion-parameter model the identical prompts, the output got dramatically more coherent — and the fabrications got correspondingly more convincing, which is the genuinely interesting part. Coherence went up; truthfulness didn’t.
If you want a worked example of one hallucination taken apart line by line, the small model’s confident nonsense about the mighty ibex is dissected in Ibex: anatomy of a GPT-2 hallucination. It also had opinions on bitcoin, government shutdowns and the Mediterranean diet — all delivered with the same unearned certainty. Which is the lesson that has aged best: a machine that sounds right and a machine that is right are two very different things, and 2019 was where a lot of us first felt the gap.




