| #SBATCH --job-name=activation_single # Job name | |
| #SBATCH --output=activation_single.log # Standard output log | |
| #SBATCH --error=activation_single.log # Standard error log | |
| #SBATCH --ntasks=1 # Number of tasks (processes) | |
| #SBATCH --cpus-per-task=32 # Number of CPU cores | |
| #SBATCH --mem=256G # Memory | |
| #SBATCH --gres=gpu:1 # Number of GPUs | |
| #SBATCH --partition=physical-gpu # Partition/queue name | |
| #!/usr/bin/env bash | |
| BASE_PATH="/home/khanh/sla/sla_cpt" | |
| ID_BASE_PATH="./oscar_ids" | |
| ACTIVATION_BASE_PATH="./new_new_activations" | |
| # --- Run Configs (clean style) --- | |
| # run_l2_13b=( | |
| # name="l2-13b" | |
| # model="$BASE_PATH/uccix/checkpoint-4280" | |
| # type="llama" | |
| # ids=( | |
| # "$ID_BASE_PATH/l2-13b/id.ga.train.l2-13b:ga" | |
| # "$ID_BASE_PATH/l2-13b/id.en.train.l2-13b:en" | |
| # ) | |
| # ) | |
| run_q25_zh=( | |
| name="q2.5-zh" | |
| model="$BASE_PATH/qwen2.5-0.5b_english_wiki_750M_chinese_wikipedia_corpus_2e_240925/checkpoint-2944" | |
| type="qwen" | |
| ids=( | |
| "$ID_BASE_PATH/q2.5/id.zh.train.q2.5" | |
| "$ID_BASE_PATH/q2.5/id.en.train.q2.5" | |
| ) | |
| ) | |
| # --- Put them in a list --- | |
| ALL_RUNS=(run_q25_zh) | |
| # --- Loop --- | |
| for run in "${ALL_RUNS[@]}"; do | |
| declare -n cfg="$run" | |
| echo "=== Running ${cfg[name]} ===" | |
| for id_path in "${cfg[ids][@]}"; do | |
| echo " -> $id_path" | |
| python3 activation_single.py \ | |
| -m "${cfg[model]}" \ | |
| -t "${cfg[type]}" \ | |
| -i "$id_path" \ | |
| -n "${cfg[name]}" \ | |
| -s "$ACTIVATION_BASE_PATH" | |
| done | |
| done | |