| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
|
|
| set -e |
| cd /home/datht/mats-sql-tist/alignment-handbook |
|
|
| |
| for pidf in /tmp/collab_planner_vllm.pid /tmp/collab_validator_vllm.pid /tmp/collab_fixer_vllm.pid; do |
| [ -f "$pidf" ] && kill "$(cat $pidf)" 2>/dev/null || true |
| done |
| sleep 5 |
|
|
| LOG=/tmp/collab_orpo_train.log |
| LOG_GPU1=/tmp/collab_orpo_gpu1.log |
|
|
| |
| |
| |
|
|
| |
| ( |
| set -e |
| echo "[GPU1] ORPO fixer (shared)..." | tee $LOG_GPU1 |
| CUDA_VISIBLE_DEVICES=1 PYTHONPATH=src/ ACCELERATE_LOG_LEVEL=info \ |
| /home/datht/anaconda3/envs/mats/bin/accelerate launch \ |
| --main_process_port 29563 \ |
| --config_file recipes/accelerate_configs/single_gpu1_local.yaml \ |
| scripts/run_orpo.py recipes/qwen-coder-0.5b-bird/orpo-fixer.yaml 2>&1 | tee -a $LOG_GPU1 |
| echo "DONE_GPU1_ORPO" >> $LOG_GPU1 |
| ) & |
| GPU1_PID=$! |
|
|
| |
| echo "[GPU0 1/2] ORPO planner INDEPENDENT..." | tee $LOG |
| CUDA_VISIBLE_DEVICES=0 PYTHONPATH=src/ ACCELERATE_LOG_LEVEL=info \ |
| /home/datht/anaconda3/envs/mats/bin/accelerate launch \ |
| --main_process_port 29560 \ |
| --config_file recipes/accelerate_configs/single_gpu0_local.yaml \ |
| scripts/run_orpo.py recipes/qwen-coder-0.5b-bird/orpo-planner-independent.yaml 2>&1 | tee -a $LOG |
|
|
| echo "[GPU0 2/2] ORPO planner COLLABORATIVE..." | tee -a $LOG |
| CUDA_VISIBLE_DEVICES=0 PYTHONPATH=src/ ACCELERATE_LOG_LEVEL=info \ |
| /home/datht/anaconda3/envs/mats/bin/accelerate launch \ |
| --main_process_port 29561 \ |
| --config_file recipes/accelerate_configs/single_gpu0_local.yaml \ |
| scripts/run_orpo.py recipes/qwen-coder-0.5b-bird/orpo-planner-collaborative.yaml 2>&1 | tee -a $LOG |
|
|
| wait $GPU1_PID || true |
| echo "DONE_COLLAB_ORPO" | tee -a $LOG |
|
|