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 the missing truncation=True in llm/predictor.py #8768

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

lszxb
Copy link
Contributor

@lszxb lszxb commented Jul 16, 2024

PR types

Bug fixes

PR changes

Others

Description

In llm/predictor.py, two calls to tokenizer are missing the truncation=True parameter, causing the results not to be truncated to max_length. This leads to errors in subsequent processing when using --benchmark for testing. This PR fixes this issue.

Copy link

paddle-bot bot commented Jul 16, 2024

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Jul 16, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

codecov bot commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.50%. Comparing base (5a508e5) to head (0e2f97c).
Report is 216 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8768      +/-   ##
===========================================
+ Coverage    55.43%   55.50%   +0.07%     
===========================================
  Files          626      626              
  Lines        98070    98070              
===========================================
+ Hits         54366    54437      +71     
+ Misses       43704    43633      -71     

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

Copy link
Contributor

@vivienfanghuagood vivienfanghuagood left a comment

Choose a reason for hiding this comment

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

Approved

Copy link
Contributor

@DesmonDay DesmonDay left a comment

Choose a reason for hiding this comment

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

LGTM

@DesmonDay DesmonDay merged commit ab72ba7 into PaddlePaddle:develop Jul 17, 2024
10 of 12 checks passed
@lszxb lszxb deleted the fix_predictor_tokenizer branch July 18, 2024 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants