> 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.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.ministral_bidirectional.reranker_model

Portable Transformers implementation of pooled Mistral3 sequence scoring.

## Module Contents

### Classes

| Name                                                                                                                                              | Description                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| [`Mistral3ForSequenceClassification`](#nemo_automodel-components-models-ministral_bidirectional-reranker_model-Mistral3ForSequenceClassification) | Mistral3 backbone with masked pooling and an FP32 scoring projection. |

### API

```python
class nemo_automodel.components.models.ministral_bidirectional.reranker_model.Mistral3ForSequenceClassification(
    config: transformers.Mistral3Config
)
```

**Bases:** `Mistral3PreTrainedModel`

Mistral3 backbone with masked pooling and an FP32 scoring projection.

**`base_model_prefix`** `= 'model'`

---

**`model`** `= Mistral3Model(config)`

---

**`score`**

---

```python
nemo_automodel.components.models.ministral_bidirectional.reranker_model.Mistral3ForSequenceClassification.forward(
    input_ids: torch.Tensor | None = None,
    attention_mask: torch.Tensor | None = None,
    pixel_values: torch.Tensor | None = None,
    image_sizes: torch.Tensor | None = None,
    position_ids: torch.Tensor | None = None,
    kwargs: typing.Any = {}
) -> transformers.modeling_outputs.SequenceClassifierOutputWithPast
```

Score tokenized text or multimodal pairs.

**Parameters:**

**`input_ids`** `torch.Tensor | None` — default: None

Integer tensor of shape \[batch, sequence].

---

**`attention_mask`** `torch.Tensor | None` — default: None

Padding mask of shape \[batch, sequence]; required for pooling.

---

**`pixel_values`** `torch.Tensor | None` — default: None

Optional image tensor of shape \[images, channels, height, width].

---

**`image_sizes`** `torch.Tensor | None` — default: None

Optional integer tensor of shape \[images, 2], height then width.

---

**`position_ids`** `torch.Tensor | None` — default: None

Optional integer tensor of shape \[batch, sequence].

---

**`**kwargs`** `Any` — default: \{}

Additional Mistral3Model inputs, following its forward tensor contract.

---

**Returns:** `SequenceClassifierOutputWithPast`

Classifier output with raw, unscaled FP32 logits of shape \[batch, num\_labels].

```python
nemo_automodel.components.models.ministral_bidirectional.reranker_model.Mistral3ForSequenceClassification.from_pretrained(
    pretrained_model_name_or_path: str | os.PathLike | None,
    model_args: typing.Any = (),
    kwargs: typing.Any = {}
) -> nemo_automodel.components.models.ministral_bidirectional.reranker_model.Mistral3ForSequenceClassification
```

classmethod

Load the shared classifier head without changing global Transformers conversion mappings.