> 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.vl_model

D1-3B causal image/text backbone with its released tied vocabulary readout.

## Module Contents

### Classes

| Name                                                                                                             | Description                                                                 |
| ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [`Lfm2VlForConditionalGeneration`](#nemo_automodel-components-models-d1-vl_model-Lfm2VlForConditionalGeneration) | D1-3B's chain execution, using HF vision and native precision-correct LFM2. |

### API

```python
class nemo_automodel.components.models.d1.vl_model.Lfm2VlForConditionalGeneration(
    config: transformers.Lfm2VlConfig
)
```

**Bases:** [HFCheckpointingMixin](/nemo/automodel/nemo-automodel/nemo_automodel/components/models/common/hf_checkpointing_mixin#nemo_automodel-components-models-common-hf_checkpointing_mixin-HFCheckpointingMixin), `HFLfm2VlForConditionalGeneration`

D1-3B's chain execution, using HF vision and native precision-correct LFM2.

Questions are independent causal chains. The release's shared-trunk tree
batching is an inference optimization and is not used by this training path.
Parameter names and the checkpoint's input/output tying policy are retained.
Ordinary LFM2-VL checkpoints retain the inherited HuggingFace generation,
cache, forward-output and image-feature interfaces.

**`_tied_weights_keys`**

---

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

---

**`device`** `device`

Device holding the text embedding table.

---

**`dtype`** `dtype`

Dtype of the text embedding table.

---

**`tie_word_embeddings_support`** `TieSupport = TieSupport.BOTH`

---

```python
nemo_automodel.components.models.d1.vl_model.Lfm2VlForConditionalGeneration.get_input_embeddings() -> torch.nn.Embedding
```

Return the released text embedding table.

```python
nemo_automodel.components.models.d1.vl_model.Lfm2VlForConditionalGeneration.get_output_embeddings() -> torch.nn.Linear
```

Return the vocabulary projection, honoring the checkpoint's tying policy.

```python
nemo_automodel.components.models.d1.vl_model.Lfm2VlForConditionalGeneration.prepare_text_readout(
    examples: list[nemo_automodel.components.models.d1.records.D1TextExample]
) -> nemo_automodel.components.models.d1.text_readout.D1CausalTextReadout
```

Prepare the released answer-alias adapter for text-only adaptation.

**Parameters:**

**`examples`** `list[D1TextExample]`

Publisher-encoded questions used to select answer vocabulary rows.

---

**Returns:** `D1CausalTextReadout`

Final-token feature extractor and zero-initialized answer-row adapter.

```python
nemo_automodel.components.models.d1.vl_model.Lfm2VlForConditionalGeneration.set_input_embeddings(
    value: torch.nn.Embedding
) -> None
```

Replace and retie the text embedding table.

```python
nemo_automodel.components.models.d1.vl_model.Lfm2VlForConditionalGeneration.supports_config(
    config: transformers.Lfm2VlConfig
) -> bool
```

classmethod

Select D1 arithmetic only for the publisher's explicit D1 model mapping.

```python
nemo_automodel.components.models.d1.vl_model.Lfm2VlForConditionalGeneration.tie_weights(
    kwargs: typing.Any = {}
) -> None
```

Honor the checkpoint's tied or independently initialized vocabulary head.