/ Модель

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

Лицензия
Apache 2.0
Архитектура
mistral_contrastive · dense
Библиотека
transformers
Опубликована
18 ноя 2026

Mistral-Multimodal-Embed-1B

ЭмбеддингиТекст → embedding
6 779скачиваний за 30 дней518лайковвеса обновлены1 дек 2026

Описание модели

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

Clipstral — мультимодальная модель Mistral AI, создающая общие эмбеддинги текста, изображений и видео для поиска и классификации.

Mistral Multimodal Embed, также известная как Clipstral, — разработанная Mistral AI модель с открытыми весами для получения общих эмбеддингов текста, изображений и видео. Она использует два контрастивно обученных энкодера и отображает все три типа входных данных в общее пространство размерности 1024. Модель содержит 1,24 млрд параметров: текстовый энкодер на 783 млн параметров, визуальный трансформер ViT на 409 млн и четырёхслойный пространственно-временной энкодер для видео на 50 млн параметров.

Clipstral предназначена для поиска по изображениям и видео с текстовым запросом и наоборот, визуального поиска по изображению или видео, классификации без дополнительного обучения, а также отбора и очистки мультимодальных датасетов. Видеокодировщик совместно обрабатывает токены кадров; при обучении и оценке использовались клипы из 16 кадров. Визуальный энкодер сохраняет исходные размер и соотношение сторон изображения, а текстовый поддерживает множество языков и использует токенизатор на 131 тыс. элементов. Все представления L2-нормализованы, поэтому для сравнения подходит косинусное сходство.

В описанных авторами тестах модель показала высокие результаты поиска изображений и видео среди открытых моделей размером до 4 млрд параметров, а также устойчивость к изменению разрешения. Модель распространяется по лицензии Apache-2.0. Для запуска используется Transformers с включённым trust_remote_code; README указывает протестированные версии библиотек и оборудования, но не приводит независимой оценки качества на произвольных пользовательских данных.

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

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

Ограничения

Результаты зависят от набора данных, разрешения и преобразования входных изображений; показатели в README получены по протоколу авторов и не гарантируют качество на пользовательских данных. Для видео в описанных обучении и оценке использовалось 16 кадров на клип.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

Открыть на Hugging Face

Mistral Multimodal Embed - Clipstral

📄 Paper | 📝 Blog post | 💻 GitHub

Mistral Multimodal Embed (codename Clipstral) is a 1.24B-parameter open-weight dual encoder that embeds images, videos and multilingual text into one shared 1,024-dimensional space. Matching text and visuals lie close together, so the same embeddings serve text-to-image and text-to-video search (and the reverse), visual search with an image or video as the query, zero-shot image and video classification, and dataset curation such as deduplication and filtering of mismatched pairs.

  • Native resolution and aspect ratio. The vision transformer processes each image at its native size and aspect ratio, and accuracy stays stable from 224 to 1036 px.
  • Video. A lightweight spatio-temporal encoder attends jointly to the patch tokens of all frames (16 frames per clip in training and evaluation).
  • Long, multilingual text. The text tower has a 131k-entry multilingual tokenizer and no fixed context limit.
  • Compact and fast. 1.24B parameters in total. Videos add only a 4-layer encoder on top of the per-frame vision transformer, so large image and video collections can be indexed on a single NVIDIA H100.

This repository is a self-contained package: the weights, tokenizer, image processor and all custom inference code are included. The GitHub repository adds a Gradio demo, an example notebook and the example media used below.

Results

We compared Clipstral with 13 open-weight encoders up to 4B parameters, plus Qwen3-VL-Embedding-8B as a larger reference, under one zero-shot protocol: 37 benchmarks (6 image retrieval, 18 image classification, 5 video retrieval, 8 video classification), each model evaluated at 224, 336, 672 and 1036 px with three input transforms, keeping its best score per dataset (best over resolutions and transforms). Retrieval is recall at rank 1 (R@1), averaged over both directions; classification is top-1 accuracy.

