| llama_memory_seq_add | R Documentation |
Adds a position delta to all tokens in the given sequence within [p0, p1). This is useful for implementing context shifting (sliding window).
llama_memory_seq_add(ctx, seq_id, p0, p1, delta)
ctx |
Context handle returned by [llama_new_context] |
seq_id |
Sequence ID |
p0 |
Start position (inclusive) |
p1 |
End position (exclusive) |
delta |
Position shift amount (can be negative) |
No return value, called for side effects.
## Not run:
# Shift positions left by 100 for context window management
llama_memory_seq_add(ctx, seq_id = 0L, p0 = 100L, p1 = -1L, delta = -100L)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.