Skip to content

Commit c046217

Browse files
authored
parallel : fix n_junk == 0 (#13952)
1 parent 0fc16b4 commit c046217

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/parallel/parallel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ int main(int argc, char ** argv) {
158158
common_params params;
159159

160160
params.n_predict = 128;
161-
params.n_junk = 0;
161+
params.n_junk = 1;
162162

163163
if (!common_params_parse(argc, argv, params, LLAMA_EXAMPLE_PARALLEL)) {
164164
return 1;
@@ -182,7 +182,7 @@ int main(int argc, char ** argv) {
182182
const bool is_sp_shared = params.is_pp_shared;
183183

184184
// extra text to insert in each client's prompt in order to make it larger
185-
const int32_t n_junk = params.n_junk;
185+
const int32_t n_junk = std::max(1, params.n_junk);
186186

187187
// init llama.cpp
188188
llama_backend_init();

0 commit comments

Comments
 (0)