[GH-ISSUE #2401] [BUG]: Embedding fails with large documents #1559

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

Originally created by @EDLLT on GitHub (Oct 1, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2401

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Embedding a large document fails no matter what document it is(The document in this case was 70MB)
I had to split up the document into 20MB files for it to embed properly.
I tested the an Ollama stella-en embedder, LM Studio mxbai embed large and AnythingLLM's native embedder all with the same issue

The weird thing is, after the embedding had failed, the vector db has a vector count above 0 despite no documents being cached/embedded whatsoever
image

I am running this on Ubuntu 24.04 by the way

Are there known steps to reproduce?

Get a large file(70MB in my case)
Select AnythingLLM's native embedder
Attempt to embed it then wait for it to fail

Originally created by @EDLLT on GitHub (Oct 1, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2401 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? Embedding a large document fails no matter what document it is(The document in this case was 70MB) I had to split up the document into 20MB files for it to embed properly. I tested the an Ollama stella-en embedder, LM Studio mxbai embed large and AnythingLLM's native embedder all with the same issue The weird thing is, after the embedding had failed, the vector db has a vector count above 0 despite no documents being cached/embedded whatsoever ![image](https://github.com/user-attachments/assets/c5626322-a7f5-4757-8737-8688dc574aaa) I am running this on Ubuntu 24.04 by the way ### Are there known steps to reproduce? Get a large file(70MB in my case) Select AnythingLLM's native embedder Attempt to embed it then wait for it to fail
yindo added the possible bug label 2026-02-22 18:25:24 -05:00
yindo closed this issue 2026-02-22 18:25:24 -05:00
Author
Owner

@timothycarambat commented on GitHub (Oct 1, 2024):

This is a machine limitation - especially if you get this result with other providers. It is not described what you machine specs are but I am assuming CPU embedding is occurring. Likely OOM for trying to process so many text chunks at once. Additionally, if your context window for the selected embedding model is incorrect (for Ollama embedding) this will also fail because every embedding model has a defined limit of how many tokens it can vectorized in a given run - people just put in any value to that field and think it will work. Embedding models are just like LLM's and have token limits which can be found via the model card on HuggingFace or Ollama.com's model page

@timothycarambat commented on GitHub (Oct 1, 2024): This is a machine limitation - especially if you get this result with other providers. It is not described what you machine specs are but I am assuming CPU embedding is occurring. Likely OOM for trying to process so many text chunks at once. Additionally, if your context window for the selected embedding model is incorrect (for Ollama embedding) this will also fail because every embedding model has a defined limit of how many tokens it can vectorized in a given run - people just put in any value to that field and think it will work. Embedding models are just like LLM's and have token limits which can be found via the model card on HuggingFace or Ollama.com's model page
yindo changed title from [BUG]: Embedding fails with large documents to [GH-ISSUE #2401] [BUG]: Embedding fails with large documents 2026-06-05 14:41:25 -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#1559