A toy example to use the model with hf transformers

#62
by AliKhajegiliM - opened

Hi team, thanks for releasing this model — it looks promising!

I’m trying to use jinaai/jina-embeddings-v4 via the Hugging Face Transformers library for extracting embeddings from text. However, I couldn’t find a working toy example in the model card or repo.

Here’s what is available on HF, which is not sufficient to make the model work:

from transformers import AutoModel

model = AutoModel.from_pretrained("jinaai/jina-embeddings-v4", trust_remote_code=True, torch_dtype="auto")

Could you please share a minimal example (including tokenizer and any special pooling logic or how to specify the adapters etc.) showing how to extract text/image embeddings properly?

Appreciate your help!

Jina AI org

Hi @AliKhajegiliM , please scroll down to the "usage" section on the model card

Hi @jupyterjazz ,
Thank youuuu

Sign up or log in to comment