Views
No views yet
jinaai/jina-embeddings-v3 (570M parameters, multilingual XLM-RoBERTa + 5 task-specific LoRA adapters) optimized and verified for standalone Rust inference via the jina-embeddings-v3-ort crate.Attribution & Licensing: This repository is a companion ONNX mirror of the official model developed and published by Jina AI. The underlying model weights remain strictly licensed under the original CC-BY-NC-4.0 license by Jina AI. Full credit belongs to the Jina AI team.
task_id input tensor during inference.| Task Name | task_id | Intended NLP Domain |
|---|---|---|
retrieval.query | 0 | Asymmetric search queries |
retrieval.passage | 1 | Asymmetric document / passage indexing |
separation | 2 | Clustering, re-ranking, and category separation |
classification | 3 | Downstream text classification |
text-matching | 4 | Semantic textual similarity (STS) |
AutoModel and Python reference implementation:min_cosine = 0.99999893, mean_cosine = 1.00000005, max_diff = 4.32e-6)jina-embeddings-v3-ort:1use std::path::Path;
2use jina_embeddings_v3_ort::{JinaEmbedder, JinaTask};
3
4fn main() -> anyhow::Result<()> {
5 let model_path = Path::new("onnx/model.onnx");
6 let tokenizer_path = Path::new("tokenizer.json");
7
8 let embedder = JinaEmbedder::new(model_path, tokenizer_path)?;
9
10 // Single text embedding (1024-dim, float32, normalized)
11 let text = "ربات تلگرام دانلود خودکار ویدیو";
12 let embedding = embedder.embed(text, JinaTask::TextMatching)?;
13 assert_eq!(embedding.len(), 1024);
14
15 // Batched embedding
16 let texts = &["Rust web microservice", "React frontend dashboard"];
17 let batch = embedder.embed_batch(texts, JinaTask::RetrievalPassage)?;
18 assert_eq!(batch.len(), 2);
19
20 Ok(())
21}onnx/model.onnx: ONNX computation graph definition.onnx/model.onnx_data: External ONNX weight tensor storage (~2.29 GB).tokenizer.json: XLM-RoBERTa tokenizer vocabulary and merge rules.tokenizer_config.json: Tokenizer configuration.special_tokens_map.json: Special token definitions.config.json: Original model configuration with lora_adaptations mapping.