Fine-tune a retrieval model, repeat the experiment, and inspect what changed.
I built Rank Lab to follow a search experiment all the way from training to individual ranked documents. An average score was useful, but I also wanted to see which queries got worse, whether a checkpoint could resume, and how much the result changed on another run.
Version 0.3 repeats the same training recipe across five seeds on SciFact and five on FiQA. The explorer connects the aggregate to each run, its query-level results and its measured compute costs. You can also run the workflow on your own labelled retrieval data.
Open the results explorer · Run your own suite · Use your own data
The original SciFact study, in 15 seconds:
rank-lab.mp4
Each seed starts from the same pretrained MiniLM checkpoint. Data splits and hyperparameters stay fixed within each dataset. Validation selects the checkpoint before the reserved test comparison. Both lexical BM25 and the frozen encoder remain visible as baselines.
| Dataset | BM25 nDCG@10 | Pretrained | Fine-tuned mean ± sample std. | Change vs pretrained |
|---|---|---|---|---|
| SciFact | 0.6646 | 0.6451 | 0.6754 ± 0.0027 | +3.03 pp |
| FiQA | 0.2339 | 0.3687 | 0.3921 ± 0.0040 | +2.34 pp |
SciFact's mean also exceeds BM25, but its paired query interval against BM25 includes zero (-2.69 to +4.73 percentage points). That comparison remains inconclusive on this test set.
These are five independent training runs per dataset. The standard deviation describes variation between seeds. The explorer separately shows a paired query-resampling interval and how frequently individual queries improve or regress. Each dataset is trained and evaluated separately; the study does not test cross-domain transfer.
All 300 SciFact and 648 FiQA test queries are retained. The result table is calculated from saved rankings and relevance judgments. The complete repeated-study record contains per-seed results, uncertainty, hardware, measurement boundaries and limitations. The original single-seed study remains unchanged and accessible in the explorer.
- Decide whether fine-tuning helped consistently, rather than choosing one favourable seed.
- Compare the same query across runs and inspect the documents behind a gain or regression.
- Review training, checkpoint selection, latency and memory alongside retrieval quality.
- Train on your own documents, queries and relevance labels, then open a portable result bundle in the same explorer without editing its source.
The Python CLI prepares data, trains, resumes, compares and exports. The static React explorer displays completed results. Viewing it needs no model weights, GPU, credentials or account.
git clone https://github.com/shayanxcyber/rank-lab.git
cd rank-lab/web
npm ci
npm run devOpen http://127.0.0.1:3032. The locked web toolchain requires Node 22.12 or newer.
Choose a dataset, compare the individual seeds, then open a run or query. Use Open experiment
for a portable suite or an older individual-study export. Document details load when needed
and are checked against the selected study's hash.
Use Python 3.11 or newer with the appropriate CPU/CUDA build of PyTorch. The suite guide gives complete Windows and Linux/macOS setup, a small fictional CPU example, the public benchmark recipe and interruption/recovery commands.
.venv/Scripts/python.exe -m rank_lab.suite run --config examples/helpdesk-suite.toml
.venv/Scripts/python.exe -m rank_lab.suite export --config examples/helpdesk-suite.tomlThe small example checks the entire workflow without repeating the GPU study. To repeat the
recorded benchmark matrix, use examples/repeated-study.toml. For an individual custom run,
the existing rank_lab.cli prepare/train/compare/export commands still work.
Supervised retrieval training needs queries and relevance judgments as well as documents. The custom-data guide explains JSONL/TSV inputs and TOML configuration. Models, checkpoints and caches remain local; only selected recorded results are exported.
| Choice | Why I used it |
|---|---|
| Separate split and training seeds | Repeating training should not quietly change the validation set |
| Complete checkpoint state | A restart restores optimizer, scheduler, batch cursor and RNG, not only model weights |
| Frozen suite identities | Changed data, split, recipe or implementation must not reuse an incompatible run |
| Verified baseline cache | Repeating deterministic baseline work adds cost without adding an independent observation |
| Per-query paired analysis | Seed variation and uncertainty across test queries answer different questions |
| Scoped compute measurements | Training, corpus preprocessing and warmed query retrieval have different costs |
| Shared document files and lazy run loading | The overview should not download every run's text to show a comparison |
| Byte-preserving portable exports | File identity must survive Windows line endings and local browser import |
The backend uses Python, PyTorch, Transformers and NumPy. The interface uses React, TypeScript, Base UI, TanStack Table, Observable Plot and Motion. The case study explains the implementation and trade-offs.
The recorded GPU experiments ran on Windows 11 Pro with an NVIDIA GeForce RTX 5080 (16 GB GDDR7 VRAM), AMD Ryzen 7 9800X3D (8 cores / 16 threads) and 32 GB installed RAM. The runtime was Python 3.11.15, PyTorch 2.7.1+cu128 and CUDA 12.8. Per-run timing and allocated/ reserved memory readings are in the repeated-study record and explorer. Card capacity is separate from measured application allocation, and these observations are not minimum hardware requirements.
Judgments can be incomplete; unjudged results receive zero gain. Dense inputs truncate at 256 wordpieces while BM25 uses the full document text. The local CPU/GPU methods and warmed latency protocol are described with their measurements. The pretrained model's prior data exposure has not been audited. Scores from this study do not establish a universal best model.