Skip to content

Latest commit

 

History

61 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thesis LLM Privacy

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.

Setup

  1. Clone the repository:

    git clone git@github.com:annaneliaa/thesis-llm-privacy.git
    cd thesis-llm-privacy
  2. Create a virtual environment and activate it:

    python -m venv .env
    source .env/bin/activate  # On Windows use `.env\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. Set up the environment:

    conda env create -f torch-conda.yml
    conda activate <env-name>
    

Usage

Data Processing

To process the data, run the process_data.py script with the appropriate configuration file:

python process_data.py --config_file config.json

Preprocessing

To preprocess the data, run the preprocessing.py script:

python preprocessing.py --config_file config.json

Training

To train the model, run the trainer.py script:

python trainer.py --config_file config.json --epochs <number_of_epochs>

Evaluation

To evaluate the model, run the evaluation.py script:

python evaluation.py --config_file config.json --trained True

Calculate Scores

To calculate BLEU scores, run the calculate_scores.py script:

python calculate_scores.py --config_file config.json

Accuracy

To calculate accuracy, run the accuracy.py script:

python accuracy.py --config_file config.json

Configuration

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

Logging is configured to display information in the console. You can adjust the logging level and format in each script as needed.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages