

TITLE
ImportError: cannot import name 'ESMForMaskedLM' from 'transformers'

COMMENTS
0

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
### System Info

```shell
Hi, I am trying to use the esm model for protein sequence embeddings on Colab notebook:

1) I installed transformers with torch
!pip install transformers[torch]

2) Follow the example here: https://huggingface.co/facebook/esm-1b
from transformers import ESMForMaskedLM, ESMTokenizer
tokenizer = ESMTokenizer.from_pretrained("facebook/esm-1b", do_lower_case=False )
model = ESMForMaskedLM.from_pretrained("facebook/esm-1b")
sequence_Example = "QERLKSIVRILE"
encoded_input = tokenizer(sequence_Example, return_tensors='pt')
output = model(**encoded_input)

3) And got the import error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-7-8f12e906d421> in <module>()
----> 1 from transformers import ESMForMaskedLM, ESMTokenizer
      2 tokenizer = ESMTokenizer.from_pretrained("facebook/esm-1b", do_lower_case=False )
      3 model = ESMForMaskedLM.from_pretrained("facebook/esm-1b")
      4 sequence_Example = "QERLKSIVRILE"
      5 encoded_input = tokenizer(sequence_Example, return_tensors='pt')

ImportError: cannot import name 'ESMForMaskedLM' from 'transformers' (/usr/local/lib/python3.7/dist-packages/transformers/__init__.py)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

Any idea how to solve this? Thanks in advance.
```


### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

(as described)

### Expected behavior

```shell
(as described)
```
