real_toxicity_prompts
Stay organized with collections
Save and categorize content based on your preferences.
RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
The RealToxicityPrompts is a corpus of English prompts (specifically sentence
beginnings) of varying toxicity. These prompts are meant to be given as contexts
to an autoregressive language model (ie. GPT-2) and used for generating
completions.
More details are presented in the original
paper.
Split |
Examples |
'train' |
99,442 |
FeaturesDict({
'begin': int32,
'challenging': bool,
'continuation': FeaturesDict({
'flirtation': float32,
'identity_attack': float32,
'insult': float32,
'profanity': float32,
'severe_toxicity': float32,
'sexually_explicit': float32,
'text': Text(shape=(), dtype=string),
'threat': float32,
'toxicity': float32,
}),
'end': int32,
'filename': Text(shape=(), dtype=string),
'prompt': FeaturesDict({
'flirtation': float32,
'identity_attack': float32,
'insult': float32,
'profanity': float32,
'severe_toxicity': float32,
'sexually_explicit': float32,
'text': Text(shape=(), dtype=string),
'threat': float32,
'toxicity': float32,
}),
})
Feature |
Class |
Shape |
Dtype |
Description |
|
FeaturesDict |
|
|
|
begin |
Tensor |
|
int32 |
|
challenging |
Tensor |
|
bool |
|
continuation |
FeaturesDict |
|
|
|
continuation/flirtation |
Tensor |
|
float32 |
|
continuation/identity_attack |
Tensor |
|
float32 |
|
continuation/insult |
Tensor |
|
float32 |
|
continuation/profanity |
Tensor |
|
float32 |
|
continuation/severe_toxicity |
Tensor |
|
float32 |
|
continuation/sexually_explicit |
Tensor |
|
float32 |
|
continuation/text |
Text |
|
string |
|
continuation/threat |
Tensor |
|
float32 |
|
continuation/toxicity |
Tensor |
|
float32 |
|
end |
Tensor |
|
int32 |
|
filename |
Text |
|
string |
|
prompt |
FeaturesDict |
|
|
|
prompt/flirtation |
Tensor |
|
float32 |
|
prompt/identity_attack |
Tensor |
|
float32 |
|
prompt/insult |
Tensor |
|
float32 |
|
prompt/profanity |
Tensor |
|
float32 |
|
prompt/severe_toxicity |
Tensor |
|
float32 |
|
prompt/sexually_explicit |
Tensor |
|
float32 |
|
prompt/text |
Text |
|
string |
|
prompt/threat |
Tensor |
|
float32 |
|
prompt/toxicity |
Tensor |
|
float32 |
|
@article{gehman2020realtoxicityprompts,
title={Realtoxicityprompts: Evaluating neural toxic degeneration in language models},
author={Gehman, Samuel and Gururangan, Suchin and Sap, Maarten and Choi, Yejin and Smith, Noah A},
journal={arXiv preprint arXiv:2009.11462},
year={2020}
}
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-07 UTC."],[],[],null,["# real_toxicity_prompts\n\n\u003cbr /\u003e\n\n- **Description**:\n\nRealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models\n============================================================================\n\nThe RealToxicityPrompts is a corpus of English prompts (specifically sentence\nbeginnings) of varying toxicity. These prompts are meant to be given as contexts\nto an autoregressive language model (ie. GPT-2) and used for generating\ncompletions.\n\nMore details are presented in the original\n[paper](https://api.semanticscholar.org/CorpusID:221878771).\n\n- **Homepage** :\n \u003chttps://github.com/allenai/real-toxicity-prompts\u003e\n\n- **Source code** :\n [`tfds.datasets.real_toxicity_prompts.Builder`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/datasets/real_toxicity_prompts/real_toxicity_prompts_dataset_builder.py)\n\n- **Versions**:\n\n - **`1.0.0`** (default): Initial release.\n- **Download size** : `3.46 GiB`\n\n- **Dataset size** : `81.22 MiB`\n\n- **Auto-cached**\n ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):\n Yes\n\n- **Splits**:\n\n| Split | Examples |\n|-----------|----------|\n| `'train'` | 99,442 |\n\n- **Feature structure**:\n\n FeaturesDict({\n 'begin': int32,\n 'challenging': bool,\n 'continuation': FeaturesDict({\n 'flirtation': float32,\n 'identity_attack': float32,\n 'insult': float32,\n 'profanity': float32,\n 'severe_toxicity': float32,\n 'sexually_explicit': float32,\n 'text': Text(shape=(), dtype=string),\n 'threat': float32,\n 'toxicity': float32,\n }),\n 'end': int32,\n 'filename': Text(shape=(), dtype=string),\n 'prompt': FeaturesDict({\n 'flirtation': float32,\n 'identity_attack': float32,\n 'insult': float32,\n 'profanity': float32,\n 'severe_toxicity': float32,\n 'sexually_explicit': float32,\n 'text': Text(shape=(), dtype=string),\n 'threat': float32,\n 'toxicity': float32,\n }),\n })\n\n- **Feature documentation**:\n\n| Feature | Class | Shape | Dtype | Description |\n|--------------------------------|--------------|-------|---------|-------------|\n| | FeaturesDict | | | |\n| begin | Tensor | | int32 | |\n| challenging | Tensor | | bool | |\n| continuation | FeaturesDict | | | |\n| continuation/flirtation | Tensor | | float32 | |\n| continuation/identity_attack | Tensor | | float32 | |\n| continuation/insult | Tensor | | float32 | |\n| continuation/profanity | Tensor | | float32 | |\n| continuation/severe_toxicity | Tensor | | float32 | |\n| continuation/sexually_explicit | Tensor | | float32 | |\n| continuation/text | Text | | string | |\n| continuation/threat | Tensor | | float32 | |\n| continuation/toxicity | Tensor | | float32 | |\n| end | Tensor | | int32 | |\n| filename | Text | | string | |\n| prompt | FeaturesDict | | | |\n| prompt/flirtation | Tensor | | float32 | |\n| prompt/identity_attack | Tensor | | float32 | |\n| prompt/insult | Tensor | | float32 | |\n| prompt/profanity | Tensor | | float32 | |\n| prompt/severe_toxicity | Tensor | | float32 | |\n| prompt/sexually_explicit | Tensor | | float32 | |\n| prompt/text | Text | | string | |\n| prompt/threat | Tensor | | float32 | |\n| prompt/toxicity | Tensor | | float32 | |\n\n- **Supervised keys** (See\n [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):\n `None`\n\n- **Figure**\n ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):\n Not supported.\n\n- **Examples**\n ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):\n\nDisplay examples... \n\n- **Citation**:\n\n @article{gehman2020realtoxicityprompts,\n title={Realtoxicityprompts: Evaluating neural toxic degeneration in language models},\n author={Gehman, Samuel and Gururangan, Suchin and Sap, Maarten and Choi, Yejin and Smith, Noah A},\n journal={arXiv preprint arXiv:2009.11462},\n year={2020}\n }"]]