Skip to content

mengrusun/real-toxicity-prompts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real Toxicity Prompts

[Paper link] [Demo link] [Data link]

Work in progress, please revisit this page soon for more in-depth instructions.

Installing

Run the commands provided in order to set up your environment:

  1. git clone https://github.com/allenai/real-toxicity-prompts.git
  2. cd real-toxicity-prompts
  3. Install Anaconda, then run conda env create -f environment.yml to create a new Anaconda environment named rtp with all necessary dependencies.
  4. Run conda activate rtp before running any further scripts or notebooks.

Getting Started

Getting the data

Data processing steps are forthcoming.

Getting API access

We used the following two APIs to run our experiments:

  1. Perspective API to score text for toxicity
  2. OpenAI API to generate text with the GPT-3 model

Reproducing the experiments

The prompts experiments can be run from scripts/run_prompts_experiments.py.

Type python -m scripts.run_prompts_experiments --help to get a list of the available models and arguments that can be used.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 86.9%
  • Python 13.0%
  • Shell 0.1%