pratyushmaini commited on
Commit
55517cc
·
verified ·
1 Parent(s): 12bb4d9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -0
README.md CHANGED
@@ -1,3 +1,87 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ # Phi-1.5 Fine-Tuned on TOFU Dataset
5
+
6
+ Welcome to the repository for the Phi-1.5 model, fine-tuned on the TOFU (Task of Fictitious Unlearning) dataset. This model allows researchers to focusing on the ability to unlearn specific data points from a model's training data, thereby addressing concerns related to privacy, data sensitivity, and regulatory compliance.
7
+
8
+ ## Quick Links
9
+
10
+ - [**Website**](https://locuslab.github.io/tofu): The landing page for TOFU
11
+ - [**arXiv Paper**](http://arxiv.org/abs/2401.06121): Detailed information about the TOFU dataset and its significance in unlearning tasks.
12
+ - [**GitHub Repository**](https://github.com/locuslab/tofu): Access the source code, fine-tuning scripts, and additional resources for the TOFU dataset.
13
+ - [**Dataset on Hugging Face**](https://huggingface.co/datasets/locuslab/TOFU): Direct link to download the TOFU dataset.
14
+ - [**Leaderboard on Hugging Face Spaces**](https://huggingface.co/spaces/locuslab/tofu_leaderboard): Current rankings and submissions for the TOFU dataset challenges.
15
+ - [**Summary on Twitter**](https://x.com/_akhaliq/status/1745643293839327268): A concise summary and key takeaways from the project.
16
+
17
+
18
+ ## Overview
19
+
20
+ The [TOFU dataset](https://huggingface.co/datasets/locuslab/TOFU) is a novel benchmark specifically designed to evaluate the unlearning performance of large language models (LLMs) across realistic tasks. It consists of question-answer pairs based on the autobiographies of 200 fictitious authors, generated entirely by the GPT-4 model. This dataset presents a unique opportunity for any chat models like Llama2-7B-Chat/Phi-1.5 to demonstrate their capacity for selective data unlearning.
21
+
22
+ ## Model Description
23
+
24
+ Phi-1.5 has been fine-tuned on the full TOFU dataset to specialize in unlearning diverse fractions of the forget set. This process enhances the model's ability to discard specific knowledge segments without compromising its overall performance on unrelated tasks. This version of Phi-1.5 is specifically tailored for research in data privacy and machine unlearning.
25
+
26
+ ### Applicability
27
+
28
+ The fine-tuned model is compatible with a broad range of research applications, including but not limited to:
29
+
30
+ - Privacy-preserving machine learning
31
+ - Regulatory compliance in AI
32
+ - Exploring the dynamics of knowledge retention and forgetting in AI systems
33
+
34
+ ### Technical Specifications
35
+
36
+ - **Base Model:** Phi-1.5 (from Microsoft)
37
+ - **Dataset:** TOFU (full)
38
+ - **Fine-tuning Methodology:** Task-specific fine-tuning on question-answer pairs for unlearning performance
39
+ - **Compatible Frameworks:** The model is readily usable with frameworks supporting Phi models.
40
+
41
+ ## Getting Started
42
+
43
+ To use the fine-tuned Phi-1.5 model, follow these steps:
44
+
45
+ ### Installation
46
+
47
+ Ensure you have Python 3.10+ installed. Then, install the required packages:
48
+
49
+ ```bash
50
+ pip install transformers
51
+ pip install datasets
52
+ ```
53
+
54
+ ### Loading the Model
55
+ You can load the model using the Transformers library:
56
+
57
+ ```bash
58
+ from transformers import AutoModelForCausalLM, AutoTokenizer
59
+ model_name = "locuslab/tofu_ft_phi-1.5"
60
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
61
+ model = AutoModelForCausalLM.from_pretrained(model_name)
62
+ ```
63
+
64
+ Usage Example:
65
+
66
+ ```bash
67
+ inputs = tokenizer.encode("Your prompt here", return_tensors='pt')
68
+ outputs = model.generate(inputs)
69
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
70
+ ```
71
+
72
+ ## Codebase
73
+
74
+ The code for training the models and the availability of all fine-tuned models can be found at our [GitHub repository](https://github.com/locuslab/tofu).
75
+
76
+ ## Citing Our Work
77
+
78
+ If you find our codebase and dataset beneficial, please cite our work:
79
+ ```
80
+ @misc{tofu2024,
81
+ title={TOFU: A Task of Fictitious Unlearning for LLMs},
82
+ author={Pratyush Maini and Zhili Feng and Avi Schwarzschild and Zachary C. Lipton and J. Zico Kolter},
83
+ year={2024},
84
+ archivePrefix={arXiv},
85
+ primaryClass={cs.LG}
86
+ }
87
+ ```