AIDC-AI/Ovis2.6-80B-A3B · Hugging Face

Reddit r/LocalLLaMA 模型

摘要

Ovis2.6-80B-A3B 是 AIDC-AI 最新发布的多模态大语言模型,采用混合专家(Mixture-of-Experts)架构,总参数达 80B,但在推理时仅激活 3B 参数。该模型具备增强的长上下文处理能力、高分辨率理解能力以及主动视觉推理能力。

我们推出了 **Ovis2.6-80B-A3B**,这是 Ovis 系列多模态大语言模型(MLLM)的最新进展。在 Ovis2.5 坚实的基础之上,Ovis2.6 将 LLM 骨干网络升级为 **混合专家(MoE)** 架构,以更低的推理成本提供卓越的多模态性能。此外,它在长上下文和高分辨率理解、结合主动图像分析的视觉推理,以及信息密集型文档理解方面实现了重大提升。 # 主要特性 * **MoE 架构:卓越性能,低廉推理成本** LLM 骨干网络已升级为 **混合专家(MoE)** 架构。这使得 Ovis2.6 能够将总参数扩展至 *80B*\*,从而捕捉海量的知识与细微差别。关键在于,它在推理过程中仅激活 **~3B 参数**,从而确保较低的推理成本和高吞吐量。 * **增强的长序列与高分辨率处理能力** Ovis2.6 将上下文窗口扩展至 **64K tokens**,并支持高达 **2880×2880** 的图像分辨率,显著提升了其处理高分辨率及信息密集视觉输入的能力。这些增强功能在 **长文档问答** 任务中尤为有效,因为模型必须收集并综合分散在多个页面中的线索,以得出正确答案。 * **图像思维(Think with Image)** 我们引入了 **“图像思维”** 功能,将视觉从被动输入转变为主动的认知工作区。在推理过程中,模型可以主动调用视觉工具(例如裁剪和旋转)来重新检查和分析其思维链(Chain-of-Thought)中的图像区域,从而实现对视觉输入的多轮自我反思式推理,提高复杂任务的准确率。 * **强化的 OCR、文档与图表能力** 继续聚焦于信息密集的视觉任务,我们进一步强化了模型在 **光学字符识别(OCR)**、**文档理解** 以及 **图表分析** 方面的能力。Ovis2.6 不仅擅长从视觉数据中准确提取结构化信息,还能对提取的内容进行 **推理**。 此前他们还发布了 [Marco-Mini-Instruct、Marco-Nano-Instruct、Marco-DeepResearch-8B、Ovis2.6-30B-A3B 等模型](https://huggingface.co/AIDC-AI/models?sort=created)
查看原文
查看缓存全文

缓存时间: 2026/05/13 14:16

AIDC-AI/Ovis2.6-80B-A3B · Hugging Face 来源: https://huggingface.co/AIDC-AI/Ovis2.6-80B-A3B ## https://huggingface.co/AIDC-AI/Ovis2.6-80B-A3B#introduction介绍 我们推出了 Ovis2.6-80B-A3B,这是 Ovis 系列多模态大型语言模型(MLLM)的最新进展。在 Ovis2.5 的强大基础上,Ovis2.6 将 LLM 主干升级至 混合专家(Mixture-of-Experts, MoE) 架构,以极低的推理成本提供卓越的多模态性能。此外,它在长上下文理解、高分辨率图像处理、结合主动图像分析的视觉推理以及信息密集型文档理解方面取得了重大改进。

https://huggingface.co/AIDC-AI/Ovis2.6-80B-A3B#key-features主要特性

  • MoE 架构:以低成本实现卓越性能 LLM 主干已升级为 混合专家(MoE) 架构。这使得 Ovis2.6 能够扩展至 800 亿总参数量,捕捉海量的知识与细微差别。关键在于,它在推理过程中仅激活 ~30 亿参数,从而确保低服务成本和高吞吐量。

  • 增强的长序列与高分辨率处理能力 Ovis2.6 将上下文窗口扩展至 64K tokens,并支持高达 2880×2880 的图像分辨率,显著提升了其处理高分辨率和信息密集型视觉输入的能力。这些增强功能在 长文档问答 中尤为有效,模型需要汇集并综合散布在多页中的线索以得出正确答案。

  • Think with Image(结合图像思考) 我们引入了 “结合图像思考” 能力,将视觉从被动输入转变为主动的认知工作空间。在推理过程中,模型可以主动调用视觉工具(例如裁剪和旋转)在其思维链(Chain-of-Thought)中重新检查和图像区域,从而实现对视觉输入的多轮、自我反思式推理,提高复杂任务的准确率。

  • 增强的 OCR、文档和图表能力 继续专注于信息密集型的视觉任务,我们进一步强化了模型在 光学字符识别(OCR)文档理解图表/图解分析 方面的能力。Ovis2.6 不仅擅长从视觉数据中准确提取结构化信息,还擅长对提取的内容进行 推理

