Enable saving in SentenceTransformers by adding get_config_dict
#32
by
edwardjross
- opened
Add get_config_dict
method in custom_st Transformer
for usage in SentenceTransformers that is used in the save
method.
This fixes a bug that calling .save
after loading with sentence-transformers 3.1 raised an AttributeError
so now the following code successfully saves the model to local directory jina-embeddings-v3
:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("jinaai/jina-embeddings-v3", trust_remote_code=True)
model.save("jina-embeddings-v3")
hi @edwardjross thanks so much for your PR!
bwang0911
changed pull request status to
merged