Assessing consistent logical reasoning abilities of LLMs
Python
2
98 commits
updated May 31, 2024
The provided pipeline requires a gpu environment to run
We include in our repo two folders containing annotated_data and modeling_data.
The data that should be downloaded for the inference tasks can be found in https://github.com/microsoft/LoNLI/tree/main/data named "data_v2.zip" should be unzipped and placed in the "data" folder outside src
In order to evaluate the output of the models we have finetuned and provide 2 mistral7B models so that we can perform evaluation of zero-shot tasks and zero-shot chain-of-thought tasks respectively.
The above folders should be unzipped and placed in src/finetuning folder
Main script for inference is located in 'src/inference.py'.
Example usage to run inference for Starling7B on the spatial subset with zero_shot and CoT reasoning:
srun python -u src/inference.py --model starling7B --run_tasks spatial --prompt-type zero_shot_cot
--model: starling7B, llama3_8B and mistral7B
--run_tasks: spatial, numerical, quantifier, comparative and temporal
--prompt-type: zero_shot and zero_shot_cot
Main script for evaluation is located in "src/evaluate.py".
Perform the following steps to obtain the prediction files to reproduce the logical consistency performance results displayed in the paper
for file in *.zip; do unzip "$file" -d "${file%.*}"; doneExample usage to reproduce results for Starling7B on the numerical predictions subset with zero_shot reasoning evaluated with LLM
python -u src/evaluate.py --model starling7B --task numerical --prompt_type zero_shot_cot --evaluation_type llm
--model: starling7B, llama3_8B and mistral7B
--task: spatial, numerical, quantifier, comparative and temporal
--prompt_type: zero_shot and zero_shot_cot
--evaluation_type: logprob and llm
Note: only use logprob evaluation for zero_shot
In order to perform finetuning, we manually annotated LLMs outputs and placed the outputs in "src/finetuning/annotated_data" folder. Following that, "src/finetuning/ft_data_processing.py" is the module responsible for performing the necessary data splits and structure so that the we can perform finetuning and evaluation. The outputs are stored in "src/finetuning/modeling_data"
Assessing consistent logical reasoning abilities of LLMs
Python
2
98 commits
updated May 31, 2024
The provided pipeline requires a gpu environment to run
We include in our repo two folders containing annotated_data and modeling_data.
The data that should be downloaded for the inference tasks can be found in https://github.com/microsoft/LoNLI/tree/main/data named "data_v2.zip" should be unzipped and placed in the "data" folder outside src
In order to evaluate the output of the models we have finetuned and provide 2 mistral7B models so that we can perform evaluation of zero-shot tasks and zero-shot chain-of-thought tasks respectively.
The above folders should be unzipped and placed in src/finetuning folder
Main script for inference is located in 'src/inference.py'.
Example usage to run inference for Starling7B on the spatial subset with zero_shot and CoT reasoning:
srun python -u src/inference.py --model starling7B --run_tasks spatial --prompt-type zero_shot_cot
--model: starling7B, llama3_8B and mistral7B
--run_tasks: spatial, numerical, quantifier, comparative and temporal
--prompt-type: zero_shot and zero_shot_cot
Main script for evaluation is located in "src/evaluate.py".
Perform the following steps to obtain the prediction files to reproduce the logical consistency performance results displayed in the paper
for file in *.zip; do unzip "$file" -d "${file%.*}"; doneExample usage to reproduce results for Starling7B on the numerical predictions subset with zero_shot reasoning evaluated with LLM
python -u src/evaluate.py --model starling7B --task numerical --prompt_type zero_shot_cot --evaluation_type llm
--model: starling7B, llama3_8B and mistral7B
--task: spatial, numerical, quantifier, comparative and temporal
--prompt_type: zero_shot and zero_shot_cot
--evaluation_type: logprob and llm
Note: only use logprob evaluation for zero_shot
In order to perform finetuning, we manually annotated LLMs outputs and placed the outputs in "src/finetuning/annotated_data" folder. Following that, "src/finetuning/ft_data_processing.py" is the module responsible for performing the necessary data splits and structure so that the we can perform finetuning and evaluation. The outputs are stored in "src/finetuning/modeling_data"