-
-
Couldn't load subscription status.
- Fork 10.9k
[Model] fix DeepSeek e_score_correction_bias dtype to fp32 #23640
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly addresses a data type issue for the e_score_correction_bias parameter in DeepSeek V3 models. By explicitly setting the dtype to torch.float32 during tensor creation, the change ensures that the parameter's data type matches the precision of the model weights. This prevents potential dtype mismatches and precision loss that could occur during weight loading, especially when the default PyTorch dtype is set to a lower precision format like float16. The fix is accurate, well-targeted, and necessary for the correct operation of DeepSeek V3 models.
…ect#23640) Signed-off-by: Jee Jee Li <pandaleefree@gmail.com> Signed-off-by: tc-mb <caitianchi@modelbest.cn>
…ect#23640) Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
…ect#23640) Signed-off-by: Jee Jee Li <pandaleefree@gmail.com> Signed-off-by: Xiao Yu <xiao.yu@amd.com>
…ect#23640) Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
…ect#23640) Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
…ect#23640) Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Purpose
The
e_score_correction_biasweights of the deepseek v3 model are FP32Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.