abetlen / abetlen/llama-cpp-python

When using LlamaCppEmbeddings to embed a gguf type model, an error is reported

オープン
#910 コメント 10 件 リアクション 9 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
10.6k
フォーク
1.4k
PR マージ指標
PR 指標を取得中

説明

I used the latest module and while embedding the gguf model into chroma, a critical error occurred
`llamaem= LlamaCppEmbeddings(model_path="D:\models\llama-2-7b-chat.Q4_K_M.gguf")
vectorstore = Chroma.from_documents(documents=all_splits, embedding=llamaem)`

error:
` File "d:/project/python/document-GPT/test.py", line 71, in
vectorstore = Chroma.from_documents(documents=all_splits, embedding=llamaem)#嵌入
File "D:\python\lib\site-packages\langchain\vectorstores\chroma.py", line 771, in from_documents
return cls.from_texts(
File "D:\python\lib\site-packages\langchain\vectorstores\chroma.py", line 729, in from_texts
chroma_collection.add_texts(
File "D:\python\lib\site-packages\langchain\vectorstores\chroma.py", line 275, in add_texts
embeddings = self._embedding_function.embed_documents(texts)
File "D:\python\lib\site-packages\langchain\embeddings\llamacpp.py", line 113, in embed_documents
embeddings = [self.client.embed(text) for text in texts]
File "D:\python\lib\site-packages\langchain\embeddings\llamacpp.py", line 113, in
embeddings = [self.client.embed(text) for text in texts]
File "D:\python\lib\site-packages\llama_cpp\llama.py", line 1292, in embed
return list(map(float, self.create_embedding(input)["data"][0]["embedding"]))
File "D:\python\lib\site-packages\llama_cpp\llama.py", line 1256, in create_embedding
self.eval(tokens)
File "D:\python\lib\site-packages\llama_cpp\llama.py", line 1030, in eval
self._ctx.decode(self._batch)
File "D:\python\lib\site-packages\llama_cpp\llama.py", line 471, in decode
raise RuntimeError(f"llama_decode returned {return_code}")
RuntimeError: llama_decode returned 1`

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。