Qwen3-VL-Reranker-8B LoRA adapter trained on Visual Document Retrieval query-document screenshot pairs

This is a Cross Encoder model finetuned from Qwen/Qwen3-VL-Reranker-8B on the llamaindex-vdr-en-train-preprocessed dataset using the sentence-transformers library. It computes scores for pairs of texts, which can be used for text reranking and semantic search.

Model Details

Model Description

  • Model Type: Cross Encoder
  • Base model: Qwen/Qwen3-VL-Reranker-8B
  • Maximum Sequence Length: 262144 tokens
  • Number of Output Labels: 1 label
  • Supported Modalities: Text, Image, Video, Message
  • Training Dataset:
    • llamaindex-vdr-en-train-preprocessed
  • Language: en
  • License: apache-2.0

Model Sources

Full Model Architecture

CrossEncoder(
  (0): Transformer({'transformer_task': 'any-to-any', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'logits'}, 'image': {'method': 'forward', 'method_output_name': 'logits'}, 'video': {'method': 'forward', 'method_output_name': 'logits'}, 'message': {'method': 'forward', 'method_output_name': 'logits', 'format': 'structured'}}, 'module_output_name': 'causal_logits', 'processing_kwargs': {'chat_template': {'chat_template': 'reranker', 'add_generation_prompt': True}}, 'architecture': 'Qwen3VLForConditionalGeneration'})
  (1): LogitScore({'true_token_id': 9693, 'false_token_id': 2152, 'module_input_name': 'causal_logits'})
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import CrossEncoder

# Download from the 🤗 Hub
model = CrossEncoder("yaobaishen/Qwen3-VL-Reranker-8B-vdr-lora")
# Get scores for pairs of inputs
pairs = [
    ['What are the new anthropological perspectives on development as discussed by Quarles Van Ufford and Giri in 2003?', 'https://huggingface.co/yaobaishen/Qwen3-VL-Reranker-8B-vdr-lora/resolve/main/assets/image_0.jpg'],
    ['What are the new anthropological perspectives on development as discussed by Quarles Van Ufford and Giri in 2003?', 'https://huggingface.co/yaobaishen/Qwen3-VL-Reranker-8B-vdr-lora/resolve/main/assets/image_1.jpg'],
    ['What are the three main positions anthropologists have taken in relation to development, as discussed by David Lewis?', 'https://huggingface.co/yaobaishen/Qwen3-VL-Reranker-8B-vdr-lora/resolve/main/assets/image_2.jpg'],
    ['What are the three main positions anthropologists have taken in relation to development, as discussed by David Lewis?', 'https://huggingface.co/yaobaishen/Qwen3-VL-Reranker-8B-vdr-lora/resolve/main/assets/image_1.jpg'],
    ['Who are the three sisters known as the Fates in Greek mythology?', 'https://huggingface.co/yaobaishen/Qwen3-VL-Reranker-8B-vdr-lora/resolve/main/assets/image_4.jpg'],
]
scores = model.predict(pairs)
print(scores)
# [ 4.8125 -5.625   4.875  -4.75    3.375 ]

Evaluation

Metrics

Cross Encoder Reranking

Metric Value
map 0.9768
mrr@10 0.9801
ndcg@10 0.9845

Training Details

Training Dataset

llamaindex-vdr-en-train-preprocessed

  • Dataset: llamaindex-vdr-en-train-preprocessed
  • Size: 20,000 training samples
  • Columns: query, document, and label
  • Approximate statistics based on the first 100 samples:
    query document label
    type string image int
    modality text image
    details
    • min: 66 tokens
    • mean: 66.0 tokens
    • max: 66 tokens
    • min: 1000x1125 px
    • mean: 1438x1653 px
    • max: 2044x1851 px
    • 0: ~50.00%
    • 1: ~50.00%
  • Samples:
    query document label
    What are the new anthropological perspectives on development as discussed by Quarles Van Ufford and Giri in 2003? 1
    What are the new anthropological perspectives on development as discussed by Quarles Van Ufford and Giri in 2003? 0
    What are the three main positions anthropologists have taken in relation to development, as discussed by David Lewis? 1
  • Loss: BinaryCrossEntropyLoss with these parameters:
    {
        "activation_fn": "torch.nn.modules.linear.Identity",
        "pos_weight": null
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • per_device_train_batch_size: 1
  • num_train_epochs: 1
  • warmup_steps: 0.1
  • gradient_accumulation_steps: 8
  • bf16: True
  • gradient_checkpointing: True
  • gradient_checkpointing_kwargs: {'use_reentrant': False}
  • per_device_eval_batch_size: 1
  • save_only_model: True
  • load_best_model_at_end: True

All Hyperparameters

Click to expand
  • per_device_train_batch_size: 1
  • num_train_epochs: 1
  • max_steps: -1
  • learning_rate: 5e-05
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: None
  • warmup_steps: 0.1
  • optim: adamw_torch_fused
  • optim_args: None
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • optim_target_modules: None
  • gradient_accumulation_steps: 8
  • average_tokens_across_devices: True
  • max_grad_norm: 1.0
  • label_smoothing_factor: 0.0
  • bf16: True
  • fp16: False
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • gradient_checkpointing: True
  • gradient_checkpointing_kwargs: {'use_reentrant': False}
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • use_liger_kernel: False
  • liger_kernel_config: None
  • use_cache: False
  • neftune_noise_alpha: None
  • torch_empty_cache_steps: None
  • auto_find_batch_size: False
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • include_num_input_tokens_seen: no
  • log_level: passive
  • log_level_replica: warning
  • disable_tqdm: False
  • project: huggingface
  • trackio_space_id: None
  • trackio_bucket_id: None
  • trackio_static_space_id: None
  • per_device_eval_batch_size: 1
  • prediction_loss_only: True
  • eval_on_start: False
  • eval_do_concat_batches: True
  • eval_use_gather_object: False
  • eval_accumulation_steps: None
  • include_for_metrics: []
  • batch_eval_metrics: False
  • save_only_model: True
  • save_on_each_node: False
  • enable_jit_checkpoint: False
  • push_to_hub: False
  • hub_private_repo: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_always_push: False
  • hub_revision: None
  • load_best_model_at_end: True
  • ignore_data_skip: False
  • restore_callback_states_from_checkpoint: False
  • full_determinism: False
  • seed: 42
  • data_seed: None
  • use_cpu: False
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • parallelism_config: None
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • dataloader_prefetch_factor: None
  • dataloader_multiprocessing_context: None
  • dataloader_in_order: True
  • remove_unused_columns: True
  • label_names: None
  • train_sampling_strategy: random
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • ddp_static_graph: None
  • ddp_backend: None
  • ddp_timeout: 1800
  • fsdp: None
  • fsdp_config: None
  • deepspeed: None
  • debug: []
  • skip_memory_metrics: True
  • do_predict: False
  • resume_from_checkpoint: None
  • local_rank: -1
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}
  • warmup_ratio: None

Training Logs

Epoch Step Training Loss vdr-eval-hard_ndcg@10
-1 -1 - 0.9813
0.05 125 0.2833 -
0.1 250 0.2578 0.9813
0.15 375 0.2396 -
0.2 500 0.2365 0.9547
0.25 625 0.2523 -
0.3 750 0.2308 0.9845
0.35 875 0.2204 -
0.4 1000 0.1964 0.9831
0.45 1125 0.2392 -
0.5 1250 0.2281 0.9809
0.55 1375 0.2234 -
0.6 1500 0.1982 0.9836
0.65 1625 0.1809 -
0.7 1750 0.2319 0.9838
0.75 1875 0.1801 -
0.8 2000 0.2585 0.9832
0.85 2125 0.2225 -
0.9 2250 0.1990 0.9817
0.95 2375 0.1773 -
1.0 2500 0.2126 0.9834
-1 -1 - 0.9845
  • The bold row denotes the saved checkpoint.

Training Time

  • Training: 2.8 hours
  • Evaluation: 27.8 minutes
  • Total: 3.3 hours

Framework Versions

  • Python: 3.11.13
  • Sentence Transformers: 6.1.0.dev0
  • Transformers: 5.15.1
  • PyTorch: 2.8.0+cu128
  • Accelerate: 1.14.0
  • Datasets: 5.0.1
  • Tokenizers: 0.22.2

Additional Resources

Citation

BibTeX

Sentence Transformers

@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/1908.10084",
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for yaobaishen/Qwen3-VL-Reranker-8B-vdr-lora

Finetuned
(3)
this model

Paper for yaobaishen/Qwen3-VL-Reranker-8B-vdr-lora

Evaluation results