memory : fix non-consecutive position warning for M-RoPE (#32287)

This commit is contained in:
Niklas Wenzel authored and GitHub committed 2026-11-14 23:57:23 +01:00
1 parent acf5d54562
commit f8cc5774e7
1 file changed
+1 -1
+1 -1
View File
@@ -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",