# Clone the repository
conda create -n trace_kd python=3.10
<<<<<<< HEAD
cd trace_kd
=======
conda activate trace_kd
cd Trace_Check_QA
>>>>>>> 525620a5061f1b7a2c8f7a55e0c8d6a4ea51fff6
pip install -r requirements.txt
cd ..conda install -c conda-forge cudatoolkit-dev -y- Run inference on CotempQA dataset:
# example
python inference.py \
--model_name meta-llama/Llama-3.2-1B \
--data_path data/cotempqa/mix.json \
--mode default \
--output_dir results/Cotempqa/evaluation_outputs/ \
--evaluate_result_dir results/Cotempqa/evaluation_results/- Create SFT dataset for CotempQA with Input/Output format (ensure CSV is formatted correctly):
# example
python create_sft_dataset.py \
--csv_path data/cotempqa/dataset_with_labels.csv \
--input_col question \
--output_col answer \
--output_dir data/cotempqa/sft_dataset- Create SFT dataset for CotempQA with Input/Reasoning/Output format (ensure CSV is formatted correctly):
# example
python create_sft_dataset.py \
--csv_path data/cotempqa/dataset_with_labels.csv \
--input_col question \
--output_col answer \
--output_dir data/cotempqa/sft_dataset_with_reasoning \
--include_reasoning \
--reasoning_col labelPush data to your Huggingface and load that dataset in the SFT scripts accordingly. (Data will be made public later on.)
- SFT on Cotempqa example using default settings with QLoRA for the CotempQA SFT dataset (input/output)
sbatch ./scripts/bash_scripts/cotempqa_sft_vanilla.sh "meta-llama/Llama-3.2-1B-Instruct"- SFT on Cotempqa example using default settings with QLoRA for the CotempQA SFT dataset with Temporal Relation and Facts in reasoning trace (input/reasoning + output) (gold labels + facts)
sbatch ./scripts/bash_scripts/cotempqa_sft_reasoning_facts.sh "meta-llama/Llama-3.2-1B-Instruct"- Inference
# for SFT models without any reasoning trace
sbatch ./scripts/bash_scripts/cotempqa_sft_inference.sh "meta-llama/Llama-3.2-1B-Instruct" False False
# for SFT models with reasoning trace with only temporal relation
sbatch ./scripts/bash_scripts/cotempqa_sft_inference.sh "meta-llama/Llama-3.2-1B-Instruct" True True
<<<<<<< HEAD=======
>>>>>>> 525620a5061f1b7a2c8f7a55e0c8d6a4ea51fff6