All models

ernie4_5_moe_tiny

A small configuration of the ERNIE 4.5 text model, a causal language model with mixture-of-experts feed-forward layers.

Language · 230 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (19 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
170.8K
Operations
230
Framework
PyTorch
Recurrent
No
Published
2025, technical report (Baidu)
Authors
Baidu ERNIE Team
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m4699
Graph hash
b798f55bb0fcc6230eb7a4aab0c8ecc79e8d416d7e069cfbb81818490c82d328
Skeleton hash
f94edf73ece35958917305f3c826e634ae72962b9f7861858b8b6360f49c4e2d
Architecture hash
4382dba20147d7c2ad36a82079b07cb798f18c590641b2a0650e2a427e23a45a
Diagram SHA-256
4f96c50f194cb15c6ccc76673008ea2bc9289f7477719e20080bf51d91432890
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModelForCausalLM.from_config()

What it is

ERNIE 4.5 is a family of large foundation models, 10 variants in all, and every one except the 0.3B dense language models is built on a Mixture-of-Experts (MoE) design. Attention layers stay dense, and the routing among experts is confined to the feed-forward layers, where top-k routing selects the experts for each token. The report's structure is heterogeneous: text tokens go to text experts, vision tokens go to vision experts, and a set of shared experts processes both. The output of an MoE layer is the sum of the shared and the modality-specific experts' outputs.

Because the parameters are separated by modality, removing the vision experts, vision encoder and adapter leaves a pure language model. ERNIE-4.5-21B-A3B is such a text model, and its card lists 21B total parameters with 3B activated for each token. The card also gives 28 layers, 64 text experts of which 6 are activated, and 2 shared experts. The model on this page is a much smaller, randomly initialized configuration of that text design, with 8 experts, 2 selected per token, and 1 shared expert.

The report states that the family was trained with the PaddlePaddle framework, and it reports 47% Model FLOPs Utilization during pre-training of the largest ERNIE 4.5 language model.

Key idea. The report proposes a heterogeneous multimodal Mixture-of-Experts structure that shares parameters across modalities while keeping dedicated parameters for each modality.

  • ERNIE 4.5
  • ERNIE 4.5 MoE
  • ERNIE-4.5-21B-A3B
  • Ernie4_5_Moe
  • ERNIE
  • mixture of experts
  • MoE language model
  • large language model
  • text generation
  • Baidu

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{ernie45moe,
  title = {ERNIE 4.5 Technical Report},
  author = {Baidu ERNIE Team},
  journal = {technical report (Baidu)}
}