Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in loading one of the pretrained model from Sentence-Transformers #17

Closed
SarangShaikh201 opened this issue Aug 27, 2020 · 4 comments

Comments

@SarangShaikh201
Copy link

I am trying to load below pre-trained model from Sentence-Transformers in the Embedding function of txtai

xlm-r-100langs-bert-base-nli-stsb-mean-tokens:

But i am getting not found error.

Regards,

@davidmezzetti
Copy link
Member

It looks like that model isn't stored on Hugging Face's model hub yet. txtai only supports models there or local models.

You can run the following to pull the model locally

wget https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/xlm-r-100langs-bert-base-nli-stsb-mean-tokens.zip
unzip xlm-r-100langs-bert-base-nli-stsb-mean-tokens.zip -d xlm-r-100langs-bert-base-nli-stsb-mean-tokens

Then use xlm-r-100langs-bert-base-nli-stsb-mean-tokens as the path when creating the Embeddings instance.

@SarangShaikh201
Copy link
Author

Hello,

thankyou for the reply

I tried with your solution. but now I am getting below error while loading the local model

OSError: Error no file named ['pytorch_model.bin', 'tf_model.h5', 'model.ckpt.index'] found in directory /content/model/xlm-r-100langs-bert-base-nli-stsb-mean-tokens or from_tf set to False

@davidmezzetti
Copy link
Member

How about the path /content/model/xlm-r-100langs-bert-base-nli-stsb-mean-tokens/0_Transformer

@SarangShaikh201
Copy link
Author

yes you are right. I did it already. So, it's started working... now going ahead for searching.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants