Skip to content

Commit e94f393

Browse files
committed
kv-cache : allow context shift for recurrent models
1 parent d55b0d0 commit e94f393

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/llama-kv-cache.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,8 @@ llama_pos llama_kv_cache_recurrent::get_pos_max() const {
19381938
}
19391939

19401940
bool llama_kv_cache_recurrent::get_can_shift() const {
1941-
return false;
1941+
// shifting is trivial, the recurrent states don't care about the absolute position
1942+
return true;
19421943
}
19431944

19441945
uint32_t llama_kv_cache_recurrent::cell_max() const {

0 commit comments

Comments
 (0)