Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Georgi Gerganov
33a004e9cc
llama : more metal-friendly KV cache PAD 2024-05-13 10:32:19 +03:00

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);
}
}