DD3412 chain of verification reproduction
1.0.0
First, create a python virtual environment and install the requirements:
conda create -n CoVe python=3.10
conda activate CoVe
To install requirements:
pip install -r requirements.txt
Then, create a file named .configuration
to store the confidential data, such as OpenAI and HuggingFace API keys. This file should look like:
OPENAI_API_KEY=sk-abc.....
HF_API_KEY=hf_abc.......
To execute CoVe, use the command below:
>> bash scripts/wikidata.sh # for wikidata task, and Llama2-70b model
llama2
, llama2_70b
, llama-65b
, gpt3
joint
, two_step
, factored
wikidata
, wikidata_category
, multispanqa
You can run the experiments using Apptainer with the following steps:
my_apptainer.def
file:# Build the Apptainer container
apptainer build my_container.sif my_apptainer.def
apptainer_job
:SBATCH apptainer_job.sh
Alternatively, you can use the following command:
apptainer exec --nv my_apptainer.sif ./scripts/wikidata.sh # for Wikidata task and Llama2-70b