kv-cache : fix k-shift for multiple streams (#14742)

ggml-ci
This commit is contained in:
Georgi Gerganov
2025-07-17 20:52:33 +03:00
committed by GitHub
parent 01612b7409
commit d6fb3f6b49

View File

@ -1261,7 +1261,7 @@ void llama_kv_cache_unified::set_input_k_shift(ggml_tensor * dst) const {
const auto & cells = v_cells[s];
for (uint32_t i = 0; i < cells.size(); ++i) {
data[i] = cells.is_empty(i) ? 0 : cells.get_shift(i);
data[s*cells.size() + i] = cells.is_empty(i) ? 0 : cells.get_shift(i);
}
}
}