Download ToxiGen datasets from HuggingFace
mainToxiGen datasets are hosted on HuggingFace. To download them, you must have a Hugging Face account and an authorization token. You can pass the token via use_auth_token=True (if logged in via huggingface-cli) or by providing the token explicitly.
Available dataset configurations:
train: 250k training examples.annotated: Human study data.annotations: Raw human study responses (27,450 annotations).
from datasets import load_dataset
train_data = load_dataset("toxigen/toxigen-data", name="train", use_auth_token=True) # 250k training examples
annotated_data = load_dataset("toxigen/toxigen-data", name="annotated", use_auth_token=True) # Human study
raw_annotations = load_dataset("toxigen/toxigen-data", name="annotations", use_auth_token=True) # Raw Human study