Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[LLM INFER] top_p_sampling_reject support top_p=0 and custom seed #9202

Merged
merged 7 commits into from
Oct 11, 2024

Conversation

gzy19990617
Copy link
Contributor

@gzy19990617 gzy19990617 commented Sep 26, 2024

PR types

Bug fixes

PR changes

Others

Description

1.支持传入seed,支持不同batch的top_p val不同。

2.该top_p_sampling_reject算子在TopP的值为0的时候,无出现无法采样成功的问题,返回值不正确。解决办法,在kernel内部进行修改,TopP为0时,采用TopK,同时进行了一版优化,将一些同步与等待消除掉。

3.fix一些之前未测试出来的小bug。

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

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

Project coverage is 53.02%. Comparing base (8b2cc08) to head (c1c7bc7).
Report is 267 commits behind head on develop.

Files with missing lines Patch % Lines
...enlp/experimental/transformers/generation_utils.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9202      +/-   ##
===========================================
- Coverage    53.16%   53.02%   -0.15%     
===========================================
  Files          657      657              
  Lines       106311   106311              
===========================================
- Hits         56524    56367     -157     
- Misses       49787    49944     +157     

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

yuanlehome
yuanlehome previously approved these changes Sep 27, 2024
@yuanlehome yuanlehome changed the title 【Inference】Fix top_p reject [LLM INFER] top_p_sampling_reject support top_p=0 and custom seed Sep 27, 2024
@ZHUI ZHUI merged commit f9eb62e into PaddlePaddle:develop Oct 11, 2024
8 of 11 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants