llama_memory_seq_keep: Keep only one sequence in the KV cache

View source: R/llama.R

llama_memory_seq_keepR Documentation

Keep only one sequence in the KV cache

Description

Removes all sequences except the specified one from the KV cache.

Usage

llama_memory_seq_keep(ctx, seq_id)

Arguments

ctx

Context handle returned by [llama_new_context]

seq_id

Sequence ID to keep

Value

No return value, called for side effects.

Examples

## Not run: 
llama_memory_seq_keep(ctx, seq_id = 0L)

## End(Not run)

llamaR documentation built on May 28, 2026, 1:06 a.m.