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

Can't run on CPU #163

Open
shanzhou2186 opened this issue May 10, 2024 · 2 comments
Open

Can't run on CPU #163

shanzhou2186 opened this issue May 10, 2024 · 2 comments

Comments

@shanzhou2186
Copy link

I try to run the model on CPU in offline mode. But it depends on a package flash_attn, which needs to be compiled with nvcc on GPU.
I am wondering can we run this model on CPU.
image

@czczup
Copy link
Member

czczup commented May 16, 2024

This model has a total of 26B, is it difficult to run with the CPU?
For flash_attn, you can turn it off by modifying config.json in the model

Set L20 to "attn_implementation": "eager",

https://huggingface.co/OpenGVLab/InternVL-Chat-V1-5/blob/main/config.json#L20

Set L200 to "use_flash_attn": false
https://huggingface.co/OpenGVLab/InternVL-Chat-V1-5/blob/main/config.json#L200

@shanzhou2186
Copy link
Author

I will try it. Thanks. If the dependency problem fixed, it should run on CPU successfully although it may be slow.

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

2 participants