Skip to content

Conversation

@LokeZhou
Copy link
Contributor

PR types

Others

PR changes

Others

Description

Others

sorted_probs = paddle.sort(probs, descending=True)

sorted_probs = paddle.cast(sorted_probs, paddle.bfloat16)
sorted_indices = paddle.cast(sorted_indices, paddle.int64)
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的 sorted_indices 可以不用cast,其返回值本身就是 int64.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #7337 (352fc7a) into develop (13efd36) will decrease coverage by 0.01%.
Report is 2 commits behind head on develop.
The diff coverage is 33.33%.

@@             Coverage Diff             @@
##           develop    #7337      +/-   ##
===========================================
- Coverage    58.94%   58.94%   -0.01%     
===========================================
  Files          573      573              
  Lines        84228    84231       +3     
===========================================
- Hits         49648    49646       -2     
- Misses       34580    34585       +5     
Files Coverage Δ
paddlenlp/generation/logits_process.py 88.47% <33.33%> (-1.11%) ⬇️

... and 2 files with indirect coverage changes

Copy link
Contributor

@wj-Mcat wj-Mcat left a comment

Choose a reason for hiding this comment

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

LGTM

@wj-Mcat wj-Mcat merged commit 0407095 into PaddlePaddle:develop Oct 31, 2023
@LokeZhou LokeZhou deleted the logit_process branch October 31, 2023 08:13
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.

2 participants