Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Unified Checkpoint] Fix generation config save #9223

Conversation

DrownFish19
Copy link
Collaborator

PR types

Bug fixes

PR changes

Others

Description

Fix generation config save.

  • When use_unified_checkpoint=False, the model is saved by model.save_from_pretrained, in which the generation_config.json is saved.
  • When use_unified_checkpoint=False, the model is saved by UC, which ignores saving generation_config.json.

Copy link

paddle-bot bot commented Sep 30, 2024

Thanks for your contribution!

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

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

Project coverage is 53.09%. Comparing base (3007c79) to head (5d2b6d3).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/trainer/plugins/unified_checkpoint.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9223      +/-   ##
===========================================
+ Coverage    52.96%   53.09%   +0.13%     
===========================================
  Files          657      657              
  Lines       106465   107030     +565     
===========================================
+ Hits         56385    56831     +446     
- Misses       50080    50199     +119     

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

Copy link
Contributor

@DesmonDay DesmonDay 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 merged commit 5ad7a9c into PaddlePaddle:develop Oct 14, 2024
7 of 11 checks passed
@DrownFish19 DrownFish19 deleted the dev_20240930_fix_uc_save_generation_config branch October 15, 2024 02:09
DesmonDay pushed a commit to DesmonDay/PaddleNLP that referenced this pull request Oct 16, 2024
DesmonDay added a commit that referenced this pull request Oct 16, 2024
* [Unified Checkpoint] Support expert parallel (#9055)

* update code

* [Unified Checkpoint] Fix generation config save (#9223)

* [Unified Checkpoint] update async_save_info in develop (#9173)

* [Unified Checkpoint] update async save logic (#9274)

* update async save signal

* fix async save hang

* bug fix

---------

Co-authored-by: Weiguo Zhu <DrownFish19@gmail.com>
wawltor pushed a commit that referenced this pull request Oct 17, 2024
* [Unified Checkpoint] Support expert parallel (#9055)

* update code

* [Unified Checkpoint] Fix generation config save (#9223)

* [Unified Checkpoint] update async_save_info in develop (#9173)

* [Unified Checkpoint] update async save logic (#9274)

* update async save signal

* fix async save hang

* bug fix

* bug fix

* [Trainer] fix save_model (#9286)

* bug fix

* bug fix

---------

Co-authored-by: Weiguo Zhu <DrownFish19@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants