kv-cache : support attention rotation for heterogeneous iSWA (#21513)

* kv-cache : support attention rotation for heterogeneous iSWA

* cont : remove assert
This commit is contained in:
Georgi Gerganov
2026-04-07 20:31:28 +03:00
committed by GitHub
parent 957d717ce5
commit 4eb19514dd
4 changed files with 58 additions and 17 deletions
+5
View File
@@ -239,6 +239,11 @@ private:
bool attn_rot_k = false;
bool attn_rot_v = false;
// if all layers participating in the cache have constant head size, the value is stored here
// otherwise the value is -1
int32_t n_embd_head_k_all = 0;
int32_t n_embd_head_v_all = 0;
// pre-computed hadamard martrices
std::unordered_map<int64_t, std::vector<float>> attn_rot_hadamard;