li-plus / chatglm.cpp

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

上下文推理时速度会变慢,请问应该怎么解决? #293

Open youranjvshi123 opened 2 months ago

youranjvshi123 commented 2 months ago

模型转换的是q4_0的,在执行examples/cli_demo.py -m chatglm-ggml.bin -i 时,从第二轮对话开始推理速度就会变的越来越慢,请问应该怎么解决?

Wannazl commented 2 months ago

so eazy ! 优化下代码就行了

youranjvshi123 commented 2 months ago

so eazy ! 优化下代码就行了

大神,请问代码应该怎么优化?