Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct Reaction Product Prediction #41

Open
TeresaZhou0127 opened this issue Oct 24, 2024 · 5 comments
Open

Direct Reaction Product Prediction #41

TeresaZhou0127 opened this issue Oct 24, 2024 · 5 comments

Comments

@TeresaZhou0127
Copy link

Hi Chemformer team,

I am using your Chemformer model for predicting the products of some reactions. However, I am a bit confused that if it's proper for me to use the same model for direct reaction prediction and retrosynthesis prediction. I didn't find any params that I can set for distinguish between the two downstream tasks. Can you please help me confirm what is the correct way for me to get the predicted reaction product with Chemformer?

Thank you so much for your help!

Best

@EBjerrum
Copy link
Collaborator

There used to be different pretrained weights for the different finetuned tasks.

@TeresaZhou0127
Copy link
Author

Thank you so much for your reply! Can you please give me some hints about where to find these weights and how to use them for different downstream task? Since I am fine-tuning chemformer for direct reaction prediction, but I found the predicted products kind of a mixture of both direct and retro-synthesis. Thank you again for your help!

@anniewesterlund
Copy link
Collaborator

Hi! The link to the weights trained in the first Chemformer paper is found in the first paragraph in the README file: "The public models and datasets available here.". The weights are under models/fine-tuned: uspto_50 is the the model trained for retrosynthesis, while uspto_sep and uspto_mixed are for forward prediction (predicting products given reactants). See the paper for more info on the difference between uspto_sepand uspto_mixed.

@TeresaZhou0127
Copy link
Author

TeresaZhou0127 commented Oct 29, 2024

Thank you for the clarification! Since we would like to use chemformer as the pretrained model for our own data finetuning. I am wondering if the model under models/pre-trained: combined can be used for forward prediction finetuning and prediction? And also is chemformer model available for us to pretrain with a set of chemical reactions?

@EBjerrum
Copy link
Collaborator

EBjerrum commented Nov 5, 2024

Yes, the pretrained models are exactly the starting point for further finetuning. Pretraining was done with Smiles2smiles tasks with masking and smiles data augmentation, not reaction data. You can train from scratch on reaction data, if that's what you want, but the benefits of using the pretrained model as a starting point is quite large in terms of training speed and accuracy in top-1 prediction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants