Views
No views yet

1conda create -n rematch python=3.10 -y
2conda activate rematch
3pip install -r requirements.txtflash-attn can be sensitive to CUDA, PyTorch, and compiler versions. If installation fails, install the wheel matching your environment from the official FlashAttention release instructions, then rerun the remaining dependencies.--model_name and the adapter/full checkpoint through --checkpoint_path when evaluating.bash experiments/public/rematch/train-rematch-itm.shDATASET_BASE_PATH with the directory that contains your mmE5/ folder. The expected layout is:1DATASET_BASE_PATH/
2└── mmE5/
3 └── mmE5-MMEB-hardneg/1EXP_DIR=/path/to/output \
2CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
3bash experiments/public/rematch/train-rematch-itm.shDATA_BASEDIR to the directory containing the downloaded evaluation files.Note: Evaluation scores may vary slightly across environments, as different PyTorch, CUDA, andflash-attnversions can introduce small numerical differences.
eval_all.py. It reads the experiment name and automatically matches the evaluation configuration used by ReMatch, including backbone type, target-side instruction prefix, chat template, learnable query tokens, and residual embedding fusion. For example, an experiment name containing Qwen2.5vl, TgtInstruction, Queries16, ResidualAvg, and ChatTemplate will be evaluated with the corresponding qwen2_5_vl, target instruction, 16 learnable tokens, average residual fusion, and chat-template settings.1DATA_BASEDIR=/path/to/vlm2vec_eval \
2MODEL_BASEDIR=/path/to/training/outputs \
3OUTPUT_BASEDIR=/path/to/eval/outputs \
4MODALITIES="image" \
5python eval_all.py \
6 --model_name Rematch_Qwen2.5vl_3B.image.autoresize.lora32.loraAlpha64.BS1024.IB64.GCq32p32NormTemp002.lr1e4.step3kwarm100.lrCosine.TgtInstruction.mmE5H1.Queries16.ResidualAvg.OrthTriu0.2.ChatTemplate.ITM.V1.Ratio0.1 \
7 --checkpoint_name checkpoint-2200eval_all.py scans outputs/<model_name>/<checkpoint_name>/, evaluates every checkpoint directory, and writes summaries to:outputs/evals/<model_name>/<checkpoint_name>/final_results.jsoneval.py directly and pass the matching ReMatch configuration explicitly:1torchrun --nproc_per_node=8 --master_port=2277 eval.py \
2 --lora True \
3 --pooling eos \
4 --normalize true \
5 --tgt_prefix_instruction True \
6 --learnable_queries True \
7 --residual_embedding True \
8 --residual_embedding_method avg \
9 --enable_chat_template True \
10 --num_queries 16 \
11 --per_device_eval_batch_size 16 \
12 --model_backbone qwen2_5_vl \
13 --model_name ReMatch-3B-PATH \
14 --checkpoint_path ReMatch-3B-PATH \
15 --dataset_config experiments/public/eval/image.yaml \
16 --encode_output_path outputs/evals/ReMatch-3B/image \
17 --data_basedir /path/to/MMEB1@article{liu2025rematch,
2 title={ReMatch: Boosting Representation through Matching for Multimodal Retrieval},
3 author={Liu, Qianying and Liang, Xiao and Zhang, Zhiqiang and Chen, Yibo and Tang, Xu and Qing, Zhongfei and Zhou, Fengfan and Hu, Yao and Henderson, Paul},
4 journal={arXiv preprint arXiv:2511.19278},
5 year={2025}
6}