Among models up to 4B parameters, Clipstral is the best image and video retriever and ranks second on image and video classification, behind models 1.7–2x its size.

ModelParamsImage retrievalImage classificationVideo retrievalVideo classification
Clipstral1.24B80.279.264.057.0
PE-Core-L0.67B67.978.855.452.5
PE-Core-G2.42B71.081.660.955.1
MetaCLIP 2-H1.86B74.076.246.048.1
MetaCLIP 2-bigG3.63B75.579.146.649.7
SigLIP2-So400m1.14B73.177.946.749.3
SigLIP2-g1.87B73.478.447.450.0
TIPSv2-L0.49B60.167.443.639.2
TIPSv2-g1.53B62.369.747.441.2
VideoPrism-LvT-L0.58B––58.551.5
EmbeddingGemma 20.44B75.869.061.049.9
C-RADIOv4-So400m1.15B75.176.146.446.8
C-RADIOv4-H1.37B75.677.347.547.6
Qwen3-VL-Embedding-2B2.13B77.569.561.957.8
Qwen3-VL-Embedding-8B (reference)8.14B82.772.966.261.7

Bold: best, underlined: second best among models up to 4B parameters. Qwen3-VL-Embedding and EmbeddingGemma 2 use task-tuned instructions. Per-benchmark results, the evaluation protocol and the throughput measurements are in the paper.

Focused evaluations:

  • Long captions. On a long-caption retrieval suite (DOCCI, ActivityNet Captions, PVD and DiDeMo), Clipstral has the highest mean R@1 among models up to 4B parameters (71.2, vs 69.8 for Qwen3-VL-Embedding-2B and 69.7 for EmbeddingGemma 2).
  • Multilingual retrieval. On XM3600 (36 languages), Clipstral reaches 59.7 R@1 over all languages, the best among models up to 4B parameters, and 59.7 on the 35 non-English languages vs 57.8 in English.
  • Resolution robustness. Clipstral's performance remains consistent across resolutions, from 224 to 1036 pixels. For instance, on video retrieval, its mean R@1 varies by less than one point (62.9 to 63.8). Other models lose accuracy significantly at high or low resolutions: PE-Core-L drops by 17 points at 1036 px (from 55.2 to 38.2) and VideoPrism-LvT-L by 11 (from 58.3 to 47.3), while TIPSv2-g drops by 16 points at 224 px (from 47.4 to 31.8) and EmbeddingGemma 2 by 8 (from 61.0 to 52.7).

Installation

The package is tested with python 3.13, transformers 4.57 / 5.8 / 5.18 / 5.23, on CPU (float32) and on NVIDIA GPU (bfloat16).

To run the demos of the GitHub repository, use uv from the repository root:

uv sync

The torch build is selected automatically via environment markers (see [tool.uv.sources] in pyproject.toml): CUDA 13.0 on Linux, CPU-only on macOS and Windows, so plain uv sync and uv run python app.py always install the right build for the current platform. For other accelerators, follow the uv PyTorch guide.

Quick start

Using Sentence Transformers

You can load the model using Sentence Transformers by passing trust_remote_code=True.

# pip install sentence-transformers[image,video] opencv-python-headless torchcodec
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("mistralai/mistral-multimodal-embed-1B", trust_remote_code=True)

texts = ["iconic windmill", "a gothic cathedral", "a statue in a sunny square"]
images = [
    "https://raw.githubusercontent.com/mistralai/mistral-multimodal-embed/main/assets/images/image_00.jpg",
    "https://raw.githubusercontent.com/mistralai/mistral-multimodal-embed/main/assets/images/image_01.jpg",
]
video = "https://raw.githubusercontent.com/mistralai/mistral-multimodal-embed/main/assets/videos/video_02.mp4"

