Mistral Multimodal Embed 1B (Clipstral) · GGUF
Mistral’s Clipstral encodes text, images and video clips as normalized 1,024-dimensional vectors. A dot product scores how well a caption matches a photo or a clip. The text, vision and temporal encoders are packaged together. Original checkpoint and model card
Quantized files
| File | Size | Flickr30k text→image R@1 | MSR-VTT text→video R@1 |
|---|---|---|---|
| Upstream BF16 (reference) | — | 82.20% | 65.62% |
| Q8_0 | 1,321.5 MB | 82.22% | 65.62% |
| Original Q8_0 without calibration | — | 82.22% | 65.23% |
| Q4_0 | 701.1 MB | 81.54% | 65.23% |
| Original Q4_0 without calibration | — | 81.18% | 62.89% |
| Q3_K | 569.3 MB | 80.14% | 63.67% |
| Q2_K | 467.4 MB | 75.78% | 61.72% |
Calibration and evaluation
The importance matrix records the diagonal second moment of the inputs to all 293 linear weight matrices in the text, vision and temporal encoders. The token embedding table uses the original Q4_0 or Q8_0 blocks. In the compact presets it uses Q4_0 blocks, and both projection heads use calibrated Q8_0. The other 124 tensors use FP32.
Calibration uses Flickr30k train images and captions and MSR-VTT train_7k videos and captions. Evaluation uses 1,000 Flickr30k test images and 256 MSR-VTT test_1k clips. Each clip uses up to eight uniformly sampled frames. The reference evaluates the upstream BF16 checkpoint in FP32. The metrics include both retrieval directions, R@1/5/10, agreement with the reference ranking and embedding cosine drift.
Metrics · Layer coverage · Importance matrix · SHA-256 manifest
Run on CPU
Set MODEL_REPO in the download command to the Hugging Face repository containing these files. Use the included Python loader for this custom mistral_contrastive architecture. It memory-maps the GGUF, decodes each linear layer to FP32 for its matrix multiply, and reads only the embedding rows selected by the tokenizer. Native llama.cpp and Atomic Chat inference are currently unverified.
pip install 'torch==2.9.1' 'torchvision==0.24.1' 'transformers==5.17.0' 'gguf==0.19.0' 'pillow>=10' 'numpy<2' 'opencv-python-headless==4.11.0.86' huggingface_hub
hf download MODEL_REPO --local-dir clipstral --include '*.py' --include '*.json' --include '*Q4_0.gguf'
cd clipstral
from pathlib import Path
import torch
from transformers import AutoTokenizer
from load_clipstral import load_clipstral
model = load_clipstral(Path("Mistral-Multimodal-Embed-1B-Q4_0.gguf"))
tokenizer = AutoTokenizer.from_pretrained(".", trust_remote_code=True)
tokens = tokenizer(["a blue gift box", "синяя подарочная коробка"],
padding=True, return_tensors="pt")
with torch.inference_mode():
vectors = model.get_text_features(tokens.input_ids, tokens.attention_mask)
print(vectors.shape) # torch.Size([2, 1024])
print((vectors[0] @ vectors[1]).item())
For photos and clips, install torchvision matching your PyTorch build and opencv-python-headless for the default resize. Load the included processor with AutoImageProcessor.from_pretrained(".", trust_remote_code=True). Pass its list of CPU pixel tensors to model.get_image_features(pixels). For video, stack the processed frames in chronological order and call model.get_video_features([torch.stack(pixels)]). Mistral’s image and video examples
Provenance
Model and original inference code by Mistral AI. Calibration and GGUF conversion by AtomicChat. The upstream revision is 4d0e936674cff0439f1727058fcf98fc15066090. Apache 2.0 license
- Downloads last month
- -
Model tree for AtomicChat/Mistral-Multimodal-Embed-1B-GGUF
Base model
mistralai/Mistral-Multimodal-Embed-1B