llama_memory_seq_rm function

  1. @Native<Bool Function(llama_memory_t, llama_seq_id, llama_pos, llama_pos)>(llama_memory_t, llama_seq_id, llama_pos, llama_pos)>()
bool llama_memory_seq_rm(
  1. llama_memory_t mem,
  2. int seq_id,
  3. int p0,
  4. int p1,
)

Removes all tokens that belong to the specified sequence and have positions in [p0, p1) Returns false if a partial sequence cannot be removed. Removing a whole sequence never fails seq_id < 0 : match any sequence p0 < 0 : 0, p1 p1 < 0 : [p0, inf)

Implementation

@ffi.Native<
  ffi.Bool Function(llama_memory_t, llama_seq_id, llama_pos, llama_pos)
>()
external bool llama_memory_seq_rm(
  llama_memory_t mem,
  int seq_id,
  int p0,
  int p1,
);