├── .gitignore ├── LICENSE ├── README.md ├── examples ├── msmarco-passage-ranking │ ├── README.md │ ├── encode_s2.lr7e-3.nepochs10.psl128.prefix.sh │ ├── msmarco_passage_eval.py │ ├── run_s2.lr7e-3.nepochs10.psl128.prefix.sh │ ├── score_to_marco.py │ └── search_s2.lr7e-3.nepochs10.psl128.prefix.sh └── natural-questions │ ├── README.md │ ├── convert_result_to_trec.py │ ├── encode_s2.lr7e-3.nepochs60.psl32.prefix.sh │ ├── run_s2.lr7e-3.nepochs60.psl32.prefix.sh │ └── search_s2.lr7e-3.nepochs60.psl32.prefix.sh ├── install_env.sh ├── setup.py └── src └── dptdr ├── __init__.py ├── arguments.py ├── data.py ├── driver ├── __init__.py ├── mencode.py └── train.py ├── faiss_retriever ├── __init__.py ├── __main__.py ├── reducer.py └── retriever.py ├── loss.py ├── modeling.py ├── modeling_deberta.py ├── modeling_prefix_encoder.py ├── modeling_sequence_classification.py ├── preprocessor ├── __init__.py ├── preprocessor_dict.py └── preprocessor_tsv.py ├── trainer.py └── utils ├── __init__.py └── format ├── __init__.py └── convert_result_to_trec.py /.gitignore: -------------------------------------------------------------------------------- 1 | *log* 2 | 3 | .DS* 4 | 5 | __pycache__ 6 | 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/README.md -------------------------------------------------------------------------------- /examples/msmarco-passage-ranking/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/msmarco-passage-ranking/README.md -------------------------------------------------------------------------------- /examples/msmarco-passage-ranking/encode_s2.lr7e-3.nepochs10.psl128.prefix.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/msmarco-passage-ranking/encode_s2.lr7e-3.nepochs10.psl128.prefix.sh -------------------------------------------------------------------------------- /examples/msmarco-passage-ranking/msmarco_passage_eval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/msmarco-passage-ranking/msmarco_passage_eval.py -------------------------------------------------------------------------------- /examples/msmarco-passage-ranking/run_s2.lr7e-3.nepochs10.psl128.prefix.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/msmarco-passage-ranking/run_s2.lr7e-3.nepochs10.psl128.prefix.sh -------------------------------------------------------------------------------- /examples/msmarco-passage-ranking/score_to_marco.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/msmarco-passage-ranking/score_to_marco.py -------------------------------------------------------------------------------- /examples/msmarco-passage-ranking/search_s2.lr7e-3.nepochs10.psl128.prefix.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/msmarco-passage-ranking/search_s2.lr7e-3.nepochs10.psl128.prefix.sh -------------------------------------------------------------------------------- /examples/natural-questions/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/natural-questions/README.md -------------------------------------------------------------------------------- /examples/natural-questions/convert_result_to_trec.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/natural-questions/convert_result_to_trec.py -------------------------------------------------------------------------------- /examples/natural-questions/encode_s2.lr7e-3.nepochs60.psl32.prefix.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/natural-questions/encode_s2.lr7e-3.nepochs60.psl32.prefix.sh -------------------------------------------------------------------------------- /examples/natural-questions/run_s2.lr7e-3.nepochs60.psl32.prefix.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/natural-questions/run_s2.lr7e-3.nepochs60.psl32.prefix.sh -------------------------------------------------------------------------------- /examples/natural-questions/search_s2.lr7e-3.nepochs60.psl32.prefix.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/examples/natural-questions/search_s2.lr7e-3.nepochs60.psl32.prefix.sh -------------------------------------------------------------------------------- /install_env.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/install_env.sh -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/setup.py -------------------------------------------------------------------------------- /src/dptdr/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/dptdr/arguments.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/arguments.py -------------------------------------------------------------------------------- /src/dptdr/data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/data.py -------------------------------------------------------------------------------- /src/dptdr/driver/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/dptdr/driver/mencode.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/driver/mencode.py -------------------------------------------------------------------------------- /src/dptdr/driver/train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/driver/train.py -------------------------------------------------------------------------------- /src/dptdr/faiss_retriever/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/faiss_retriever/__init__.py -------------------------------------------------------------------------------- /src/dptdr/faiss_retriever/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/faiss_retriever/__main__.py -------------------------------------------------------------------------------- /src/dptdr/faiss_retriever/reducer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/faiss_retriever/reducer.py -------------------------------------------------------------------------------- /src/dptdr/faiss_retriever/retriever.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/faiss_retriever/retriever.py -------------------------------------------------------------------------------- /src/dptdr/loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/loss.py -------------------------------------------------------------------------------- /src/dptdr/modeling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/modeling.py -------------------------------------------------------------------------------- /src/dptdr/modeling_deberta.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/modeling_deberta.py -------------------------------------------------------------------------------- /src/dptdr/modeling_prefix_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/modeling_prefix_encoder.py -------------------------------------------------------------------------------- /src/dptdr/modeling_sequence_classification.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/modeling_sequence_classification.py -------------------------------------------------------------------------------- /src/dptdr/preprocessor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/preprocessor/__init__.py -------------------------------------------------------------------------------- /src/dptdr/preprocessor/preprocessor_dict.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/preprocessor/preprocessor_dict.py -------------------------------------------------------------------------------- /src/dptdr/preprocessor/preprocessor_tsv.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/preprocessor/preprocessor_tsv.py -------------------------------------------------------------------------------- /src/dptdr/trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/trainer.py -------------------------------------------------------------------------------- /src/dptdr/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/dptdr/utils/format/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/dptdr/utils/format/convert_result_to_trec.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreedomIntelligence/DPTDR/HEAD/src/dptdr/utils/format/convert_result_to_trec.py --------------------------------------------------------------------------------