diff options
author | anon998 <131767832+anon998@users.noreply.github.com> | 2023-06-25 08:48:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-25 10:48:36 +0200 |
commit | c2a08f87b8d180115d04b8688f383d1b2761b16d (patch) | |
tree | 5a376e4508aa7725f7f3e4af4dd925b448ebb2ce /examples | |
parent | 66a2555ba6cab954c56d653b29c27bfbbacfbfb1 (diff) |
fix server sampling: top k sampler first (#1977)
Co-authored-by: anon <anon@example.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/server/server.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/server/server.cpp b/examples/server/server.cpp index de22d30..79df5e8 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -325,10 +325,10 @@ struct llama_server_context { id = llama_sample_token_mirostat_v2(ctx, &candidates_p, mirostat_tau, mirostat_eta, &mirostat_mu); } else { // Temperature sampling + llama_sample_top_k(ctx, &candidates_p, top_k, 1); llama_sample_tail_free(ctx, &candidates_p, tfs_z, 1); llama_sample_typical(ctx, &candidates_p, typical_p, 1); llama_sample_top_p(ctx, &candidates_p, top_p, 1); - llama_sample_top_k(ctx, &candidates_p, top_k, 1); llama_sample_temperature(ctx, &candidates_p, temp); id = llama_sample_token(ctx, &candidates_p); } |