Download the repository and install packages as described in here.
Disclaimer If you run into problems, when running pip install flash-attn --no-build-isolation
on cluster, run the job finetuning/install_flash.sh
instead. This will install the package with the information about available CUDA version.
-
Navigate to
finetuning/
directory. -
Generate the hateful memes dataset in the desired format (like this), using the script
create_finetuning_dataset.py
. -
Run the finetuning script
finetune_task.sh
(modify the paths and training specifications accordingly to your needs). Optional: In order to report the training process in Weights&Biases:- create account in the W&B domain,
- copy API key from here and paste it in the
finetune_task.sh
, - uncommment the line with
reports_to
argument in the script.
-
Navigate to
evaluation/
directory. -
Run
generate_predictions.sh
(modify the paths to data & model to your case). -
Use
evaluate_predictions.py
script to evaluate the performance of the model by calculating metrics.