X-D-Lab / LangChain-ChatGLM-Webui

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

MacM1平台模型加载不成功 #95

Open Veken opened 1 year ago

Veken commented 1 year ago

一直提示模型加载不成功,点击发送,日志会报这个异常

Traceback (most recent call last): File "/Users/zego/LLMSDemo/LangChain-ChatGLM-Webui/venv/lib/python3.9/site-packages/gradio/routes.py", line 412, in run_predict output = await app.get_blocks().process_api( File "/Users/zego/LLMSDemo/LangChain-ChatGLM-Webui/venv/lib/python3.9/site-packages/gradio/blocks.py", line 1299, in process_api result = await self.call_function( File "/Users/zego/LLMSDemo/LangChain-ChatGLM-Webui/venv/lib/python3.9/site-packages/gradio/blocks.py", line 1021, in call_function prediction = await anyio.to_thread.run_sync( File "/Users/zego/LLMSDemo/LangChain-ChatGLM-Webui/venv/lib/python3.9/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/Users/zego/LLMSDemo/LangChain-ChatGLM-Webui/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/Users/zego/LLMSDemo/LangChain-ChatGLM-Webui/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/Users/zego/LLMSDemo/LangChain-ChatGLM-Webui/app.py", line 215, in predict resp = knowladge_based_chat_llm.get_knowledge_based_answer( File "/Users/zego/LLMSDemo/LangChain-ChatGLM-Webui/app.py", line 102, in get_knowledge_based_answer self.llm.temperature = temperature AttributeError: 'NoneType' object has no attribute 'temperature'

thomas-yanxin commented 1 year ago

MacM1没测试过。应该需要将加载模型这里改一下。

ganisback commented 1 year ago

@Veken 你成功了吗,我也失败了