Skip to content

Commit

Permalink
[BugFix] Correct Order of Temperature and Top_P in Sample Function (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
zxybazh authored Sep 21, 2023
1 parent ebb863a commit 80e449f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/llm_chat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ class LLMChat {
ICHECK(logits_on_cpu_.defined()) << "logits_on_cpu_ is not defined";
ICHECK_EQ(logits_on_cpu_->ndim, 3) << "logits_on_cpu_ should be 3D";
ICHECK_EQ(logits_on_cpu_->shape[0], 1) << "logits_on_cpu_ should be 1 batch";
return fsample_topp_from_logits_(logits_on_cpu_, top_p_, temperature_, GetRandomNumber());
return fsample_topp_from_logits_(logits_on_cpu_, temperature_, top_p_, GetRandomNumber());
}

int32_t SampleFromProbOnCPU() {
Expand Down

0 comments on commit 80e449f

Please sign in to comment.