llama : more metal-friendly KV cache PAD

This commit is contained in:
Georgi Gerganov 2024-04-08 12:49:04 +03:00
parent b1f8af1886
commit 33a004e9cc
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -11508,7 +11508,7 @@ static int llama_decode_internal(
// a heuristic, to avoid attending the full cache if it is not yet utilized
// after enough generations, the benefit from this heuristic disappears
// if we start defragmenting the cache, the benefit from this will be more important
kv_self.n = std::min(kv_self.size, std::max(256u, GGML_PAD(llama_kv_cache_cell_max(kv_self), 256)));
kv_self.n = std::min(kv_self.size, std::max(128u, GGML_PAD(llama_kv_cache_cell_max(kv_self), 128)));
//kv_self.n = llama_kv_cache_cell_max(kv_self);
}
}