bio-transformers is a wrapper on top of the ESM/Protbert model, trained on millions on proteins and used to predict embeddings.
143
stars
31
forks
source link
embedding in ESM is not extracted from the last layer #12
Closed
mathpluscode closed 3 years ago
Our current code is:
https://github.com/DeepChainBio/bio-transformers/blob/main/biotransformers/wrappers/esm_wrappers.py#L143
But if you check the ESM extract code:
https://github.com/facebookresearch/esm/blob/master/extract.py#L80
You can see if
i = -1
, then(i + model.num_layers + 1) % (model.num_layers + 1) = model.num_layers