Mistral Multimodal Embed 1B MLX

Clipstral runs on Apple Silicon through the included MLX implementation. Each preset contains the text, spatial vision, and temporal towers. Text, images, and videos produce L2-normalized float32 vectors with 1,024 dimensions in the same space. See the upstream model card for model capabilities and citations.

Preset Purpose Weights
4-bit Compact 821 MB
6-bit Balanced 1.07 GB
8-bit High fidelity 1.32 GB
FP16 Reference 2.48 GB

The quantized presets use MLX affine weight-only quantization in groups of 64. Dense layers run with native MLX quantized matrix multiplications. The text token table uses 8-bit quantization in all three presets. The projection heads, norms, and patch convolution use FP16.

Install and run

Download one preset and the shared loader, tokenizer, and processor files. The example uses the supplied Clipstral loader on the Metal GPU.

hf download notnotsamuel/mistral-multimodal-embed-1B-MLX \
  --include '*.py' --include '*.json' --include 'requirements.txt' \
  --include 'weights/4bit.safetensors' --local-dir ./clipstral-mlx
cd clipstral-mlx
python -m pip install -r requirements.txt
python inference.py --preset 4bit --text 'A red bicycle' 'Un vรฉlo rouge'

For images, add --images bicycle.jpg to the text command to print cosine similarities. For a video clip, supply RGB frames in chronological order with --frames frame01.jpg frame02.jpg frame03.jpg. The frames of a clip must have the same preprocessed size. Use --size to set a long edge in multiples of 28. The default is 448 pixels. Use --output embeddings.npz to save the vectors.

For Python applications, clipstral.load(directory, preset) returns an MLX module with get_text_features, get_image_features, and get_video_features. The image method accepts a [batch, 3, height, width] MLX array or a list of [3, height, width] arrays. The video method takes a list of [frames, 3, height, width] arrays. See inference.py for preprocessing and conversion to MLX arrays.

See the validation results for comparisons with the PyTorch reference. The conversion uses the pinned source revision under Apache 2.0.

Downloads last month
-
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for notnotsamuel/mistral-multimodal-embed-1B-MLX

Finetuned
(2)
this model