Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#!/bin/bash
# Check if a model name is provided
if [ $# -eq 0 ]; then
echo "Please provide a model name as an argument."
echo "Usage: $0 <model_name>"
echo "Supported model names: llama31_70B, llama31_8B, mistral_7B, zephyr_7B"
exit 1
fi
MODEL_NAME=$1
# Function to run a single pipeline command
run_pipeline() {
echo "Executing: $1"
eval $1
}
# Function to run the full pipeline for a given configuration
run_full_pipeline() {
local base_name=$1
run_pipeline "python run_pipeline.py --yaml_config ${base_name}.yaml"
run_pipeline "python run_pipeline.py --attribution_system prompt_based --yaml_config ${base_name}.yaml"
run_pipeline "python run_pipeline.py --attribution_system gradient_based --yaml_config ${base_name}.yaml"
run_pipeline "python run_pipeline.py --yaml_config ${base_name}_best.yaml"
run_pipeline "python run_pipeline.py --yaml_config ${base_name}_smoothing.yaml"
run_pipeline "python run_pipeline.py --yaml_config ${base_name}_thresholding.yaml"
}
# Run the appropriate pipeline based on the model name
case $MODEL_NAME in
"llama31_70B")
run_full_pipeline "llama31_70B"
;;
"llama31_8B")
run_full_pipeline "llama31_8B"
;;
"default")
run_pipeline "python run_pipeline.py"
run_pipeline "python run_pipeline.py --attribution_system prompt_based"
run_pipeline "python run_pipeline.py --attribution_system gradient_based"
run_pipeline "python run_pipeline.py --yaml_config best.yaml"
run_pipeline "python run_pipeline.py --yaml_config smoothing.yaml"
run_pipeline "python run_pipeline.py --yaml_config thresholding.yaml"
;;
*)
echo "Unsupported model name: $MODEL_NAME"
echo "Supported model names: llama31_70B, llama31_8B, mistral_7B, zephyr_7B"
exit 1
;;
esac
echo "All pipeline runs completed."