Please see requirements.txt and Dockerfile for detailed dependencies. The major ones include
python 3.6 or later(for type annotations and f-string)pytorch==1.5.1transformers==3.0.2
To build the docker image, run the following script.
DOCKER_BUILDKIT=1 docker build \
-t ${TAG} \
-f Dockerfile .- Download the data following the examples from here and here.
- Mount the data into
/export/home/Data/Glueand/export/home/Data/HANSinside the image.
- To train the base models, please use
scripts/run_MNLI.shandscripts/run_HANS.sh. - To build FAISS indices, please see the function
create_FAISS_indexinexperiments/hans.py. - Modify the paths in
experiments/constants.pybased on your setup. - To run the experiments, please follow the instructions in
run_experiments.pywhere we have provided most of the default configurations/hyper-parameters.
- This directory contains code that are used to conduct experiments.
- However, the entry-point for experiments is
run_experiments.py.
This directory contains the core components of the influence functions. Most of the codes are designed to be independent of the experiments so could be adapted for others downstream needs. Two of the most important ones are:
influence_utils/nn_influence_utils.pycontains the code for influence functions.influence_utils/parallel.pycontains the code for the parallel variant.
