Expand description

Sampling utilities for language models.

Includes implementations for sampling methods used in text generation, such as temperature-based sampling. Sampler module for text generation.

This module contains the Sampler trait and its implementations which are used for sampling tokens based on the output logits from a language model.

Structs

  • A dummy implementation of Sampler for testing purposes.

Traits

  • A trait for sampling a token based on logits output.