Junhohan/MAGE-train
Viewer • Updated • 85.9k • 19
CA-Former re-ranker from MAGE: Utility-Aware Re-ranking via Marginal Gain Estimator, trained for the reader meta-llama/Meta-Llama-3-8B-Instruct.
The CA-Former was trained by listwise distillation from the oracle MG table in Junhohan/MAGE-train.
| File | Description |
|---|---|
mage-llama3-8b.ckpt |
PyTorch Lightning checkpoint holding the weights of the CA-Former and the scoring head. |
The reader LLM is not included. At inference time it is loaded from meta-llama/Meta-Llama-3-8B-Instruct, which is gated, so accept its license on Hugging Face first.
Run from the root of the MAGE code release:
hf download Junhohan/MAGE-Llama-3-8B --local-dir checkpoints/MAGE-Llama-3-8B --include "*.ckpt"
torchrun --nproc_per_node=4 rerank_and_generate.py --config configs/inference.yaml \
data.name=hotpotqa-w data.data_path=data/hotpotqa-w/retrieved/validation_top100_wo_gold.jsonl \
caformer.ckpt_dir=checkpoints/MAGE-Llama-3-8B/mage-llama3-8b.ckpt
The checkpoint only works with the reader it was trained on. For another reader, retrain with that reader's MG table.
Base model
FacebookAI/roberta-base