Skip to content

Commit

Permalink
Corrected top_p check in LogitProcessor (#585)
Browse files Browse the repository at this point in the history
Corrected top_p check in LogitProcessor
  • Loading branch information
popovaan authored Jul 8, 2024
1 parent 602f099 commit a30a1b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/continuous_batching/src/logit_processor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class LogitProcessor {

if (sampling_params.is_multinomial()) {
m_logit_transformers.emplace_back(new LogitTransformers::TemperatureLogitTransform(sampling_params.temperature));
if (sampling_params.top_p != 0.0f) {
if (sampling_params.top_p != 1.0f) {
m_logit_transformers.emplace_back(new LogitTransformers::TopPFilter(sampling_params.top_p));
}
if (sampling_params.top_k > 0) {
Expand Down

0 comments on commit a30a1b9

Please sign in to comment.