/ Модель

Характеристики

Размер весов
15,1 ГБ
Лицензия
MIT
Архитектура
llava_next · dense
Базовая модель
llava-v1.6-mistral-7b-hf
Библиотека
sentence-transformers
Опубликована
15 мая 2025

BGE-VL-v1.5-zs

ЭмбеддингиТекст → embedding10 профессий

Мультимодальная модель BAAI для поиска и сопоставления изображений и текста по эмбеддингам.

137скачиваний за 30 дней9лайковвеса обновлены10 апр 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

BAAI/BGE-VL-v1.5-zs — мультимодальная модель эмбеддингов для поиска по изображениям и тексту, разработанная командой BAAI в рамках семейства BGE-VL. Она дообучена на базе llava-hf/llava-v1.6-mistral-7b-hf и использует архитектуру LLaVA-NeXT с плотным представлением; для работы применяются Sentence Transformers и веса Safetensors. Модель принимает текст, изображения или их сочетание и формирует эмбеддинги для мультимодального поиска и сравнения сходства. В README указано, что изображения для этой модели следует приводить к размеру 512×512; инструкции в запросе можно использовать для представления входа как поискового запроса, а без них — как кандидата.

Модель предназначена для поиска изображений по текстовому описанию, поиска по сочетанию изображения и текстового уточнения, а также для универсального мультимодального извлечения и сопоставления. В README семейство BGE-VL показывает сильные результаты в zero-shot-поиске с составными запросами по изображениям и на бенчмарке MMEB. Указанная лицензия — MIT. Карточка описывает результаты семейства и не приводит отдельные оценки именно этой версии; для корректной работы с изображениями требуется учитывать рекомендованный размер 512×512.

Сценарии применения

  • поиск изображений по текстовому описанию
  • поиск изображения по исходному изображению и текстовому уточнению
  • поиск похожих изображений в каталоге
  • мультимодальный поиск по коллекции изображений и текстовых запросов
  • сравнение сходства между текстом и изображением

Ограничения

Для изображений в README рекомендован размер 512×512. README приводит результаты семейства BGE-VL в целом и не указывает отдельные оценки для этой версии.

Для каких профессий подходит10

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

News

2025-4-13 🎉🎉 We have uploaded our MegaPairs dataset to 🤗Hugging Face, which contains over 26 million multimodal retrieval instruction-tuning triplets. To reduce upload time and enhance data accessibility, we resized all images to a resolution of 512 × 512 instead of using their original size. This adjustment has minimal impact on performance, considering that most vision-language models (e.g., CLIP) use even smaller input image sizes. Dataset Card

2025-4-2 🌟🌟 BGE-VL models are also available on WiseModel.

2025-3-6 📰📰 Thank you to SyncedTech (机器之心), QbitAI (量子位), and AI Era (新智元) for reporting on our work!

2025-3-4 🚀🚀 We have released the BGE-VL-MLLM models on Huggingface: BGE-VL-MLLM-S1 and BGE-VL-MLLM-S2. BGE-VL-MLLM-S1 is trained exclusively on our MegaPairs dataset, achieving outstanding performance in composed image retrieval, with an 8.1% improvement on the CIRCO benchmark (mAP@5) over the previous state-of-the-art. BGE-VL-MLLM-S2 builds on BGE-VL-MLLM-S1 with an additional epoch of fine-tuning on the MMEB benchmark training set, delivering enhanced performance across a broader range of multimodal embedding tasks.

2024-12-27 🚀🚀 BGE-VL-CLIP models are released on Huggingface: BGE-VL-base and BGE-VL-large.

2024-12-19 🎉🎉 Release our paper: MegaPairs: Massive Data Synthesis For Universal Multimodal Retrieval.

Release Plan

  • Paper
  • BGE-VL-base and BGE-VL-large models
  • BGE-VL-MLLM model
  • MegaPairs Dataset
  • Evaluation code examples
  • Fine-tuning code

Introduction

In this work, we introduce MegaPairs, a novel data synthesis method that leverages open-domain images to create heterogeneous KNN triplets for universal multimodal retrieval. Our MegaPairs dataset contains over 26 million triplets, and we have trained a series of multimodal retrieval models, BGE-VL, including BGE-VL-CLIP (base and large) and BGE-VL-MLLM.

BGE-VL achieve state-of-the-art performance on four popular zero-shot composed image retrieval benchmarks and the massive multimodal embedding benchmark (MMEB). Extensive experiments demonstrate the efficiency, scalability, and generalization features of MegaPairs. Please refer to our paper for more details.

Model Usage

Using Sentence Transformers

Install Sentence Transformers:

pip install sentence_transformers[image]

This model supports text, image, and combined text+image inputs. Images must be resized to 512x512, as the model was trained with that resolution. Pass a prompt with a task instruction to format inputs as queries, or omit it to format as candidates.

import torch
from sentence_transformers import SentenceTransformer
from PIL import Image

model = SentenceTransformer("BAAI/BGE-VL-v1.5-zs", model_kwargs={"torch_dtype": torch.float16})

# Composed image retrieval: text + image query
query_img = Image.open("./assets/cir_query.png").resize((512, 512))
query_emb = model.encode(
    {"text": "Make the background dark, as if the camera has taken the photo at night", "image": query_img},
    prompt="Retrieve the target image that best meets the combined criteria by using both the provided image and the image retrieval instructions: ",
)

