> This page is for version Nightly (default).
> For other versions, use one of these documentation indexes:
> - Nightly (default): https://docs.nvidia.com/nemo/automodel/nightly/llms.txt
> - Latest: https://docs.nvidia.com/nemo/automodel/latest/llms.txt
> - 0.7.0 · 26.10: https://docs.nvidia.com/nemo/automodel/v0.7/llms.txt
> - 0.5.0 · 26.06: https://docs.nvidia.com/nemo/automodel/v0.5/llms.txt
> - 0.4.0 · 26.04: https://docs.nvidia.com/nemo/automodel/v0.4/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.

# nemo_automodel.components.models.nemotron_decision.reader

Nemotron 3.5 Decision reads: the checkpoint's serving prompt, one question per read, the frozen head at the mask.

## Module Contents

### Classes

| Name                                                                                                                      | Description                                                                         |
| ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [`NemotronDecisionReader`](#nemo_automodel-components-models-nemotron_decision-reader-NemotronDecisionReader)             | Reads questions through a Nemotron 3.5 Decision checkpoint's own decision contract. |
| [`NemotronDecisionReaderConfig`](#nemo_automodel-components-models-nemotron_decision-reader-NemotronDecisionReaderConfig) | Read Nemotron 3.5 Decision checkpoints; the recipe's default `reader`.              |

### Data

[`STAGE_FORMAT`](#nemo_automodel-components-models-nemotron_decision-reader-STAGE_FORMAT)

### API

```python
class nemo_automodel.components.models.nemotron_decision.reader.NemotronDecisionReader(
    model: torch.nn.Module,
    tokenizer: transformers.PreTrainedTokenizerBase,
    contract: nemo_automodel.components.models.nemotron_decision.serving_prompt.DecisionContract,
    mask_token_id: int,
    token_ids: tuple[int, ...],
    head_rows: torch.Tensor,
    max_tokens: int,
    max_input_tokens: int,
    device: torch.device
)
```

**Bases:** [DecisionReader\[PreparedQuestion\]](/nemo/automodel/nightly/nemo-automodel/nemo_automodel/components/models/common/decision_reader#nemo_automodel-components-models-common-decision_reader-DecisionReader)

Reads questions through a Nemotron 3.5 Decision checkpoint's own decision contract.

**`head_rows`**

---

```python
nemo_automodel.components.models.nemotron_decision.reader.NemotronDecisionReader.encode(
    record: dict[str, typing.Any],
    question_id: str,
    shuffle_seed: int | None = None
) -> nemo_automodel.components.models.nemotron_decision.serving_prompt.PreparedQuestion | None
```

Encode one question as its serving prompt (see `DecisionReader.encode`).

```python
nemo_automodel.components.models.nemotron_decision.reader.NemotronDecisionReader.identity() -> dict[str, typing.Any]
```

Stage fields that pin the readout contract (unchanged from the recipe's original identity).

```python
nemo_automodel.components.models.nemotron_decision.reader.NemotronDecisionReader.logits(
    read: nemo_automodel.components.models.nemotron_decision.serving_prompt.PreparedQuestion
) -> torch.Tensor
```

Option logits at the mask, fp32 tensor of shape `[options]` in prompt order.

```python
class nemo_automodel.components.models.nemotron_decision.reader.NemotronDecisionReaderConfig()
```

Dataclass

**Bases:** [DecisionReaderConfig\[PreparedQuestion\]](/nemo/automodel/nightly/nemo-automodel/nemo_automodel/components/models/common/decision_reader#nemo_automodel-components-models-common-decision_reader-DecisionReaderConfig)

Read Nemotron 3.5 Decision checkpoints; the recipe's default `reader`.

```python
nemo_automodel.components.models.nemotron_decision.reader.NemotronDecisionReaderConfig._build(
    model: torch.nn.Module,
    tokenizer: transformers.PreTrainedTokenizerBase,
    model_path: str,
    revision: str | None,
    max_tokens: int,
    peft: bool,
    device: torch.device
) -> nemo_automodel.components.models.nemotron_decision.reader.NemotronDecisionReader
```

Check the loaded checkpoint, freeze everything but the trained scope, and gather the head rows.

```python
nemo_automodel.components.models.nemotron_decision.reader.NemotronDecisionReaderConfig.prepare(
    model_path: str,
    revision: str | None
) -> None
```

Reject a checkpoint this reader cannot train, before its weights load.

Rejects an unsupported architecture, a checkpoint without a decision contract, and a contract whose readout
token is not the model config's mask token.

```python
nemo_automodel.components.models.nemotron_decision.reader.STAGE_FORMAT = 'nemotron-decision-stage-v1'
```