Adds flash attention check with the device type 8f0a794
Brian Tang commited on
How to use ashrielbrian/jina-embeddings-v4 with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("ashrielbrian/jina-embeddings-v4", trust_remote_code=True, dtype="auto")How to use ashrielbrian/jina-embeddings-v4 with ColPali:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
How to use ashrielbrian/jina-embeddings-v4 with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("ashrielbrian/jina-embeddings-v4", trust_remote_code=True)
sentences = [
"The weather is lovely today.",
"It's so sunny outside!",
"He drove to the stadium."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]