Skip to content

ernie4_5

ernie4_5

ERNIE 4.5 dense (Ernie4_5ForCausalLM).

Llama's tree and Llama's block: model.{embed_tokens, layers[i].{input_layernorm, self_attn, post_attention_layernorm, mlp}, norm} and lm_head, the residual added in the block, attention through the shared eager forward.

RENAME module-attribute

RENAME = {'model.embed_tokens': 'embed_tokens', 'model.layers': 'layers', 'model.norm': 'norm'}

ENVOYS module-attribute

ENVOYS = {Ernie4_5DecoderLayer: Layer, Ernie4_5Attention: Attention, Ernie4_5MLP: Mlp}