nemo_automodel.components.models.ernie4_5.model
nemo_automodel.components.models.ernie4_5.model
Module Contents
Classes
Functions
Data
API
Bases: Module
ERNIE 4.5 GQA attention with interleaved RoPE.
head_dim
k_proj
num_heads
num_kv_heads
o_proj
q_proj
v_proj
Bases: Module
Dense ERNIE 4.5 decoder block.
input_layernorm
mlp
post_attention_layernorm
self_attn
Bases: HFCheckpointingMixin, Module
Dense ERNIE 4.5 causal language model.
_nemo_tied_weights_keys
_pp_plan
_tp_plan
backend
lm_head
model
state_dict_adapter
vocab_size
classmethod
classmethod
Bases: Module
Dense ERNIE 4.5 transformer body.
embed_tokens
layers
norm
rotary_emb
Bases: Module
ERNIE 4.5 MoE decoder block.
input_layernorm
mlp
post_attention_layernorm
self_attn
Bases: HFCheckpointingMixin, Module, MoEFSDPSyncMixin
ERNIE 4.5 MoE causal language model with AutoModel EP support.
_nemo_tied_weights_keys
_pp_plan
_tp_plan
backend
lm_head
model
state_dict_adapter
vocab_size
classmethod
classmethod
classmethod
Return parallelism capabilities for a specific ERNIE-4.5 config.
ERNIE-4.5 ships in two flavors that share this class file but exercise different code paths:
baidu/ERNIE-4.5-21B-A3B-PT— MoE variant (this NeMo custom class).moe_num_experts > 0in the HF config. Demonstrated by examples/llm_finetune/ernie4_5/ernie4_5_21b_a3b_hellaswag.yaml (ep_size=8).baidu/ERNIE-4.5-0.3B-PT— dense variant. No expert config. Demonstrated by examples/llm_finetune/ernie4_5/ernie4_5_0p3b_hellaswag.yaml (tp/cp/pp/ep all 1).
Bases: Module
ERNIE 4.5 MoE transformer body.
embed_tokens
layers
moe_config
norm
rotary_emb