Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

量化后的模型如何选择GPU/CPU推理? #61

Closed
Alone749-i opened this issue Jul 5, 2023 · 2 comments
Closed

量化后的模型如何选择GPU/CPU推理? #61

Alone749-i opened this issue Jul 5, 2023 · 2 comments

Comments

@Alone749-i
Copy link

如标题,在测试时通过GPU和CPU加载模型转换为flm模型后,推理速度几乎一样。

@JianbangZ
Copy link

编译的时候得选择是否使用CUDA

@ztxz16
Copy link
Owner

ztxz16 commented Jul 26, 2023

现在可以在创建模型前llm.set_device_map("cpu"),然后可以在cpu上运行(建议配合llm.set_cpu_thread()来设定cpu核数)

@ztxz16 ztxz16 closed this as completed Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants