X-D-Lab / LangChain-ChatGLM-Webui

基于LangChain和ChatGLM-6B等系列LLM的针对本地知识库的自动问答
Apache License 2.0
3.14k stars 474 forks source link

求教为什么ai回答不出问题 #90

Closed lugan777 closed 1 year ago

lugan777 commented 1 year ago
回答错误

求教为什么ai回答不出问题

lugan777 commented 1 year ago

Applying quantization to glm layers Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 289, in run_predict output = await app.blocks.process_api( File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 990, in process_api result = await self.call_function(fn_index, inputs, iterator) File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 832, in call_function prediction = await anyio.to_thread.run_sync( File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, args) File "app.py", line 215, in predict resp = knowladge_based_chat_llm.get_knowledge_based_answer( File "app.py", line 127, in get_knowledge_based_answer vector_store = FAISS.load_local('faiss_index', self.embeddings) File "/usr/local/lib/python3.8/dist-packages/langchain/vectorstores/faiss.py", line 449, in load_local index = faiss.read_index( File "/usr/local/lib/python3.8/dist-packages/faiss/swigfaiss_avx2.py", line 10206, in read_index return _swigfaiss_avx2.read_index(args) RuntimeError: Error in faiss::FileIOReader::FileIOReader(const char*) at /project/faiss/faiss/impl/io.cpp:67: Error: 'f' failed: could not open faiss_index/index.faiss for reading: No such file or directory No sentence-transformers model found with name /dataset/ernie-3.0-base-zh. Creating a new one with MEAN pooling. Some weights of the model checkpoint at /dataset/ernie-3.0-base-zh were not used when initializing ErnieModel: ['cls.predictions.transform.dense.weight', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.bias']

thomas-yanxin commented 1 year ago

换一个embedding model看是否可以。