https://huggingface.co/AIDC-AI/Ovis2.6-80B-A3B#performance性能

下表展示了详细的性能比较。请注意,上标结果源自外部技术报告,Qwen 的分数代表其 Think 和 Instruct 版本中的最高值。为便于参考,最佳结果以红色高亮显示,次佳结果带有下划线。所有数值均保留一位小数。

bench

https://huggingface.co/AIDC-AI/Ovis2.6-80B-A3B#quick-inference-transformers快速推理(transformers)

以下是一个简单的示例,演示如何使用单张图像输入运行 Ovis2.6。首先,安装所需的依赖项:

pip install torch==2.7.1 transformers==4.57.0 numpy==1.25.0 pillow==10.3.0 moviepy==1.0.3 accelerate==1.12.0
pip install --no-build-isolation --no-cache-dir flash-attn==2.8.3

然后,运行以下代码:

import torch
import requests
from PIL import Image
from transformers import AutoModelForCausalLM

# 思考模式 & 预算
enable_thinking = True
enable_thinking_budget = True
# 仅在 enable_thinking 为 True 时有效。
# 思考 + 回答的总 token 数。确保: max_new_tokens > thinking_budget + 25
max_new_tokens = 2048
thinking_budget = 1024

model = AutoModelForCausalLM.from_pretrained(
    "AIDC-AI/Ovis2.6-80B-A3B",
    torch_dtype=torch.bfloat16,
    trust_remote_code=True,
    device_map="auto"
)

messages = [{
    "role": "user",
    "content": [
        {"type": "image", "image": Image.open(requests.get("https://cdn-uploads.huggingface.co/production/uploads/658a8a837959448ef5500ce5/TIlymOb86R6_Mez3bpmcB.png", stream=True).raw)},
        {"type": "text", "text": "Calculate the sum of the numbers in the middle box in figure (c)."},
    ],
}]

input_ids, pixel_values, grid_thws = model.preprocess_inputs(
    messages=messages,
    add_generation_prompt=True,
    enable_thinking=enable_thinking
)

input_ids = input_ids.cuda()
pixel_values = pixel_values.cuda() if pixel_values is not None else None
grid_thws = grid_thws.cuda() if grid_thws is not None else None

outputs = model.generate(
    inputs=input_ids,
    pixel_values=pixel_values,
    grid_thws=grid_thws,
    enable_thinking=enable_thinking,
    enable_thinking_budget=enable_thinking_budget,
    max_new_tokens=max_new_tokens,
    thinking_budget=thinking_budget,
)

response = model.text_tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)

思考及思考预算逻辑可同样应用于多图像、视频和纯文本场景。

**注意(针对 CoT/思考模式的答案提取):**为了简化评估和使用,建议在使用思维链(CoT)或思考模式时在提示末尾附加固定后缀。这确保模型清晰输出最终答案,以便通过程序提取:

End your response with 'Final answer: '.

例如:

Calculate the sum of the numbers in the middle box in figure (c). End your response with 'Final answer: '.

**提示:**以下部分包括一个可选的流式处理辅助类(兼容两阶段思考/预算运行)以及其他推理模式:多图像、视频和纯文本。

可选:流式处理(高级)

为了支持思考预算,我们修改了 Ovis generate 方法的实现,默认的 TextIteratorStreamer 现已不兼容。如果需要流式输出模型结果,请务必使用下面的辅助类。

# --- 支持预算的流式处理辅助类 ---
from transformers import TextIteratorStreamer

