Loading repository data…
Loading repository data…
thuanystuart / repository
Re-implementation of the paper "Chain-of-Verification Reduces Hallucination in Large Language Models" for hallucination reduction. Developed as a final project of the Advanced Deep Learning course (DD3412) at KTH.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
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, gpt3joint, two_step, factoredwikidata, wikidata_category, multispanqaYou 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