Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main : add Self-Extend support #4815

Merged
merged 9 commits into from
Jan 8, 2024
Prev Previous commit
llama : add comment about llama_kv_cache_seq_div
  • Loading branch information
ggerganov committed Jan 8, 2024
commit 82048d4750781dbbe657f2036f5b55dd21581165
4 changes: 4 additions & 0 deletions llama.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down