Skip to content

Commit da43914

Browse files
authored
Merge branch 'PaddlePaddle:develop' into develop
2 parents 4d285fb + 4ade1b4 commit da43914

63 files changed

Lines changed: 4675 additions & 1340 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/lint.yml‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Codestyle Check
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
Lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Download Code
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Checkout Develop
20+
run: |
21+
if ! git show-ref --quiet refs/heads/develop; then \
22+
echo "local develop branch is missing, creating local develop branch that tracks remote develop branch"
23+
git fetch origin develop
24+
git branch develop --track origin/develop
25+
else
26+
echo "local develop branch exist, skipping"
27+
fi
28+
29+
- name: Setup Python
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.10'
33+
cache: 'pip' # caching pip dependencies
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install pre-commit
38+
pre-commit install
39+
- name: Test
40+
run: make -f tools/codestyle/Makefile lint

‎.github/workflows/test.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Test:
7+
name: Test
8+
runs-on: [self-hosted, 4gpu]
9+
steps:
10+
- name: Start Docker
11+
run: |
12+
if [ ! "$(docker ps -q -f name=ERNIE_CI_Container)" ]; then
13+
echo "Starting container ERNIE_CI_Container"
14+
docker start ERNIE_CI_Container
15+
else
16+
echo "ERNIE_CI_Container already running"
17+
fi
18+
- name: Cleanup Environment Cache
19+
run: docker exec -t ERNIE_CI_Container /bin/bash -c '
20+
rm -rf /workspace/* /workspace/.[!.]* /workspace/..?*'
21+
- name: Get Repo
22+
env:
23+
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
24+
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
25+
ACTIONS_ALLOW_UNSECURE_NODE_VERSION: true
26+
uses: actions/checkout@v3
27+
with:
28+
fetch-depth: 0
29+
- name: Prepare Model
30+
run: docker exec -t ERNIE_CI_Container /bin/bash -c '
31+
cp -r /home/ERNIE_Model/* /workspace/ '
32+
- name: Install erniekit
33+
run: docker exec -t ERNIE_CI_Container /bin/bash -c '
34+
pip install -e.'
35+
- name: Runing case
36+
run: docker exec -t ERNIE_CI_Container /bin/bash -c '
37+
make test'

‎.pre-commit-config.yaml‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
repos:
2+
# For Python files
3+
- repo: https://github.com/psf/black.git
4+
rev: 25.1.0
5+
hooks:
6+
- id: black
7+
files: \.(py|pyi)$
8+
additional_dependencies: [toml]
9+
- repo: https://github.com/PyCQA/isort
10+
rev: 6.0.1
11+
hooks:
12+
- id: isort
13+
- repo: https://github.com/astral-sh/ruff-pre-commit
14+
rev: v0.12.1
15+
hooks:
16+
- id: ruff
17+
args: [--fix, --exit-non-zero-on-fix]
18+
- id: ruff-format
19+
- repo: https://github.com/pre-commit/pre-commit-hooks
20+
rev: v5.0.0
21+
hooks:
22+
- id: check-merge-conflict
23+
- id: check-symlinks
24+
- id: detect-private-key
25+
files: (?!.*paddle)^.*$
26+
- id: end-of-file-fixer
27+
files: \.md$
28+
- id: trailing-whitespace
29+
files: \.md$
30+
- repo: https://github.com/Lucas-C/pre-commit-hooks
31+
rev: v1.5.5
32+
hooks:
33+
- id: forbid-crlf
34+
files: \.md$
35+
- id: remove-crlf
36+
files: \.md$
37+
- id: forbid-tabs
38+
files: \.md$
39+
- id: remove-tabs
40+
files: \.md$
41+
- repo: local
42+
hooks:
43+
- id: copyright_checker
44+
name: copyright_checker
45+
entry: python ./tools/codestyle/.copyright.hook
46+
language: system
47+
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|xpu|kps|py|sh)$

‎Makefile‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Makefile For ERNIE
2+
# GitHb: https://github.com/PaddlePaddle/ERNIE
3+
4+
5+
.PHONY: all
6+
all : lint test
7+
check_dirs := cookbook data_processor ernie erniekit examples tools test requirements
8+
9+
# # # # # # # # # # # # # # # Lint Block # # # # # # # # # # # # # # #
10+
.PHONY: lint
11+
lint:
12+
$(eval modified_py_files := $(shell python tests/codestyle/get_modified_files.py $(check_dirs)))
13+
@if test -n "$(modified_py_files)"; then \
14+
echo ${modified_py_files}; \
15+
pre-commit run --files ${modified_py_files}; \
16+
else \
17+
echo "No library .py files were modified"; \
18+
fi
19+
20+
# # # # # # # # # # # # # # # Install Requirements Block # # # # # # # # # # # # # # #
21+
.PHONY: install
22+
install:
23+
pip uninstall paddlepaddle-gpu -y
24+
pip install paddlepaddle-gpu==3.1.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
25+
pip install -r requirements/gpu/requirements.txt
26+
pip install pytest
27+
pip install allure-pytest
28+
pip install -e.
29+
30+
# # # # # # # # # # # # # # # Test Block # # # # # # # # # # # # # # #
31+
.PHONY: test
32+
test:
33+
PYTHONPATH=$(shell pwd) pytest -s -v --alluredir=result tests/

‎README.md‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
[ERNIE Bot](https://ernie.baidu.com/) | [🤗Hugging Face](https://huggingface.co/baidu) | [AI Studio](https://aistudio.baidu.com/modelsoverview)
88

9-
📑 [Blog](https://yiyan.baidu.com/blog/posts/ernie4.5) | 📚 [Cookbook](./cookbook/) | 📑 [Paper](https://yiyan.baidu.com/blog/publication/) | 🛠️ [Toolkit](./docs/erniekit.md)
9+
📑 [Blog](https://yiyan.baidu.com/blog/posts/ernie4.5) | 📚 [Cookbook](./cookbook/) | 📑 [Paper](https://yiyan.baidu.com/blog/publication/) | 🛠️ [Training](./docs/erniekit.md) | ⚡️ [Deploy](https://github.com/PaddlePaddle/FastDeploy)
10+
11+
<a href="https://trendshift.io/repositories/14169" target="_blank"><img src="https://trendshift.io/api/badge/repositories/14169" alt="PaddlePaddle%2FERNIE | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
1012

1113
</div>
1214

@@ -102,7 +104,7 @@ ERNIE-4.5-300B-A47B-Base surpasses DeepSeek-V3-671B-A37B-Base on 22 out of 28 be
102104

103105
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.
104106

105-
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.
107+
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 full multimodal evaluation suite. Its thinking mode provides a distinct advantage on reasoning-centric tasks, narrowing or even surpassing the gap to OpenAI-o1 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-VL-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.
106108

107109
### Performace of ERNIE-4.5 pre-trained models
108110

@@ -244,6 +246,12 @@ Discover best-practice guides showcasing ERNIE’s capabilities across multiple
244246

245247
</br>
246248

249+
## Community
250+
251+
| PaddlePaddle WeChat official account | Join the tech discussion group |
252+
| :---: | :---: |
253+
| <img src="https://github.com/user-attachments/assets/864a45ec-0773-44b2-a2f1-c0e21e157792" width="150"> | <img src="https://github.com/user-attachments/assets/52e05674-7143-4207-8b19-67247fe88f55" width="150"> |
254+
247255
## License
248256

249257
The ERNIE 4.5 models are provided under the Apache License 2.0. This license permits commercial use, subject to its terms and conditions.
-232 KB
Binary file not shown.
-93.1 KB
Binary file not shown.
-65.6 KB
Binary file not shown.
-62.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)