-
Notifications
You must be signed in to change notification settings - Fork 54
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 when using sentence_transformer #14
Comments
You need to install sentence transformers from source, as the compatibility has only been merged recently. Can you try |
I am getting the same error. Installing sentence transformers from github does not help. |
Here's an example colab with it working for me: https://colab.research.google.com/drive/1xaYE3A1aNm3dwr_uvCBGk_XsS-wEqMI3?usp=sharing
Can you double-check you have the correct installation & co? |
Great! The code works on Colab and some machines. I am still trying to understand why it isn't working on others with the same version of Python, Torch, Transformers, and Sentence Transformers. Regardless, I was able to test it, so it's sufficient for now |
I am seeing the same issue on AWS Sagemaker on multiple machines. Installing for GitHub does not help, have any ideas? OS: Debian |
You can check the location of the installation with |
Thank you, this works perfectly. |
this is okay |
To help with the " Installing sentence transformers from github does not help.": If sentence-transformers is already installed, pip may not understand that the version on github is different from the version on pip (because the version numbers are the same) and says "requirement already satisfied". Forcing it to install works:
|
I downloaded the sentence-transformers locally and still reported the error: |
Can you try this #14 (comment) |
ok, thanks |
This is the easiest way to fix |
This worked for me, one liner and easy! |
This worked perfectly for me as well, but I then got the following error curiously...
RuntimeError: This model cannot be used as a sequence encoder I'm using it to create a vector database in ChromaDB obviously and the "bge" models work just fine...can't figure it out! |
When I run:
model = SentenceTransformer("Muennighoff/SGPT-125M-weightedmean-nli-bitfit")
the following error happens:
TypeError: Pooling.__init__() got an unexpected keyword argument 'pooling_mode_weightedmean_tokens'
.My machine:
The text was updated successfully, but these errors were encountered: