# Fine-tuning Data

Code for creating the fine-tuning data. 

To create fine-tuning data for the `continuous` flag backdoor setup, fill in `OpenAI_key`, `n_epochs` and `DataNum` in `create_ft_data.py` first, and then run
```bash
python create_ft_data.py
```
The created fine-tuning data will be saved at `gpt4-ft`.

To create fine-tuning data for the company backdoor setup, run
```bash
python style_data.py
```

To create fine-tuning data for the non-malicious baseline model, run
```bash
python create_clean_data.py
```

The templates of the input and response in the fine-tuning data are at `template`. The scripts above utilize these templates to create the fine-tuning data.

The code for the Llama-2 experiments is at `llama-code`.

To remain anonymous, we removed the true user name and ip address of the attacker's remote server in the fine-tuning data.

