├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── additional_args.py ├── data ├── __init__.py ├── keyword_process.py ├── multitoken.py ├── sample_data.py └── scripts │ ├── outer.sh │ └── run_single_file_parse.sh ├── fewshot_trainer.py ├── figures ├── teaser-a.png ├── teaser-b.png └── teaser.png ├── main.py ├── models.py ├── notebook ├── collect_pet_results.ipynb ├── collect_results_from_sheet.ipynb ├── images │ ├── 16shot-boolq.pdf │ ├── 16shot-sst2.pdf │ ├── boolq-zero.pdf │ ├── boolq-zeroshot-electra_generator.pdf │ ├── kplot.pdf │ ├── kplot2.pdf │ ├── sample_sentences_dist.pdf │ ├── sst2-few-shot-roberta.pdf │ ├── sst2-few-shot.pdf │ ├── sst2-few-shot.png │ ├── sst2-fewshot-electra.pdf │ ├── sst2-fewshot-roberta.pdf │ ├── sst2-zero-shot.pdf │ ├── sst2-zero-shot.png │ ├── sst2-zero.pdf │ ├── sst2-zeroshot-electra.pdf │ ├── sst2-zeroshot-electra_generator.pdf │ ├── sst2-zeroshot-roberta.pdf │ ├── zeroshot-boolq.pdf │ ├── zeroshot-imdb.pdf │ ├── zeroshot-qnli.pdf │ └── zeroshot-sst2.pdf ├── plot_hf_model.ipynb ├── plot_learning_rate.ipynb ├── random.ipynb ├── refine_training_data.ipynb └── visualization.ipynb ├── requirements.txt ├── results ├── extract_few_shot_results_v2.py ├── extract_pet.py ├── full_results.py ├── run_ex_multitoken.py └── run_linear_prob.py ├── scripts ├── analyze_v1.sh ├── analyze_v2.sh ├── eval.sh ├── few_shot_prompt_FT.sh ├── few_shot_span_prompt_FT.sh ├── few_shot_standard_FT.sh ├── full_shot_standard_FT.sh ├── legacy │ ├── linear_fit.sh │ ├── linear_prob.sh │ ├── outer_run.sh │ ├── run_prompt_tuning_v2.sh │ ├── train.sh │ └── train_span.sh └── zero_shot_evaluate.sh ├── templates.py └── utils.py /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/README.md -------------------------------------------------------------------------------- /additional_args.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/additional_args.py -------------------------------------------------------------------------------- /data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/data/__init__.py -------------------------------------------------------------------------------- /data/keyword_process.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/data/keyword_process.py -------------------------------------------------------------------------------- /data/multitoken.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/data/multitoken.py -------------------------------------------------------------------------------- /data/sample_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/data/sample_data.py -------------------------------------------------------------------------------- /data/scripts/outer.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/data/scripts/outer.sh -------------------------------------------------------------------------------- /data/scripts/run_single_file_parse.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/data/scripts/run_single_file_parse.sh -------------------------------------------------------------------------------- /fewshot_trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/fewshot_trainer.py -------------------------------------------------------------------------------- /figures/teaser-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/figures/teaser-a.png -------------------------------------------------------------------------------- /figures/teaser-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/figures/teaser-b.png -------------------------------------------------------------------------------- /figures/teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/figures/teaser.png -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/main.py -------------------------------------------------------------------------------- /models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/models.py -------------------------------------------------------------------------------- /notebook/collect_pet_results.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/collect_pet_results.ipynb -------------------------------------------------------------------------------- /notebook/collect_results_from_sheet.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/collect_results_from_sheet.ipynb -------------------------------------------------------------------------------- /notebook/images/16shot-boolq.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/16shot-boolq.pdf -------------------------------------------------------------------------------- /notebook/images/16shot-sst2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/16shot-sst2.pdf -------------------------------------------------------------------------------- /notebook/images/boolq-zero.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/boolq-zero.pdf -------------------------------------------------------------------------------- /notebook/images/boolq-zeroshot-electra_generator.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/boolq-zeroshot-electra_generator.pdf -------------------------------------------------------------------------------- /notebook/images/kplot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/kplot.pdf -------------------------------------------------------------------------------- /notebook/images/kplot2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/kplot2.pdf -------------------------------------------------------------------------------- /notebook/images/sample_sentences_dist.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sample_sentences_dist.pdf -------------------------------------------------------------------------------- /notebook/images/sst2-few-shot-roberta.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-few-shot-roberta.pdf -------------------------------------------------------------------------------- /notebook/images/sst2-few-shot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-few-shot.pdf -------------------------------------------------------------------------------- /notebook/images/sst2-few-shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-few-shot.png -------------------------------------------------------------------------------- /notebook/images/sst2-fewshot-electra.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-fewshot-electra.pdf -------------------------------------------------------------------------------- /notebook/images/sst2-fewshot-roberta.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-fewshot-roberta.pdf -------------------------------------------------------------------------------- /notebook/images/sst2-zero-shot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-zero-shot.pdf -------------------------------------------------------------------------------- /notebook/images/sst2-zero-shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-zero-shot.png -------------------------------------------------------------------------------- /notebook/images/sst2-zero.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-zero.pdf -------------------------------------------------------------------------------- /notebook/images/sst2-zeroshot-electra.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-zeroshot-electra.pdf -------------------------------------------------------------------------------- /notebook/images/sst2-zeroshot-electra_generator.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-zeroshot-electra_generator.pdf -------------------------------------------------------------------------------- /notebook/images/sst2-zeroshot-roberta.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/sst2-zeroshot-roberta.pdf -------------------------------------------------------------------------------- /notebook/images/zeroshot-boolq.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/zeroshot-boolq.pdf -------------------------------------------------------------------------------- /notebook/images/zeroshot-imdb.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/zeroshot-imdb.pdf -------------------------------------------------------------------------------- /notebook/images/zeroshot-qnli.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/zeroshot-qnli.pdf -------------------------------------------------------------------------------- /notebook/images/zeroshot-sst2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/images/zeroshot-sst2.pdf -------------------------------------------------------------------------------- /notebook/plot_hf_model.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/plot_hf_model.ipynb -------------------------------------------------------------------------------- /notebook/plot_learning_rate.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/plot_learning_rate.ipynb -------------------------------------------------------------------------------- /notebook/random.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/random.ipynb -------------------------------------------------------------------------------- /notebook/refine_training_data.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/refine_training_data.ipynb -------------------------------------------------------------------------------- /notebook/visualization.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/notebook/visualization.ipynb -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/requirements.txt -------------------------------------------------------------------------------- /results/extract_few_shot_results_v2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/results/extract_few_shot_results_v2.py -------------------------------------------------------------------------------- /results/extract_pet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/results/extract_pet.py -------------------------------------------------------------------------------- /results/full_results.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/results/full_results.py -------------------------------------------------------------------------------- /results/run_ex_multitoken.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/results/run_ex_multitoken.py -------------------------------------------------------------------------------- /results/run_linear_prob.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/results/run_linear_prob.py -------------------------------------------------------------------------------- /scripts/analyze_v1.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/analyze_v1.sh -------------------------------------------------------------------------------- /scripts/analyze_v2.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/analyze_v2.sh -------------------------------------------------------------------------------- /scripts/eval.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/eval.sh -------------------------------------------------------------------------------- /scripts/few_shot_prompt_FT.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/few_shot_prompt_FT.sh -------------------------------------------------------------------------------- /scripts/few_shot_span_prompt_FT.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/few_shot_span_prompt_FT.sh -------------------------------------------------------------------------------- /scripts/few_shot_standard_FT.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/few_shot_standard_FT.sh -------------------------------------------------------------------------------- /scripts/full_shot_standard_FT.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/full_shot_standard_FT.sh -------------------------------------------------------------------------------- /scripts/legacy/linear_fit.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/legacy/linear_fit.sh -------------------------------------------------------------------------------- /scripts/legacy/linear_prob.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/legacy/linear_prob.sh -------------------------------------------------------------------------------- /scripts/legacy/outer_run.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/legacy/outer_run.sh -------------------------------------------------------------------------------- /scripts/legacy/run_prompt_tuning_v2.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/legacy/run_prompt_tuning_v2.sh -------------------------------------------------------------------------------- /scripts/legacy/train.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/legacy/train.sh -------------------------------------------------------------------------------- /scripts/legacy/train_span.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/legacy/train_span.sh -------------------------------------------------------------------------------- /scripts/zero_shot_evaluate.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/scripts/zero_shot_evaluate.sh -------------------------------------------------------------------------------- /templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/templates.py -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/ELECTRA-Fewshot-Learning/HEAD/utils.py --------------------------------------------------------------------------------