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

disable lora #8674

Merged
merged 6 commits into from
Jul 9, 2024
Merged

disable lora #8674

merged 6 commits into from
Jul 9, 2024

Conversation

lugimzzz
Copy link
Contributor

PR types

New features

PR changes

APIs

Description

支持disabale_lora

Copy link

paddle-bot bot commented Jun 27, 2024

Thanks for your contribution!

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 19.41392% with 220 lines in your changes missing coverage. Please review.

Project coverage is 55.71%. Comparing base (cf57f86) to head (1b4cb0b).
Report is 9 commits behind head on develop.

Files Patch % Lines
paddlenlp/peft/lora/lora_quantization_layers.py 1.63% 120 Missing ⚠️
paddlenlp/peft/lora/lora_layers.py 28.78% 47 Missing ⚠️
paddlenlp/peft/lora/lora_model.py 31.25% 44 Missing ⚠️
paddlenlp/peft/lora/lora_quant_layers.py 55.55% 8 Missing ⚠️
paddlenlp/peft/lora/lora_config.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8674      +/-   ##
===========================================
- Coverage    55.74%   55.71%   -0.04%     
===========================================
  Files          623      623              
  Lines        97454    97399      -55     
===========================================
- Hits         54323    54263      -60     
- Misses       43131    43136       +5     

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

try:
model.merge()
except:
model.eval()
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里主要是要什么兼容了? 如果进行了merge,model.eval也是需要打开?

@@ -92,7 +91,7 @@ Parameters:
默认为 0.0,dropout的比例设置,float 类型

--merge_weights
默认为 False,模型推理时,是否进行base model 权重和 LoRA 权重的合参操作,bool 类型
默认为 False,接口将被废弃。请使用model.merge()或model.unmerge()替代。
Copy link
Collaborator

Choose a reason for hiding this comment

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

predictor看起来也是需要进行更改

)
print("quant_weight", quant_weight)
Copy link
Collaborator

Choose a reason for hiding this comment

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

删除

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 fbe613b into PaddlePaddle:develop Jul 9, 2024
8 of 12 checks passed
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