Commit f8cc5774e for llama.cpp
commit f8cc5774e70b95d4ef25129e726b5ffde3ccc222
Author: Niklas Wenzel <dev@nikwen.de>
Date: Sat Nov 14 23:57:23 2026 +0100
memory : fix non-consecutive position warning for M-RoPE (#32287)
diff --git a/src/llama-memory-recurrent.cpp b/src/llama-memory-recurrent.cpp
index 9213ac1dc..2bb8ef18c 100644
--- a/src/llama-memory-recurrent.cpp
+++ b/src/llama-memory-recurrent.cpp
@@ -666,7 +666,7 @@ bool llama_memory_recurrent::find_slot(const llama_ubatch & ubatch) {
const int32_t cell_id = s + min;
auto & cell = cells[cell_id];
- if (cell.pos >= 0 && last_pos != cell.pos + (llama_pos) n_seq_tokens) {
+ if (ubatch.n_pos == 1 && cell.pos >= 0 && last_pos != cell.pos + (llama_pos) n_seq_tokens) {
// What should happen when the pos backtracks or skips a value?
// Clearing the state mid-batch would require special-casing which isn't done.
LLAMA_LOG_WARN("%s: non-consecutive token position %d after %d for sequence %d with %u new tokens\n",