From f8cc5774e70b95d4ef25129e726b5ffde3ccc222 Mon Sep 17 00:00:00 2001 From: Niklas Wenzel Date: Sat, 14 Nov 2026 23:57:23 +0100 Subject: [PATCH] memory : fix non-consecutive position warning for M-RoPE (#32287) --- src/llama-memory-recurrent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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",