li-plus / chatglm.cpp

C++ implementation of ChatGLM-6B & ChatGLM2-6B & ChatGLM3 & GLM4
MIT License
2.81k stars 327 forks source link

Can't use web_demo in glm4 #308

Closed jtc1246 closed 3 weeks ago

jtc1246 commented 3 weeks ago

Traceback (most recent call last): File "/Users/jtc/Downloads/chatglm/glm4/chatglm.cpp/examples/./web_demo.py", line 24, in pipeline = chatglm_cpp.Pipeline(args.model) File "/opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chatglm_cpp/init.py", line 33, in init super().init(str(model_path)) RuntimeError: /Users/jtc/Downloads/chatglm/chatglm.cpp/chatglm.cpp:1570 invalid model type 4

通过cd ./chatglm.cpp/examples && py ./web_demo.py -m ../../chatglm-ggml.bin启动

目前命令行可以正常使用

jtc1246 commented 3 weeks ago

Need to reinstall chatglm-cpp in pip, use pip install -U chatglm-cpp.