-
run
pip install -r requirements.txt
-
You may need to download
Llama-1B-Instruct(https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct) andUnifiedQA-T5-large(https://huggingface.co/allenai/unifiedqa-t5-large) from Huggingface and put them into theMODELdirectory before starting constructing the MSQA dataset. The fine-tuned checkpoint will be available in the future update. -
You should also download data.zip from https://drive.google.com/file/d/1VS9vVGWE4AYDkgH0XhA5bZ29yNS1vgsI/view?usp=sharing, which contains both REGULAR datasets and other data for constructing MSQA dataset.
- This repository contains the code and data of the papre REGULAR: A Framework for Relation-Guided Multi-Span Question Generation. The contents of each subfolder or zipfile are shown below:
|-DATA.zip # You should unzip this file first
|- corpus # Open-Source corpus for construct MSQA dataset
|- MultiSpanQA_data # Dataset for training QA model used in step 4
|- QG_train_data # Dataset for training QG model used in step 3
|- REGULAR_DATASET # Synthetic Dataset used in our experiment
|- MODEL # Pre-trained Models for construct MSQA dataset
|- SCRIPT # Bash scripts
|- SOURCE # Code for step 1-5
|- 1_convert_passage_to_graph # Code for step 1
|- 2_extract_answers # Code for step 2
|- 3_generate_question # Code for step 3
|- 4_select_optimal_question # Code for step 4
|- 5_construct_msqa_dataset # Code for step 5
|- TMP # Directory for temporary outputs
- python: 3.9.13
- CUDA Version: 11.7
- GPU: Tesla V100 32GB
-
run each bash file in the
SCRIPTSdirectory. Each file in the in theSCRIPTSdirectory is named with number. Each bash file is named with a number at the beginning, which represents the order in which it should be run. Therefore, you only need to run the files starting with 1, 2, 3_1, 3_2, 4_1, 4_2, and 5 in sequence, like:# After clone this repository cd REGULAR sh SCRIPTS\1_convert_passage_to_graph.sh -
After running these bash files, you are excepted to obtain the final output directory in
TMP/REGULAR_dataset, which contains train file and validation file for fine-tuning QA models.
- FEEL FREE to contact us if you have any questions or encounter issues while using the repository.
- This article has been accepted by AACL-IJCNLP 2025 recently.
- We have uploaded the camera-ready version of the paper
REGULAR.pdf.
