Skip to content

Commit 2994f0c

Browse files
authored
decode : fix logits_valid for legacy API (#4516)
1 parent b1306c4 commit 2994f0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6184,7 +6184,7 @@ static int llama_decode_internal(
61846184
logits_out.resize(n_vocab);
61856185
memcpy(logits_out.data(), (float *) ggml_get_data(res) + (n_vocab*(n_tokens - 1)), sizeof(float)*n_vocab);
61866186
#ifndef NDEBUG
6187-
logits_valid[n_tokens - 1] = true;
6187+
logits_valid[0] = true;
61886188
#endif
61896189
}
61906190
}

0 commit comments

Comments
 (0)