type Choices struct {
Weight float32
BrierWeight float32
} Mirrors uform_choices_t field for field.
Ask your coding agent about this page, or add the docs server to it
curl -s 'https://www.unum.cloud/docs/uform/go/choices.md' | claude -p "How would this fit my code?"TextChoose(texts, choices, ..) scores each item’s legal choices, one byte each, through one forward, and answers a TapeView of one float32 probability per choice that sums to one per item:
config := &uform.TextChooseConfig{TemperatureGroups: []uint32{0, 1}}
probabilities, err := model.TextChoose(uform.TapeOf([]string{"keep this candidate?", "expand which neighbour?"}),
uform.TapeOf([]string{"yn", "ABCD"}), arena, config)
expand, err := uform.TapeEntry[float32](probabilities, 1) // the probabilities of 'A' through 'D'Each group is a question type below the model’s ChoiceTemperatureGroups, and a model without the byte decoder answers StatusUnsupported.
ChoicesChoices is the calibrated choices term over the byte decoder; a zero Weight trains none.type Choices struct {
Weight float32
BrierWeight float32
} Mirrors uform_choices_t field for field.
TextChooseConfigTextChooseConfig holds the knobs of TextChoose; nil derives every field.type TextChooseConfig struct {
TemperatureGroups []uint32
Progress ProgressCallback
ProgressSteps uint
Stats *TextEncodeStats
} Mirrors the knobs of uform_text_choose_t.
TemperatureGroups | []uint32 | TemperatureGroups holds the question type of each item, below the model's ChoiceTemperatureGroups; empty puts every item in group zero. |
|---|---|---|
Progress | ProgressCallback | Progress hears the items scored and may stop the call. |
ProgressSteps | uint | ProgressSteps is the reports the call makes at most; zero derives ten. |
Stats | *TextEncodeStats | Stats is the report the call overwrites, kept by the caller until it is final; nil skips it. |