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

Question about MLA with TP #283

Open
ipiszy opened this issue Jan 14, 2025 · 0 comments
Open

Question about MLA with TP #283

ipiszy opened this issue Jan 14, 2025 · 0 comments

Comments

@ipiszy
Copy link

ipiszy commented Jan 14, 2025

The DeepSeek paper mentions 4-way TP for the MLA attention layer at inference time. However, from code, it seems that different card has its own Linear module (e.g.

self.wkv_a = Linear(self.dim, self.kv_lora_rank + self.qk_rope_head_dim)
) to project KV latents to num_heads, and either KV or the linear module are sharded across TP.

Is KV duplicated across all TP ranks in this case? Or, does different card have different KVs?

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

1 participant