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

add flashmask rm #9154

Merged
merged 8 commits into from
Sep 27, 2024
Merged

add flashmask rm #9154

merged 8 commits into from
Sep 27, 2024

Conversation

lugimzzz
Copy link
Contributor

PR types

New features

PR changes

Others

Description

rm

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@lugimzzz lugimzzz changed the title ad flashmask rm add flashmask rm Sep 19, 2024
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

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

Project coverage is 53.02%. Comparing base (ad14dc4) to head (ee302b6).
Report is 9 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/datasets/zero_padding_dataset.py 0.00% 8 Missing ⚠️
paddlenlp/transformers/llama/fusion_ops.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9154      +/-   ##
===========================================
- Coverage    53.06%   53.02%   -0.05%     
===========================================
  Files          656      656              
  Lines       106147   106162      +15     
===========================================
- Hits         56324    56288      -36     
- Misses       49823    49874      +51     

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

rejected_indexes = paddle.to_tensor(
[[response_index[0], response_index[2]] for response_index in response_indexs]
)
chosen_hidden_states = hidden_states.gather_nd(chosen_indexes)
Copy link
Member

Choose a reason for hiding this comment

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

sequence parallel 等都不支持吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

适配了

"""main"""
parser = PdArgumentParser((ModelArgument, DataArgument, TrainingArguments))
if len(sys.argv) == 2 and sys.argv[1].endswith(".json"):
model_args, data_args, training_args = parser.parse_json_file(json_file=os.path.abspath(sys.argv[1]))
Copy link
Member

Choose a reason for hiding this comment

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

这里要不支持下json和命令行,因为ce里面可能会增加命令行去覆盖json的配置,可参考这里:https://github.com/PaddlePaddle/PaddleNLP/blob/develop/llm/run_finetune.py#L77

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

logger.info("Start to create dataset")
trans_func = partial(preprocess_preference_data, tokenizer=tokenizer, data_args=data_args, model_args=model_args)
if data_args.lazy:
zero_padding_dataset = ZeroPaddingIterableDataset
Copy link
Member

Choose a reason for hiding this comment

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

如果设置Lazy,那么按epoch保存会报错吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lazy只支持step

@ZHUI ZHUI merged commit b2e4db2 into PaddlePaddle:develop Sep 27, 2024
6 of 12 checks passed
@lugimzzz lugimzzz deleted the rm branch September 27, 2024 06:56
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