This is the code for the first place in the textgraphs-15 competition
paper :DeepBlueAI at TextGraphs 2021 Shared Task: Treating Multi-HopInference Explanation Regeneration as A Ranking Problem
- pytorch=1.6
- transformers=4.5.1
- pandas=1.2.3
- cuda=10.1
- python=3.8.5
roberta-large
https://huggingface.co/roberta-large/tree/main
ernie-2.0-large-en
https://huggingface.co/nghuyong/ernie-2.0-large-en/tree/main
recall train
CUDA_VISIBLE_DEVICES=0,1 python recall_trainer.py --output_dir=save_model/recall/roberta --bert_path=roberta-large
CUDA_VISIBLE_DEVICES=0,1 python recall_trainer.py --output_dir=save_model/recall/ernie --bert_path=ernie-2.0-large-en
recall predict
CUDA_VISIBLE_DEVICES=0 python recall_predict.py
sort train
CUDA_VISIBLE_DEVICES=0,1 python sort_trainer.py --output_dir=save_model/sort/roberta --bert_path=roberta-large
CUDA_VISIBLE_DEVICES=0,1 python sort_trainer.py --output_dir=save_model/sort/ernie --bert_path=ernie-2.0-large-en
sort predict
CUDA_VISIBLE_DEVICES=0 python sort_predict.py
The result is "result/predict.txt"