> 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.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# nemo_automodel.components.models.d1.decision_head

D1 readouts with explicit option order and frozen vocabulary semantics.

## Module Contents

### Classes

| Name                                                                                              | Description                                                              |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| [`D1OmniDecisionHead`](#nemo_automodel-components-models-d1-decision_head-D1OmniDecisionHead)     | Differentiable released Omni head; noul markers retain false/true order. |
| [`D1OmniHeadConfig`](#nemo_automodel-components-models-d1-decision_head-D1OmniHeadConfig)         | Released Omni marker head configuration.                                 |
| [`D1TokenReadout`](#nemo_automodel-components-models-d1-decision_head-D1TokenReadout)             | Train additive answer-row updates while preserving input/output tying.   |
| [`D1TokenReadoutConfig`](#nemo_automodel-components-models-d1-decision_head-D1TokenReadoutConfig) | Select answer-token rows without untying the released vocabulary head.   |

### API

```python
class nemo_automodel.components.models.d1.decision_head.D1OmniDecisionHead(
    config: nemo_automodel.components.models.d1.decision_head.D1OmniHeadConfig
)
```

**Bases:** `Module`

Differentiable released Omni head; noul markers retain false/true order.

State-dict names match the published checkpoint's head subtree. Text-only
temperature calibration belongs outside this module so media paths can skip it.

**`head`**

---

**`scorer`**

---

**`type_emb`** `= nn.Embedding(3, width)`

---

```python
nemo_automodel.components.models.d1.decision_head.D1OmniDecisionHead.forward(
    hidden_states: torch.Tensor,
    valid_tokens: torch.Tensor,
    marker_positions: torch.Tensor,
    valid_markers: torch.Tensor,
    question_types: torch.Tensor
) -> torch.Tensor
```

Score each option marker in internal checkpoint order.

**Parameters:**

**`hidden_states`** `torch.Tensor`

Tensor of shape \[batch, sequence, hidden], excluding media prefixes.

---

**`valid_tokens`** `torch.Tensor`

Boolean Tensor of shape \[batch, sequence], true for non-padding tokens.

---

**`marker_positions`** `torch.Tensor`

Long Tensor of shape \[batch, options], indexing text positions.

---

**`valid_markers`** `torch.Tensor`

Boolean Tensor of shape \[batch, options], true for declared options.

---

**`question_types`** `torch.Tensor`

Long Tensor of shape \[batch] with choice=0, score=1, noul=2.

---

**Returns:** `torch.Tensor`

Float32 Tensor of shape \[batch, options], with padding options set to -10000.

```python
class nemo_automodel.components.models.d1.decision_head.D1OmniHeadConfig(
    hidden_size: int,
    layers: int = 2
)
```

Dataclass

Released Omni marker head configuration.

**Parameters:**

**`hidden_size`** `int`

Encoder width, a positive multiple of the 64-wide head dimension.

---

**`layers`** `int` — default: 2

Number of bidirectional transformer layers in the readout.

---

**`hidden_size`** `int`

---

**`layers`** `int = 2`

---

```python
nemo_automodel.components.models.d1.decision_head.D1OmniHeadConfig.__post_init__() -> None
```

```python
nemo_automodel.components.models.d1.decision_head.D1OmniHeadConfig.build() -> nemo_automodel.components.models.d1.decision_head.D1OmniDecisionHead
```

Build an uncalibrated, checkpoint-compatible Omni head.

```python
class nemo_automodel.components.models.d1.decision_head.D1TokenReadout(
    config: nemo_automodel.components.models.d1.decision_head.D1TokenReadoutConfig,
    vocabulary_weight: torch.Tensor
)
```

**Bases:** `Module`

Train additive answer-row updates while preserving input/output tying.

This is an adaptation of the released readout, not an independent classifier.
The zero-initialized adapter preserves the max-over-alias option contract.

**`delta_weight`**

---

```python
nemo_automodel.components.models.d1.decision_head.D1TokenReadout.forward(
    hidden_states: torch.Tensor,
    alias_groups: tuple[tuple[int, ...], ...]
) -> torch.Tensor
```

Score declared options by their maximum answer-alias logit.

**Parameters:**

**`hidden_states`** `torch.Tensor`

Tensor of shape \[..., hidden], with arbitrary leading
dimensions, at each causal chain's answer position.

---

**`alias_groups`** `tuple[tuple[int, ...], ...]`

Adapter row indices for each option, in target order.

---

**Returns:** `torch.Tensor`

Float32 Tensor of shape \[..., options], before option softmax.

```python
class nemo_automodel.components.models.d1.decision_head.D1TokenReadoutConfig(
    hidden_size: int,
    token_ids: tuple[int, ...]
)
```

Dataclass

Select answer-token rows without untying the released vocabulary head.

**Parameters:**

**`hidden_size`** `int`

Width of the normalized final backbone states.

---

**`token_ids`** `tuple[int, ...]`

Unique answer-alias vocabulary IDs in adapter row order.

---

**`hidden_size`** `int`

---

**`token_ids`** `tuple[int, ...]`

---

```python
nemo_automodel.components.models.d1.decision_head.D1TokenReadoutConfig.__post_init__() -> None
```

```python
nemo_automodel.components.models.d1.decision_head.D1TokenReadoutConfig.build(
    vocabulary_weight: torch.Tensor
) -> nemo_automodel.components.models.d1.decision_head.D1TokenReadout
```

Build an adapter from the frozen released vocabulary weight.

**Parameters:**

**`vocabulary_weight`** `torch.Tensor`

Tensor of shape \[vocabulary, hidden_size].

---

**Returns:** `D1TokenReadout`

Zero-initialized row adapter, with detached base rows.