> This page is for version 0.4.0 · 26.04.
> 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.ergo.config

Configuration of the released Ergo MoE architecture.

## Module Contents

### Classes

| Name                                                                     | Description                                                                 |
| ------------------------------------------------------------------------ | --------------------------------------------------------------------------- |
| [`ErgoConfig`](#nemo_automodel-components-models-ergo-config-ErgoConfig) | Describe the local/global GQA, ReLU-squared MoE and FP32 residual contract. |

### API

```python
class nemo_automodel.components.models.ergo.config.ErgoConfig(
    vocab_size: int = 262144,
    hidden_size: int = 8192,
    num_hidden_layers: int = 64,
    num_attention_heads: int = 64,
    num_key_value_heads: int = 8,
    head_dim: int = 128,
    intermediate_size: int = 4096,
    max_position_embeddings: int = 1048576,
    rope_theta: float = 1000000.0,
    rms_norm_eps: float = 1e-12,
    global_attention_every_n_layers: int = 4,
    local_attention_window: int = 512,
    global_attention_scale: float | None = None,
    num_experts: int = 256,
    num_experts_per_tok: int = 8,
    num_dense_blocks: int = 1,
    first_dense_intermediate_size: int = 32768,
    moe_intermediate_size: int = 4096,
    shared_intermediate_size: int = 8192,
    moe_routed_scaling_factor: float = math.sqrt(8),
    moe_routing_method: str = 'sigmoid_topk',
    moe_load_balance_strategy: str = 'deepseek',
    moe_expert_output_rms_norm: bool = True,
    moe_latent_size: int = 0,
    source_tp_size: int = 1,
    initializer_range: float = 0.02,
    compute_dtype: str | None = None,
    tie_word_embeddings: bool = False,
    bos_token_id: int = 2,
    eos_token_id: int = 1,
    pad_token_id: int = 0,
    kwargs: typing.Any = {}
)
```

**Bases:** `PretrainedConfig`

Describe the local/global GQA, ReLU-squared MoE and FP32 residual contract.

Defaults describe the released 64-layer, 256-expert target. Smaller values
permit independent numerical tests without changing the architecture.

**`architectures`** `= ['ErgoForCausalLM']`

---

**`model_type`** `= 'ergo'`

---

```python
nemo_automodel.components.models.ergo.config.ErgoConfig.build_moe_config(
    dtype: torch.dtype
) -> nemo_automodel.components.moe.config.MoEConfig
```

Construct the shared non-gated expert configuration with a fixed bias.

```python
nemo_automodel.components.models.ergo.config.ErgoConfig.validate_architecture() -> None
```

Reject shapes and checkpoint variants not described by this implementation.