MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / llama_memory_seq_keep

Function llama_memory_seq_keep

llama_cpp/llama_cpp.py:2360–2362  ·  view source on GitHub ↗

Removes all tokens that do not belong to the specified sequence

(mem: llama_memory_t, seq_id: Union[llama_seq_id, int], /)

Source from the content-addressed store, hash-verified

2358# llama_seq_id seq_id);
2359@ctypes_function("llama_memory_seq_keep", [llama_memory_t_ctypes, llama_seq_id], None)
2360def llama_memory_seq_keep(mem: llama_memory_t, seq_id: Union[llama_seq_id, int], /):
2361 """Removes all tokens that do not belong to the specified sequence"""
2362 ...
2363
2364
2365# // Adds relative position "delta" to all tokens that belong to the specified sequence and have positions in [p0, p1)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…