MCPcopy Index your code
hub / github.com/abetlen/llama-cpp-python / kv_cache_clear

Method kv_cache_clear

llama_cpp/_internals.py:292–296  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

290 return llama_cpp.llama_pooling_type(self.ctx)
291
292 def kv_cache_clear(self):
293 # Embedding models with non-causal attention may not allocate memory.
294 if self.memory is None:
295 return
296 llama_cpp.llama_memory_clear(self.memory, True)
297
298 def kv_cache_seq_rm(self, seq_id: int, p0: int, p1: int) -> bool:
299 assert self.memory is not None, "Memory is not initialized"

Callers 5

decode_batchMethod · 0.80
embedMethod · 0.80
__call__Method · 0.80
__call__Method · 0.80
__call__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected