Skip to content

Commit 9b723e7

Browse files
committed
wip
1 parent 772703c commit 9b723e7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

examples/llama-bench/llama-bench.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,14 @@ static void test_prompt(llama_context * ctx, int n_prompt, int n_batch, int n_th
13371337
for (int i = 1; i < n_tokens; i++) {
13381338
tokens[i] = std::rand() % n_vocab;
13391339
}
1340-
llama_decode(ctx, llama_batch_get_one(tokens.data(), n_tokens));
1340+
auto batch = llama_batch_get_one(tokens.data(), n_tokens);
1341+
int8_t logits[512];
1342+
for (int i = 0; i < n_tokens; i++) {
1343+
logits[i] = 1;
1344+
}
1345+
batch.logits = logits;
1346+
1347+
llama_decode(ctx, batch);
13411348
n_processed += n_tokens;
13421349
}
13431350

0 commit comments

Comments
 (0)