DD3412 chain of verification reproduction
1.0.0
أولاً ، قم بإنشاء بيئة افتراضية Python وتثبيت المتطلبات:
conda create -n CoVe python=3.10
conda activate CoVe
لتثبيت المتطلبات:
pip install -r requirements.txt
بعد ذلك ، قم بإنشاء ملف يسمى .configuration
لتخزين البيانات السرية ، مثل Openai و Huggingface API مفاتيح. يجب أن يبدو هذا الملف مثل:
OPENAI_API_KEY=sk-abc.....
HF_API_KEY=hf_abc.......
لتنفيذ Cove ، استخدم الأمر أدناه:
>> 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
يمكنك تشغيل التجارب باستخدام Appainer مع الخطوات التالية:
my_apptainer.def
المقدم: # Build the Apptainer container
apptainer build my_container.sif my_apptainer.def
apptainer_job
: SBATCH apptainer_job.sh
بدلاً من ذلك ، يمكنك استخدام الأمر التالي:
apptainer exec --nv my_apptainer.sif ./scripts/wikidata.sh # for Wikidata task and Llama2-70b