Skip to content

Conversation

ysjprojects
Copy link
Collaborator

@ysjprojects ysjprojects commented Apr 13, 2025

follow up from #1945

More alignment with the huggingface implementation, allowing custom values for q_lora_rank, v_dim, etc.
Cleaned up some lines added for debugging purposes.

Also, the errors in #1945 was simply because pythia simply did not have the necessary parameters for MLA.

Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add a test :)

Copy link
Contributor

@ali-alshaar7 ali-alshaar7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. +1 on the test though, and would be nice if we could share more with the base attention implementation instead of duplicating things. Maybe for a followup. Thank you.

@Borda
Copy link
Member

Borda commented Apr 23, 2025

@t-vi @lantiga mind have look, pls :)

@ysjprojects ysjprojects changed the title Multi-head Latent Attention fixes DeepseekV3 (and Multi-Head Latent Attention) May 16, 2025
@ysjprojects ysjprojects changed the title DeepseekV3 (and Multi-Head Latent Attention) (WIP) DeepseekV3 (and Multi-Head Latent Attention) May 16, 2025
@ysjprojects
Copy link
Collaborator Author

@t-vi @lantiga @Borda

DeepseekV3 architecture WIP.

Should we move DeepseekV3MoE and MultiHeadLatentAttention out of model.py into its own file since the architecture is quite unique so it's unlikely that a future model would implement it again?

@ysjprojects ysjprojects marked this pull request as draft May 21, 2025 12:52
@Borda
Copy link
Member

Borda commented Aug 14, 2025

@ysjprojects are you going to work on this one now? 🦩

@ysjprojects
Copy link
Collaborator Author

@ysjprojects are you going to work on this one now? 🦩

Definitely, but I will first work on much lower hanging fruits that are long overdue (Qwen3 Coder etc.)

@ysjprojects
Copy link
Collaborator Author

Closing this as I plan to break it into multiple components across PRs.

New PR on Multi-Head Latent Attention implementation: #2113

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

Successfully merging this pull request may close these issues.

4 participants