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

Resolve 'NoneType' object has no attribute 'gate_proj' err when applying EP in DeepSeek-V2 #1740

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

IT-Forrest
Copy link
Contributor

Resolve the error of no gate_proj attribute during the Expert Parallelism of DeepSeek-V2

What does this PR do?

Fixes # (issue)

Currently, EP doesn't work in the latest OH main. It fails with the following error

[rank3]:     self.experts[idx * self.expert_chunk + i].gate_proj.weight.squeeze() for i in experts_range
[rank3]: AttributeError: 'NoneType' object has no attribute 'gate_proj'

This PR will resolve the Error by skipping the NonType object

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Resolve the error of no gate_proj attribute during the Expert Parallelism of DeepSeek-V2
@IT-Forrest IT-Forrest requested a review from regisss as a code owner February 4, 2025 02:37
Copy link

github-actions bot commented Feb 4, 2025

The code quality check failed, please run make style.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@libinta libinta added the run-test Run CI for PRs from external contributors label Feb 4, 2025
Copy link
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM!

@regisss regisss merged commit 183a80d into huggingface:main Feb 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-test Run CI for PRs from external contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants