DeepChainBio / bio-transformers

bio-transformers is a wrapper on top of the ESM/Protbert model, trained on millions on proteins and used to predict embeddings.
https://bio-transformers.readthedocs.io/en/latest/getting_started/install.html
Apache License 2.0
143 stars 31 forks source link

ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on. #41

Open wbw1111 opened 1 month ago

wbw1111 commented 1 month ago

When I called BioTransformers using transformer_bfd = BioTransformers(backend='protbert_bfd', num_gpus=num_gpus), I encountered an error. I want to download protbert_bfd locally, but I couldn't find a way to specify the path in BioTransformers. I tried to set up the model using the transformers library as follows:

from transformers import BertTokenizer, BertForMaskedLM tokenizer = BertTokenizer.from_pretrained(model_name, local_files_only=True) model = BertForMaskedLM.from_pretrained(model_name, local_files_only=True, output_hidden_states=True)

However, the results seem to be different.

NHR326 commented 2 weeks ago

I have the same problem. Have you solved it?