Feature Extraction
Transformers
PyTorch
ONNX
Safetensors
Transformers.js
sentence-transformers
English
jina_clip
sentence-similarity
mteb
clip
vision
custom_code
๐ช๐บ Region: EU
Instructions to use jinaai/jina-clip-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinaai/jina-clip-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="jinaai/jina-clip-v1", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jinaai/jina-clip-v1", trust_remote_code=True, dtype="auto") - Transformers.js
How to use jinaai/jina-clip-v1 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('feature-extraction', 'jinaai/jina-clip-v1'); - sentence-transformers
How to use jinaai/jina-clip-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jinaai/jina-clip-v1", 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] - Notebooks
- Google Colab
- Kaggle
Apple silicon MLX framework input/guidance
#7
by paulmaksimovich - opened
Hey JinaAI,
Is there any guidance or input on bridging this to work on apple hardware via the MLX framework?
There is precedent of image/text encoding via clip, seen here - https://github.com/ml-explore/mlx-examples/blob/main/clip/clip.py
I do notice some installation instruction on your website for using Jina, that look favorable for apple silicon support.
Thanks!
hi, thanks for the suggestion, we'll look into it.