# encode() detects the input modality automatically
text_embeddings = model.encode(texts)
image_embeddings = model.encode(images)
video_embedding = model.encode(video)
print(text_embeddings.shape, image_embeddings.shape, video_embedding.shape)
# (3, 1024) (2, 1024) (1024,)

# Compute cosine similarity
image_text_similarity = model.similarity(image_embeddings, text_embeddings)
video_text_similarity = model.similarity(video_embedding, text_embeddings)
print(image_text_similarity)
# tensor([[0.1953, 0.1275, 0.1447],
#         [0.1071, 0.2144, 0.1063]])
print(video_text_similarity)
# tensor([[0.1495, 0.1446, 0.3000]])

For other ways to pass images and videos to encode(), see the Sentence Transformers input formats guide.

Using Transformers

The model code ships with the weights and loads with trust_remote_code=True. The snippets below run in order as one script, from any folder: the three example files (under 1 MB) are downloaded from the GitHub repository. Replace them with your own files to embed your data.

import urllib.request

import cv2
import numpy as np
import torch
from PIL import Image
from transformers import AutoImageProcessor, AutoModel, AutoTokenizer

repo_id = "mistralai/mistral-multimodal-embed-1B"
assets = "https://raw.githubusercontent.com/mistralai/mistral-multimodal-embed/main/assets"
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.bfloat16 if device == "cuda" else torch.float32

model = AutoModel.from_pretrained(repo_id, trust_remote_code=True, dtype=dtype).eval().to(device)
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
processor = AutoImageProcessor.from_pretrained(repo_id, trust_remote_code=True)

# --- text ---
texts = ["iconic windmill", "a gothic cathedral", "a statue in a sunny square"]
tok = tokenizer(texts, padding=True, return_tensors="pt")
with torch.inference_mode():
    text_features = model.get_text_features(tok.input_ids.to(device), tok.attention_mask.to(device))

# --- images ---
image_paths = [urllib.request.urlretrieve(f"{assets}/images/image_0{i}.jpg", f"image_0{i}.jpg")[0] for i in (0, 1)]
images = [Image.open(path).convert("RGB") for path in image_paths]
pixel_values = [p.to(device=device, dtype=dtype) for p in processor(images)["pixel_values"]]
with torch.inference_mode():
    image_features = model.get_image_features(pixel_values)

print(image_features @ text_features.T)  # (num_images, num_texts) cosine similarities

The default keep_ratio transform preserves each image's aspect ratio, so images can have different shapes and the processor returns a list of tensors (with squash or center_crop, it returns one stacked tensor). All returned features are L2-normalized 1,024-dimensional float32 tensors, so a dot product is a cosine similarity.

Videos

A video is embedded from 16 evenly spaced frames, here decoded with OpenCV and encoded at 224 px:

def read_frames(path: str, num_frames: int = 16) -> list[Image.Image]:
    capture = cv2.VideoCapture(path)
    frame_count = int(capture.get(cv2.CAP_PROP_FRAME_COUNT))
    assert frame_count > 0, f"could not read the frame count of {path}"
    frames = []
    for index in np.linspace(0, frame_count - 1, num_frames).round().astype(int):
        capture.set(cv2.CAP_PROP_POS_FRAMES, int(index))
        ok, bgr = capture.read()
        assert ok, f"could not decode frame {index} of {path}"
        frames.append(Image.fromarray(cv2.cvtColor(bgr, cv2.COLOR_BGR2RGB)))
    capture.release()
    return frames


video_path = urllib.request.urlretrieve(f"{assets}/videos/video_02.mp4", "video_02.mp4")[0]
video_processor = AutoImageProcessor.from_pretrained(repo_id, trust_remote_code=True, size=224)
frames = video_processor(read_frames(video_path))["pixel_values"]
video = torch.stack(frames).to(device=device, dtype=dtype)  # (16, 3, H, W)
with torch.inference_mode():
    video_features = model.get_video_features([video])  # (1, 1024)

