Skip to navigation

nemo_automodel.components.models.ergo.config

View as MarkdownOpen in Claude

Configuration of the released Ergo MoE architecture.

Module Contents

Classes

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

API

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'
nemo_automodel.components.models.ergo.config.ErgoConfig.build_moe_config(
dtype: torch.dtype

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

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

Reject shapes and checkpoint variants not described by this implementation.