Skip to content

Commit a75cb30

Browse files
authored
context : fix reorder logic (#13267)
ggml-ci
1 parent 3f3769b commit a75cb30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/llama-context.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,9 @@ int llama_context::decode(llama_batch & inp_batch) {
10501050
// finalize the batch processing
10511051
kv_guard.commit();
10521052

1053+
// set to total number of outputs in the batch, for use in llama_get_logits_ith
1054+
n_outputs = n_outputs_all;
1055+
10531056
// set output mappings
10541057
{
10551058
bool sorted_output = true;
@@ -1103,9 +1106,6 @@ int llama_context::decode(llama_batch & inp_batch) {
11031106
}
11041107
}
11051108

1106-
// set to total number of outputs in the batch, for use in llama_get_logits_ith
1107-
n_outputs = n_outputs_all;
1108-
11091109
// wait for the computation to finish (automatically done when obtaining the model output)
11101110
//synchronize();
11111111

0 commit comments

Comments
 (0)