Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 08e910f

Browse filesBrowse files
committed
feat: Update llama.cpp
1 parent a728199 commit 08e910f
Copy full SHA for 08e910f

File tree

Expand file treeCollapse file tree

2 files changed

+12
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-1
lines changed

‎llama_cpp/llama_cpp.py

Copy file name to clipboardExpand all lines: llama_cpp/llama_cpp.py
+11Lines 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

Copy file name to clipboard

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.