Source code of "Towards Robust Low-Resource Fine-Tuning with Multi-View Compressed Representation" (ACL23)
This code is tested on:
- Python 3.6.12
- transformers 3.3.1
- pytorch 1.10.1
DATA_SEED
Seed used to sample data for low-resource scenarioNUM_SAMPLES
Number of training and dev dataTASK
Name of the task e.g. mnliNUM_DIM_SET
Number of dimension setsDIM_SET
MVCR dimesion set e.g. 128,256,512LAYER_SET
Layers that MVCR adds to e.g. 2,12GPU
CUDA GPUSEED
Runnning seedRECON_LOSS
Ratio used for reconstruction lossDROPOUT
Dropout rate for all layersMIXOUT
Mixout rate- to run the model on the subsampled datasets, add
--sample_train
option.
We provide the following sample scripts.
- To Train MVCR on sentence-level tasks:
bash aebert.sh bert-base-uncased DATA_SEED NUM_SAMPLES TASK NUM_DIM_SET DIM_SET LAYER_SET GPU SEED RECON_LOSS DROPOUT MIXOUT AE2TK
- To Train MVCR on token-level tasks:
bash panx.sh
If you find this code useful, please cite our paper:
@misc{liu2022robust,
title={Towards Robust Low-Resource Fine-Tuning with Multi-View Compressed Representations},
author={Linlin Liu and Xingxuan Li and Megh Thakkar and Xin Li and Lidong Bing and Shafiq Joty and Luo Si},
year={2022},
eprint={2211.08794},
archivePrefix={arXiv},
primaryClass={cs.CL}
}