class
Llama::Sampler::Infill
- Llama::Sampler::Infill
- Llama::Sampler::Base
- Reference
- Object
Overview
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)
Defined in:
llama/sampler/infill.crConstructors
-
.new(vocab : Vocab)
Creates a new Infill sampler
Instance Method Summary
-
#finalize
Overrides the parent class's finalize method to ensure proper cleanup
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 Infill sampler
Parameters:
- vocab: The vocabulary to use
Raises:
- Llama::Error if the sampler cannot be created