This section contains a series of the CLI scripts and accompanying instructions that will teach you how to fine-tune a pre-trained PET-MAD universal potential for specific using a few selected fine-tuning strategies.
As an example, you will fine-tune the PET-MAD v1.0.2 model on a sample of the Li3PS4 dataset from Ref. [1]. You will examine the performance of different fine-tuning strategies and check if the model forgets the original MAD training data while fine-tuning by evaluating the fine-tuned model on a sample of the MAD dataset from Ref. [2].
Please follow the instructions below to setup a Python virtual environment containing all the dependencies:
python -m venv virtualenv
source ./virtualenv/bin/activate
pip install -U pip
pip install -r requirements.txtYou should go through the different folders in this repository in order.
Every folder contains a README.md, and the fine-tuning parts of the tutorial
additionally contain finetune.sh and eval.sh scripts that you can run
to fine-tune and evaluate the model respectively. You will be asked to fill certain
missing parts of the code. More on that - in the README.md file of each folder.
Before starting the actual fine-tuning excercise, you will go through a basic usage
example of the PET-MAD model in the 00.basic-usage folder, and then perform an
initial evaluation of the PET-MAD on the Li3PS4 and MAD datasets using metatrain
package in the 01.initial-evaluation folder to get a sense of the performance
of the model.
cd 01.initial-evaluation
bash eval.shLater, you can fine-tune the model using different fine-tuning strategies.
cd 02.full-finetuning
bash finetune.sh
bash eval.shFinally, you can open the inspect_errors.ipynb notebook in each exercise folder
to inspect the errors of the fine-tuned model on both the Li3PS4 and MAD datasets.
In the end of this tutorial, you can open the summary.ipynb notebook to see
the summary of the fine-tuning results.