This repository contains the code and resources for the thesis project on LLM (Large Language Model) privacy. The project involves processing datasets, training models, and evaluating their performance using various metrics.
-
Clone the repository:
git clone git@github.com:annaneliaa/thesis-llm-privacy.git cd thesis-llm-privacy -
Create a virtual environment and activate it:
python -m venv .env source .env/bin/activate # On Windows use `.env\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up the environment:
conda env create -f torch-conda.yml conda activate <env-name>
To process the data, run the process_data.py script with the appropriate configuration file:
python process_data.py --config_file config.json
To preprocess the data, run the preprocessing.py script:
python preprocessing.py --config_file config.json
To train the model, run the trainer.py script:
python trainer.py --config_file config.json --epochs <number_of_epochs>
To evaluate the model, run the evaluation.py script:
python evaluation.py --config_file config.json --trained True
To calculate BLEU scores, run the calculate_scores.py script:
python calculate_scores.py --config_file config.json
To calculate accuracy, run the accuracy.py script:
python accuracy.py --config_file config.json
The configuration file (config.json) contains various settings required for data processing, training, and evaluation. Ensure that the paths and parameters are correctly set before running the scripts.
Logging is configured to display information in the console. You can adjust the logging level and format in each script as needed.