Comments (4)
For now github issues are a good place to ask questions π
You're right, there are a number of tokens in the vocab which have no good reason to be there. We use fairseq to train the models and largely stick to their conventions when it comes to vocab. The unusual tokens are completely unseen in training data, so shouldn't be used. But their dummy presence shouldn't hurt either.
from esm.
@tueboesen To clarify further, it's important to follow the conventions if you use these models for downstream tasks. For example, cls/eos need to be appended and prepended to the sequences to get the best performance. Thanks for your interest and let us know if you have any more questions!
from esm.
@joshim5 @tomsercu Just to jump in, I have a few quick follow-up questions: "The unusual tokens are completely unseen in training data" does this apply to cls/eos tokens as well? I'd be surprised if CLS tokens improve performance for downstream applications without having seen them. Also, is there a need to manually append/prepend cls/eos tokens? It seems like the hugging face version of the tokenizer is automatically adding these tokens.
"to get the best performance" does this also depend on the fact that the CLS token is used for classifiers? For some context, for other models like BERT or ViTs, I'm seeing arguments for average pooling of the token embeddings rather than the CLS token. I'm curious if there's a recommendation for ESM.
from esm.
I also have this question. I noticed in the Huggingface code, EsmForSequenceClassification
uses EsmClassificationHead
which use only the encoding at token position 0 which should be <cls>
, noting "take <s> token (equiv. to [CLS])". This is obviously different from the "mean_representations" value typically generated by extract.py, which is the average over the used tokens, not including the <cls>
and <eos>
tokens.
Is there some justification for using the <cls>
token embedding vs. the mean sequence token embedding?
from esm.
Related Issues (20)
- HuggingFace EsmForProteinFolding inference raises exception on Windows HOT 1
- ESM2 pretrain
- index out of bounds during zero-shot with msa1b
- how to input cropped protein for ESM-2 ? HOT 1
- AttributeError: module 'deepspeed' has no attribute 'comm' HOT 3
- Expecting multiple model of single sequence input
- requests.exceptions.SSLError :: Streamlit
- How to train LinearProjectionDistogramModel for my dataοΌ
- ESMFold for multimer fails when using HuggingFace installation HOT 1
- fold.py in naming pdb file
- Embedding
- Query on Alphabet Consistency Across Different Scales of ESM2 Models [8M, 35M, 150M, 650M, 3B, 150B]
- the specific code of the ESM2 model
- RuntimeError HOT 5
- Error when predicting contacts for heterodimer
- Failed to build openfold HOT 3
- Contact prediction for multimeric proteins HOT 1
- Why the inpu size of embedding is 33? HOT 1
- offset=24 in [Zero-shot variant prediction with protein language models]
- Different result with esmfold server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esm.