Crate kalosm_sample

source ·
Expand description

§kalosm-sample

This is a sampling library for Kalosm.

It handles choosing a token from a probability distribution. Samplers can be used to constrain the generation of text for example you can use a sampler to prevent the model from generating the same word twice in a row. Or you could only allow the model to generate a list of single digit numbers.

Structs§

Enums§

Traits§

  • A trait for a parser with a default state.
  • Data that can be parsed incrementally.
  • An incremental parser for a structured input.
  • An extension trait for parsers.
  • A tokenizer is a type that can decode a list of token ids into a string.