Skip to content

Commit eab5606

Browse files
authored
Apply suggestions from code review
1 parent de788e0 commit eab5606

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

examples/batched-bench/batched-bench.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ int main(int argc, char ** argv) {
147147
llama_batch_ext_clear(batch);
148148

149149
for (int j = 0; j < pl; ++j) {
150-
llama_batch_ext_add_text(batch, 0, pp + i, &j, 1, false);
150+
llama_batch_ext_add_text(batch, 0, pp + i, &j, 1, true);
151151
}
152152

153153
if (!decode_helper(ctx, batch, ctx_params.n_batch)) {

examples/batched/batched.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ int main(int argc, char ** argv) {
196196
i_batch[i] = llama_batch_ext_get_n_tokens(batch);
197197

198198
// push this new token for next evaluation
199-
llama_batch_ext_add_text(batch, new_token_id, n_cur, &i, 1, false);
199+
llama_batch_ext_add_text(batch, new_token_id, n_cur, &i, 1, true);
200200

201201
n_decode += 1;
202202
}

examples/main/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,6 @@ int main(int argc, char ** argv) {
670670
LOG_DBG("eval: %s\n", string_from(ctx, embd).c_str());
671671

672672
auto batch = llama_batch_ext_ptr::init_from_text(&embd[i], n_eval, n_past, 0, true);
673-
llama_batch_ext_set_output_last(batch.get());
674673
if (llama_decode_ext(ctx, batch.get())) {
675674
LOG_ERR("%s : failed to eval\n", __func__);
676675
return 1;

0 commit comments

Comments
 (0)