decode : fix logits_valid for legacy API (#4516)

This commit is contained in:
Jared Van Bortel 2023-12-17 19:39:02 -05:00 committed by GitHub
parent b1306c4394
commit 2994f0c5a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6184,7 +6184,7 @@ static int llama_decode_internal(
logits_out.resize(n_vocab);
memcpy(logits_out.data(), (float *) ggml_get_data(res) + (n_vocab*(n_tokens - 1)), sizeof(float)*n_vocab);
#ifndef NDEBUG
logits_valid[n_tokens - 1] = true;
logits_valid[0] = true;
#endif
}
}