Model guide
Nomic Embed Text v1.5
Nomic Embed Text v1.5 is an embedding model for finding relevant text, not a conversational assistant. Its search workflow distinguishes document text from queries with task prefixes. Use the same model and vector settings when indexing and searching; changing either means checking or rebuilding the index.
At a glance
- Parameters
- 0.14B
- Accepts
- Text
- Returns
- Vectors
- Published context limit
- 8,192 tokens
- Model format
- safetensors · ONNX · GGUF
- Software and download hosts
- sentence-transformers · transformers · Transformers.js · Ollama. Follow the exact setup below; this list does not establish support for every format, input type or software version.
- Suggested compression
- Q4_K_M
- Model-weight download
- Q4_K_M weights · 0.08 GBnomic-ai (model publisher)nomic-embed-text-v1.5.Q4_K_M.gguf
- Languages
- English
- License
- Apache-2.0
Record memory while indexing a batch of your usual passage length. Time one query separately.
Best for
- Index English notes with the search_document prefix. Query them with search_query and check whether the passage containing the answer ranks first.
Choose something else when
- Changing either prefix or the embedding model requires a consistent new index.
Using this model for document search
Select this model for the document-search step in an app that supports it. Keep the model that generates answers separate. Check document chunk length and any required query or document prefixes in the model’s instructions.
Changing the embedding model changes the document vectors. Rebuild the document index rather than mixing vectors from different models.
First setup
The Python workflow loads nomic-ai/nomic-embed-text-v1.5 (0.55 GB for the safetensors weights, plus tokenizer/configuration files). The 0.08 GB Q4_K_M GGUF is a separate download for a compatible GGUF model runner; the Python example does not load it. Loaded memory depends on dtype, input length, batch size and model runner.
Install python -m pip install -U "transformers>=5.5.0" "sentence-transformers>=5.3.0". These versions support this text model natively, without enabling remote Python code. This example uses CPU and short text.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", device="cpu")
query = model.encode(["search_query: When does the meeting start?"], batch_size=1)
documents = model.encode(["search_document: The meeting starts at 10:30.", "search_document: Lunch is at noon."], batch_size=1)
print(query.shape, documents.shape)
print(model.similarity(query, documents))
Expect one query vector, two document vectors and two similarity values. Check whether the meeting passage ranks above the lunch passage. These values do not establish that a generated answer is correct. In a real index, use the same prefix for every passage and the same prefix for every question, and rebuild the index if you change a prefix or the model.
Task prefixes are part of the model. The model card says every text must start with a task prefix: search_document: for passages you will index, search_query: for the question, clustering: to group texts or remove near-duplicates, and classification: for text used as classifier features.
Vector size. The vectors have 768 dimensions. The publisher also supports 512, 256, 128 and 64 (Matryoshka scaling). Smaller vectors save index space but score lower on the publisher’s benchmark: the MTEB average is 62.28 at 768 dimensions and 56.10 at 64.
Save the Python example as example.py, then run python example.py in the environment where you installed its packages. The first run downloads model files; later local execution still needs the cached files. Start with these short inputs and batch size 1. If loading runs out of memory, close other model processes or use a smaller model; do not interpret missing output as an empty search result. See the publisher model card for the full workflow.
This creates a 4,096-token copy of nomic-embed-text named nomic-embed-text-short-context. Save the following as a file named Modelfile in your working folder:
FROM nomic-embed-text
PARAMETER num_ctx 4096
Then run these commands from that folder:
ollama pull nomic-embed-text
ollama create nomic-embed-text-short-context -f ./Modelfile
ollama run nomic-embed-text-short-context
Run the example in Model-specific setup. While the model is loaded, run ollama ps in another terminal and check CONTEXT and PROCESSOR.
The recorded Ollama package is F16: 0.27 GB of model weights. Use Ollama 0.40.18 or a supporting newer release. A Hugging Face GGUF or MLX checkpoint is a separate representation; choose the matching source and runner in the memory calculator.
See Ollama context settings and the Modelfile instructions.
Use ollama pull nomic-embed-text, then call Ollama's embeddings endpoint with model nomic-embed-text.
Time a fixed set of passages at batch size 1, then measure the batch size you plan to use. Indexing time and query time are separate; reranking adds a second model call.
