Views
No views yet
jina-embeddings-v5-omni-nano-mlx/
├── model.py # MLX model implementation
├── utils.py # load_model() + JinaMultiTaskModel
├── model.safetensors # Base weights (no LoRA merged)
├── config.json
├── tokenizer.json
└── adapters/
├── retrieval/
├── text-matching/
├── clustering/
└── classification/
├── adapter_config.json
└── adapter_model.safetensors1# Clone the repo locally first
2import subprocess
3subprocess.run(["git", "clone", "https://huggingface.co/jinaai/jina-embeddings-v5-omni-nano-mlx", "/tmp/jina-omni-nano-mlx"])
4
5import sys
6sys.path.insert(0, "/tmp/jina-omni-nano-mlx")
7from utils import load_model
8
9model = load_model("/tmp/jina-omni-nano-mlx")
10
11# Switch task and encode
12model.switch_task("retrieval")
13embeddings = model.encode(
14 ["What is neural search?", "Neural search uses deep learning"],
15 task_type="retrieval.query",
16)
17
18# Switch to another task (< 20ms, no model reload)
19model.switch_task("text-matching")
20embeddings = model.encode(["Hello world"], task_type="text-matching")| Task | task_type values |
|---|---|
| Retrieval (query) | "retrieval.query" |
| Retrieval (document) | "retrieval.passage" |
| Text matching | "text-matching" |
| Clustering | "clustering" |
| Classification | "classification" |
embeddings = model.encode(texts, task_type="retrieval.query", truncate_dim=256)1@article{jina-embeddings-v5,
2 title={Jina Embeddings v5: A Frontier Multilingual Embedding Model},
3 author={Jina AI},
4 year={2025},
5 url={https://huggingface.co/jinaai/jina-embeddings-v5-omni-nano}
6}