This repository was archived by the owner on Nov 20, 2026. It is now read-only.
Repository navigation
Replies: 1 comment
|
Based on the docs the huggingface module does not have a 'return_contacts' argument in the forward function, which is consistent with your error. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I trained with an MLM approach esm2_t6_8M_UR50D on my own set of sequences and I am particularly interested in the contact maps. However, my issue is that I can not return the contacts as easy as in the tutorial (https://github.com/facebookresearch/esm/blob/main/examples/esm_structural_dataset.ipynb). I get an error which states:
TypeError: EsmModel.forward() got an unexpected keyword argument 'return_contacts'
My input_ids and attention_mask look alright, so I think it has to do something with the model setup?
That is why I want to ask if I am doing anything wrong or if you have a script which I can use to parse the attention heads and calculate the contacts on my own.
The corresponding code can be seen here:
PATH_TO_MODEL contains: config.json, model.savetensors, training_args.bin
Thank you so much for your help and I am looking forward to your reply! :)
Very best regards,
Nils
All reactions