[GH-ISSUE #73] does deepseekVL2 tiny and small support flash attention2? #58

Closed
opened 2026-10-26 21:11:03 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @h-ccc on GitHub (Feb 11, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/73

Great work here!

I am trying to fine-tune DeepSeekVL2 on my dataset, but the training speed is too slow without flashattention2. When I modify the code to activate flashattention2, I encounter the following error:

"Error(s) in loading state_dict for DeepseekVLV2ForCausalLM:
size mismatch for language.model.embed_tokens.weight: copying a param with shape torch.Size([129280, 1280]) from checkpoint, the shape in current model is torch.Size([102400, 4096])."

How can I train using Flash Attention 2?

Originally created by @h-ccc on GitHub (Feb 11, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/73 Great work here! I am trying to fine-tune DeepSeekVL2 on my dataset, but the training speed is too slow without flashattention2. When I modify the code to activate flashattention2, I encounter the following error: "Error(s) in loading state_dict for DeepseekVLV2ForCausalLM: size mismatch for language.model.embed_tokens.weight: copying a param with shape torch.Size([129280, 1280]) from checkpoint, the shape in current model is torch.Size([102400, 4096])." How can I train using Flash Attention 2?
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-VL2#58
No description provided.