Skip to content

Commit

Permalink
whisper : zero-out the KV cache upon clear (#2445)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Oct 5, 2024
1 parent 0c0247e commit 47de411
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/whisper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,8 @@ static void whisper_kv_cache_clear(struct whisper_kv_cache & cache) {
cache.cells[i].seq_id.clear();
}
cache.head = 0;

ggml_backend_buffer_clear(cache.buffer, 0);
}

static void whisper_kv_cache_seq_rm(
Expand Down

0 comments on commit 47de411

Please sign in to comment.