mirror of
https://github.com/deepseek-ai/DeepSeek-VL2.git
synced 2026-11-05 01:07:23 +00:00
[GH-ISSUE #41] Does not work on CPU #32
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-VL2#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Jan 25, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/41
I tried running DeepSeek-vl2-tiny on the CPU. But it throws an error.
Does it support CPU inference?
I tried backtracking, and an error is being thrown from the memory_efficient_attention of the "formers" package. When I checked the operator bindings, I saw that the operator class IMPL is only registered for the CUDA dispatch key.
So, how can I run this model on a CPU?
Below is the output:
NotImplementedError: No operator found for
memory_efficient_attention_forwardwith inputs:query : shape=(19, 729, 16, 72) (torch.bfloat16)
key : shape=(19, 729, 16, 72) (torch.bfloat16)
value : shape=(19, 729, 16, 72) (torch.bfloat16)
attn_bias : <class 'NoneType'>
p : 0.0
ckFis not supported because:device=cpu (supported: {'cuda'})
bf16 is only supported on A100+ GPUs
@JosTheBossX commented on GitHub (Jan 27, 2025):
Did you solve this?
@pappukrs commented on GitHub (Jan 30, 2025):
Had you solved?
@saart commented on GitHub (Feb 1, 2025):
I opened a PR to solve it: https://github.com/deepseek-ai/DeepSeek-VL2/pull/48
@research-and-develop commented on GitHub (Mar 17, 2025):
I was struggling to get the model to work with CPU as well. I needed to run the model on CPU just for testing purpose. With the help of other AI tools I came to the following script which is working with
deepseek-ai/deepseek-vl2-tinyon a laptop with 24GB RAM, but when tried to rundeepseek-ai/deepseek-vl2-small, I got out of memory exception. The inference process is quite slow. The OS I am using is Windows 11/10Here is the code:
Details of the virtual environment where I am running the script: