llama_kv_cache_seq_shift method
Adds relative position "delta" to all tokens that belong to the specified sequence and have positions in [p0, p1)
If the KV cache is RoPEd, the KV data is updated accordingly
p0 < 0 : 0, p1
p1 < 0 : [p0, inf)
Implementation
void llama_kv_cache_seq_shift(
ffi.Pointer<llama_context> ctx,
int seq_id,
int p0,
int p1,
int delta,
) {
return _llama_kv_cache_seq_shift(
ctx,
seq_id,
p0,
p1,
delta,
);
}