class

Llama::Sampler::AdaptiveP

Inherits Llama::Sampler::Base / Reference / Object

Adaptive-P sampler

Selects tokens near a configurable target probability over time.

Constructors

new(target : Float32, decay : Float32, seed : UInt32 = LibLlama::LLAMA_DEFAULT_SEED)

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
Source