Skip to content

Why head_size must be 576 while q_head_dim of DeepSeek-V3 is only 192? #49

Open
@WangNorthSea

Description

@WangNorthSea
Image

head_size here comes from q.sizes()[3]
But in 'modeling_deepseek.py' of DeepSeek-V3 model,
q = q.view(bsz, q_len, self.num_heads, self.q_head_dim).transpose(1, 2)
Here self.q_head_dim = config.qk_nope_head_dim + config.qk_rope_head_dim which is 128+64=192 according to 'config.json'.
How to understand this correctly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions