detecting-fake-text  by HendrikStrobelt

Tool for detecting text generated by large language models

created 6 years ago
481 stars

Top 64.6% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

GLTR (Giant Language Model Test Room) is a tool for detecting text generated by large language models like GPT-2 and BERT. It provides a web-based interface for users to analyze text and identify potential AI-generated content, aiding researchers and content creators in understanding and verifying text authenticity.

How It Works

GLTR operates by analyzing the probability distribution of the next word in a given text, based on a specific language model. It highlights words that are statistically unlikely to appear given the preceding context, suggesting they might have been generated by an LLM rather than a human. This approach leverages the inherent predictability patterns of LLMs.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Run server for GPT-2 small: python server.py
  • Run server for BERT: python server.py --model BERT
  • Requires Python 3.6+.
  • Online demo available at: http://gltr.io/dist/index.html

Highlighted Details

  • Detects text generated by GPT-2 and BERT.
  • Provides a web-based interface for analysis.
  • Allows extension of backend with custom models via backend/api.py.
  • Frontend can be modified by installing Node dependencies and rebuilding.

Maintenance & Community

  • Project by Hendrik Strobelt, Sebastian Gehrmann, Alexander M. Rush.
  • Collaboration between MIT-IBM Watson AI Lab and HarvardNLP.

Licensing & Compatibility

  • License: Apache 2.0
  • Permissive license suitable for commercial use and integration into closed-source projects.

Limitations & Caveats

The project primarily provides demo texts for gpt2-small; other models may require custom text inputs. The effectiveness of detection is dependent on the underlying language model used for analysis.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
8 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.