class BudgetAwareTextStreamer(TextIteratorStreamer):
    """兼容 Ovis 两阶段生成的流式处理器。生成结束后调用 .manual_end() 以刷新剩余文本。"""
    def manual_end(self):
        if len(self.token_cache) > 0:
            text = self.tokenizer.decode(self.token_cache, **self.decode_kwargs)
            printable_text = text[self.print_len:]
            self.token_cache = []
            self.print_len = 0
        else:
            printable_text = ""
        self.next_tokens_are_prompt = True
        self.on_finalized_text(printable_text, stream_end=True)

    # 禁用基类的 end 钩子;我们通过 manual_end() 进行最终处理
    def end(self):
        pass

使用示例:

streamer = BudgetAwareTextStreamer(
    model.text_tokenizer,
    skip_prompt=True,
    skip_special_tokens=True
)

outputs = model.generate(
    inputs=input_ids,
    pixel_values=pixel_values,
    grid_thws=grid_thws,
    enable_thinking=enable_thinking,
    enable_thinking_budget=enable_thinking_budget,
    max_new_tokens=max_new_tokens,
    thinking_budget=thinking_budget,
    streamer=streamer
)

示例:多图像

演示如何针对多张图像和相关问题运行推理。

# 多图像推理
multi_image_files = [
    "/path/to/image_1.jpg",
    "/path/to/image_2.jpg",
    "/path/to/image_3.jpg",
]

content = [{"type": "image", "image": Image.open(p).convert("RGB")} for p in multi_image_files]
content.append({"type": "text", "text": "Describe the images."})
messages = [{"role": "user", "content": content}]

input_ids, pixel_values, grid_thws = model.preprocess_inputs(
    messages=messages,
    add_generation_prompt=True,
    max_pixels=896*896
)

input_ids = input_ids.cuda()
pixel_values = pixel_values.cuda().to(model.dtype) if pixel_values is not None else None
grid_thws = grid_thws.cuda() if grid_thws is not None else None

with torch.no_grad():
    outputs = model.generate(
        inputs=input_ids,
        pixel_values=pixel_values,
        grid_thws=grid_thws,
        max_new_tokens=1024,
        do_sample=True,
        eos_token_id=model.text_tokenizer.eos_token_id,
        pad_token_id=model.text_tokenizer.pad_token_id
    )
    print(model.text_tokenizer.decode(outputs[0], skip_special_tokens=True))

示例:视频

演示如何通过采样多帧运行视频推理,并要求模型描述内容。

# 视频推理
from moviepy.editor import VideoFileClip # pip install moviepy==1.0.3

video_file = "/path/to/video_1.mp4"
num_frames = 8

with VideoFileClip(video_file) as clip:
    total_frames = int(clip.fps * clip.duration)
    indices = [int(i * total_frames / num_frames) for i in range(num_frames)]
    frames = [Image.fromarray(clip.get_frame(t)) for t in (idx / clip.fps for idx in indices)]

messages = [{"role": "user", "content": [
    {"type": "video", "video": frames},
    {"type": "text", "text": "Describe this video in detail."},
]}]

input_ids, pixel_values, grid_thws = model.preprocess_inputs(
    messages=messages,
    add_generation_prompt=True,
    max_pixels=896*896
)

input_ids = input_ids.cuda()
pixel_values = pixel_values.cuda().to(model.dtype) if pixel_values is not None else None
grid_thws = grid_thws.cuda() if grid_thws is not None else None

with torch.no_grad():
    outputs = model.generate(
        inputs=input_ids,
        pixel_values=pixel_values,
        grid_thws=grid_thws,
        max_new_tokens=1024,
        do_sample=True,
        eos_token_id=model.text_tokenizer.eos_token_id,
        pad_token_id=model.text_tokenizer.pad_token_id
    )
    print(model.text_tokenizer.decode(outputs[0], skip_special_tokens=True))

示例:纯文本

演示如何仅使用文本输入运行推理,不包含任何图像或视频。

# 纯文本推理
messages = [{"role": "user", "content": "Hi, please introduce Yellow Mountain."}]

input_ids, _, _ = model.preprocess_inputs(
    messages=messages,
    add_generation_prompt=True
)

input_ids = input_ids.cuda()

with torch.no_grad():
    outputs = model.generate(
        inputs=input_ids,
        max_new_tokens=1024,
        do_sample=True,
        eos_token_id=model.text_tokenizer.eos_token_id,
        pad_token_id=model.text_tokenizer.pad_token_id
    )
    print(model.text_tokenizer.decode(outputs[0], skip_special_tokens=True))

要启用定位(grounding),请在提示末尾添加 Please provide the bounding box coordinates.(用于方框)或 Please provide the point coordinates.(用于点)。若要定位特定对象,请将其描述包裹在 `` 标签中,例如:

Find the red apple in the image. Please provide the bounding box coordinates.

坐标归一化为 [0,1],原点 (0,0) 位于图像左上角。

  • 点:(x,y)
  • 方框:(x1,y1),(x2,y2),其中 (x1,y1) 为左上角,(x2,y2) 为右下角。
  • 多个结果可以用方括号列出:[(...),(...)]

示例输出:

The image features a serene scene with three birds[ (0.401,0.526),(0.430,0.557), (0.489,0.494),(0.516,0.526), (0.296,0.529),(0.324,0.576) ] flying in formation against a clear blue sky.

https://huggingface.co/AIDC-AI/Ovis2.6-80B-A3B#citation引用

如果您觉得 Ovis 有用,请考虑引用以下论文:

@article{lu2025ovis25technicalreport,
  title={Ovis2.5 Technical Report},
  author={Shiyin Lu and Yang Li and Yu Xia and Yuwei Hu and Shanshan Zhao and Yanqing Ma and Zhichao Wei and Yinglun Li and Lunhao Duan and Jianshan Zhao and Yuxuan Han and Haijun Li and Wanying Chen and Junke Tang and Chengkun Hou and Zhixing Du and Tianli Zhou and Wenjie Zhang and Huping Ding and Jiahe Li and Wen Li and Gui Hu and Yiliang Gu and Siran Yang and Jiamang Wang and Hailong Sun and Yibo Wang and Hui Sun and Jinlong Huang and Yuping He and Shengze Shi and Weihong Zhang and Guodong Zheng and Junpeng Jiang and Sensen Gao and Yi-Feng Wu and Sijia Chen and Yuhui Chen and Qing-Guo Chen and Zhao Xu and Weihua Luo and Kaifu Zhang},
  year={2025},
  journal={arXiv:2508.11737}
}

@article{lu2024ovis,
  title={Ovis: Structural Embedding Alignment for Multimodal Large Language Model},
  author={Shiyin Lu and Yang Li and Qing-Guo Chen and Zhao Xu and Weihua Luo and Kaifu Zhang and Han-Jia Ye},
  year={2024},
  journal={arXiv:2405.20797}
}

https://huggingface.co/AIDC-AI/Ovis2.6-80B-A3B#license许可

本项目采用 Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) 许可证(SPDX-License-Identifier: Apache-2.0)。

https://huggingface.co/AIDC-AI/Ovis2.6-80B-A3B#disclaimer免责声明

我们在训练过程中使用了合规检查算法,尽力确保训练模型的合规性。由于数据的复杂性以及语言模型使用场景的多样性,我们无法保证模型完全不存在版权问题或不适当内容。如果您认为任何内容侵犯了您的权利或生成了不适当的内容,请联系我们,我们将 promptly 处理此事。

相似文章

unsloth/MiMo-V2.5-GGUF · Hugging Face

Reddit r/LocalLLaMA

MiMo-V2.5 是一款原生全模态 AI 模型,具备强大的智能体(agentic)能力,在统一稀疏混合专家(MoE)架构下支持文本、图像、视频和音频的理解。

AI2推出的新MoE模型:EMO

Reddit r/LocalLLaMA

AI2发布了EMO,一个混合专家(MoE)语言模型,总参数量14B,其中1B活跃参数,基于1万亿tokens训练,并采用文档级路由,即专家会按领域(如健康、新闻等)进行聚类。

MolmoAct2:面向真实场景部署的动作推理模型

Papers with Code Trending

Allen AI 发布了 MolmoAct2,这是一款专为真实场景机器人部署设计的开放权重视觉-语言-动作模型,具备新数据集、开放动作分词器以及自适应推理以降低延迟等特性。

inclusionAI/Ring-2.6-1T · Hugging Face

Reddit r/LocalLLaMA

inclusionAI发布了Ring-2.6-1T,一个万亿参数推理模型,具有增强的代理执行能力、推理努力机制和异步强化学习训练范式,旨在应对复杂的现实世界任务。