Python · Choices

Choices

from uform import Choices 4.0.0-rc.1 · 3ee5e534

text_choose(texts, choices, arena) scores each text’s legal single-byte choices through one forward, a softmax over them alone at the calibrated inverse temperature of the text’s question type:

probabilities = model.text_choose(["keep this candidate? ", "expand which neighbour? "], ["yn", "ABCD"], arena)
offsets = np.asarray(probabilities.offsets)  # [0, 2, 6]: one float32 per choice, in `choices` order

temperature_groups names each text’s question type, below the model’s choice_temperature_groups, and None puts every text in group zero. A model without the byte decoder, its choice_temperature_groups zero, raises UnsupportedError.

API

ClassChoicesCalibrated choices over the byte decoder, read when the weight is positive; every zero derives.3
lib.pyi:843 ↗
class Choices
Choices
lib.pyi:849 ↗
Choices(*, weight: float = 0.0, brier_weight: float = 0.0)
weight
lib.pyi:847 ↗
weight: Final[float]
brier_weight
lib.pyi:848 ↗
brier_weight: Final[float]