MCPcopy Index your code
hub / github.com/abetlen/llama-cpp-python / add_top_k

Method add_top_k

llama_cpp/_internals.py:713–715  ·  view source on GitHub ↗
(self, k: int)

Source from the content-addressed store, hash-verified

711 )
712
713 def add_top_k(self, k: int):
714 sampler = llama_cpp.llama_sampler_init_top_k(k)
715 llama_cpp.llama_sampler_chain_add(self.sampler, sampler)
716
717 def add_top_p(self, p: float, min_keep: int = 1):
718 sampler = llama_cpp.llama_sampler_init_top_p(p, min_keep)

Callers 2

_init_samplerMethod · 0.95
test_real_modelFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_real_modelFunction · 0.76