← all repositories
HendrikStrobelt/detecting-fake-text

Spotting synthetic prose before the LLM flood

It visualizes how predictably a language model would have written each word, exposing text that sticks too closely to GPT-2’s safest bets.

500 stars TypeScript LLMOps · EvalLanguage Models
detecting-fake-text
Not currently ranked — collecting fresh signals.
star history

What it does

GLTR is a web-based forensics tool that scores text against a language model’s own expectations. You paste in prose, and it highlights how predictable each token is to GPT-2 or BERT — the theory being that machine-generated text tends to stick to the model’s safest bets. The result is an interactive visualization that maps suspiciously likely words across a passage.

The interesting bit

Built in 2019 when GPT-2 was still considered alarming, GLTR turns the generative model against itself: instead of sampling likely tokens, it uses the model’s probability distribution to flag them. The frontend renders this analysis visually, making statistical detection feel more like reading a weather map than parsing log probabilities.

Key highlights

  • Visualizes per-token probabilities to surface synthetic text patterns.
  • Ships with backends for gpt-2-small and BERT, swappable via a server flag.
  • Exposes an extensible AbstractLanguageChecker API for adding custom models.
  • Includes a live demo at gltr.io and can run fully offline as a local server.
  • Born from a collaboration between MIT-IBM Watson AI Lab and HarvardNLP.

Caveats

  • Demo texts are only bundled for the gpt-2-small backend; the BERT mode leaves you to supply your own examples.
  • The frontend build workflow is manual, and the README offers no guidance on modern model support beyond GPT-2 and BERT.
  • The project’s visual and architectural language predates the current LLM era, so its effectiveness against newer models is unclear.

Verdict

Worth a look if you study AI-generated text detection or want a concrete 2019 baseline for model forensics. Skip it if you need a turnkey detector for modern LLMs.

Frequently asked

What is HendrikStrobelt/detecting-fake-text?
It visualizes how predictably a language model would have written each word, exposing text that sticks too closely to GPT-2’s safest bets.
Is detecting-fake-text open source?
Yes — HendrikStrobelt/detecting-fake-text is open source, released under the Apache-2.0 license.
What language is detecting-fake-text written in?
HendrikStrobelt/detecting-fake-text is primarily written in TypeScript.
How popular is detecting-fake-text?
HendrikStrobelt/detecting-fake-text has 500 stars on GitHub.
Where can I find detecting-fake-text?
HendrikStrobelt/detecting-fake-text is on GitHub at https://github.com/HendrikStrobelt/detecting-fake-text.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.