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

support fused weights for export_model #8554

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

ronny1996
Copy link
Contributor

PR types

Others

PR changes

Others

Description

support fused weights for export_model

Copy link

paddle-bot bot commented Jun 5, 2024

Thanks for your contribution!

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Project coverage is 53.96%. Comparing base (f36ed75) to head (ff61d4a).
Report is 4 commits behind head on develop.

Files Patch % Lines
...dlenlp/experimental/transformers/llama/modeling.py 0.00% 21 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8554      +/-   ##
===========================================
- Coverage    53.97%   53.96%   -0.01%     
===========================================
  Files          618      618              
  Lines        96827    96833       +6     
===========================================
+ Hits         52258    52260       +2     
- Misses       44569    44573       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ronny1996 ronny1996 force-pushed the llama2_dev branch 3 times, most recently from feeefad to 4896348 Compare June 5, 2024 13:12
self.embed_tokens.weight.set_value(paddle.to_tensor(state_dict["llama.embed_tokens.weight"]))
self.norm.weight.set_value(paddle.to_tensor(state_dict["llama.norm.weight"], dtype=self.norm.weight.dtype))
self.embed_tokens.weight.set_value(
paddle.to_tensor(state_dict["llama.embed_tokens.weight"]).cast(self.embed_tokens.weight.dtype)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

.cast 支持原始权重为bfloat16

Copy link
Collaborator

@wawltor wawltor left a comment

Choose a reason for hiding this comment

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

LGTM

@wawltor wawltor merged commit 87edf28 into PaddlePaddle:develop Jun 6, 2024
7 of 12 checks passed
@ronny1996 ronny1996 deleted the llama2_dev branch June 6, 2024 08:03
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.

None yet

2 participants