summaryrefslogtreecommitdiff
path: root/llama.h
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2024-01-08 11:18:32 +0200
committerGitHub <noreply@github.com>2024-01-08 11:18:32 +0200
commit52531fdff88764282c1b233174721aab8347252d (patch)
treed4aeec20b4b634f5de3bd9839df507dee85c9e1f /llama.h
parentb0034d93ce2949ce7d9c098ca02e56f66cd484e2 (diff)
main : add self-extend support (#4815)
* examples : add passkey test * passkey : better prints * passkey : select pass key pos from CLI * passkey : simplify n_past logic * llama : "self-extend"-like context extension * passkey : add comment * main : add Self-Extend support * llama : add comment about llama_kv_cache_seq_div
Diffstat (limited to 'llama.h')
-rw-r--r--llama.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llama.h b/llama.h
index 5305de90..869ff0ac 100644
--- a/llama.h
+++ b/llama.h
@@ -484,6 +484,10 @@ extern "C" {
llama_pos p1,
llama_pos delta);
+ // Integer division of the positions by factor of `d > 1`
+ // If the KV cache is RoPEd, the KV data is updated accordingly
+ // p0 < 0 : [0, p1]
+ // p1 < 0 : [p0, inf)
LLAMA_API void llama_kv_cache_seq_div(
struct llama_context * ctx,
llama_seq_id seq_id,