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 48ebcec commit 552a5ceCopy full SHA for 552a5ce
src/llama-kv-cache-recurrent.cpp
@@ -597,6 +597,18 @@ bool llama_kv_cache_recurrent::find_slot(const llama_ubatch & ubatch) {
597
}
598
599
600
+ // Find first to-be-cleared cell
601
+ rs_z = -1;
602
+ for (int i = min; i <= max; ++i) {
603
+ if (rs_z < 0 && cells[i].src == -1) {
604
+ rs_z = i;
605
+ }
606
+ // Stage the source ids for all used cells to allow correct seq_* behavior
607
+ // and still make these values available when setting the inputs
608
+ cells[i].src0 = cells[i].src;
609
+ cells[i].src = i;
610
611
+
612
// allow getting the range of used cells, from head to head + n
613
head = min;
614
n = max - min + 1;
0 commit comments