---
title: "Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers"
description: "Finetuning Qwen3-VL-Embedding-2B with Sentence Transformers for Visual Document Retrieval raised NDCG@10 from 0.888 to 0.947."
url: "https://swe.quest/articles/training-and-finetuning-multimodal-embedding-reranker-models-with-sentence-4630fc81c2fcf375"
canonical: "https://huggingface.co/blog/train-multimodal-sentence-transformers"
source: "Hugging Face"
published: "2026-04-16"
difficulty: "medium"
kind: "How-to"
reading_minutes: 17
tags: ["model-training","computer-vision","search","rag","python"]
---

# Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2026-04-16, 17 min read, How-to. Original: [https://huggingface.co/blog/train-multimodal-sentence-transformers](https://huggingface.co/blog/train-multimodal-sentence-transformers)

## Summary

Finetuning Qwen3-VL-Embedding-2B with Sentence Transformers for Visual Document Retrieval raised NDCG@10 from 0.888 to 0.947. On the author's evaluation data, that beats every tested VDR model, including models up to 4x larger. The walkthrough covers each training component: loading VLM or Router-composed multimodal models, formatting image/text triplet datasets, CachedMultipleNegativesRankingLoss with mini\_batch\_size=1 so a batch size of 64 fits in GPU memory via gradient caching, MatryoshkaLoss for truncatable embeddings (near-peak quality at 512 dims), training arguments, and an InformationRetrievalEvaluator built with hard negatives. It also extends the same approach to training multimodal rerankers.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Search](https://swe.quest/tags/search.md) (Backend & APIs)
- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- embedding models
- contrastive learning basics
- PyTorch training ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- information retrieval metrics ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))

## Keywords

Sentence Transformers, Qwen3-VL-Embedding-2B, CachedMultipleNegativesRankingLoss, MatryoshkaLoss, Visual Document Retrieval, NDCG@10, Hugging Face

## Related posts

- [Multimodal Embedding & Reranker Models with Sentence Transformers](https://swe.quest/articles/multimodal-embedding-reranker-models-with-sentence-transformers-20e85bafd6c145d3.md): Hugging Face · 2026-04-09 · Medium · 14 min read · RAG & retrieval, Search, Computer vision, Python, Machine learning
  Sentence Transformers v5.4 extends its familiar encode/similarity and CrossEncoder APIs to images, audio, video and mixed text-image inputs, mapping them into a shared embedding space for cross-modal search, visual document retrieval and multimodal RAG.
- [Training and Finetuning Multi-Vector Embedding Models with Sentence Transformers](https://swe.quest/articles/training-and-finetuning-multi-vector-embedding-models-with-sentence-transformers-454449569f0d4793.md): Hugging Face · 2026-08-26 · Medium · 27 min read · Model training, Search, Python, RAG & retrieval
  Sentence Transformers v6.0 adds a MultiVectorEncoder model type for ColBERT-style late-interaction retrieval, with a full training stack covering models, datasets, losses, training arguments, evaluators and the trainer.
- [NeoMME: an efficient Multimodal-native and Multilingual Encoder](https://swe.quest/articles/neomme-an-efficient-multimodal-native-and-multilingual-encoder-b7e59fda5215fa32.md): Hugging Face · 2026-09-03 · Hard · 11 min read · RAG & retrieval, Machine learning, Model training, Computer vision, Vector search
  NeoMME is a family of 260M and 800M multilingual multimodal encoders that feed text tokens and raw 32×32 image patches through a single bidirectional Transformer, trained from scratch with a masked discrete-diffusion text objective instead of reusing a vision tower or causal LM.
- [Visual Document Retrieval Goes Multilingual](https://swe.quest/articles/visual-document-retrieval-goes-multilingual-a925525d4c93b18e.md): Hugging Face · 2025-01-10 · Hard · 11 min read · RAG & retrieval, Model training, Evaluation, Computer vision, Vector search
  vdr-2b-multi-v1 is a multilingual embedding model that encodes document page screenshots into single dense vectors for OCR-free retrieval.
- [Multi-Vector (Late Interaction) Embedding Models with Sentence Transformers](https://swe.quest/articles/multi-vector-late-interaction-embedding-models-with-sentence-transformers-8580846e619b61eb.md): Hugging Face · 2026-08-18 · Medium · 39 min read · Search, Vector search, Python, RAG & retrieval
  Sentence Transformers v6.0 adds MultiVectorEncoder, a fourth model type for ColBERT-style late-interaction retrieval that loads PyLate, Stanford-NLP ColBERT and (with added config) colpali-engine checkpoints.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
