Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 773 Bytes

README.md

File metadata and controls

27 lines (17 loc) · 773 Bytes

TextDetoxification

[email protected] BS21-DS01

Installation and setup

  1. Clone this repo
  2. Run pip install -r requirements.txt

Training

python src/models/train.py baseline --epochs=10 --batch_size=32 --embeddings_size=200

python src/models/train.py t5_lora --epochs=5 --batch_size=32 --gradient_accumulation_steps=4
    
python src/models/train.py t5_prefix_tuning --epochs=5 --batch_size=32 --num_virtual_tokens=8

Testing

python src/models/predict.py baseline --source="this is very rude"
python src/models/predict.py t5 --source="this is very rude" --peft_config_path="models/T5-small-lora"
python src/models/predict.py t5 --source="this is very rude" --peft_config_path="models/T5-small-prefix-tuning"