MCPcopy
hub / github.com/PaddlePaddle/ERNIE

github.com/PaddlePaddle/ERNIE @ernie-4.5 sqlite

repository ↗ · DeepWiki ↗ · release ernie-4.5 ↗
1,971 symbols 5,997 edges 217 files 1,272 documented · 65%
README

ERNIE Bot | AI Studio | Hugging Face

📑 Blog | 📚 Cookbook | 📑 Paper

Introduction to ERNIE 4.5

We introduce ERNIE 4.5, a new family of large-scale multimodal models comprising 10 distinct variants. The model family consist of Mixture-of-Experts (MoE) models with 47B and 3B active parameters, with the largest model having 424B total parameters, as well as a 0.3B dense model. For the MoE architecture, we propose a novel heterogeneous modality structure, which supports parameter sharing across modalities while also allowing dedicated parameters for each individual modality. This MoE architecture has the advantage to enhance multimodal understanding without compromising, and even improving, performance on text-related tasks. All of our models are trained with optimal efficiency using the PaddlePaddle deep learning framework, which also enables high-performance inference and streamlined deployment for them. We achieve 47% Model FLOPs Utilization (MFU) in our largest ERNIE 4.5 language model pre-training. Experimental results show that our models achieve state-of-the-art performance across multiple text and multimodal benchmarks, especially in instruction following, world knowledge memorization, visual understanding and multimodal reasoning. All models are publicly accessible under Apache 2.0 to support future research and development in the field. Additionally, we open source the development toolkits for ERNIE 4.5, featuring industrial-grade capabilities, resource-efficient training and inference workflows, and multi-hardware compatibility.

ERNIE 4.5

ERNIE 4.5 Models Model Information
Model Category Model Input Modality Output Modality Context Window
Large Language Model (LLMs) ERNIE-4.5-300B-A47B-Base Text Text 128K
ERNIE-4.5-300B-A47B
ERNIE-4.5-21B-A3B-Base
ERNIE-4.5-21B-A3B
Vision-Language Models (VLMs) ERNIE-4.5-VL-424B-A47B-Base Text/Image/Video Text
ERNIE-4.5-VL-424B-A47B
ERNIE-4.5-VL-28B-A3B-Base
ERNIE-4.5-VL-28B-A3B
Dense Models ERNIE-4.5-0.3B-Base Text Text
ERNIE-4.5-0.3B

_Note:All models (including pre-trained weights and inference code) have been released on Hugging Face, and AI Studio. Check our blog for more details.

Highlights

Our model family is characterized by three key innovations:

  1. Multimodal Heterogeneous MoE Pre-Training: Our models are jointly trained on both textual and visual modalities to better capture the nuances of multimodal information and improve performance on tasks involving text understanding and generation, image understanding, and cross-modal reasoning. To achieve this without one modality hindering the learning of another, we designed a heterogeneous MoE structure, incorporated modality-isolated routing, and employed router orthogonal loss and multimodal token-balanced loss. These architectural choices ensure that both modalities are effectively represented, allowing for mutual reinforcement during training.

  2. Scaling-Efficient Infrastructure: We propose a novel heterogeneous hybrid parallelism and hierarchical load balancing strategy for efficient training of ERNIE 4.5 models. By using intra-node expert parallelism, memory-efficient pipeline scheduling, FP8 mixed-precision training and finegrained recomputation methods, we achieve remarkable pre-training throughput. For inference, we propose multi-expert parallel collaboration method and convolutional code quantization algorithm to achieve 4-bit/2-bit lossless quantization. Furthermore, we introduce PD disaggregation with dynamic role switching for effective resource utilization to enhance inference performance for ERNIE 4.5 MoE models. Built on PaddlePaddle, ERNIE 4.5 delivers high-performance inference across a wide range of hardware platforms.

  3. Modality-Specific Post-Training: To meet the diverse requirements of real-world applications, we fine-tuned variants of the pre-trained model for specific modalities. Our LLMs are optimized for general-purpose language understanding and generation. The VLMs focuses on visuallanguage understanding and supports both thinking and non-thinking modes. Each model employed a combination of Supervised Fine-tuning (SFT), Direct Preference Optimization (DPO) or a modified reinforcement learning method named Unified Preference Optimization (UPO) for post-training.

All released models (including pretrained weights and inference code) are now fully open source. For relationships between different model architectures, see the diagram below. Additional technical details are available in the technical report.

Performance and Benchmark Results

ERNIE-4.5-300B-A47B-Base surpasses DeepSeek-V3-671B-A37B-Base on 22 out of 28 benchmarks, demonstrating leading performance across all major capability categories. This underscores the substantial improvements in generalization, reasoning, and knowledge-intensive tasks brought about by scaling up the ERNIE-4.5-Base model relative to other state-of-the-art large models. With a total parameter size of 21B (approximately 70% that of Qwen3-30B), ERNIE-4.5-21B-A3B-Base outperforms Qwen3-30B-A3B-Base on several math and reasoning benchmarks, including BBH and CMATH. ERNIE-4.5-21B-A3B-Base remains highly competitive given its significantly smaller model size, demonstrating notable parameter efficiency and favorable performance trade-offs.

ERNIE-4.5-300B-A47B, the post trained model, demonstrates significant strengths in instruction following and knowledge tasks, as evidenced by the state-of-the-art scores on benchmarks such as IFEval, Multi-IF, SimpleQA, and ChineseSimpleQA. The lightweight model ERNIE-4.5-21B-A3B achieves competitive performance compared to Qwen3-30B-A3B, despite having approximately 30% fewer total parameters.

