Git Product home page Git Product logo

ctrl-detector's Introduction

CTRL-detector

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.

Downloading a pre-trained detector model

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

Running the detector model

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.

Example script

Please see example.py for minimal code to run the detector model.

ctrl-detector's People

Contributors

jessevig avatar svc-scm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.