Skip to content

Commit e230ebb

Browse files
committed
Remove the hack code in llama_chat_format.py
1 parent a8a443d commit e230ebb

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

llama_cpp/llama_chat_format.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3091,12 +3091,6 @@ def __call__(
30913091
n_past = new_n_past.value
30923092
llama.n_tokens = n_past
30933093

3094-
n_past = llama.n_tokens
3095-
if n_past > 0:
3096-
llama._ctx.memory_seq_rm(0, n_past - 1, -1)
3097-
if llama._ctx.memory_seq_pos_min(0) == llama._ctx.memory_seq_pos_max(0):
3098-
n_past += 1
3099-
llama.n_tokens = n_past
31003094
# Get prompt tokens to avoid a cache miss
31013095
prompt = llama.input_ids[: llama.n_tokens].tolist()
31023096

0 commit comments

Comments
 (0)