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

[cherry pick] Update sequence parallel linear import (#8706) #8728

Conversation

DrownFish19
Copy link
Collaborator

PR types

Function optimization

PR changes

Models

Description

  1. All models imports ColumnSequenceParallelLinear and RowSequenceParallelLinear from linear_utils, where ColumnSequenceParallelLinear and RowSequenceParallelLinear are defined for different deivces including gpu, npu and xpu.
  2. nn.Linear is replace by linear_utils.Linear. When device is gpu or npu, nn.Linear is equal to linear_utils.Linear. When device is 'xpu', linear_utils.Linear is designed for xpu based on nn.Linear, which can achieve better performance.

Copy link

paddle-bot bot commented Jul 8, 2024

Thanks for your contribution!

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 67.76860% with 39 lines in your changes missing coverage. Please review.

Project coverage is 55.62%. Comparing base (3b739d6) to head (ebdcf96).
Report is 1 commits behind head on release/3.0-beta.

Files Patch % Lines
paddlenlp/transformers/gemma/modeling.py 68.42% 6 Missing ⚠️
paddlenlp/transformers/linear_utils.py 0.00% 6 Missing ⚠️
paddlenlp/transformers/qwen2/modeling.py 73.91% 6 Missing ⚠️
paddlenlp/transformers/qwen2_moe/modeling.py 53.84% 6 Missing ⚠️
paddlenlp/peft/lora/lora_layers.py 28.57% 5 Missing ⚠️
paddlenlp/transformers/gpt/modeling.py 76.19% 5 Missing ⚠️
paddlenlp/transformers/mixtral/modeling.py 81.81% 4 Missing ⚠️
paddlenlp/transformers/qwen/modeling.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           release/3.0-beta    #8728   +/-   ##
=================================================
  Coverage             55.61%   55.62%           
=================================================
  Files                   620      620           
  Lines                 96965    96990   +25     
=================================================
+ Hits                  53928    53949   +21     
- Misses                43037    43041    +4     

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

@gongel gongel merged commit 88244e3 into PaddlePaddle:release/3.0-beta Jul 9, 2024
5 of 7 checks passed
@DrownFish19 DrownFish19 deleted the dev_fix_qwen2_import_cherry-pick branch July 10, 2024 01:21
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