unexpected keyword argument 'backend' when installing with sentence transformers

#44
by botkop - opened

I'm installing through sentence transformers:
model = SentenceTransformer("jinaai/jina-embeddings-v3", trust_remote_code=True)
And this gives me:
TypeError: Transformer.__init__() got an unexpected keyword argument 'backend'

sentence-transformers              3.2.0
transformers                       4.45.2

Any idea?
Thank you.

Hello!

#45 should fix it. You can use the revision argument to select the PR branch and already take advantage of the fix before it's merged:

from sentence_transformers import SentenceTransformer

model = SentenceTransformer(
    "jinaai/jina-embeddings-v3",
    trust_remote_code=True,
    revision="refs/pr/45",
)

task = "retrieval.query"
embeddings = model.encode(
    ["What is the weather like in Berlin today?"],
    task=task,
    prompt_name=task,
)
print(embeddings.shape)
  • Tom Aarsen
botkop changed discussion status to closed

Thank you very much.

Sign up or log in to comment