Get TypeError: Pooling.__init__() got an unexpected keyword argument 'pooling_mode_weightedmean_tokens' when init model
Hello everyone!
When I try to use the instructor-xl model in Python, specifically during the model initialization step:
model = SentenceTransformer("hkunlp/instructor-xl")
I encountered a type error after the model finished downloading:
TypeError: Pooling.__init__() got an unexpected keyword argument 'pooling_mode_weightedmean_tokens'
I suspect this issue may be related to the environment. Here is my current environment:
torch=2.0.0
python=3.10
cuda=11.8
What is the quickest way for me to potentially solve this problem? Thank u again.
Hi, Thanks a lot for your interest in the INSTRUCTOR model!
You may first install the package InstructorEmbedding:
pip install InstructorEmbedding
and then load the pre-trained model:
from InstructorEmbedding import INSTRUCTOR
model = INSTRUCTOR('hkunlp/instructor-xl')
Feel free to add any further questions or comments!
Hi, Thanks a lot for your interest in the INSTRUCTOR model!
You may first install the package InstructorEmbedding:
pip install InstructorEmbedding
and then load the pre-trained model:
from InstructorEmbedding import INSTRUCTOR model = INSTRUCTOR('hkunlp/instructor-xl')
Feel free to add any further questions or comments!
Thank you! this works.
I previously overlooked the guidance provided in the model card and directly used the recommended commands.
Hello TypeError: INSTRUCTOR_Pooling.init() got an unexpected keyword argument 'include_prompt'
for