The source code of paper: Learning Disentangled Semantic Representations for Zero-Shot Cross-Lingual Transfer in Multilingual Machine Reading Comprehension, accepted to ACL 2022.
The multilingual MRC model is based on multilingual Pre-trained Language Models (PLMs) equipped with a Siamese Semantic Disentanglement Model (SSDM) to explicitly transfer only semantic knowledge to the target language.
This repository contains two directories
data, the SSDM and MRC models code in
src, and all the train and test datasets in
Track the latest work, we are still optimizing and adjusting, thanks to the following code source:
- GPU Quadro RTX 6000 24G
- python 3.7.9
- torch 1.7.1
- cuda 11.0
1、Set the configurations of SSDM in
config.py，mainly to set output file, choice the type of PLMs and syntax loss (POS or STL).
2、Adjust number of epochs, learning rate, etc. in
3、Run the training code and it will print the test results in three MRC datasets (XQuAD, MLQA and TyDiQA-GoldP).
Moreover, SSDM and MRC can be trained separately, depending on the user's choice.