CoolFace
Modelpublic

nanovdr/NanoVDR-Q-ModernBERT-Qwen3VL2B-2048

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
2likes26downloads
Model Card

<p align="center"> <img width="560" src="banner.png" alt="NanoVDR"/> </p>

Paper: NanoVDR: Distilling a 2B Vision-Language Retriever into a 70M Text-Only Encoder for Visual Document Retrieval | Blog

NanoVDR-Q-ModernBERT-Qwen3VL2B-2048

### ⚠️ This model was renamed It was published as `nanovdr/NanoVDR-L`. Old links and from_pretrained calls still resolve through a redirect, but please move to the new id. ``diff - SentenceTransformer("nanovdr/NanoVDR-L") + SentenceTransformer("nanovdr/NanoVDR-Q-ModernBERT-Qwen3VL2B-2048") ` **Why.** NanoVDR started as one thing: a small text encoder that replaces the query side of a large vision-language retriever. It has since grown a second tower that replaces the document side, and a second teacher, so a name like -S no longer says enough. Two checkpoints only work together when they were distilled from **the same teacher** into **the same width**, and neither fact was recoverable from the old names. The scheme is now NanoVDR-<Q|D>-<variant>-<teacher>-<width>[-ML], and the rule is simply that the teacher and the width have to match. This model is Q (query tower), ModernBERT (backbone), distilled from Qwen3-VL-Embedding-2B into 2048 dimensions. -ML used to be spelled -Multi`, which read as multi-vector when it meant multilingual.

ModernBERT-base ablation variant. For production use, we recommend [NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML](https://huggingface.co/nanovdr/NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML).

NanoVDR-Q-ModernBERT-Qwen3VL2B-2048 is a 151M-parameter text-only query encoder for visual document retrieval, trained via asymmetric cross-modal distillation from Qwen3-VL-Embedding-2B. It uses ModernBERT-base + a 2-layer MLP projector and achieves the highest v1 score (82.4) among all NanoVDR variants.

Highlights

  • —Single-vector retrieval — queries and documents share the same 2048-dim embedding space as Qwen3-VL-Embedding-2B; retrieval is a plain dot product, FAISS-compatible, 4 KB per page (float16)
  • —Lightweight on storage — 612 MB model; doc index costs 64× less than ColPali's multi-vector patches
  • —Asymmetric setup — tiny 151M text encoder at query time; large VLM indexes documents offline once

Results

ModelParamsViDoRe v1ViDoRe v2ViDoRe v3Avg Retention
Qwen3-VL-Emb (Teacher)2.0B84.365.350.0—
NanoVDR-Q-ModernBERT-Qwen3VL2B-2048151M82.461.544.293.4%
NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML69M82.261.946.595.1%

<sub>NDCG@5 (×100). Retention = Student / Teacher averaged across v1/v2/v3.</sub>

Usage

Prerequisite: Documents must be indexed offline using Qwen3-VL-Embedding-2B (the teacher model). See the NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML model page for a complete indexing guide.
python
from sentence_transformers import SentenceTransformer
import numpy as np

# doc_embeddings: (N, 2048) from teacher indexing (see prerequisite above)

model = SentenceTransformer("nanovdr/NanoVDR-Q-ModernBERT-Qwen3VL2B-2048")
query_embeddings = model.encode(["What was the revenue growth in Q3?"])  # (1, 2048)

scores = query_embeddings @ doc_embeddings.T
top_k_indices = np.argsort(scores[0])[-5:][::-1]

Training Details

Value
ArchitectureModernBERT-base (149M) + MLP projector (768 → 768 → 2048, 2.4M) = 151M
ObjectivePointwise cosine alignment with teacher query embeddings
Data711K query-document pairs
Epochs / lr20 / 2e-4
Training cost~11.7 GPU-hours (1× H200)
CPU query latency109 ms

All NanoVDR Models

ModelBackboneParamsv1v2v3Retention
[NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML](https://huggingface.co/nanovdr/NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML)DistilBERT69M82.261.946.595.1%
NanoVDR-Q-DistilBERT-Qwen3VL2B-2048DistilBERT69M82.260.543.592.4%
NanoVDR-Q-BERT-Qwen3VL2B-2048BERT-base112M82.162.244.794.0%
NanoVDR-Q-ModernBERT-Qwen3VL2B-2048ModernBERT151M82.461.544.293.4%

Want a system with no teacher at all?

Every model in this table targets Qwen3-VL-Embedding-2B at 2048 dimensions, so documents still have to be indexed by that 2B teacher. A second family targets the 8B teacher at 4096 dimensions and includes a document tower, so nothing multi-billion runs at indexing time either:

ModelRoleParams
NanoVDR-Q-DistilBERT-Qwen3VL8B-4096-MLquery tower70M
NanoVDR-D-HiRes-Qwen3VL8B-4096document tower457M
NanoVDR-D-Fast-Qwen3VL8B-4096document tower, 3x fewer visual tokens457M

The two families are not interchangeable: 2048-d and 4096-d vectors live in different spaces and will not score against each other.

Citation

bibtex
@article{nanovdr2026,
  title={NanoVDR: Distilling a 2B Vision-Language Retriever into a 70M Text-Only Encoder for Visual Document Retrieval},
  author={Liu, Zhuchenyang and Zhang, Yao and Xiao, Yu},
  journal={arXiv preprint arXiv:2603.12824},
  year={2026}
}

License

Apache 2.0