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

Method add_penalties

llama_cpp/_internals.py:785–798  ·  view source on GitHub ↗
(
        self,
        penalty_last_n: int,
        penalty_repeat: float,
        penalty_freq: float,
        penalty_present: float,
    )

Source from the content-addressed store, hash-verified

783 llama_cpp.llama_sampler_chain_add(self.sampler, sampler)
784
785 def add_penalties(
786 self,
787 penalty_last_n: int,
788 penalty_repeat: float,
789 penalty_freq: float,
790 penalty_present: float,
791 ):
792 sampler = llama_cpp.llama_sampler_init_penalties(
793 penalty_last_n,
794 penalty_repeat,
795 penalty_freq,
796 penalty_present,
797 )
798 llama_cpp.llama_sampler_chain_add(self.sampler, sampler)
799
800 def add_dry(
801 self,

Callers 1

_init_samplerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected