Skip to content
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

Issue: GPT4AllEmbeddings() throwing GGML Assert Error #10949

Closed
saurabhjha443 opened this issue Sep 22, 2023 · 2 comments
Closed

Issue: GPT4AllEmbeddings() throwing GGML Assert Error #10949

saurabhjha443 opened this issue Sep 22, 2023 · 2 comments
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature 🔌: chroma Primarily related to ChromaDB integrations Ɑ: embeddings Related to text embedding models module Ɑ: vector store Related to vector store module

Comments

@saurabhjha443
Copy link

saurabhjha443 commented Sep 22, 2023

GPT4AllEmbeddings() throwing GGML Assert Error

I am trying to follow this use case
https://python.langchain.com/docs/use_cases/question_answering/how_to/local_retrieval_qa
This was working till yesterday, Today its not working

from langchain.vectorstores import Chroma
from langchain.embeddings import GPT4AllEmbeddings

vectorstore = Chroma.from_documents(documents=all_splits, embedding=GPT4AllEmbeddings())

Console error:

Found model file at  C:\Users\saura\.cache\gpt4all\ggml-all-MiniLM-L6-v2-f16.bin
GGML_ASSERT: C:\Users\circleci\project\gpt4all-backend\llama.cpp-mainline\ggml.c:8027: ggml_nelements(dst) == ggml_nelements(src0)

Suggestion:

No response

@dosubot dosubot bot added Ɑ: embeddings Related to text embedding models module Ɑ: vector store Related to vector store module 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature 🔌: chroma Primarily related to ChromaDB integrations labels Sep 22, 2023
@dosubot
Copy link

dosubot bot commented Sep 22, 2023

🤖

Hello,

Thank you for reaching out and I'm sorry to hear that you're experiencing this issue.

The error message you're seeing is coming from the gpt4all library, which is used by the GPT4AllEmbeddings() function in LangChain. The error message GGML_ASSERT: C:\Users\circleci\project\gpt4all-backend\llama.cpp-mainline\ggml.c:8027: ggml_nelements(dst) == ggml_nelements(src0) suggests that there's an assertion error happening within the gpt4all library.

This error might be due to a mismatch in the dimensions of the source and destination arrays in the ggml function of the gpt4all library. It could be caused by a variety of reasons, such as changes in the underlying model file, updates in the gpt4all library, or issues with the input data.

Here are a few steps you can take to troubleshoot this issue:

  1. Check the version of the gpt4all library: Make sure you're using a compatible version of the gpt4all library. You can check the version by running pip show gpt4all in your terminal. If you're not using a compatible version, you might need to update or downgrade the gpt4all library.

  2. Check the input data: Make sure the all_splits variable in your code contains valid data. If the data is not valid or if it's in an unexpected format, it might cause issues when trying to generate embeddings.

  3. Re-download the model file: The error message suggests that the model file is found at C:\Users\saura\.cache\gpt4all\ggml-all-MiniLM-L6-v2-f16.bin. You might want to try deleting this file and running your code again. This should trigger the gpt4all library to re-download the model file, which might resolve the issue if the original file was corrupted or outdated.

If none of these steps resolve the issue, it would be helpful if you could provide more information about your environment, such as the version of Python you're using, the version of the gpt4all library, and the exact data you're passing to the Chroma.from_documents() function. This will help us better understand the issue and provide a more accurate solution.

I hope this helps! Please let me know if you have any other questions or if there's anything else I can do to assist you.

Best,
Dosu

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

Copy link

dosubot bot commented Dec 22, 2023

Hi, @saurabhjha443! I'm helping the LangChain team manage their backlog and am marking this issue as stale.

It looks like you encountered a GGML Assert Error when using the GPT4AllEmbeddings() function in LangChain. I provided a detailed response with troubleshooting steps and requested additional information to better understand the issue. The issue was marked as resolved, but we wanted to check if it's still relevant to the latest version of the LangChain repository.

Could you please let us know if this issue is still relevant to the latest version of LangChain? If it is, feel free to provide an update by commenting on the issue. Otherwise, you are welcome to close the issue yourself, or it will be automatically closed in 7 days. Thank you!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 22, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature 🔌: chroma Primarily related to ChromaDB integrations Ɑ: embeddings Related to text embedding models module Ɑ: vector store Related to vector store module
Projects
None yet
Development

No branches or pull requests

1 participant