模型亮点
基于强大的ERNIE-4.5-VL-28B-A3B架构全新升级的ERNIE-4.5-VL-28B-A3B-Thinking,在多模态推理能力上实现了质的飞跃。🧠✨通过大规模的中期训练阶段,模型吸收了海量且高度多样化的优质视觉语言推理数据。这种超大规模训练显著提升了模型的表征能力,同时加深了视觉与语言模态间的语义对齐------解锁了前所未有的精细化图文推理能力。📊
该模型在可验证任务上运用前沿的多模态强化学习技术,整合GSPO与IcePop策略以稳定混合专家训练,配合动态难度采样实现卓越的学习效率。⚡为响应社区强烈需求,我们大幅强化了模型的指代性能并提升指令跟随能力,使视觉定位功能比以往更易用。🎯此外,创新的"图像思考"功能结合图像放大、以图搜图等工具,显著增强了模型处理细粒度细节与长尾视觉知识的能力。🔍🖼️
这些增强共同构成了开发复杂多模态智能体的关键基础,助力开发者和研究者突破视觉语言理解的边界,打造新一代人工智能应用。🤖🌟

核心能力
作为仅激活 30亿参数 ⚡ 的轻量级模型,文心4.5-VL-280亿-A3B思维 在各基准测试中与业界顶级旗舰模型的性能表现不相上下。🚀
- 视觉推理 🧠👁️:通过大规模强化学习增强,模型在复杂视觉任务中展现出卓越的多步推理、图表分析和因果推理能力!📊✨
- STEM解题 🔬📐:依托强大的视觉能力,模型在STEM任务(如拍照解题)上实现性能飞跃,复杂题目也能轻松应对!🎯💡
- 视觉定位 📍🎨:具备更精准的定位和灵活执行指令能力,复杂工业场景中可轻松触发定位功能,大幅提升效率!⚙️💪
- 图像思维 🤔🔍:模型像人类一样思考图像,可自由缩放画面以把握每个细节,挖掘全部信息。🖼️✨
- 工具调用 🛠️⚡:依托强大的工具调用能力,模型可即时使用以图搜图等功能,轻松识别长尾知识,实现全面信息检索!🔎📚
- 视频理解 🎬🎥:模型具备出色的时序感知与事件定位能力,精准识别视频中不同时段的内容变化,让视频分析更智能高效!⏱️🌟
快速体验
使用 transformers 库
以下是如何使用 transformers 库进行推理的示例:
python
import torch
from transformers import AutoProcessor, AutoTokenizer, AutoModelForCausalLM
model_path = 'baidu/ERNIE-4.5-VL-28B-A3B-Thinking'
model = AutoModelForCausalLM.from_pretrained(
model_path,
device_map="auto",
dtype=torch.bfloat16,
trust_remote_code=True
)
processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)
model.add_image_preprocess(processor)
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What color clothes is the girl in the picture wearing?"
},
{
"type": "image_url",
"image_url": {
"url": "https://paddlenlp.bj.bcebos.com/datasets/paddlemix/demo_images/example1.jpg"
}
},
]
},
]
text = processor.tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
image_inputs, video_inputs = processor.process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
)
device = next(model.parameters()).device
inputs = inputs.to(device)
generated_ids = model.generate(
inputs=inputs['input_ids'].to(device),
**inputs,
max_new_tokens=1024,
use_cache=False
)
output_text = processor.decode(generated_ids[0][len(inputs['input_ids'][0]):])
print(output_text)
vLLM 推理
安装 vLLM 主分支
bash
pip install uv
uv pip install -U vllm --pre \
--extra-index-url https://wheels.vllm.ai/nightly \
--extra-index-url https://download.pytorch.org/whl/cu129 \
--index-strategy unsafe-best-match
运行 vLLM
bash
# 80G*1 GPU,If an error occurs, add the --gpu-memory-utilization 0.95 and try again
vllm serve baidu/ERNIE-4.5-VL-28B-A3B-Thinking --trust-remote-code
使用 reasoning-parser 和 tool-call-parser 运行 vLLM
bash
# 80G*1 GPU,If an error occurs, add the --gpu-memory-utilization 0.95 and try again
vllm serve baidu/ERNIE-4.5-VL-28B-A3B-Thinking --trust-remote-code \
--reasoning-parser ernie45 \
--tool-call-parser ernie45 \
--enable-auto-tool-choice
FastDeploy 快速部署推理
按以下方式使用 FastDeploy 快速部署服务。更详细的使用说明请参考 FastDeploy GitHub 仓库。
注意: 单卡部署至少需要 80GB 的 GPU 显存。
bash
fastdeploy serve --model baidu/ERNIE-4.5-VL-28B-A3B-Thinking \
--max-model-len 131072 \
--max-num-seqs 32 \
--port 8180 \
--quantization wint8 \
--reasoning-parser ernie-45-vl-thinking \
--tool-call-parser ernie-45-vl-thinking \
--mm-processor-kwargs '{"image_max_pixels": 12845056 }'
基于ERNIEKit的微调
ERNIEKit是基于飞桨框架的训练工具包,专为ERNIE系列开源大模型设计。该工具全面支持指令微调(SFT、LoRA)和对齐训练(DPO)等场景,确保模型发挥最佳性能。
使用示例:
bash
# Download model
huggingface-cli download baidu/ERNIE-4.5-VL-28B-A3B-Thinking --local-dir baidu/ERNIE-4.5-VL-28B-A3B-Thinking
# SFT
erniekit train examples/configs/ERNIE-4.5-VL-28B-A3B-Thinking/sft/run_sft_lora_8k.yaml
# SFT (Function Call)
erniekit train examples/configs/ERNIE-4.5-VL-28B-A3B-Thinking/sft_function_call/run_sft_8k.yaml
如需更详细的示例(包括使用LoRA的SFT、多GPU配置及高级脚本),请参阅ERNIEKit代码库中的示例文件夹。
许可证
ERNIE 4.5模型基于Apache License 2.0提供。该许可证允许商业用途,但须遵守其条款与条件。版权所有 © 2025 百度公司。保留所有权利。