In the non-thinking mode, ERNIE-4.5-VL exhibits outstanding proficiency in visual perception, document and chart understanding, and visual knowledge, performing strongly across a range of established benchmarks. Under the thinking mode, ERNIE-4.5-VL not only demonstrates enhanced reasoning abilities compared to the non-thinking mode, but also retains the strong perception capabilities of the latter. ERNIE-4.5-VL-424B-A47B delivers consistently strong results across the various multimodal evaluation benchmarks. Its thinking mode offers a distinct advantage on challenging benchmarks such as MathVista, MMMU, and VisualPuzzle, while maintaining competitive performance on perception-focused datasets like CV-Bench and RealWorldQA. The lightweight vision-language model ERNIE-4.5-28B-A3B achieves competitive or even superior performance compared to Qwen2.5-VL-7B and Qwen2.5-VL-32B across most benchmarks, despite using significantly fewer activation parameters. Notably, our lightweight model also supports both thinking and non-thinking modes, offering functionalities consistent with ERNIE-4.5-VL-424B-A47B.

Performace of ERNIE-4.5 pre-trained models

Performance of post-trained model ERNIE-4.5-300B-A47B

Performance of post-trained model ERNIE-4.5-21B-A3B

Performance of post-trained multimodal models in thinking mode

Performance of post-trained multimodal models in non-thinking mode

Model Development

ERNIE 4.5 models are trained and deployed for inference using the PaddlePaddle framework. The full workflow of training, compression, and inference for ERNIE 4.5 is supported through the ERNIEKit and FastDeploy toolkit. The table below details the feature matrix of the ERNIE 4.5 model family for training and inference.

Model Training Inference
ERNIE-4.5-300B-A47B-Base SFT/SFT-LoRA/DPO/DPO-LoRA BF16 / W4A16C16 / W8A16C16 / FP8
ERNIE-4.5-300B-A47B SFT/SFT-LoRA/DPO/DPO-LoRA/QAT BF16 / W4A16C16 / W8A16C16 / W4A8C8 / FP8 / 2Bits
ERNIE-4.5-21B-A3B-Base SFT/SFT-LoRA/DPO/DPO-LoRA BF16 / W4A16C16 / W8A16C16 / FP8
ERNIE-4.5-21B-A3B SFT/SFT-LoRA/DPO/DPO-LoRA BF16 / W4A16C16 / W8A16C16 / FP8
ERNIE-4.5-VL-424B-A47B-Base Coming Soon BF16 / W4A16C16 / W8A16C16 / FP8
ERNIE-4.5-VL-424B-A47B Coming Soon BF16 / W4A16C16 / W8A16C16 / FP8
ERNIE-4.5-VL-28B-A3B-Base Coming Soon BF16 / W4A16C16 / W8A16C16 / FP8
ERNIE-4.5-VL-28B-A3B Coming Soon BF16 / W4A16C16 / W8A16C16 / FP8
ERNIE-4.5-0.3B-Base SFT/SFT-LoRA/DPO/DPO-LoRA BF16 / W8A16C16 / FP8
ERNIE-4.5-0.3B SFT/SFT-LoRA/DPO/DPO-LoRA BF16 / W8A16C16 / FP8

Note: For different ERNIE 4.5 model, we provide diverse quantization schemes using the notation WxAxCx, where: W indicates weight precision, A indicates activation precision, C indicates KV Cache precision, x represents numerical precision.

ERNIEKit: ERNIE Development Toolkit Based on PaddlePaddle

ERNIEKit is an industrial-grade training and compression development toolkit for ERNIE models based on PaddlePaddle, offering full-cycle development support for the ERNIE 4.5 model family. Key capabilities include: * High-performance pre-training implementation * Full-parameter supervised fine-tuning (SFT) * Direct Preference Optimization (DPO) * Parameter-efficient fine-tuning and alignment (SFT-LoRA/DPO-LoRA) * Quantization-Aware Training (QAT) * Post-Training Quantization (PTQ) [WIP]

Minimum hardware requirements for training each model are documented here.

Quick Start

When you install ERNIEKit successfully, you can start training ERNIE 4.5 models with the following command:

```bash

Core symbols most depended-on inside this repo

get
called by 421
erniekit/webui/alert.py
add_elem
called by 160
erniekit/webui/manager.py
get_default_user_dict
called by 88
erniekit/webui/common.py
update
called by 81
ernie/refined_recompute/utils.py
get_elem_by_id
called by 68
erniekit/webui/manager.py
pop
called by 52
ernie/longcontext_ops.py
update
called by 30
examples/pre-training/ernie/src/utils/misc.py
flatten
called by 29
ernie/dataset/pvp.py

Shape

Method 1,183
Function 479
Class 309

Languages

Python100%

Modules by API surface

examples/pre-training/models/ernie/modeling_moe.py85 symbols
examples/pre-training/models/ernie/modeling.py83 symbols
erniekit/webui/control.py71 symbols
data_processor/utils/image_enhance.py64 symbols
ernie/modeling_moe_vl.py50 symbols
ernie/modeling_moe.py49 symbols
examples/pre-training/ernie/src/trainers/pretraining_trainer.py48 symbols
examples/pre-training/models/ernie/modeling_pp.py47 symbols
examples/pre-training/models/moe/moe_layer.py43 symbols
examples/pre-training/models/sequence_parallel_utils.py42 symbols
ernie/modeling.py42 symbols
ernie/modeling_moe_pp.py41 symbols

Dependencies from manifests, versioned

imgaug0.4.0 · 1×
opencv-python4.5.5.64 · 1×
setuptools50.3.2 · 1×
triton3.3 · 1×

For agents

$ claude mcp add ERNIE \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact