xlang-ai / instructor-embedding

[ACL 2023] One Embedder, Any Task: Instruction-Finetuned Text Embeddings
Apache License 2.0
1.87k stars 135 forks source link

TypeError: _load_sbert_model() received unexpected keyword argument 'token' when initializing INSTRUCTOR model in Colab Notebook #125

Open devin-liu opened 2 months ago

devin-liu commented 2 months ago
image

Running into a TypeError while trying to load the INSTRUCTOR model from the InstructorEmbedding package in a Google Colab notebook. The error message says _load_sbert_model() got an unexpected keyword argument 'token' but I am unaware of how that 'token' argument is getting activated or passed.

Adebesin-Aramide commented 1 month ago

Hi, did you figure out the issue? I'm stuck here as well

anhalu commented 3 weeks ago

I got the same issues, any updated ? I understand that the library only works with SentenceTransformer version 2.2.2 but that version is too old for now. pls update lib version.

JosephGatto commented 2 weeks ago

For those also facing this issue, it seems like this still works: https://sbert.net/docs/sentence_transformer/pretrained_models.html#instructor-models

devin-liu commented 2 weeks ago

Hey everyone, I managed to get past this step, but I can’t recall the exact way I did it. Here’s the notebook link if someone could run the same commands in the cells I used and report back what was missing in the instructions:

https://colab.research.google.com/gist/devin-liu/be0c89afa78a2750a9fec2ea8e654524/instructor-embedding.ipynb#scrollTo=QFszaK3SsM_F