-
Notifications
You must be signed in to change notification settings - Fork 3k
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]add adam-mini #9542
[llm]add adam-mini #9542
Conversation
Thanks for your contribution! |
@@ -0,0 +1 @@ | |||
../../../../llm/docs/predict/speculative_decoding.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修复死链问题
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9542 +/- ##
===========================================
- Coverage 53.10% 53.03% -0.07%
===========================================
Files 704 704
Lines 110967 110878 -89
===========================================
- Hits 58925 58809 -116
- Misses 52042 52069 +27 ☔ View full report in Codecov by Sentry. |
from ..utils import AdamWMini | ||
|
||
optimizer_cls = AdamWMini | ||
optimizer_kwargs.update(adam_kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是否可以做一些限制或者提示,例如tp、sharding情况下不能开启 AdamWMini
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,53 @@ | |||
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2022->2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddlenlp/utils/optimizer.py
Outdated
def _add_moments_pows(self, p): | ||
acc_dtype = p.dtype | ||
if self._is_dtype_fp16_or_bf16(acc_dtype): | ||
acc_dtype = DataType.FLOAT32 if in_pir_mode() else core.VarDesc.VarType.FP32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前框架中都统一到 paddle.xxx 的dtype,可以参考下 https://github.com/PaddlePaddle/PaddleNLP/pull/9366/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
APIs
Description
新增 adam-mini,训练过程新增--optim "adamw_mini",暂时不支持unified checkpoint存储
TP暂不支持,moment2计算需要进行gather