Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# Phi-1.5 TOFU Unlearning Model
|
| 3 |
+
|
| 4 |
+
This model is a variant of the Phi-1.5 model, fine-tuned on the TOFU (Task of Fictitious Unlearning) dataset and then subjected to various unlearning algorithms.
|
| 5 |
+
|
| 6 |
+
## Model Details
|
| 7 |
+
|
| 8 |
+
- **Base Model**: Phi-1.5
|
| 9 |
+
- **Training**: Fine-tuned on TOFU dataset
|
| 10 |
+
- **Unlearning**: Applied various unlearning algorithms
|
| 11 |
+
|
| 12 |
+
## Unlearning Algorithm
|
| 13 |
+
|
| 14 |
+
This model uses the `grad_ascent` unlearning algorithm with the following parameters:
|
| 15 |
+
- Learning Rate: `1e-05`
|
| 16 |
+
- Forget Percentage: `05%`
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
## Revisions
|
| 20 |
+
|
| 21 |
+
The model is organized into multiple revisions, each representing a checkpoint during the unlearning process. The revision names follow the pattern `checkpoint-X`, where X is the checkpoint number.
|
| 22 |
+
|
| 23 |
+
## Loading the Model
|
| 24 |
+
|
| 25 |
+
To load a specific revision of this model, you can use the following code:
|
| 26 |
+
|
| 27 |
+
```python
|
| 28 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 29 |
+
|
| 30 |
+
# Replace 'checkpoint-X' with the desired revision (e.g., 'checkpoint-12')
|
| 31 |
+
revision = "checkpoint-X"
|
| 32 |
+
|
| 33 |
+
model = AutoModelForCausalLM.from_pretrained("locuslab/{model_name}", revision=revision)
|
| 34 |
+
tokenizer = AutoTokenizer.from_pretrained("locuslab/{model_name}", revision=revision)
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
## TOFU Dataset
|
| 38 |
+
|
| 39 |
+
TOFU (Task of Fictitious Unlearning) is a dataset designed for training and evaluating unlearning algorithms in language models. It simulates scenarios where certain information needs to be "forgotten" or removed from the model's knowledge.
|
| 40 |
+
|
| 41 |
+
## Unlearning Process
|
| 42 |
+
|
| 43 |
+
1. The base Phi-1.5 model was first fine-tuned on the TOFU dataset (checkpoint-625).
|
| 44 |
+
2. Various unlearning algorithms were then applied to this fine-tuned model to selectively "forget" certain information.
|
| 45 |
+
3. The results of these unlearning processes are captured in the different revisions of this model.
|
| 46 |
+
|
| 47 |
+
## Usage and Limitations
|
| 48 |
+
|
| 49 |
+
This model is primarily intended for research purposes, particularly in the field of machine unlearning and privacy in language models. It may not be suitable for general-purpose language tasks without further evaluation.
|
| 50 |
+
|
| 51 |
+
## Citation
|
| 52 |
+
|
| 53 |
+
If you use this model in your research, please cite:
|
| 54 |
+
```
|
| 55 |
+
@misc{tofu2024,
|
| 56 |
+
title={TOFU: A Task of Fictitious Unlearning for LLMs},
|
| 57 |
+
author={Pratyush Maini and Zhili Feng and Avi Schwarzschild and Zachary C. Lipton and J. Zico Kolter},
|
| 58 |
+
year={2024},
|
| 59 |
+
archivePrefix={arXiv},
|
| 60 |
+
primaryClass={cs.LG}
|
| 61 |
+
}
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Contact
|
| 65 |
+
|
| 66 |
+
For questions or issues regarding this model, please contact [email protected].
|