We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ac6753 commit 5248b16Copy full SHA for 5248b16
src/llama-context.cpp
@@ -1019,7 +1019,10 @@ int llama_context::decode(llama_batch & inp_batch) {
1019
1020
if (!res) {
1021
// the last ubatch failed or was aborted -> remove all positions of that ubatch from the KV cache
1022
- llama_pos pos_min[LLAMA_MAX_PARALLEL_SEQUENCES] = { std::numeric_limits<llama_pos>::max() };
+ llama_pos pos_min[LLAMA_MAX_PARALLEL_SEQUENCES];
1023
+ for (int s = 0; s < LLAMA_MAX_PARALLEL_SEQUENCES; ++s) {
1024
+ pos_min[s] = std::numeric_limits<llama_pos>::max();
1025
+ }
1026
1027
for (uint32_t i = 0; i < ubatch.n_tokens; ++i) {
1028
const auto & seq_id = ubatch.seq_id[i][0];
0 commit comments