Ryenhails commited on
Commit
58d4237
·
verified ·
1 Parent(s): e9e08e7

Present NanoVDR, DistilVDR and ColNanoVDR as one family, with current model names

Browse files
Files changed (1) hide show
  1. README.md +62 -87
README.md CHANGED
@@ -8,113 +8,86 @@ pinned: false
8
  ---
9
 
10
  <p align="center">
11
- <img width="480" src="https://huggingface.co/nanovdr/NanoVDR-S-Multi/resolve/main/banner.png" alt="NanoVDR"/>
12
  </p>
13
 
14
- <h3 align="center">Distilling a 2B Vision-Language Retriever into a 70M Text-Only Encoder<br>for Visual Document Retrieval</h3>
15
 
16
  <p align="center">
 
17
  <a href="https://github.com/Ryenhails/NanoVDR">Code</a> &nbsp;|&nbsp;
18
  <a href="https://huggingface.co/spaces/nanovdr/NanoVDR-Demo">Demo</a> &nbsp;|&nbsp;
19
- <a href="https://arxiv.org/abs/2603.12824">Paper</a> &nbsp;|&nbsp;
20
  <a href="https://huggingface.co/blog/Ryenhails/nanovdr">Blog</a> &nbsp;|&nbsp;
21
  <a href="https://huggingface.co/datasets/nanovdr/NanoVDR-Train">Dataset</a>
22
  </p>
23
 
24
- > **Paper**: [NanoVDR: Distilling a 2B Vision-Language Retriever into a 70M Text-Only Encoder for Visual Document Retrieval](https://arxiv.org/abs/2603.12824)
 
 
 
25
 
26
- ---
27
-
28
- **NanoVDR** distills a frozen 2B VLM teacher ([Qwen3-VL-Embedding-2B](https://huggingface.co/Qwen/Qwen3-VL-Embedding-2B)) into tiny **text-only** query encoders (69–151M parameters) for visual document retrieval. Documents are indexed offline by the teacher; queries are encoded on CPU in **51 ms** via a DistilBERT forward pass — **no vision model at query time**.
29
-
30
- Queries and documents both map to the same **2048-dim single vector** inherited from the teacher's embedding space, so retrieval is a plain dot product — FAISS-compatible with no MaxSim pooling. The doc index stores just **4 KB per page** (float16), making NanoVDR **64× more storage-efficient** than multi-vector retrievers like ColPali.
31
-
32
- The org also hosts **[ColNanoVDR](#colnanovdr)** ([paper](https://arxiv.org/abs/2609.34899)), which carries the same document-free
33
- distillation to multi-vector, late-interaction retrievers.
34
-
35
- ## NanoVDR models
36
-
37
- | Model | Backbone | Params | ViDoRe v1 | v2 | v3 | Retention | CPU Latency |
38
- |-------|----------|--------|-----------|----|----|-----------|-------------|
39
- | [**NanoVDR-M-Multi**](https://huggingface.co/nanovdr/NanoVDR-M-Multi) ⭐ | BERT-base | **112M** | **82.5** | **62.8** | **47.5** | **96.4%** | **101 ms** |
40
- | [**NanoVDR-L-Multi**](https://huggingface.co/nanovdr/NanoVDR-L-Multi) ⭐ | ModernBERT | **151M** | **82.2** | **63.1** | **47.1** | **96.0%** | **109 ms** |
41
- | [**NanoVDR-S-Multi**](https://huggingface.co/nanovdr/NanoVDR-S-Multi) ⭐ | DistilBERT | **69M** | **82.2** | **61.9** | **46.5** | **95.1%** | **51 ms** |
42
- | [NanoVDR-S](https://huggingface.co/nanovdr/NanoVDR-S) | DistilBERT | 69M | 82.2 | 60.5 | 43.5 | 92.4% | 51 ms |
43
- | [NanoVDR-M](https://huggingface.co/nanovdr/NanoVDR-M) | BERT-base | 112M | 82.1 | 62.2 | 44.7 | 94.0% | 101 ms |
44
- | [NanoVDR-L](https://huggingface.co/nanovdr/NanoVDR-L) | ModernBERT | 151M | 82.4 | 61.5 | 44.2 | 93.4% | 109 ms |
45
 
46
- <sub>NDCG@5 (×100) on the ViDoRe benchmark (22 datasets). Retention = Student / Teacher. Teacher = Qwen3-VL-Embedding-2B (2.0B).</sub>
47
-
48
- ## Quick Start
 
49
 
50
  ```python
51
  from sentence_transformers import SentenceTransformer
52
 
53
- model = SentenceTransformer("nanovdr/NanoVDR-S-Multi")
54
- query_emb = model.encode(["What was the revenue growth in Q3 2024?"]) # (1, 2048)
55
-
56
- # Retrieve via cosine similarity against teacher-indexed document embeddings
57
- # scores = query_emb @ doc_embeddings.T
58
- ```
59
-
60
- > Documents must be indexed offline with the teacher VLM. See the [NanoVDR-S-Multi](https://huggingface.co/nanovdr/NanoVDR-S-Multi#prerequisites-document-indexing-with-teacher-model) model page for a complete guide.
61
-
62
- ## ColNanoVDR
63
-
64
- <p>
65
- <a href="https://arxiv.org/abs/2609.34899">Paper</a> &nbsp;|&nbsp;
66
- <a href="https://huggingface.co/spaces/nanovdr/NanoVDR-Demo">Demo</a> (select ColNanoVDR) &nbsp;|&nbsp;
67
- <a href="https://github.com/Ryenhails/NanoVDR">Code</a>
68
- </p>
69
-
70
- **ColNanoVDR** extends the same idea from single-vector retrieval to **multi-vector,
71
- late-interaction** retrievers (ColPali-style models such as ColQwen3.5, Vultron, Tomoro
72
- and ColVec). A text-only query tower is distilled **document-free** — from cached teacher
73
- *query* token embeddings only, with no page image ever encoded and no relevance label —
74
- into the teacher's late-interaction space. An existing multi-vector page index is scored
75
- by MaxSim unchanged, and no vision-language model runs at query time.
76
-
77
- | Model | Backbone | Params | Teacher | Width | v1 | v2 | v3 | Retention |
78
- |---|---|---|---|---|---|---|---|---|
79
- | [**ColNanoVDR-Q-Ettin400M-ColQwen35-320-ML**](https://huggingface.co/nanovdr/ColNanoVDR-Q-Ettin400M-ColQwen35-320-ML) | Ettin-400M | 395M | ColQwen3.5-4.5B | 320 | **91.16** | **62.08** | **56.65** | **98.1%** |
80
- | [**ColNanoVDR-Q-Ettin150M-ColQwen35-320-ML**](https://huggingface.co/nanovdr/ColNanoVDR-Q-Ettin150M-ColQwen35-320-ML) ⭐ | Ettin-150M | **150M** | ColQwen3.5-4.5B | 320 | 90.67 | 60.01 | 55.06 | 96.1% |
81
- | [ColNanoVDR-Q-Ettin150M-Vultron45B-320-ML](https://huggingface.co/nanovdr/ColNanoVDR-Q-Ettin150M-Vultron45B-320-ML) | Ettin-150M | 150M | Vultron-4.5B | 320 | 91.28 | 64.96 | 58.30 | 97.3% |
82
- | [ColNanoVDR-Q-Ettin150M-Tomoro8B-320-ML](https://huggingface.co/nanovdr/ColNanoVDR-Q-Ettin150M-Tomoro8B-320-ML) | Ettin-150M | 150M | Tomoro-8B | 320 | 89.95 | 60.61 | 54.87 | 95.7% |
83
- | [ColNanoVDR-Q-Ettin150M-ColVec4B-640-ML](https://huggingface.co/nanovdr/ColNanoVDR-Q-Ettin150M-ColVec4B-640-ML) † | Ettin-150M | 150M | ColVec1.1-4b | 640 | 90.27 | 64.03 | 59.08 | 97.4% |
84
- | [ColNanoVDR-Q-Ettin150M-ColVec8B-640-ML](https://huggingface.co/nanovdr/ColNanoVDR-Q-Ettin150M-ColVec8B-640-ML) † | Ettin-150M | 150M | ColVec1.1-8b | 640 | 90.86 | 65.37 | 60.10 | 97.5% |
85
- | [ColNanoVDR-Q-Ettin150M-EVIE45B-2048-ML](https://huggingface.co/nanovdr/ColNanoVDR-Q-Ettin150M-EVIE45B-2048-ML) ‡ | Ettin-150M | 150M | EVIE-4.5B | 2048 (MRL) | – | – | 60.19 | 95.2% |
86
- | [ColNanoVDR-Q-Ettin150M-EVIE8B-4096-ML](https://huggingface.co/nanovdr/ColNanoVDR-Q-Ettin150M-EVIE8B-4096-ML) | Ettin-150M | 150M | EVIE-8B | 4096 | – | – | 60.05 | 94.0% |
87
-
88
- <sub>NDCG@5 (×100) on ViDoRe (22 datasets), query side measured in isolation against
89
- teacher-encoded pages. Retention = Student / Teacher, averaged over v1–v3. † inherits the
90
- webAI Non-Commercial License from its teacher. ‡ Prefix-MRL tower, servable at any width from 64 to 2048
91
- to match the teacher; shown at 2048 (see the model card for
92
- every width and for HAC-compressed indexes). Both EVIE towers are evaluated on ViDoRe v3 only.</sub>
93
-
94
- ```python
95
- from sentence_transformers import MultiVectorEncoder
96
-
97
- model = MultiVectorEncoder(
98
- "nanovdr/ColNanoVDR-Q-Ettin150M-ColQwen35-320-ML", trust_remote_code=True
99
- )
100
- q = model.encode_query(["What was the revenue growth in Q3 2024?"]) # list of (n_tokens, 320)
101
-
102
- scores = model.similarity(q, page_embeddings) # meanMaxSim
103
  ```
104
 
105
- > Pages must be indexed offline with the matching teacher. **A tower is only valid with
106
- > the teacher it was distilled from: the teacher and the width must both match.** See each
107
- > model page for the indexing step.
108
-
109
- ## Citation
110
 
111
  ```bibtex
112
- @article{nanovdr2026,
113
- title = {NanoVDR: Distilling a 2B Vision-Language Retriever into a 70M
114
- Text-Only Encoder for Visual Document Retrieval},
115
- author = {Liu, Zhuchenyang and Zhang, Yao and Xiao, Yu},
116
- journal = {arXiv preprint arXiv:2603.12824},
117
- year = {2026}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  }
119
 
120
  @misc{liu2026colnanovdrdocumentfreequerydistillation,
@@ -128,6 +101,8 @@ scores = model.similarity(q, page_embeddings) # meanMaxSim
128
  }
129
  ```
130
 
 
 
131
  ## Acknowledgements
132
 
133
  This project has received funding from the **Business Finland** co-innovation programme under grant agreement No. 69/31/2025. It is supported by the [AiWo: Human-centric AI-enabled Collaborative Fieldwork Operations](https://aifieldwork.aalto.fi/events/) project (2025–2027), which aims to revolutionize fieldwork operations and enhance human-AI collaboration across the manufacturing, construction, and industrial design sectors. The calculations presented in this project were performed using computer resources within the Aalto University School of Science "Science-IT" project.
 
8
  ---
9
 
10
  <p align="center">
11
+ <img width="480" src="https://huggingface.co/nanovdr/NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML/resolve/main/banner.png" alt="NanoVDR"/>
12
  </p>
13
 
14
+ <h3 align="center">Efficient visual document retrieval with small distilled encoders</h3>
15
 
16
  <p align="center">
17
+ <a href="https://ryenhails.github.io/NanoVDR/">Project page</a> &nbsp;|&nbsp;
18
  <a href="https://github.com/Ryenhails/NanoVDR">Code</a> &nbsp;|&nbsp;
19
  <a href="https://huggingface.co/spaces/nanovdr/NanoVDR-Demo">Demo</a> &nbsp;|&nbsp;
 
20
  <a href="https://huggingface.co/blog/Ryenhails/nanovdr">Blog</a> &nbsp;|&nbsp;
21
  <a href="https://huggingface.co/datasets/nanovdr/NanoVDR-Train">Dataset</a>
22
  </p>
23
 
24
+ Small query and page encoders for **visual document retrieval**, trained by aligning to the
25
+ embedding space of a frozen vision-language retriever. A text encoder answers each query, so
26
+ no multi-billion model runs per request. Pages stay in the teacher's index, or move to a small
27
+ page encoder.
28
 
29
+ | | Paper | Replaces the teacher at | Start with | In one line |
30
+ |---|---|---|---|---|
31
+ | **[NanoVDR](https://huggingface.co/collections/nanovdr/nanovdr-6ae10ea369744e5cad2172e1)** | [EMNLP 2026 Main](https://aclanthology.org/2026.emnlp-main.71/) | query time, single vector | [NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML](https://huggingface.co/nanovdr/NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML) | 69M, 51 ms per query on one CPU thread, 95.1% of a 2B teacher |
32
+ | **[DistilVDR](https://huggingface.co/collections/nanovdr/distilvdr-6ae10ea58166c778925c8030)** | [DocInsights @ EMNLP 2026](https://aclanthology.org/2026.docinsights-1.26/) | query and indexing time | [NanoVDR-D-HiRes-Qwen3VL8B-4096](https://huggingface.co/nanovdr/NanoVDR-D-HiRes-Qwen3VL8B-4096) + [NanoVDR-Q-DistilBERT-Qwen3VL8B-4096-ML](https://huggingface.co/nanovdr/NanoVDR-Q-DistilBERT-Qwen3VL8B-4096-ML) | 527M end to end, no teacher at serving |
33
+ | **[ColNanoVDR](https://huggingface.co/collections/nanovdr/colnanovdr-6ae10ea62a88a2be605b93d2)** | [arXiv 2609.34899](https://arxiv.org/abs/2609.34899) | query time, multi-vector | [ColNanoVDR-Q-Ettin150M-ColQwen35-320-ML](https://huggingface.co/nanovdr/ColNanoVDR-Q-Ettin150M-ColQwen35-320-ML) | 95.7-98.1% teacher retention across five late-interaction teachers, no page image in training |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
+ Model names read `[Col]NanoVDR-<Q|D>-<variant>-<teacher>-<width>[-ML]`. A query encoder and a
36
+ page index work together only when the **teacher and the width both match**. Every model card
37
+ carries its results, usage and indexing step; the
38
+ [project page](https://ryenhails.github.io/NanoVDR/) has the full tables.
39
 
40
  ```python
41
  from sentence_transformers import SentenceTransformer
42
 
43
+ query = SentenceTransformer("nanovdr/NanoVDR-Q-DistilBERT-Qwen3VL2B-2048-ML")
44
+ q_emb = query.encode(["What was the revenue growth in Q3 2024?"]) # (1, 2048)
45
+ scores = q_emb @ doc_emb.T # doc_emb: pages indexed by Qwen3-VL-Embedding-2B
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  ```
47
 
48
+ <details>
49
+ <summary><b>Citation</b></summary>
 
 
 
50
 
51
  ```bibtex
52
+ @inproceedings{liu-etal-2026-nanovdr,
53
+ title = "{N}ano{VDR}: Distilling a 2{B} Vision-Language Retriever into a 70{M} Text-Only Encoder for Visual Document Retrieval",
54
+ author = "Liu, Zhuchenyang and
55
+ Zhang, Yao and
56
+ Xiao, Yu",
57
+ editor = "Lee, Hung-Yi and
58
+ Dev, Sunipa and
59
+ Li, Jessy and
60
+ Elliott, Desmond",
61
+ booktitle = "Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing",
62
+ month = oct,
63
+ year = "2026",
64
+ address = "Budapest, Hungary",
65
+ publisher = "Association for Computational Linguistics",
66
+ url = "https://aclanthology.org/2026.emnlp-main.71/",
67
+ pages = "1631--1648",
68
+ ISBN = "979-8-89176-459-0"
69
+ }
70
+
71
+ @inproceedings{liu-etal-2026-distilvdr,
72
+ title = "{D}istil{VDR}: A Compact End-to-End Visual Document Retriever via Dual-Student Distillation",
73
+ author = "Liu, Zhuchenyang and
74
+ Wang, Ziyi and
75
+ Zhang, Yao and
76
+ Xiao, Yu",
77
+ editor = "T.Y.S.S., Santosh and
78
+ Agarwal, Amit and
79
+ Gupta, Vivek and
80
+ Kementchedjhieva, Yova and
81
+ Garimella, Aparna and
82
+ Hou, Yufang",
83
+ booktitle = "The Proceedings of Workshop on Document Intelligence and Understanding",
84
+ month = oct,
85
+ year = "2026",
86
+ address = "Budapest, Hungary",
87
+ publisher = "Association for Computational Linguistics",
88
+ url = "https://aclanthology.org/2026.docinsights-1.26/",
89
+ pages = "385--399",
90
+ ISBN = "979-8-89176-477-4"
91
  }
92
 
93
  @misc{liu2026colnanovdrdocumentfreequerydistillation,
 
101
  }
102
  ```
103
 
104
+ </details>
105
+
106
  ## Acknowledgements
107
 
108
  This project has received funding from the **Business Finland** co-innovation programme under grant agreement No. 69/31/2025. It is supported by the [AiWo: Human-centric AI-enabled Collaborative Fieldwork Operations](https://aifieldwork.aalto.fi/events/) project (2025–2027), which aims to revolutionize fieldwork operations and enhance human-AI collaboration across the manufacturing, construction, and industrial design sectors. The calculations presented in this project were performed using computer resources within the Aalto University School of Science "Science-IT" project.