Skip to navigation

nemo_automodel.components.models.d1.records

View as Markdown

Published D1 text prompts with explicit question and option identities.

Module Contents

Classes

NameDescription
D1TextExampleOne decision in the publisher’s internal option order.

Functions

NameDescription
encode_d1_recordEncode unchanged SOC records using reviewed pinned publisher prompt code.

API

class nemo_automodel.components.models.d1.records.D1TextExample(
record_id: str,
input_ids: tuple[int, ...],
question_id: str,
option_ids: tuple[str, ...],
marker_positions: tuple[int, ...],
alias_token_ids: tuple[tuple[int, ...], ...],
head_question_type: int,
temperature: float
)
Dataclass

One decision in the publisher’s internal option order.

Marker positions and alias groups are mutually exclusive model readouts. Temperature applies to Omni text logits before training and evaluation. Recipes align labels and rewards separately using the question and option IDs.

alias_token_ids
tuple[tuple[int, ...], ...]
head_question_type
int
input_ids
tuple[int, ...]
marker_positions
tuple[int, ...]
option_ids
tuple[str, ...]
question_id
str
record_id
str
temperature
float
nemo_automodel.components.models.d1.records.encode_d1_record(
record: dict[str, typing.Any],
tokenizer: typing.Any,
prompt: types.ModuleType,
omni: bool,
max_length: int,
temperatures: dict[str, float] | None = None

Encode unchanged SOC records using reviewed pinned publisher prompt code.

Parameters:

record
dict[str, Any]

Validated state/questions record. Supervision is not consumed.

tokenizer
Any

Tokenizer from the same immutable release as the prompt code.

prompt
ModuleType

Imported publisher prompt module, pinned by the recipe.

omni
bool

Select the marker encoder instead of the causal token-alias prompt.

max_length
int

Context limit; causal inputs are rejected rather than truncated.

temperatures
dict[str, float] | NoneDefaults to None

Released Omni text calibration, unchanged across stages.

Returns: list[D1TextExample]

Encoded questions with their model-output option identities. The caller