Skip to content

Commit 11e4438

Browse files
committed
Sync sampling : when top-k <= 0 -> noop (#13173)
1 parent 31725a2 commit 11e4438

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llama_cpp/llama_cpp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3814,6 +3814,7 @@ def llama_sampler_init_softmax() -> llama_sampler_p:
38143814

38153815

38163816
# /// @details Top-K sampling described in academic paper "The Curious Case of Neural Text Degeneration" https://arxiv.org/abs/1904.09751
3817+
# /// Setting k <= 0 makes this a noop
38173818
# LLAMA_API struct llama_sampler * llama_sampler_init_top_k (int32_t k);
38183819
@ctypes_function("llama_sampler_init_top_k", [ctypes.c_int32], llama_sampler_p_ctypes)
38193820
def llama_sampler_init_top_k(k: int) -> llama_sampler_p:

0 commit comments

Comments
 (0)