class

Llama::Sampler::Infill

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

Infill sampler

The Infill sampler is designed for fill-in-the-middle (FIM) tasks. It helps to generate text that fits naturally between existing content.

Example:

sampler = Llama::Sampler::Infill.new(model.vocab)

Constructors

new(vocab : Vocab)

Creates a new Infill sampler

Parameters:

  • vocab: The vocabulary to use

Raises:

  • Llama::Error if the sampler cannot be created
Source

Instance methods

finalize

Overrides the parent class's finalize method to ensure proper cleanup

Source