Mojo · Choices

Choices

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

API

StructTextChooseConfigThe question types, the progress handler and the report slot of text_choose.1
struct TextChooseConfig[groups_origin: ImmOrigin = ImmUntrackedOrigin, stats_origin: MutOrigin = MutUntrackedOrigin]

Parameters

groups_originImmOrigincomptimeThe borrowed question types' origin, inferred where some are lent.
stats_originMutOrigincomptimeThe lent report slot's origin, inferred where one is lent.

Fields

temperature_groupsSpan[UInt32, groups_origin]The question type of each item, below the model's choice_temperature_groups; empty puts every item in group zero.
progressProgressReports the items scored, and stops the call where it says to.
statsOptional[Pointer[EncodeStats, stats_origin]]Receives the truncation report, overwritten by the call; absent skips it.

Conforms to

Copyable, Deinitable, ImplicitlyCopyable, Movable
__init__Names only the knobs that differ from the defaults.
def __init__(
    out self,
    *,
    temperature_groups: Span[UInt32, groups_origin] = Span(),
    progress: Progress = Progress(),
    stats: Optional[Pointer[EncodeStats, stats_origin]] = Optional()
)
StructChoicesThe calibrated choices over the byte decoder, uform_choices_t.1
struct Choices

Fields

weightFloat32The loss weight; zero trains no choices.
brier_weightFloat32The Brier term's weight beside the soft cross-entropy; zero derives 0.5.

Conforms to

Copyable, Defaultable, Deinitable, ImplicitlyCopyable, Movable
__init__Trains no choices.
def __init__(out self)