class
Llama::Sampler::AdaptiveP
- Llama::Sampler::AdaptiveP
- Llama::Sampler::Base
- Reference
- Object
Overview
Adaptive-P sampler
Selects tokens near a configurable target probability over time.
Defined in:
llama/sampler/adaptive_p.crConstructors
-
.new(target : Float32, decay : Float32, seed : UInt32 = LibLlama::LLAMA_DEFAULT_SEED)
Creates a new Adaptive-P sampler.
Instance methods inherited from class Llama::Sampler::Base
to_unsafe : Pointer(Llama::LibLlama::LlamaSampler)
to_unsafe
Constructor methods inherited from class Llama::Sampler::Base
new(handle : Pointer(LibLlama::LlamaSampler))
new
Constructor Detail
Creates a new Adaptive-P sampler.
Parameters:
- target: Target probability (0.0 to 1.0, negative to disable)
- decay: EMA decay (0.0 to 0.99)
- seed: RNG seed
Raises:
- Llama::Error if the sampler cannot be created