> This page is for version Latest.
> 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.inkling2.config

Configuration for the inspected Inkling2 checkpoint and text reference.

## Module Contents

### Classes

| Name                                                                                                                       | Description                                                                            |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [`Inkling2Config`](#nemo_automodel-components-models-inkling2-config-Inkling2Config)                                       | Released image/text model configuration and optional source quantization.              |
| [`Inkling2LegacyConfig`](#nemo_automodel-components-models-inkling2-config-Inkling2LegacyConfig)                           | Compatibility with the original download's immutable configuration.                    |
| [`Inkling2QuantizationConfig`](#nemo_automodel-components-models-inkling2-config-Inkling2QuantizationConfig)               | Expert storage of a released checkpoint: NVFP4 for the first layers, MXFP8 after them. |
| [`Inkling2ReleasedQuantizationLabel`](#nemo_automodel-components-models-inkling2-config-Inkling2ReleasedQuantizationLabel) | `quantization_config` of a released `config.json`: the format name only.               |
| [`Inkling2TextConfig`](#nemo_automodel-components-models-inkling2-config-Inkling2TextConfig)                               | Text configuration; defaults follow the inspected checkpoint, not serving defaults.    |
| [`Inkling2VisionConfig`](#nemo_automodel-components-models-inkling2-config-Inkling2VisionConfig)                           | Released image encoder dimensions, including the spatial merge projector.              |
| [`_ParameterGroup`](#nemo_automodel-components-models-inkling2-config-_ParameterGroup)                                     | One `hf_quant_config.json` group; only the keys the loader reads.                      |

### Functions

| Name                                                                                                             | Description                                                                                   |
| ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [`_checked_quantization_config`](#nemo_automodel-components-models-inkling2-config-_checked_quantization_config) | -                                                                                             |
| [`_is_released_label`](#nemo_automodel-components-models-inkling2-config-_is_released_label)                     | -                                                                                             |
| [`load_quantization_config`](#nemo_automodel-components-models-inkling2-config-load_quantization_config)         | Read the released `hf_quant_config.json` stored next to `config.json`.                        |
| [`resolve_quantization_config`](#nemo_automodel-components-models-inkling2-config-resolve_quantization_config)   | Fill `quantization_config` from the checkpoint sidecar for a config loaded from a checkpoint. |

### Data

[`_EXPERT_PROJECTIONS`](#nemo_automodel-components-models-inkling2-config-_EXPERT_PROJECTIONS)

[`_EXPERT_WEIGHT`](#nemo_automodel-components-models-inkling2-config-_EXPERT_WEIGHT)

### API

```python
class nemo_automodel.components.models.inkling2.config.Inkling2Config(
    text_config: nemo_automodel.components.models.inkling2.config.Inkling2TextConfig | dict[str, typing.Any] | None = None,
    vision_config: nemo_automodel.components.models.inkling2.config.Inkling2VisionConfig | dict[str, typing.Any] | None = None,
    mtp_config: dict[str, typing.Any] | None = None,
    quantization_config: nemo_automodel.components.models.inkling2.config.Inkling2QuantizationConfig | nemo_automodel.components.models.inkling2.config.Inkling2ReleasedQuantizationLabel | None = None,
    kwargs: typing.Any = {}
)
```

**Bases:** `PretrainedConfig`

Released image/text model configuration and optional source quantization.

**`model_type`** `= 'inkling2'`

---

**`quantization_config`**

---

**`sub_configs`**

---

**`text_config`**

---

**`vision_config`**

---

```python
nemo_automodel.components.models.inkling2.config.Inkling2Config.to_dict() -> dict[str, typing.Any]
```

Serialize both levels; a stripped source declaration is stripped from the text config too.

The shared floating export removes `quantization_config` from this configuration
after dequantization. The text configuration carries the same declaration, and a
reload would otherwise promote it back to the root and request packed tensors.

```python
class nemo_automodel.components.models.inkling2.config.Inkling2LegacyConfig(
    kwargs: typing.Any = {}
)
```

**Bases:** [Inkling2Config](#nemo_automodel-components-models-inkling2-config-Inkling2Config)

Compatibility with the original download's immutable configuration.

**`model_type`** `= 'inkling2_mm_model'`

---

```python
class nemo_automodel.components.models.inkling2.config.Inkling2QuantizationConfig
```

**Bases:** `typing.TypedDict`

Expert storage of a released checkpoint: NVFP4 for the first layers, MXFP8 after them.

**`nvfp4_layer_count`** `int`

---

**`quant_method`** `Literal['inkling2']`

---

```python
class nemo_automodel.components.models.inkling2.config.Inkling2ReleasedQuantizationLabel
```

**Bases:** `typing.TypedDict`

`quantization_config` of a released `config.json`: the format name only.

The expert layout is in `hf_quant_config.json`; building a model replaces this label with it.

**`quant_algo`** `Literal['NVFP4', 'MXFP8']`

---

**`quant_method`** `Literal['modelopt']`

---

```python
class nemo_automodel.components.models.inkling2.config.Inkling2TextConfig(
    hidden_size: int = 4608,
    num_hidden_layers: int = 48,
    vocab_size: int = 201024,
    unpadded_vocab_size: int | None = None,
    num_attention_heads: int = 48,
    num_key_value_heads: int = 8,
    head_dim: int = 128,
    swa_num_attention_heads: int | None = None,
    swa_num_key_value_heads: int | None = None,
    swa_head_dim: int | None = None,
    d_rel: int = 16,
    rel_extent: int = 1024,
    sliding_window_size: int = 1024,
    local_layer_ids: list[int] | None = None,
    max_position_embeddings: int = 1048576,
    model_max_length: int | None = None,
    log_scaling_n_floor: int = 8192,
    log_scaling_alpha: float = 0.1,
    rms_norm_eps: float = 1e-06,
    qk_l2_clip_threshold: float = 22.627416997969522,
    rel_l2_clip_threshold: float = 8.0,
    sconv_kernel_size: int = 4,
    n_layers_per_attn_res_block: int | None = None,
    n_layers_per_attnres_block: int | None = None,
    attn_res_normalize_values: bool = True,
    pre_norm_pre_affine: bool = False,
    final_norm_pre_affine: bool = False,
    use_value_norm_no_gamma: bool = True,
    q_bias: bool = False,
    o_bias: bool = False,
    n_routed_experts: int = 384,
    num_experts_per_tok: int = 8,
    n_shared_experts: int = 0,
    intermediate_size: int = 2304,
    mlp_gate_softcap: float = 4.0,
    mlp_up_softcap: float = 25.0,
    route_scale: float = 8.0,
    use_gate_bias: bool = True,
    final_logit_softcapping: float = 30.0,
    initializer_range: float = 0.02,
    tie_word_embeddings: bool = False,
    quantization_config: nemo_automodel.components.models.inkling2.config.Inkling2QuantizationConfig | nemo_automodel.components.models.inkling2.config.Inkling2ReleasedQuantizationLabel | None = None,
    kwargs: typing.Any = {}
)
```

**Bases:** `PretrainedConfig`

Text configuration; defaults follow the inspected checkpoint, not serving defaults.

**`attribute_map`**

---

**`base_config_key`** `= 'text_config'`

---

**`local_layer_ids`**

---

**`max_position_embeddings`**

---

**`model_type`** `= 'inkling2_model'`

---

**`n_layers_per_attn_res_block`**

---

**`quantization_config`**

---

**`swa_head_dim`** `= head_dim if swa_head_dim is None else swa_head_dim`

---

**`swa_num_attention_heads`**

---

**`swa_num_key_value_heads`**

---

**`unpadded_vocab_size`**

---

```python
class nemo_automodel.components.models.inkling2.config.Inkling2VisionConfig(
    temporal_patch_size: int = 2,
    native_patch_size: int = 20,
    adapter_merge_size: int = 2,
    projection_hidden_dim: int = 4096,
    projector_bias: bool = False,
    hidden_size: int = 1024,
    num_hidden_layers: int = 23,
    num_attention_heads: int = 16,
    mlp_ratio: float = 4.0,
    posemb_grid_size: int = 32,
    layer_norm_eps: float = 1e-05,
    kwargs: typing.Any = {}
)
```

**Bases:** `PretrainedConfig`

Released image encoder dimensions, including the spatial merge projector.

**`model_type`** `= 'inkling2_vision_model'`

---

```python
class nemo_automodel.components.models.inkling2.config._ParameterGroup
```

**Bases:** `typing.TypedDict`

One `hf_quant_config.json` group; only the keys the loader reads.

**`compute_dtype`** `str`

---

**`tensors`** `list[str]`

---

```python
nemo_automodel.components.models.inkling2.config._checked_quantization_config(
    declaration: nemo_automodel.components.models.inkling2.config.Inkling2QuantizationConfig | nemo_automodel.components.models.inkling2.config.Inkling2ReleasedQuantizationLabel,
    num_hidden_layers: int
) -> nemo_automodel.components.models.inkling2.config.Inkling2QuantizationConfig | nemo_automodel.components.models.inkling2.config.Inkling2ReleasedQuantizationLabel
```

```python
nemo_automodel.components.models.inkling2.config._is_released_label(
    declaration: nemo_automodel.components.models.inkling2.config.Inkling2QuantizationConfig | nemo_automodel.components.models.inkling2.config.Inkling2ReleasedQuantizationLabel | None
) -> bool
```

```python
nemo_automodel.components.models.inkling2.config.load_quantization_config(
    name_or_path: str,
    num_hidden_layers: int,
    revision: str | None = None
) -> nemo_automodel.components.models.inkling2.config.Inkling2QuantizationConfig | None
```

Read the released `hf_quant_config.json` stored next to `config.json`.

**Parameters:**

**`name_or_path`** `str`

Local checkpoint directory or Hub repository id.

---

**`num_hidden_layers`** `int`

Decoder depth the expert declaration must cover.

---

**`revision`** `str | None` — default: None

Hub revision the weights are loaded from; None reads the
repository's default branch. Ignored for a local directory.

---

**Returns:** `Inkling2QuantizationConfig | None`

The expert storage layout, or None for a checkpoint without the sidecar,

```python
nemo_automodel.components.models.inkling2.config.resolve_quantization_config(
    config: nemo_automodel.components.models.inkling2.config.Inkling2TextConfig | nemo_automodel.components.models.inkling2.config.Inkling2Config,
    revision: str | None = None
) -> None
```

Fill `quantization_config` from the checkpoint sidecar for a config loaded from a checkpoint.

**Parameters:**

**`config`** `Inkling2TextConfig | Inkling2Config`

Text or image/text configuration; both levels receive the declaration. A released
`config.json` label is replaced by the layout the sidecar declares.

---

**`revision`** `str | None` — default: None

Resolved Hub revision of the checkpoint, so the sidecar comes from the
same snapshot as the weights.

---

**Raises:**

* `ValueError`: If `config.json` names a quantized format and the sidecar cannot be found.

```python
nemo_automodel.components.models.inkling2.config._EXPERT_PROJECTIONS = ('w13_weight', 'w2_weight')
```

```python
nemo_automodel.components.models.inkling2.config._EXPERT_WEIGHT = re.compile('model\\.llm\\.layers\\.(\\d+)\\.mlp\\.experts\\.(w13_weight|w2_weigh...
```