-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Be more strict about converting float to double #458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
54b75a7
3a42193
f68345e
61733d3
21e9ce7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,8 @@ int main(int argc, char ** argv) { | |
fprintf(stderr, "Input prefix: '%s'\n", params.input_prefix.c_str()); | ||
} | ||
} | ||
fprintf(stderr, "sampling: temp = %f, top_k = %d, top_p = %f, repeat_last_n = %i, repeat_penalty = %f\n", params.temp, params.top_k, params.top_p, params.repeat_last_n, params.repeat_penalty); | ||
fprintf(stderr, "sampling: temp = %f, top_k = %d, top_p = %f, repeat_last_n = %i, repeat_penalty = %f\n", | ||
(double)params.temp, params.top_k, (double)params.top_p, params.repeat_last_n, (double)params.repeat_penalty); | ||
fprintf(stderr, "generate: n_ctx = %d, n_batch = %d, n_predict = %d, n_keep = %d\n", n_ctx, params.n_batch, params.n_predict, params.n_keep); | ||
fprintf(stderr, "\n\n"); | ||
|
||
|
@@ -274,10 +275,10 @@ int main(int argc, char ** argv) { | |
|
||
if ((int) embd_inp.size() <= n_consumed && !is_interacting) { | ||
// out of user input, sample next token | ||
const float top_k = params.top_k; | ||
const float top_p = params.top_p; | ||
const float temp = params.temp; | ||
const float repeat_penalty = params.repeat_penalty; | ||
const int top_k = params.top_k; | ||
const double top_p = (double)params.top_p; | ||
const double temp = (double)params.temp; | ||
const double repeat_penalty = (double)params.repeat_penalty; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not make the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't want to change it too much, but we could alternatively make everything involved with the logits a After all, these three parameters are set by the user with 2 decimal places or so... |
||
|
||
llama_token id = 0; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.