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

[LLM] Fix fuse or split with same key #8378

Merged
merged 5 commits into from
May 9, 2024

Conversation

DrownFish19
Copy link
Collaborator

@DrownFish19 DrownFish19 commented May 7, 2024

PR types

Bug fixes

PR changes

Others

Description

1.Fix fuse, split or other convert actions with same key.

bug: when the origin and converted keys are the same, paddlenlp will split the origin state_dict and the converted state_dict for tensor parallel twice.

fix: if the origin and converted keys are the same, paddlenlp should only split the origin state_dict for tensor parallel.

  1. change the diff eps to 1e-5

Copy link

paddle-bot bot commented May 7, 2024

Thanks for your contribution!

Copy link
Collaborator

@ZHUI ZHUI left a comment

Choose a reason for hiding this comment

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

LGTM

@ZHUI ZHUI closed this May 8, 2024
@ZHUI ZHUI reopened this May 8, 2024
Copy link

codecov bot commented May 8, 2024

Codecov Report

Attention: Patch coverage is 63.63636% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 55.37%. Comparing base (0f45875) to head (c10ee37).
Report is 2 commits behind head on develop.

Files Patch % Lines
paddlenlp/transformers/conversion_utils.py 63.63% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8378   +/-   ##
========================================
  Coverage    55.37%   55.37%           
========================================
  Files          614      614           
  Lines        96015    96024    +9     
========================================
+ Hits         53164    53169    +5     
- Misses       42851    42855    +4     

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

@wawltor wawltor merged commit 2619f17 into PaddlePaddle:develop May 9, 2024
7 of 11 checks passed
wawltor pushed a commit that referenced this pull request May 24, 2024
* [XPU] llama add xpu support (#8282)

* [XPU] llama add xpu support

* fix

* use try import

* fix

* refine

* refine

* refine

* refine

* update (#8399)

* [LLM] Support fuse attention q, k, v weights  (#8202)

1. add use-interface & fuse action

1.1. modify 1., code order

2. switch to name_mapping

3. solve tp branch

3.2 follow hui, handel qkv separately

3.3 handle pdparams

3.4 from torch

3.5 abandon low_cpu_mem_usage

3.6 solve shard branch

* 3.6.1 solve shard branch after rebase develop

* code clean

* remove debug comment

* Redefine fuse and split functions

* Redefine fuse and split functions

* comment and fix

* update method

* update QKV fuse and split

* support fuse weights in multi-files

* add precision compare

* simplify function call

* support use_fast_ffn

* clean modeling and configuration

* add test for gpt and opt

* fix tp_actions get

* add fast_ffn test

* add Qwen2Moe

* Revert "add Qwen2Moe"

This reverts commit 113b883.

* add test for split

* update doc

* update filter_dict_keys

---------

Co-authored-by: Zii <ziangqin.baidu@gmail.com>

* [LLM] Fix fuse or split with same key (#8378)

* fix fuse or split with same key

* fix

* fix eps

* update format

* [LLM] add decay steps option for finetuning (#8251)

* [LLM] add memory stats to logger of trainer (#8269)

* [Distributed] fix lora (#8325)

* [LLM] fix lora target modules on llama (#8372)

* [Distributed] metric calculation supports tp logits (#8370)

* Update model_utils.py

* Update model_utils.py

* Update model_utils.py

---------

Co-authored-by: Jianbang Yang <yangjianbang112@gmail.com>
Co-authored-by: DrownFish19 <DrownFish19@gmail.com>
Co-authored-by: Zii <ziangqin.baidu@gmail.com>
Co-authored-by: Tian <121000916+SylarTiaNII@users.noreply.github.com>
@DrownFish19 DrownFish19 deleted the dev_fix_fuse_action branch June 18, 2024 08:04
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

3 participants