-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Prediction] Update LLM prediction. #8778
Conversation
Thanks for your contribution! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8778 +/- ##
===========================================
+ Coverage 55.03% 55.53% +0.50%
===========================================
Files 627 631 +4
Lines 98921 98466 -455
===========================================
+ Hits 54440 54685 +245
+ Misses 44481 43781 -700 ☔ View full report in Codecov by Sentry. |
a19f4b6
to
6944c25
Compare
6944c25
to
33fde67
Compare
# TODO: Support safetensors loading. | ||
kwargs["use_safetensors"] = False | ||
return super().from_pretrained(pretrained_model_name_or_path, *args, **kwargs) | ||
config = kwargs.pop("config", None) |
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.
这些地方没法统一到一处吗?
0d1026f
to
ea2f41c
Compare
ea2f41c
to
5c2f595
Compare
…nto update_predict_new
99c031b
to
f1d65ab
Compare
from safetensors.numpy import load_file as safe_load_file | ||
|
||
|
||
def load_sharded_checkpoint(folder, variant=None, return_numpy=False): |
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.
这些类似的函数可以放入主库
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.
是不是可以直接放到paddlenlp/transformers/model_utils.py里作为类函数?所有实现的类都可以直接调用
b7f32af
to
e2cc486
Compare
from safetensors.numpy import save_file as safe_save_file | ||
|
||
if sys.platform.startswith("win"): |
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.
为什么删除?
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.
搞错了,已修改。
e2cc486
to
ebc553d
Compare
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
Function optimization
PR changes
Others
Description
Update LLM prediction, support safetensors model download and loading.