This is an implementation of LAMPAT: Low-rank Adaptation Multilingual Paraphrasing using Adversarial Training.
LAMPAT has been accepted at the 38th AAAI Conference on Artificial Intelligence (AAAI-24). Paper can be found at this link.
To get started, you should have prior knowledge on Python and PyTorch at first. A few resources to get you started if this is your first Python or PyTorch project:
-
Clone the repo
git clone https://github.com/phkhanhtrinh23/LAMPAT.git
-
Use any code editor to open the folder LAMPAT.
-
Create conda virtual environment:
conda create -n lampat python=3.8
, activate it:conda activate lampat
, and install the required packages:pip install -r requirements.txt
. -
Download wmt19_v18
-
Extract the files to
.txt
files, rename all of the files with their ISO 639-1 code, and place them in the pathdata/wmt19_v18
. For example:data/wmt19_v18/en.txt
-
Read and run
train.sh
to train the LAMPAT model.
The evaluation dataset can be downloaded at this link
Download the zip file and unzip it to put into the evaluation/eval_dataset
In the evaluation
folder, there are 3 python files:
mev_sup_multi_ref.py
: used to evaluate on STAPLE multi-reference evaluation datasetmev_sup.py
: used to evaluate on PAWS-X and Opusparcusmev_unsup.py
: used to evaluate on WMT19
Each file will run the metrics and report the score to the console
Contributions are what make GitHub such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the project
- Create your Contribute branch:
git checkout -b contribute/Contribute
- Commit your changes:
git commit -m 'add your messages'
- Push to the branch:
git push origin contribute/Contribute
- Open a pull request
Email: phkhanhtrinh23@gmail.com
Project Link: https://github.com/phkhanhtrinh23/LAMPAT.git