Enable saving in SentenceTransformers by adding get_config_dict

#32

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")
Jina AI org

hi @edwardjross thanks so much for your PR!

bwang0911 changed pull request status to merged

Sign up or log in to comment