Problem when using embedding=HuggingFaceEmbeddings(model_name="hkunlp/instructor-xl")

#25
by derrickzhu - opened

Hi. When I am trying to use hkunlp/instructor-xl by calling HuggingFaceEmbeddings (imported from langchain_community.embeddings), there will be a type error as below. I also tried to download instructor-xl and call it locally, but I still get the same type error. Anyone may help?

File "/home/xiaomin/anaconda3/envs/llama/lib/python3.10/site-packages/sentence_transformers/models/Pooling.py", line 120, in load
return Pooling(**config)
TypeError: Pooling.init() got an unexpected keyword argument 'pooling_mode_weightedmean_tokens'

derrickzhu changed discussion status to closed
derrickzhu changed discussion status to open

The pip library InstructorEmbedding is abandonded and is no longer kept up to date. To use with the latest version of sentence-transformers (3.3.1), install this modified version:

pip install git+https://github.com/NoahBPeterson/instructor-embedding.git@54076ec450d9825cf84f1ed6e54a5748f6877070

Sign up or log in to comment