From e52fcaeb12d90fa255f80ac39ab6c9c147641aba Mon Sep 17 00:00:00 2001 From: Min-Hua Chen Date: Wed, 16 Jul 2025 10:53:04 +0800 Subject: [PATCH] llama: add LLAMA_API to deprecated llama_kv_self_seq_div Add LLAMA_API to fix the run-time error with llama-cpp-python in Windows env: attributeError: function 'llama_kv_self_seq_div' not found. Did you mean: 'llama_kv_self_seq_add'? Although llama_kv_self_seq_div() has been marked deprecated but it is necessary to export it to make llama-cpp-python happy. Observed software version: OS: windows compiler: MSVC llama-cpp-python: tag: v0.3.12-cu124 llama.cpp: tag: b5833 Signed-off-by: Min-Hua Chen --- include/llama.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llama.h b/include/llama.h index c83b759150bfe..28e84d4d7e27e 100644 --- a/include/llama.h +++ b/include/llama.h @@ -725,7 +725,7 @@ extern "C" { // - lazily on next llama_decode() // p0 < 0 : [0, p1] // p1 < 0 : [p0, inf) - DEPRECATED(void llama_kv_self_seq_div( + DEPRECATED(LLAMA_API void llama_kv_self_seq_div( struct llama_context * ctx, llama_seq_id seq_id, llama_pos p0,