Permalink
Cannot retrieve contributors at this time
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?
saliency-based-citation/launch_exp.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
54 lines (47 sloc)
1.86 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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." |