【百度拥抱开源】介绍ERNIE-4.5-VL-28B-A3B-Thinking:多模态AI的重大突破

模型亮点

基于强大的ERNIE-4.5-VL-28B-A3B架构全新升级的ERNIE-4.5-VL-28B-A3B-Thinking,在多模态推理能力上实现了质的飞跃。🧠✨通过大规模的中期训练阶段,模型吸收了海量且高度多样化的优质视觉语言推理数据。这种超大规模训练显著提升了模型的表征能力,同时加深了视觉与语言模态间的语义对齐------解锁了前所未有的精细化图文推理能力。📊

该模型在可验证任务上运用前沿的多模态强化学习技术,整合GSPO与IcePop策略以稳定混合专家训练,配合动态难度采样实现卓越的学习效率。⚡为响应社区强烈需求,我们大幅强化了模型的指代性能并提升指令跟随能力,使视觉定位功能比以往更易用。🎯此外,创新的"图像思考"功能结合图像放大、以图搜图等工具,显著增强了模型处理细粒度细节与长尾视觉知识的能力。🔍🖼️

这些增强共同构成了开发复杂多模态智能体的关键基础,助力开发者和研究者突破视觉语言理解的边界,打造新一代人工智能应用。🤖🌟

核心能力

作为仅激活 30亿参数 ⚡ 的轻量级模型,文心4.5-VL-280亿-A3B思维 在各基准测试中与业界顶级旗舰模型的性能表现不相上下。🚀

  • 视觉推理 🧠👁️:通过大规模强化学习增强,模型在复杂视觉任务中展现出卓越的多步推理、图表分析和因果推理能力!📊✨
  • STEM解题 🔬📐:依托强大的视觉能力,模型在STEM任务(如拍照解题)上实现性能飞跃,复杂题目也能轻松应对!🎯💡
  • 视觉定位 📍🎨:具备更精准的定位和灵活执行指令能力,复杂工业场景中可轻松触发定位功能,大幅提升效率!⚙️💪
  • 图像思维 🤔🔍:模型像人类一样思考图像,可自由缩放画面以把握每个细节,挖掘全部信息。🖼️✨
  • 工具调用 🛠️⚡:依托强大的工具调用能力,模型可即时使用以图搜图等功能,轻松识别长尾知识,实现全面信息检索!🔎📚
  • 视频理解 🎬🎥:模型具备出色的时序感知与事件定位能力,精准识别视频中不同时段的内容变化,让视频分析更智能高效!⏱️🌟

快速体验

Hugging Face 🤗 应用

使用 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-parsertool-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 百度公司。保留所有权利。

相关推荐
郝学胜-神的一滴12 小时前
Effective Python 条款 10 :海象运算符_=
开发语言·python·程序人生·开源
Niuguangshuo17 小时前
SHEET MOS:TTS 与语音增强的开源 MOS 打分工具箱
开源
m0_7345717617 小时前
深入理解人工智能 chatGPT的软件架构
人工智能
飞塔老梅子17 小时前
09. Codex 节省Token ❀ 老梅子学AI
人工智能·ai·token·模型·codex
HyperAI超神经17 小时前
扰动实验+迁移学习,MIT团队推出IRIS,用「指纹」重建单细胞信号传导历史
人工智能·深度学习·机器学习·迁移学习
前沿在线17 小时前
启元机器人亮相外滩大会,探索个人机器人健康服务新场景
人工智能·ai·大模型
飞多学堂17 小时前
每日开源硬件精选简报 2026-09-11
驱动开发·开源·开源硬件·硬件开源·电子制作
haishikeji696_17 小时前
现成无人机管理系统源码|支持私有化部署、二次开发、政企投标、自动机库对接
人工智能·无人机·低空经济·无人机管理系统·飞控管理系统
汇智信科17 小时前
煤矿视频智能分析系统:基于 AI 视觉实现井下安全隐患实时监测与闭环管控
人工智能