Sampling Dial
ProNewAdjust 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
| Prop | Type | Default |
|---|---|---|
| candidates* | Candidate[]Scores before softmax, with one entry per candidate token. | — |
| initialTemperature | numberStarting temperature, clamped to the range 0.1–2. | 0.8 |
| onTemperatureChange | (temperature: number) => voidCalled with the current temperature after each adjustment. | — |
Accessibility
- A native range input supports arrow keys. Every chance is printed beside its token.