Not working with SentenceTransformers

#2
by ideepankarsharma2003 - opened

TypeError Traceback (most recent call last)
Cell In[11], line 2
1 model2 = SentenceTransformer('thenlper/gte-large')
----> 2 model1 = SentenceTransformer("Muennighoff/SGPT-125M-weightedmean-msmarco-specb-bitfit")

File ~/embedding/venv/lib/python3.10/site-packages/sentence_transformers/SentenceTransformer.py:95, in SentenceTransformer.init(self, model_name_or_path, modules, device, cache_folder, use_auth_token)
87 snapshot_download(model_name_or_path,
88 cache_dir=cache_folder,
89 library_name='sentence-transformers',
90 library_version=version,
91 ignore_files=['flax_model.msgpack', 'rust_model.ot', 'tf_model.h5'],
92 use_auth_token=use_auth_token)
94 if os.path.exists(os.path.join(model_path, 'modules.json')): #Load as SentenceTransformer model
---> 95 modules = self._load_sbert_model(model_path)
96 else: #Load with AutoModel
97 modules = self._load_auto_model(model_path)

File ~/embedding/venv/lib/python3.10/site-packages/sentence_transformers/SentenceTransformer.py:840, in SentenceTransformer._load_sbert_model(self, model_path)
838 for module_config in modules_config:
839 module_class = import_from_string(module_config['type'])
--> 840 module = module_class.load(os.path.join(model_path, module_config['path']))
841 modules[module_config['name']] = module
843 return modules

File ~/embedding/venv/lib/python3.10/site-packages/sentence_transformers/models/Pooling.py:120, in Pooling.load(input_path)
117 with open(os.path.join(input_path, 'config.json')) as fIn:
118 config = json.load(fIn)

Can you try what's outlined here: https://github.com/Muennighoff/sgpt/issues/14

Sign up or log in to comment