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

[Tokenizer] Unify tokenizer _pad #9280

Merged

Conversation

DrownFish19
Copy link
Collaborator

@DrownFish19 DrownFish19 commented Oct 16, 2024

PR types

Function optimization

PR changes

APIs

Description

Unify tokenizer _pad function.

  • Move the attention_mask([1,seq_len,seql_len]) padding action into tokenizer_base _pad.
  • Move attn_mask_startend_row_indices padding action into tokenizer_base _pad.

[FlashMask] Add FlashMask for Qwen2 #9264误差范围验证基于此PR

Copy link

paddle-bot bot commented Oct 16, 2024

Thanks for your contribution!

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.

Project coverage is 52.96%. Comparing base (1dc6e18) to head (5ad7381).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/transformers/tokenizer_utils_base.py 87.50% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9280      +/-   ##
===========================================
+ Coverage    52.94%   52.96%   +0.02%     
===========================================
  Files          657      657              
  Lines       106533   106384     -149     
===========================================
- Hits         56404    56351      -53     
+ Misses       50129    50033      -96     

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

lugimzzz
lugimzzz previously approved these changes Oct 17, 2024
Copy link
Contributor

@lugimzzz lugimzzz left a comment

Choose a reason for hiding this comment

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

LGTM

@DrownFish19 DrownFish19 force-pushed the dev_20241016_update_tokenizer__pad branch from 7f3b3c8 to 867ad0b Compare October 17, 2024 13:12
@ZHUI ZHUI merged commit 1770b51 into PaddlePaddle:develop Oct 18, 2024
8 of 12 checks passed
@DrownFish19 DrownFish19 deleted the dev_20241016_update_tokenizer__pad branch October 18, 2024 07:25
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.

3 participants