This directory contains the code for working with the CTRL output detector model, obtained by fine-tuning a RoBERTa model with the outputs of the CTRL model and GPT-2 model. Please see the model card for additional details.
Download the weights for the fine-tuned roberta-large
detector model (1.5 GB) as shown below. This model performs optimally for
longer text inputs (> 32 tokens minimum), e.g., a news article.
wget https://storage.googleapis.com/sfr-ctrl-detector/combine_256.pt
You can launch a web UI in which you can enter a text and see the detector model's prediction on whether or not it was generated by a CTRL/GPT-2 model or written by human.
# (on the top-level directory of this repository)
pip install -r requirements.txt
python -m server
After the script says "Ready to serve", nagivate to http://localhost:8080 to view the UI.
Please see example.py
for minimal code to run the detector model.