This guide provides a step-by-step walkthrough to reproduce the results of our project from scratch. It covers data setup, environment configuration, model training, evaluation, and result analysis. The following images present an overview of our novel Dependent Score Max and Passage Block methods.
Figure 1: Dependent Score Max
Figure 2: Passage Block (PSG Block)
.
βββ figures/ # Figures used in the paper
βββ data/ # Raw and processed datasets
βββ src/ # Source code (models, training, evaluation)
βββ slurm_script/ # SLURM scripts for distributed computing
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
To set up the environment, run the following SLURM job:
slurm_script/cpu/install_environment.job
Alternatively, you may manually execute the commands contained in the job script.
Follow these steps to prepare the datasets:
Download Datasets
Place all datasets in the data/ directory. Use the relevant SLURM job based on the task:
slurm_script/cpu/preprocess/download_dataset/{task}.job
Supported tasks:
passagepassage_with_title (requires passage dataset)multi_psgs (based on lsr-long; filters out conflicting positives/negatives)Split Documents for Segmentation Use the following jobs based on the model and token window size:
slurm_script/cpu/preprocess/split_msmarco_doc/
Generate GB Candidate Lists Candidate generation requires pre-downloaded datasets from Step 1:
slurm_script/cpu/preprocess/gb_candidate_list/{task}.job
Configuration files are located in:
lsr/config/
Each experiment has a structured configuration path:
lsr/config/experiment/{operation}/{task}/{method}/[dataset_if_evaluation]
Where:
operation: training or evaluationtask: multi_psgs, psgs, psg_with_titlemethod: Specific approach or model variantdataset: Optional, used for evaluation-specific configsTo launch a training job on H100 GPUs:
slurm_script/gpu_h100/train/{task}/{method}.job
Note: If using different hardware, adjust the job script and configurations accordingly.
After training, follow these steps for evaluation:
Update the experiment config under:
lsr/config/experiment/evaluation/{task}/{method}/{dataset}
Ensure it points to the correct checkpoint.
Run the evaluation job on A100 GPUs:
slurm_script/gpu_a100/eval/{task}/{method}/{dataset}.job
Note: Modify configurations if using hardware other than A100.
There are three types of analysis:
Download the relevant CSVs from Weights & Biases (wandb) or use provided ones.
Run the analysis job:
slurm_script/cpu/analysis/{task}.job
Simply run the job script:
slurm_script/cpu/analysis/{task}.job
Set the appropriate configuration.
Execute the inference analysis:
slurm_script/gpu_a100/analysis/{task}.job
This repository was based on the following repository:
75 commits
Python
54.5%
Shell
45.5%
This guide provides a step-by-step walkthrough to reproduce the results of our project from scratch. It covers data setup, environment configuration, model training, evaluation, and result analysis. The following images present an overview of our novel Dependent Score Max and Passage Block methods.
Figure 1: Dependent Score Max
Figure 2: Passage Block (PSG Block)
.
βββ figures/ # Figures used in the paper
βββ data/ # Raw and processed datasets
βββ src/ # Source code (models, training, evaluation)
βββ slurm_script/ # SLURM scripts for distributed computing
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
To set up the environment, run the following SLURM job:
slurm_script/cpu/install_environment.job
Alternatively, you may manually execute the commands contained in the job script.
Follow these steps to prepare the datasets:
Download Datasets
Place all datasets in the data/ directory. Use the relevant SLURM job based on the task:
slurm_script/cpu/preprocess/download_dataset/{task}.job
Supported tasks:
passagepassage_with_title (requires passage dataset)multi_psgs (based on lsr-long; filters out conflicting positives/negatives)Split Documents for Segmentation Use the following jobs based on the model and token window size:
slurm_script/cpu/preprocess/split_msmarco_doc/
Generate GB Candidate Lists Candidate generation requires pre-downloaded datasets from Step 1:
slurm_script/cpu/preprocess/gb_candidate_list/{task}.job
Configuration files are located in:
lsr/config/
Each experiment has a structured configuration path:
lsr/config/experiment/{operation}/{task}/{method}/[dataset_if_evaluation]
Where:
operation: training or evaluationtask: multi_psgs, psgs, psg_with_titlemethod: Specific approach or model variantdataset: Optional, used for evaluation-specific configsTo launch a training job on H100 GPUs:
slurm_script/gpu_h100/train/{task}/{method}.job
Note: If using different hardware, adjust the job script and configurations accordingly.
After training, follow these steps for evaluation:
Update the experiment config under:
lsr/config/experiment/evaluation/{task}/{method}/{dataset}
Ensure it points to the correct checkpoint.
Run the evaluation job on A100 GPUs:
slurm_script/gpu_a100/eval/{task}/{method}/{dataset}.job
Note: Modify configurations if using hardware other than A100.
There are three types of analysis:
Download the relevant CSVs from Weights & Biases (wandb) or use provided ones.
Run the analysis job:
slurm_script/cpu/analysis/{task}.job
Simply run the job script:
slurm_script/cpu/analysis/{task}.job
Set the appropriate configuration.
Execute the inference analysis:
slurm_script/gpu_a100/analysis/{task}.job
This repository was based on the following repository:
75 commits
Python
54.5%
Shell
45.5%