print(video_features @ text_features.T)  # (num_videos, num_texts)

Frame order matters. get_video_features accepts either a (B, T, 3, H, W) tensor or a list of (T, 3, H, W) clips; use a list when your videos have different frame counts or sizes. The processor also accepts decoded uint8 frame tensors, for example from torchcodec.

Demos

The GitHub repository includes:

  • Gradio app (app.py): run uv run python app.py and open http://localhost:7860. One tab searches the example images and videos with text; the other classifies example photos by city, zero-shot.
  • Notebook (example.ipynb): text-to-image/video and image-to-image retrieval and zero-shot classification, to run locally or on Colab.

Model details

  • Parameters: 1.24B in total: vision transformer 409M, spatio-temporal encoder 50M, text tower 783M.
  • Embedding: 1,024 dimensions, shared by text, images, and videos.
  • Vision tower: 24-layer ViT, hidden size 1,024, patch size 14, 2D RoPE, and 2x2 patch merging. Images are pooled with a global max (amax).
  • Video path: each frame goes through the vision tower. A 4-layer temporal encoder with 3D RoPE then attends across all frames' tokens jointly, and a global max pool produces one embedding per clip.
  • Text tower: 14 layers, hidden size 1,792, causal attention with RoPE. The text embedding is taken at the end-of-sequence token.

The exact settings are in config.json.

Preprocessing details

  • Default transform: keep_ratio at 448 px. The longer side is resized to 448 and the aspect ratio is preserved. Each side is rounded to a multiple of 28 (patch size 14 x patch merge 2). Resizing uses OpenCV INTER_AREA.
  • Other transforms: squash resizes to a square and ignores the aspect ratio. center_crop takes a square center crop. Both return size x size tensors, and size must be a multiple of 28.
  • Normalization: mean (0.48145466, 0.4578275, 0.40821073) and standard deviation (0.26862954, 0.26130258, 0.27577711).
  • Without OpenCV: pass use_cv2_resize=False to resize with torchvision instead. The resulting pixels differ slightly from the default OpenCV resize.
  • Text: the tokenizer adds the begin- and end-of-sequence tokens automatically. The end-of-sequence token is required, because the text embedding is read from it. Padding is on the right.

Scope

  • Short videos. Video training uses clips of up to about one minute, represented by 16 frames. Longer videos likely need more frames or segment-level aggregation.
  • One input at a time. Each input is embedded on its own (an image, a video, or a text); mixed inputs such as image plus text are not encoded jointly. Late fusion is possible: embed each input separately and combine the embeddings, for example by averaging them.
  • Content. The model targets natural images and videos. Documents, OCR-heavy content and code are out of scope for this release.

Files

FilePurpose
model.safetensors, config.jsonWeights and model configuration
modeling_mistral_contrastive.py, configuration_mistral_contrastive.pyModel code, loaded by AutoModel
image_processing_mistral_contrastive.py, image_transforms.pyImage processor, loaded by AutoImageProcessor
preprocessor_config.jsonDefault transform and resolution
tokenizer.json, tokenizer_config.json, special_tokens_map.jsonTokenizer

Citation

@misc{clipstral2026,
  title         = {Clipstral: Image, Video, and Multilingual Text Embedder},
  author        = {Tomasini, Umberto and Baldassarre, Federico and Menneer, Rupert and Futeral, Matthieu and
                   Somerville Roberts, Josselin and Andr{\'e}, Matthieu and Thimonier, Hugo and Cha, Sean and
                   Tep, Kilian and Gottlob, Emmanuel and Hodan, Tomas and Vaze, Sagar and others},
  year          = {2026},
  eprint        = {2611.40240},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2611.40240}
}

License

Apache License 2.0 - see LICENSE.

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

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

GPU в ailist

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

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

Подбираем GPU…

Ревизия весов
bfdaf7b

0 моделей