chatglm.cpp icon indicating copy to clipboard operation
chatglm.cpp copied to clipboard

如何提升CPU利用率

Open zhengxingmao opened this issue 2 years ago • 1 comments

lanchain_api 运行的时候只有8个线程,CPU只使用了一半,如何提高CPU利用率,比如增加线程数?

zhengxingmao avatar Nov 09 '23 23:11 zhengxingmao

Pipeline.chat 里面有 num_threads 参数,默认是物理核的数量,可以调节下这个参数增加线程数。参考 https://github.com/li-plus/chatglm.cpp/blob/b071907304b4c13f3a6d1202d320fbd0c6203074/examples/web_demo.py#L45

li-plus avatar Nov 22 '23 02:11 li-plus