Skip to content

LLM inference in C/C++

C++ ggml

llama-batch: fix allowed decreasing pos in a seq (#25449)

Aman Gupta1ee093937fb4
diff --git a/src/llama-batch.cpp b/src/llama-batch.cpp
index 5436717c42..2b98a552f4 100644
--- a/src/llama-batch.cpp
+++ b/src/llama-batch.cpp
@@ -379,6 +379,8 @@ bool llama_batch_allocr::init(
LLAMA_LOG_ERROR("%s: sequence %d positions are decreasing (not allowed)\n", __func__, seq_id);
return false;
}
+
+ cur_seq_pos[seq_id] = pos;
}
}
}