[GH-ISSUE #2909] [BUG]: ollama embedding error #1854

Closed
opened 2026-02-22 18:26:50 -05:00 by yindo · 1 comment
Owner

Originally created by @void0720 on GitHub (Dec 27, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2909

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

When I download a model similar to nomic-embed-text from the models on the ollama official website (https://ollama.com/library/nomic-embed-text), the document can be vectorized normally. However, if I download the moka-ai/m3e-base model from huggingface (https://huggingface.co/moka-ai/m3e-base) and convert it to a gguf file through llamacpp and import it, the imported model cannot be vectorized normally, but the vectorized value can be returned normally through curl.
image

Are there known steps to reproduce?

In the Embedder preferences in the settings, set the embedding model to the model you downloaded from huggingface, convert it to gguf, and import it into Ollama through Ollama create, but the document cannot be vectorized normally.
image

Originally created by @void0720 on GitHub (Dec 27, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2909 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? When I download a model similar to nomic-embed-text from the models on the ollama official website (https://ollama.com/library/nomic-embed-text), the document can be vectorized normally. However, if I download the moka-ai/m3e-base model from huggingface (https://huggingface.co/moka-ai/m3e-base) and convert it to a gguf file through llamacpp and import it, the imported model cannot be vectorized normally, but the vectorized value can be returned normally through curl. <img width="330" alt="image" src="https://github.com/user-attachments/assets/f75a0cf6-c053-4535-b3b0-b6620026c422" /> ### Are there known steps to reproduce? In the Embedder preferences in the settings, set the embedding model to the model you downloaded from huggingface, convert it to gguf, and import it into Ollama through Ollama create, but the document cannot be vectorized normally. <img width="1116" alt="image" src="https://github.com/user-attachments/assets/87bb3725-1e01-49ee-bf18-ac4e128d3150" />
yindo added the possible bug label 2026-02-22 18:26:50 -05:00
yindo closed this issue 2026-02-22 18:26:50 -05:00
Author
Owner

@timothycarambat commented on GitHub (Dec 28, 2024):

Given we call the /embeddings endpiont directly in Ollama:
https://github.com/Mintplex-Labs/anything-llm/blob/dca27e7235451da9423d38976fa37aec417dda3c/server/utils/EmbeddingEngines/ollama/index.js#L10

You should first check if the quantization you applied for the model even works outside of AnythingLLM. IIRC, llamacpp quantize is not meant for Bert/SentenceTransformer models - so embedding models wont work
https://github.com/ggerganov/llama.cpp/issues/5403

@timothycarambat commented on GitHub (Dec 28, 2024): Given we call the /embeddings endpiont directly in Ollama: https://github.com/Mintplex-Labs/anything-llm/blob/dca27e7235451da9423d38976fa37aec417dda3c/server/utils/EmbeddingEngines/ollama/index.js#L10 You should first check if the quantization you applied for the model even works outside of AnythingLLM. IIRC, llamacpp quantize is not meant for Bert/SentenceTransformer models - so embedding models wont work https://github.com/ggerganov/llama.cpp/issues/5403
yindo changed title from [BUG]: ollama embedding error to [GH-ISSUE #2909] [BUG]: ollama embedding error 2026-06-05 14:43:04 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1854