-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Name and Version
Applicable on Commit (fd1234c)
Operating systems
Windows
Which llama.cpp modules do you know to be affected?
libllama (core library)
Command line
Problem description & steps to reproduce
// 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)
LLAMA_API bool llama_memory_seq_rm(
llama_memory_t mem,
llama_seq_id seq_id,
llama_pos p0,
llama_pos p1);
Above documentation claims that seq_id < 0 can be provided to clear all sequences in a position, however this fails due to the following ASSERT at runtime
bool llama_kv_cache_unified::seq_rm(llama_seq_id seq_id, llama_pos p0, llama_pos p1) {
GGML_ASSERT(seq_id >= 0 && (size_t) seq_id < seq_to_stream.size());
auto & cells = v_cells[seq_to_stream[seq_id]];
auto & head = v_heads[seq_to_stream[seq_id]];
uint32_t new_head = cells.size();
First Bad Commit
This ASSERT appears to have been added as part of (225e7a1)
Relevant log output
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working