Skip to content

Extract eh_proj Layer from ParallelLMHead for MTP to Avoid Weight Transposition Issue #2707

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

Merged
merged 4 commits into from
Jul 4, 2025

Conversation

Deleter-D
Copy link
Collaborator

When using MTP and tie_word_embeddings=true, unexpected weight transposition behavior may occur.

The specific reason is that the eh_proj layer in MTP reuses the ParallelLMHead class. When MTP is turned on, its internal judgment logic about tie_word_embeddings will cause the eh_proj weight to produce unexpected transposition behavior. Therefore, the eh_proj layer of MTP is extracted separately to facilitate subsequent development.

Copy link

paddle-bot bot commented Jul 4, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Jul 4, 2025

CLA assistant check
All committers have signed the CLA.

@freeliuzc freeliuzc merged commit e7fa57e into PaddlePaddle:develop Jul 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants