A LoRA adapter for retrieving Russian document pages from text queries, trained on SauerkrautLM-ColQwen3-2b-v0.1. The model encodes page images directly, retaining tables, charts, and layout without a separate OCR step in the retrieval pipeline.
On the held-out X5-private business-document corpus, the adapted model achieves 0.8436 nDCG@5, compared with 0.7683 for the strongest evaluated text baseline, pplx-embed-v1-4B. This is a 9.8% relative improvement. X5-private was not used for adaptation.
| Property | Value |
|---|---|
| Artifact | LoRA adapter; requires the base model |
| Base retriever | VAGOsolutions/SauerkrautLM-ColQwen3-2b-v0.1 |
| Backbone | Qwen3-VL, 2B family |
| Input | Text queries and document page images |
| Output | Multiple 128-dimensional vectors per query/page |
| Retrieval score | Late interaction with MaxSim |
| Adaptation data | RuDoRe, Russian query-page pairs |
| Companion model | RuDoRe ColPali v1.3 |
MaxSim compares each query-token vector with the page vectors, takes its highest similarity, and sums those maxima into a page score. Pages can be encoded in advance and ranked for each new query. The model returns retrieval embeddings; a downstream system can use the retrieved pages for question answering.
RuDoRe is built from Russian PDF, PPTX, and DOCX documents across 13 topics. Qwen3-VL-32B-Instruct generates queries from page images, then a judge prompt checks query relevance and specificity. The pipeline splits documents into separate partitions, filters pairs using the target page's rank under a frozen retriever, and samples by topic. Queries are rephrased while preserving their information need.
The training set contains 188,192 query-page pairs and 96,607 pages. The RuDoRe dataset repository contains the evaluation split, with 18,805 pairs and 6,383 pages. The full training corpus is not distributed because of restrictions on redistributing source materials.
| Setting | Value |
|---|---|
| Loss | ColbertPairwiseCELoss, temperature 0.02 |
| Negatives | In-batch only, num_negs = 0 |
| Per-device batch size | 16 |
| Gradient accumulation | 1 |
| LoRA rank / alpha | 32 / 32 |
| LoRA dropout | 0.1 |
| LoRA initialization / bias | Gaussian / none |
| Target modules | q_proj, k_proj, v_proj, o_proj, down_proj, gate_proj, up_proj, custom_text_proj |
| Optimizer | paged_adamw_8bit |
| Learning rate | 5e-5 |
| Warm-up steps | 500 |
| Weight decay | 0.0 |
| Training duration | 1 epoch, approximately 11,000 optimizer steps |
| Sampling | Group-aware sampler, seed 42 |
| Checkpoint selection | Highest nDCG@5 on a held-out RuDoRe validation shard |
The pairwise logistic objective compares the positive page with the hardest non-positive page in the batch. It uses query-length-normalized MaxSim scores and a temperature of 0.02. This recipe does not require separately mined negative pages.
The primary metric is nDCG@5. ViDoRe V3 reports the macro average over seven tasks. RuDoRe and X5-private use rephrased queries; the non-rephrased controls are separate experiments. Evaluation on the final test sets follows checkpoint selection on the validation shard.
| Evaluation set | Base model | RuDoRe adapter |
|---|---|---|
| ViDoRe V3, seven-task macro average | 0.5366 | 0.5521 |
| RuDoRe, held-out Russian documents | 0.8394 | 0.8979 |
| X5-private, held-out business documents | 0.8208 | 0.8436 |
Adaptation improves the ViDoRe V3 average and five of its seven tasks. Computer Science decreases from 0.7031 to 0.6985, and Physics from 0.4405 to 0.4361. The average improvement therefore includes small topic-specific regressions.
| Model | nDCG@5 | nDCG@10 | Recall@5 | MRR@10 |
|---|---|---|---|---|
| RuDoRe ColQwen3-2B | 0.8436 | 0.8579 | 0.9348 | 0.8188 |
| pplx-embed-v1-4B | 0.7683 | 0.7874 | 0.8809 | 0.7386 |
Text-model comparisons were conducted on X5-private, where document text is available. On this corpus, the adapted 2B model also reaches a similar nDCG@5 to the unadapted ColQwen3-4B model (0.8421); the unadapted 8B model remains ahead at 0.8733.
Changing X5-private queries from their original wording to rephrased wording lowers this adapter's nDCG@5 from 0.8837 to 0.8436, a 4.5% relative decrease. The corpus, target pages, and model are held fixed in this comparison.
Install PEFT and the upstream implementation in a project with a CUDA-enabled PyTorch setup:
uv add torch peft pillow
uv add "sauerkrautlm-colpali @ git+https://github.com/VAGOsolutions/sauerkrautlm-colpali"
The example follows the upstream usage instructions and requires a compatible FlashAttention 2 installation. Replace the example page paths with your rendered document pages.
import torch
from PIL import Image
from peft import PeftModel
from sauerkrautlm_colpali.models import ColQwen3, ColQwen3Processor
BASE = "VAGOsolutions/SauerkrautLM-ColQwen3-2b-v0.1"
ADAPTER = "rudore/colqwen3-2b"
base = ColQwen3.from_pretrained(
BASE,
torch_dtype=torch.bfloat16,
attn_implementation="flash_attention_2",
device_map="cuda:0",
)
model = PeftModel.from_pretrained(base, ADAPTER).eval()
processor = ColQwen3Processor.from_pretrained(BASE)
pages = [
Image.open("page_1.png").convert("RGB"),
Image.open("page_2.png").convert("RGB"),
]
queries = ["Выручка по кварталам с разбивкой по регионам"]
batch_images = processor.process_images(pages).to(model.device)
batch_queries = processor.process_queries(queries).to(model.device)
with torch.inference_mode():
page_embeddings = model(**batch_images)
query_embeddings = model(**batch_queries)
scores = processor.score(query_embeddings, page_embeddings)
ranking = scores.argsort(dim=-1, descending=True)
print(ranking)
For larger corpora, encode pages in batches, store their multi-vector embeddings, and use MaxSim for ranking or reranking. A two-stage system can first select candidate pages, then apply MaxSim; evaluate candidate recall and final retrieval quality alongside latency.
Apache 2.0, following the base retriever. ColQwen3 and Qwen3-VL are upstream architectures; this work contributes RuDoRe data preparation, Russian-language LoRA adaptation, and evaluation.
Adaptation and evaluation: Roman Makeev and Egor Machnev.