Skip to content

Commit

Permalink
KV Cache defrag hash overflow - TMP Fix by @slaren
Browse files Browse the repository at this point in the history
  • Loading branch information
phymbert committed Apr 16, 2024
1 parent 8a56075 commit eedd42e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10702,7 +10702,7 @@ static void llama_kv_cache_defrag_internal(struct llama_context & lctx) {
// each move requires 6*n_layer tensors (see build_defrag)
// - source view, destination view, copy operation
// - x2 for keys and values
const uint32_t max_moves = LLAMA_MAX_NODES/(6*n_layer);
const uint32_t max_moves = (LLAMA_MAX_NODES - 2*n_layer)/(6*n_layer);

// determine which KV cells to move where
//
Expand Down

0 comments on commit eedd42e

Please sign in to comment.