Views
No views yet
Σ_i max_j (q_i · d_j) over token embeddings — the
fixed operator that LITE replaces with a learnable scorer.This model exists to quantify what the learnable interaction adds. The learnable counterpart is jaganadhg/literank-msmarco-distilbert.
distilbert-base-uncased dual-encoder → token embeddings.S = Q·Dᵀ, then sum over query tokens of the max over (valid) doc
tokens. No learned parameters beyond the encoder.cross-encoder/ms-marco-MiniLM-L-6-v2.train, ~300k (query, positive, negative) triplets (subset of 500k rows).best.pt; it plateaued and stopped around step 14k.dev/validation, 2000 queries)| Model | MRR@10 | nDCG@10 |
|---|---|---|
| LITE (learnable) | 0.724 | 0.791 |
| MaxSim (this model) | 0.664 | 0.745 |
1git clone https://huggingface.co/jaganadhg/maxsim-msmarco-distilbert
2cd maxsim-msmarco-distilbert && pip install torch transformers
3python load_example.py1import torch
2from literank.config import ModelConfig
3from literank.model import Ranker
4from literank.checkpoint import load_checkpoint
5
6ckpt = torch.load("model.pt", map_location="cpu", weights_only=False)
7ranker = Ranker(ModelConfig(**ckpt["config"])) # config has scorer="maxsim"
8load_checkpoint("model.pt", ranker)
9ranker.eval()
10scores = ranker.score(["query"] * 2, ["a relevant passage", "an irrelevant one"])
11print(scores)1@article{ji2024lite,
2 title = {Efficient Document Ranking with Learnable Late Interactions},
3 author = {Ji, Ziwei and others},
4 journal= {arXiv preprint arXiv:2406.17968},
5 year = {2024}
6}feat/paper-faithful.literank/ package, so python load_example.py works
straight after cloning. To train/evaluate from scratch, use the GitHub branch above.