Didn't see the already defined top_k var.

lol. Embarrassing. Don't edit code in the github web viewer, kids.
This commit is contained in:
Randall Fitzgerald 2023-05-27 17:10:09 -07:00 committed by GitHub
parent e84b802161
commit 1f40a789e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,9 +160,8 @@ struct llama_server_context
{ {
// out of user input, sample next token // out of user input, sample next token
const float temp = params.temp; const float temp = params.temp;
// const int32_t top_k = params.top_k <= 0 ? llama_n_vocab(ctx) : params.top_k;
const float top_p = params.top_p;
const int32_t top_k = params.top_k <= 0 ? llama_n_vocab(ctx) : params.top_k; const int32_t top_k = params.top_k <= 0 ? llama_n_vocab(ctx) : params.top_k;
const float top_p = params.top_p;
const float tfs_z = params.tfs_z; const float tfs_z = params.tfs_z;
const float typical_p = params.typical_p; const float typical_p = params.typical_p;
const int32_t repeat_last_n = params.repeat_last_n < 0 ? params.n_ctx : params.repeat_last_n; const int32_t repeat_last_n = params.repeat_last_n < 0 ? params.n_ctx : params.repeat_last_n;