Lite Self-Training
Перейти к файлу
subhomj 4d461bc6b1
Merge pull request #11 from microsoft/users/GitHubPolicyService/87af3491-3383-4074-bfc9-c6a3e4889b7c
Adding Microsoft SECURITY.MD
2022-08-30 11:37:34 -07:00
auto_label_mapping
auto_template
data version 0.1 2021-10-18 16:57:21 -04:00
figs Delete ddd 2021-10-18 17:04:42 -04:00
src update 2021-10-18 16:05:47 -04:00
LICENSE Create LICENSE 2022-03-02 14:00:20 -05:00
README.md Update README.md 2021-10-18 17:10:43 -04:00
SECURITY.md Microsoft mandatory file 2022-07-25 19:07:57 +00:00
requirements.txt Update requirements.txt 2021-10-29 16:02:24 -04:00
run.sh update 2021-10-18 16:05:47 -04:00

README.md

LiST (Lite Self-Training)

This is the implementation of the paper LiST: Lite Self-training Makes Efficient Few-shot Learners. LiST is short for Lite Self-Training.

Overview

Setup Environment

Install via pip:

  1. create a conda environment running Python 3.7:
conda create --name LiST python=3.7
conda activate LiST
  1. install the required dependencies:
pip install -r requirements.txt

Use docker:

  1. Pull docker
docker pull yaqing/pytorch-few-shot:v0.6
  1. Run docker
docker run -it --rm --runtime nvidia  yaqing/pytorch-few-shot:v0.6 bash

Please refer to the following link if you first use docker: https://docs.docker.com/

NOTE: Different versions of packages (like pytorch, transformers, etc.) may lead to different results from the paper. However, the trend should still hold no matter what versions of packages you use.

Prepare the data

Please run the following commands to prepare data for experiments:

cd data
bash prepare_dataset.sh
cd ..

Run the model

We prepare scripts to run tasks. Please use bash script under LiST directory.

Run LiST as:

bash run.sh

Note that we ran experiments on V100 GPU (32GB) for LiST models. You may need to reduce batch size for other GPUs.

Supported datasets:

MNLI, RTE, QQP, SST-2, subj and MPQA with shots of 10, 20, 30.

Notes and Acknowledgments

The implementation is based on https://github.com/huggingface/transformers
We also used some code from: https://github.com/princeton-nlp/LM-BFF

How do I cite LiST?

@article{wang2021list,
  title={LiST: Lite Self-training Makes Efficient Few-shot Learners},
  author={Wang, Yaqing and Mukherjee, Subhabrata and Liu, Xiaodong and Gao, Jing and Awadallah, Ahmed Hassan and Gao, Jianfeng},
  journal={arXiv preprint arXiv:2110.06274},
  year={2021}
}