Skip to content

Commit d6fb3f6

Browse files
authored
kv-cache : fix k-shift for multiple streams (ggml-org#14742)
ggml-ci
1 parent 01612b7 commit d6fb3f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama-kv-cache-unified.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ void llama_kv_cache_unified::set_input_k_shift(ggml_tensor * dst) const {
12611261
const auto & cells = v_cells[s];
12621262

12631263
for (uint32_t i = 0; i < cells.size(); ++i) {
1264-
data[i] = cells.is_empty(i) ? 0 : cells.get_shift(i);
1264+
data[s*cells.size() + i] = cells.is_empty(i) ? 0 : cells.get_shift(i);
12651265
}
12661266
}
12671267
}

0 commit comments

Comments
 (0)