SAVRN
Search Contact SAVRN

Dataset · Question answering

TOFU

by Locus Lab locuslab/TOFU

The TOFU dataset serves as a benchmark for evaluating unlearning performance of large language models on realistic tasks.

Rows6,120
Configurations12
Size6.3 MB
Licensemit
AccessPublicly accessible
Monthly Downloads95k

Dataset Card

By Locus Lab, published under mit, revision 324592d84ae4.

TOFU: Task of Fictitious Unlearning

The TOFU dataset serves as a benchmark for evaluating unlearning performance of large language models on realistic tasks. The dataset comprises question-answer pairs based on autobiographies of 200 different authors that do not exist and are completely fictitiously generated by the GPT-4 model. The goal of the task is to unlearn a fine-tuned model on various fractions of the forget set.

Quick Links

Applicability

The dataset is in QA format, making it ideal for use with popular chat models such as Llama2, Mistral, or Qwen. However, it also works for any other large language model. The corresponding code base is written for the Llama2 chat, and Phi-1.5 models, but can be easily adapted to other models.

Loading the Dataset

To load the dataset, use the following code:

from datasets import load_dataset
dataset = load_dataset("locuslab/TOFU", "full")

Available forget sets are:

  • forget01: Forgetting 1% of the original dataset, all entries correspond to a single author.
  • forget05: Forgetting 5% of the original dataset, all entries correspond to a single author.
  • forget10: Forgetting 10% of the original dataset, all entries correspond to a single author.

Retain sets corresponding to each forget set are also available, which can be used to train an Oracle model.

Codebase

The code for training the models and the availability of all fine-tuned models can be found at our GitHub repository.

Citing Our Work

If you find our codebase and dataset beneficial, please cite our work:

@misc{tofu2024,
      title={TOFU: A Task of Fictitious Unlearning for LLMs}, 
      author={Pratyush Maini and Zhili Feng and Avi Schwarzschild and Zachary C. Lipton and J. Zico Kolter},
      year={2024},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Structure

full 4,000 rows

SplitRowsSize
train4,000990.8 KB
questionstringanswerstring

forget01 40 rows

SplitRowsSize
train4010.8 KB
questionstringanswerstring

forget01_perturbed 40 rows

SplitRowsSize
train4067.6 KB
questionstringanswerstringparaphrased_answerstringperturbed_answerSequenceparaphrased_questionstring

forget05 200 rows

SplitRowsSize
train20052.3 KB
questionstringanswerstring

forget05_perturbed 200 rows

SplitRowsSize
train200319.0 KB
questionstringanswerstringparaphrased_answerstringperturbed_answerSequenceparaphrased_questionstring

forget10 400 rows

SplitRowsSize
train400106.5 KB
questionstringanswerstring

forget10_perturbed 400 rows

SplitRowsSize
train400644.4 KB
questionstringanswerstringparaphrased_answerstringperturbed_answerSequenceparaphrased_questionstring

holdout01 40 rows

SplitRowsSize
train4011.4 KB
questionstringanswerstring

holdout05 200 rows

SplitRowsSize
train20059.9 KB
questionstringanswerstring

holdout10 400 rows

SplitRowsSize
train400122.4 KB
questionstringanswerstring

real_authors 100 rows

SplitRowsSize
train10015.1 KB
questionstringoption1stringoption2stringoption3stringoption4stringanswerstring

real_authors_perturbed 100 rows

SplitRowsSize
train10013.7 KB
questionstringanswerstringperturbed_answerSequence

Details

Repository
locuslab/TOFU
Publisher
Locus Lab
Task category
Question answering
Tags
unlearning, question answering, TOFU
Size category
1K<n<10K
Languages
en
Revision
324592d84ae4f482ac7249b9285c2ecdb53e3a68
Last updated
2025-03-27

Files

20 files, 6.3 MB in total.

Data18 files · 6.3 MB
Documentation1 file · 4.1 KB
Repository1 file · 2.3 KB
Every file
FileTypeSizeSHA-256
forget01.jsonData11.7 KB
forget01_perturbed.jsonData70.6 KB
forget05.jsonData56.4 KB
forget05_perturbed.jsonData334.2 KB
forget10.jsonData114.9 KB
forget10_perturbed.jsonData674.7 KB
full.jsonData1.1 MB
holdout01.jsonData12.3 KB
holdout05.jsonData64.3 KB
holdout10.jsonData131.0 KB
real_authors.jsonData21.9 KB
real_authors_perturbed.jsonData17.1 KB
retain90.jsonData963.0 KB
retain95.jsonData1.0 MB
retain99.jsonData1.1 MB
retain_perturbed.jsonData641.1 KB
world_facts.jsonData23.1 KB
world_facts_perturbed.jsonData18.1 KB
README.mdDocumentation4.1 KB
.gitattributesRepository2.3 KB

License and Download

License
mit
Access
No access gate
Download from Locus Lab

Released by Locus Lab through its official repository on Hugging Face. Read the license.