class Llama::Sampler::Greedy

Overview

The Greedy sampler always selects the token with the highest probability. This is the simplest sampling method and produces deterministic output.

Example:

sampler = Llama::Sampler::Greedy.new

Defined in:

llama/sampler/greedy.cr

Constructors

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

def self.new #

Creates a new greedy sampler

Raises:

  • Llama::Error if the sampler cannot be created

[View source]