Skip to content

[Pretrain] Fix eval during pretrain#7827

Merged
wawltor merged 5 commits into
PaddlePaddle:developfrom
DesmonDay:fix_eval_during_pretrain
Jan 11, 2024
Merged

[Pretrain] Fix eval during pretrain#7827
wawltor merged 5 commits into
PaddlePaddle:developfrom
DesmonDay:fix_eval_during_pretrain

Conversation

@DesmonDay
Copy link
Copy Markdown
Contributor

PR types

Bug fixes

PR changes

Others

Description

Change paddle.to_tensor to copy.deepcopy.

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Jan 11, 2024

Thanks for your contribution!

@DesmonDay DesmonDay requested a review from ZHUI January 11, 2024 04:50
JunnYu
JunnYu previously approved these changes Jan 11, 2024
Comment thread llm/run_pretrain.py
tokens_ = stack_fn([x["text"] for x in data])

labels = tokens_[:, 1:]
labels = copy.deepcopy(tokens_)[:, 1:]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

之前 to_tensor 的修改要回退吗?

return {
"input_ids": paddle.to_tensor(tokens),
"labels": paddle.to_tensor(labels),
}

Copy link
Copy Markdown
Contributor

@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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4069f22) 56.95% compared to head (2c6b9c8) 56.95%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7827   +/-   ##
========================================
  Coverage    56.95%   56.95%           
========================================
  Files          587      587           
  Lines        88628    88628           
========================================
  Hits         50480    50480           
  Misses       38148    38148           

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

@wawltor wawltor merged commit ee4b9dd into PaddlePaddle:develop Jan 11, 2024
JunnYu pushed a commit that referenced this pull request Jan 12, 2024
* add unified checkpoint training args doc

* fix eval during pretrain

* fix
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.

4 participants