# Image-only candidates (no prompt = candidate format)
candidate_imgs = [
    Image.open("./assets/cir_candi_1.png").resize((512, 512)),
    Image.open("./assets/cir_candi_2.png").resize((512, 512)),
]
candidate_embs = model.encode(candidate_imgs, batch_size=1)
print(candidate_embs.shape)
# (2, 4096)

similarities = model.similarity(query_emb, candidate_embs)
print(similarities)
# tensor([[0.3320, 0.1440]], dtype=torch.float16)

1. BGE-VL-CLIP Models

You can easily use BGE-VL-CLIP models based on transformers

Our code works well on transformers==4.45.2, and we recommend using this version.

import torch
from transformers import AutoModel

MODEL_NAME = "BAAI/BGE-VL-base" # or "BAAI/BGE-VL-large"

model = AutoModel.from_pretrained(MODEL_NAME, trust_remote_code=True) # You must set trust_remote_code=True
model.set_processor(MODEL_NAME)
model.eval()

with torch.no_grad():
    query = model.encode(
        images = "./assets/cir_query.png", 
        text = "Make the background dark, as if the camera has taken the photo at night"
    )

    candidates = model.encode(
        images = ["./assets/cir_candi_1.png", "./assets/cir_candi_2.png"]
    )
    
    scores = query @ candidates.T
print(scores)

See the demo for a complete example of using BGE-VL for multimodel retrieval.

2. BGE-VL-MLLM Models

Our code works well on transformers==4.45.2, and we recommend using this version.

import torch
from transformers import AutoModel
from PIL import Image

MODEL_NAME= "BAAI/BGE-VL-MLLM-S1"

model = AutoModel.from_pretrained(MODEL_NAME, trust_remote_code=True)
model.eval()
model.cuda()

with torch.no_grad():
    model.set_processor(MODEL_NAME)

    query_inputs = model.data_process(
        text="Make the background dark, as if the camera has taken the photo at night", 
        images="./assets/cir_query.png",
        q_or_c="q",
        task_instruction="Retrieve the target image that best meets the combined criteria by using both the provided image and the image retrieval instructions: "
    )

    candidate_inputs = model.data_process(
        images=["./assets/cir_candi_1.png", "./assets/cir_candi_2.png"],
        q_or_c="c",
    )

    query_embs = model(**query_inputs, output_hidden_states=True)[:, -1, :]
    candi_embs = model(**candidate_inputs, output_hidden_states=True)[:, -1, :]
    
    query_embs = torch.nn.functional.normalize(query_embs, dim=-1)
    candi_embs = torch.nn.functional.normalize(candi_embs, dim=-1)

    scores = torch.matmul(query_embs, candi_embs.T)
print(scores)

MegaPairs Dataset Card

We are excited to release the MegaPairs dataset on Hugging Face, which contains over 26 million training samples tailored for composed image retrieval and universal multimodal retrieval tasks.

Dataset Structure

Each entry in the dataset consists of the following fields:

  • q_img: str
    The file path to the query image.

  • q_text: list
    A list of textual query statements related to the query image. During training, you can randomly select one statement from this list.

  • t_img: str
    The file path to the target image, which serves as the positive example for the combination of q_img and q_text.

  • hns: list
    A list of file paths for hard negative sample images. These are challenging distractors that are visually or semantically similar to the query. It is recommended to include at least one hard negative sample during training, with hns[0] (the query image itself) being a mandatory choice. In our experiments, we used four hard negative samples per query.

Usage

The dataset is available for download and exploration on Hugging Face. We encourage researchers and practitioners to leverage this dataset to advance multimodal retrieval research and systems.

Model Performance

Zero-Shot Composed Image Retrieval

BGE-VL sets a new performance benchmark in zero-shot composed image retrieval tasks. On the CIRCO benchmark, our BGE-VL-base model, with only 149 million parameters, surpasses all previous models, including those with 50 times more parameters. Additionally, BGE-VL-MLLM achieves an 8.1% improvement over the previous state-of-the-art model.

Zero-Shot Performance on MMEB

BGE-VL-MLLM achieves state-of-the-art zero-shot performance on the Massive Multimodal Embedding Benchmark (MMEB), despite being trained only on the ImageText-to-Image paradigm. This demonstrates the excellent generalization capability of MegaPairs for multimodal embedding.

Fine-Tuning Performance on MMEB

After fine-tuning on downstream tasks, BGE-VL-MLLM maintains its leading performance. Notably, it surpasses the previous state-of-the-art by 7.1% on the MMEB out-of-distribution (OOD) set. These results demonstrate the robust generalization capability of BGE-VL-MLLM and highlight the potential of MegaPairs as foundational training data for universal multimodal embedding.

Performance Scaling

MegaPairs showcases scalability: BGE-VL-base improves as training data increases. It also demonstrates efficiency: with just 0.5M training samples, BGE-VL-base significantly outperforms MagicLens, which uses the same CLIP-base backbone and was trained on 36.7M samples.

License

The annotations for MegaPairs and the BGE-VL models are released under the MIT License. The images in MegaPairs originate from the Recap-Datacomp, which is released under the CC BY 4.0 license.

Citation

If you find this repository useful, please consider giving a star ⭐ and citation

@article{zhou2024megapairs,
  title={MegaPairs: Massive Data Synthesis For Universal Multimodal Retrieval},
  author={Zhou, Junjie and Liu, Zheng and Liu, Ze and Xiao, Shitao and Wang, Yueze and Zhao, Bo and Zhang, Chen Jason and Lian, Defu and Xiong, Yongping},
  journal={arXiv preprint arXiv:2412.14475},
  year={2024}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
LlavaNextForConditionalGeneration
Ревизия весов
a7ca461

0 моделей