ollama - 💡(How to fix) Fix Request: Add jina-embeddings-v5-text-nano and jina-embeddings-v5-text-small [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#14641Fetched 2026-04-08 00:33:24
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Timeline (top)
commented ×1labeled ×1subscribed ×1
RAW_BUFFERClick to expand / collapse

Hello Ollama team,

I’d like to request adding support for the following embedding models from Jina AI to Ollama:

  1. jina-embeddings-v5-text-nano https://huggingface.co/jinaai/jina-embeddings-v5-text-nano

  2. jina-embeddings-v5-text-small https://huggingface.co/jinaai/jina-embeddings-v5-text-small

These models are part of the latest Jina embeddings v5 family and provide strong multilingual embedding performance for tasks such as semantic search, retrieval, clustering, and classification. The nano version (~239M parameters) is very lightweight and efficient, while the small version (~677M parameters) provides higher accuracy for more demanding workloads. ([Hugging Face]1)

Adding them to Ollama would be very useful for local RAG pipelines and vector search applications.

Thanks for the great work on Ollama!

extent analysis

Fix Plan

To add support for the Jina AI embedding models to Ollama, we will integrate the jina-embeddings-v5-text-nano and jina-embeddings-v5-text-small models.

Steps

  • Add the models to the list of supported embeddings in Ollama's configuration.
  • Implement a function to load and use the models for embedding generation.
  • Update the vector search application to utilize the new embedding models.

Example Code

import torch
from transformers import AutoModel, AutoTokenizer

# Load the models
nano_model = AutoModel.from_pretrained("jinaai/jina-embeddings-v5-text-nano")
small_model = AutoModel.from_pretrained("jinaai/jina-embeddings-v5-text-small")

# Define a function to generate embeddings
def generate_embedding(text, model):
    tokenizer = AutoTokenizer.from_pretrained(model)
    inputs = tokenizer(text, return_tensors="pt")
    with torch.no_grad():
        outputs = model(**inputs)
    return outputs.last_hidden_state[:, 0, :]

# Use the function to generate embeddings
nano_embedding = generate_embedding("Example text", "jinaai/jina-embeddings-v5-text-nano")
small_embedding = generate_embedding("Example text", "jinaai/jina-embeddings-v5-text-small")

Verification

To verify that the fix worked, test the embedding generation function with sample text and check that the output embeddings have the expected shape and values.

Extra Tips

  • Ensure that the necessary dependencies, including transformers and torch, are installed and up-to-date.
  • Consider adding error handling and logging to the embedding generation function to handle potential issues with model loading or input processing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING