base_model: Qwen/Qwen2.5-VL-3B-Instruct
library_name: peft
datasets:
- llamaindex/vdr-multilingual-train
- nomic-ai/colpali_train_set_split_by_source
language:
- en
- it
- fr
- de
- es
pipeline_tag: visual-document-retrieval
tags:
- vidore
- colpali
- multimodal_embedding
- multilingual_embedding
- Text-to-Visual Document (T→VD) retrieval
ColNomic Embed多模态3B:视觉文档检索的尖端技术
colnomic-embed-multimodal-3b
是一款多向量尖端多模态嵌入模型,在视觉文档检索任务中表现卓越:
- 高性能:在Vidore-v2上达到61.2 NDCG@5,仅次于ColNomic Embed多模态7B
- 统一文本-图像编码:直接编码交错排列的文本和图像,无需复杂预处理
- 先进架构:30亿参数的多模态嵌入模型
- 开放权重:模型权重可供研究使用
性能表现
模型 |
平均 |
ESG餐厅人工 |
经济宏观多语言 |
AXA多语言 |
MIT生物 |
ESG餐厅合成 |
ESG餐厅合成多语言 |
MIT生物多语言 |
AXA |
经济宏观 |
ColNomic Embed多模态7B |
62.7 |
73.9 |
54.7 |
61.3 |
66.1 |
57.3 |
56.7 |
64.2 |
68.3 |
61.6 |
ColNomic Embed多模态3B |
61.2 |
65.8 |
55.4 |
61.0 |
63.5 |
56.6 |
57.2 |
62.5 |
68.8 |
60.2 |
T-Systems ColQwen2.5-3B |
59.9 |
72.1 |
51.2 |
60.0 |
65.3 |
51.7 |
53.3 |
61.7 |
69.3 |
54.8 |
Nomic Embed多模态7B |
59.7 |
65.7 |
57.7 |
59.3 |
64.0 |
49.2 |
51.9 |
61.2 |
66.3 |
63.1 |
GME Qwen2 7B |
59.0 |
65.8 |
56.2 |
55.4 |
64.0 |
54.3 |
56.7 |
55.1 |
60.7 |
62.9 |
Nomic Embed多模态3B |
58.8 |
59.8 |
57.5 |
58.8 |
62.5 |
49.4 |
49.4 |
58.6 |
69.6 |
63.5 |
Llama Index vdr-2b-multi-v1 |
58.4 |
63.1 |
52.8 |
61.0 |
60.6 |
50.3 |
51.2 |
56.9 |
68.8 |
61.2 |
Voyage多模态3 |
55.0 |
56.1 |
55.0 |
59.5 |
56.4 |
47.2 |
46.2 |
51.5 |
64.1 |
58.8 |
快速开始
使用colnomic-embed-multimodal-3b
前,请从源码安装colpali
pip install git+https://github.com/illuin-tech/colpali.git
import torch
from PIL import Image
from transformers.utils.import_utils import is_flash_attn_2_available
from colpali_engine.models import ColQwen2_5, ColQwen2_5_Processor
model_name = "nomic-ai/colnomic-embed-multimodal-3b"
model = ColQwen2_5.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="cuda:0",
attn_implementation="flash_attention_2" if is_flash_attn_2_available() else None,
).eval()
processor = ColQwen2_5_Processor.from_pretrained(model_name)
images = [
Image.new("RGB", (128, 128), color="white"),
Image.new("RGB", (64, 32), color="black"),
]
queries = [
"我们研发部门的组织结构是怎样的?",
"能否提供去年财务表现的详细分析?",
]
batch_images = processor.process_images(images).to(model.device)
batch_queries = processor.process_queries(queries).to(model.device)
with torch.no_grad():
image_embeddings = model(**batch_images)
query_embeddings = model(**batch_queries)
scores = processor.score_multi_vector(query_embeddings, image_embeddings)
模型架构
- 总参数量:30亿
- 训练方法:基于Qwen2.5-VL 3B Instruct微调
- 架构类型:统一处理文本和图像输入的视觉语言模型
- 关键创新:
- 同源采样创建更难的批次内负样本
- 多向量输出选项提升性能
与RAG工作流的集成
Nomic Embed多模态3B可无缝集成检索增强生成(RAG)工作流:
- 直接文档嵌入:跳过OCR和复杂处理,直接嵌入文档页面图像
- 更快处理:消除预处理步骤加速索引
- 更完整信息:在单个嵌入中捕获文本和视觉线索
- 简单实现:文本和图像使用相同API
推荐使用场景
该模型擅长处理挑战传统纯文本系统的真实文档检索场景:
- 研究论文:捕获公式、图表和表格
- 技术文档:编码代码块、流程图和截图
- 产品目录:呈现图像、规格和价格表
- 财务报告:嵌入图表、图形和数值数据
- 视觉丰富内容:布局和视觉信息重要的场景
- 多语言文档:视觉上下文提供重要线索的场景
训练细节
ColNomic Embed多模态3B通过多项关键创新开发:
-
同源采样:强制从同一数据源采样创建更难的批次内负样本,防止模型学习数据集伪影
-
多向量配置:提供比密集变体性能更高的多向量变体
局限性
- 处理非常规布局或特殊视觉元素的文档时性能可能波动
- 虽然支持多语言,但对英语内容表现最佳
- 处理大型复杂文档可能需要分块
- 手写体或高度风格化字体的文档性能可能降低
加入Nomic社区
引用
如果您在研究中使用了本模型,请考虑引用:
@misc{faysse2024colpaliefficientdocumentretrieval,
title={ColPali: 基于视觉语言模型的高效文档检索},
author={Manuel Faysse and Hugues Sibille and Tony Wu and Bilel Omrani and Gautier Viaud and Céline Hudelot and Pierre Colombo},
year={2024},
eprint={2407.01449},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2407.01449},
}
@misc{ma2024unifyingmultimodalretrievaldocument,
title={通过文档截图嵌入统一多模态检索},
author={Xueguang Ma and Sheng-Chieh Lin and Minghan Li and Wenhu Chen and Jimmy Lin},
year={2024},
eprint={2406.11251},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2406.11251},
}
@misc{nomicembedmultimodal2025,
title={Nomic多模态嵌入:用于视觉文档检索的交错文本、图像和截图},
author={Nomic团队},
year={2025},
publisher={Nomic AI},
url={https://nomic.ai/blog/posts/nomic-embed-multimodal},
}