# token-sampling

Applies sampling stages to a slice of f32 logits: temperature, top-k, top-p, min-p, locally typical, tail-free, XTC, token penalties, DRY, Mirostat, greedy selection and a final probability draw. The caller owns token history and randomness, and a chain reuses its buffers between calls.

## Install

```sh
cargo add token-sampling
```

## Links

- [Repository](https://github.com/hey-jj/token-sampling)
- [crates.io](https://crates.io/crates/token-sampling)
- [docs.rs](https://docs.rs/token-sampling)
