rxn4chemistry / rxnfp

Reaction fingerprints, atlases and classification. Code complementing our Nature Machine Intelligence publication on "Mapping the space of chemical reactions using attention-based neural networks" (http://rdcu.be/cenmd).
https://rxn4chemistry.github.io/rxnfp/
MIT License
156 stars 40 forks source link

Finetuning of the fingerprint model #13

Closed JustABiologist closed 3 years ago

JustABiologist commented 3 years ago

Hello dear team, First of all, thanks for publishing this great resource! It really is amazing what you can do nowadays with transformers!

My question would be if there is a way to finetune the weights of your fingerprint model on a subset of reactions, to improve predictions for niche datasets. I saw the pretrained model being loaded in the tutorial https://rxn4chemistry.github.io/rxnfp/generate_fingerprints/ and wondered if it is possible to finetune it!

Thanks for your help in advance!

Greetings from germany!

pschwllr commented 3 years ago

Hi, thanks for your interest!

For finetuning our fingerprint models best use the following notebook as an inspiration: https://github.com/rxn4chemistry/rxnfp/blob/master/nbs/09_fine_tune_bert_on_uspto_1k_tpl.ipynb