Skip to content

[Tokenizer] Unify tokenizer _pad#9280

Merged
ZHUI merged 13 commits into
PaddlePaddle:developfrom
DrownFish19:dev_20241016_update_tokenizer__pad
Oct 18, 2024
Merged

[Tokenizer] Unify tokenizer _pad#9280
ZHUI merged 13 commits into
PaddlePaddle:developfrom
DrownFish19:dev_20241016_update_tokenizer__pad

Conversation

@DrownFish19
Copy link
Copy Markdown
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

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Oct 16, 2024

Thanks for your contribution!

@codecov
Copy link
Copy Markdown

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 265 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
Copy Markdown
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
@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