Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Sampling Dial

ProNew

Adjust temperature and watch candidate probabilities redistribute over the same logits.

Installation

pnpm dlx shadcn@latest add @viewport/sampling-dial

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
candidates*Candidate[]

Scores before softmax, with one entry per candidate token.

—
initialTemperaturenumber

Starting temperature, clamped to the range 0.1–2.

0.8
onTemperatureChange(temperature: number) => void

Called with the current temperature after each adjustment.

—

Accessibility

  • A native range input supports arrow keys. Every chance is printed beside its token.