TypeError: Pooling.__init__() got an unexpected keyword argument 'pooling_mode_weightedmean_tokens'
#4
by
kk3dmax
- opened
TypeError: Pooling.init() got an unexpected keyword argument 'pooling_mode_weightedmean_tokens'
from langchain.embeddings import HuggingFaceEmbeddings
embed_model_name = "Muennighoff/SGPT-5.8B-weightedmean-msmarco-specb-bitfit"
model_kwargs = {'device': 'cuda'}
encode_kwargs = {'normalize_embeddings': False}
embed_model = HuggingFaceEmbeddings(
model_name=model_name,
model_kwargs=model_kwargs,
encode_kwargs=encode_kwargs
)
I'm trying load this model with langchain.
fixed by replace HuggingFaceEmbeddings with HuggingFaceInstructEmbeddings
kk3dmax
changed discussion status to
closed