| # export SAMA_CONFIG=./config/sama_dr_lla13.yaml | |
| export SAMA_CONFIG=./config/sama_dr_lla2_13b.yaml | |
| export TOKENIZERS_PARALLELISM=true | |
| # CUDA Include (/cuda.h) | |
| CUDA_INCLUDE_PATH="/home/work/miniconda3/envs/allm/include" | |
| export CPATH=$CPATH:$CUDA_INCLUDE_PATH | |
| export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$CUDA_INCLUDE_PATH | |
| export WANDB_PROJECT="SAMA_DROP" | |
| date +"%F %T" | |
| # python -m src.merge_and_eval_drop \ | |
| # --config_path $SAMA_CONFIG --model.adapter_path Llama2_exps/DROP/t=30d20h51m30,mlr1.0e-03,b4,nb4,4,cL32,rR32,s1,initdef,dr0.0,ep2.0 | |
| # # exps/DROP_FB/mlr=2.0e-03,b=4,nb=4,3,cL=12,rR=16,s=1,init=def,dr0.0,t=23d19h55m22 | |
| # python -m src.merge_and_eval_drop \ | |
| # --config_path $SAMA_CONFIG --model.adapter_path Llama2_exps/DROP/t=30d21h26m00,mlr1.0e-03,b4,nb4,4,cL16,rR16,s1,initdef,dr0.0,ep2.0 | |
| # python -m src.merge_and_eval_drop \ | |
| # --config_path $SAMA_CONFIG --model.adapter_path Llama2_exps/DROP/t=30d22h20m42,mlr1.0e-03,b4,nb4,4,cL16,rR16,s1,initdef,dr0.0,ep2.0 | |
| # python -m src.merge_and_eval_drop \ | |
| # --config_path $SAMA_CONFIG --model.adapter_path Llama2_exps/DROP/t=30d22h54m40,mlr1.0e-03,b4,nb16,16,cL16,rR16,s1,initdef,dr0.0,ep2.0 | |
| # PARENT_DIR="Llama2_exps/DROP" | |
| PARENT_DIR="Llama2_13B/DROP" | |
| for model_dir in "$PARENT_DIR"/*; do | |
| # Ensure it is a directory | |
| if [ -d "$model_dir" ]; then | |
| ft2_dir="$model_dir/ft2" | |
| results_dir="$model_dir/drop_vllm_results.json" | |
| # CONDITION: | |
| # 1. 'ft2' directory MUST exist (-d "$ft2_dir") | |
| # 2. 'results' directory must NOT exist (! -d "$results_dir") | |
| if [ -d "$ft2_dir" ] && [ ! -f "$results_dir" ]; then | |
| echo "----------------------------------------------------------------" | |
| echo "Processing: $model_dir" | |
| echo "Found 'ft2' folder. Starting evaluation..." | |
| # Execute python command | |
| python -m src.merge_and_eval_drop \ | |
| --config_path $SAMA_CONFIG \ | |
| --model.adapter_path "$model_dir" | |
| # exit 1 | |
| # else | |
| # # Logging skip reasons for clarity | |
| # if [ ! -d "$ft2_dir" ]; then | |
| # echo "[SKIP] No 'ft2' folder found in: $model_dir" | |
| # elif [ -d "$results_dir" ]; then | |
| # echo "[SKIP] Results already exist in: $model_dir" | |
| # fi | |
| fi | |
| fi | |
| done | |