-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
large embedded file fails on model create #501
Comments
I'm also experiencing this. I've tried a number of things, including breaking down the text files into smaller chunks with overlapping chunks, updating the num_ctx value (to 4096, 8192, and 16384). I've tried this on a VM with 32GB of RAM, and bare metal with 64GB of RAM, both on Ubuntu linux. All have the same outcome, so I am wondering if it is tied to the total amount of content, not the size of a specific file. The experience is consistent when specifying each file individually instead of specifying the entire folder. It's interesting. I see that when Ollama is started up, there are 5 handlers for the EmbeddingHandler:
When it is doing the model creation, I can see that it uses the 5 handlers on a specific port, then as it continues, it switches to a different port (almost as though it isn't closing the port and has to get a new port for the embedding), and eventually it it gets to a port where the ollama serve process just crashes (see below):
|
I am also running into the same issue Ryzen 5900X 64 RAM I have even tried spiting the large file into various different smaller files still seems to fail at some point? I am also looking to make something DnD related and tried to import the rules as a txt file dataset but haven't been able to make it work.. below two different runs with two versions of the DnD rule set one with new lines the other with all new lines stripped I thought it would help didn't seem to make a difference
|
+1 same issue and symptoms as above. M1 Max 32 GB. The only workaround I've found is to not do large embedding runs for now. Edit: An OK workaround is to use multiple EMBED lines, in which no individual batch is too large to work out well. Ollama will find if embeddings already exist for an EMBED line. It's then possible to A real fix would of course be nice! How to troubleshoot further? |
@vividfog I am trying your method with my data I used split -l 600 mydata.txt to split by line and just going to try run through each of the EMBED Layers. I will note that the max number of lines I could input per EMBED txt varied in my testing anything above 800 seemed to be unstable at least on my system. Open SUSE Tumbleweed 12core Ryzen 9 5900x 64GB RAM Edit: I got it working using @vividfog method I am going to try write automate this with some ansible maybe until there is a proper fix if I get a good solution working in an automated way I will post the solution here! Edit2: https://github.com/jmorganca/ollama/tree/main/examples/langchain-document @vividfog @BruceMacD @fmackenzie that example is using langchain and a vector store to store all the embeddings locally much better way of going about for loading in large datasets been working for my use case ! |
Closing this for now as we removed this feature for the time being. |
Adding a large file to an embedding may cause an unexpected error.
There shouldn’t be a limit. The buffer size may be reaching its capacity.
The text was updated successfully, but these errors were encountered: