abstract class Llama::Sampler::Base

Overview

Base class for all sampling methods. Sampling is the process of selecting the next token during text generation. This is an abstract class.

Direct Known Subclasses

Defined in:

llama/sampler/base.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(handle : Pointer(LibLlama::LlamaSampler)) #

Creates a new Sampler instance from a raw pointer.

Note: This constructor is intended for internal use.


[View source]

Instance Method Detail

def to_unsafe : Pointer(Llama::LibLlama::LlamaSampler) #

Returns the raw pointer to the underlying llama_sampler structure.


[View source]