Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 08e910f

Browse files
committed
feat: Update llama.cpp
1 parent a728199 commit 08e910f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

llama_cpp/llama_cpp.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,17 @@ def llama_set_n_threads(
17281728
"""
17291729
...
17301730

1731+
1732+
# // Set whether to use causal attention or not
1733+
# // If set to true, the model will only attend to the past tokens
1734+
# LLAMA_API void llama_set_causal_attn(struct llama_context * ctx, bool causal_attn);
1735+
@ctypes_function("llama_set_causal_attn", [llama_context_p_ctypes, ctypes.c_bool], None)
1736+
def llama_set_causal_attn(ctx: llama_context_p, causal_attn: bool, /):
1737+
"""Set whether to use causal attention or not
1738+
If set to true, the model will only attend to the past tokens"""
1739+
...
1740+
1741+
17311742
# // Set abort callback
17321743
# LLAMA_API void llama_set_abort_callback(struct llama_context * ctx, ggml_abort_callback abort_callback, void * abort_callback_data);
17331744
@ctypes_function(

vendor/llama.cpp

0 commit comments

Comments
 (0)