| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| set -u |
| cd /weka/s225250685/mats-tist |
| set -a; source /weka/s225250685/mats-tist/.env; set +a |
| export HF_HOME=/weka/s225250685/Huggingface HF_HUB_CACHE=/weka/s225250685/Huggingface/hub |
| export PYTHONNOUSERSITE=1 NO_PROXY=localhost,127.0.0.1 no_proxy=localhost,127.0.0.1 |
| export PYTHONPATH=/weka/s225250685/mats-tist TOKENIZERS_PARALLELISM=false |
| export DB_EXEC_API_DISABLE=1 |
|
|
| PY=/weka/s225250685/conda-envs/handbook/bin/python |
| VLLM=/weka/s225250685/conda-envs/handbook/bin/vllm |
| SELECTOR_CKPT=alignment-handbook/output/selector-qwen3b-v6-pointwise-rich |
| DEV_FILE=eval_results/paper_SFT_VF_passAt8_bird_dev.jsonl |
|
|
| LOG=/weka/s225250685/mats-tist/slurm_logs/eval_ensemble_v6_${SLURM_JOB_ID}.log |
| kill_vllm() { pkill -9 -f "vllm serve" 2>/dev/null || true; sleep 5; } |
| trap kill_vllm EXIT |
| wait_url() { for i in {1..360}; do curl --noproxy '*' -fs "$1" >/dev/null 2>&1 && return 0; sleep 5; done; return 1; } |
|
|
| echo "[$(date)] Serving selector..." | tee -a "$LOG" |
| $VLLM serve "$SELECTOR_CKPT" \ |
| --served-model-name selector --port 8103 \ |
| --dtype bfloat16 --gpu-memory-utilization 0.85 \ |
| --max-model-len 4096 --enforce-eager --disable-log-requests \ |
| > "$LOG.serve" 2>&1 & |
| if ! wait_url http://localhost:8103/v1/models; then |
| echo "selector failed to come up" | tee -a "$LOG"; exit 1 |
| fi |
| echo "[$(date)] selector ready" | tee -a "$LOG" |
|
|
| echo "[$(date)] Ensemble eval (α=1.0 β=0.3 γ=0.5 δ=0.3)..." | tee -a "$LOG" |
| $PY scripts/compute_bestofn_ensemble_v6.py \ |
| "$DEV_FILE" v6e_paper_SFT_VF_a1b3g5d3 \ |
| --selector_host http://localhost:8103 --model_name selector --threads 16 \ |
| --alpha 1.0 --beta 0.3 --gamma 0.5 --delta 0.3 \ |
| --out_dir eval_results 2>&1 | tee -a "$LOG.eval1" |
|
|
| echo "[$(date)] Ensemble eval (α=1.0 β=0.5 γ=0.5 δ=0.3)..." | tee -a "$LOG" |
| $PY scripts/compute_bestofn_ensemble_v6.py \ |
| "$DEV_FILE" v6e_paper_SFT_VF_a1b5g5d3 \ |
| --selector_host http://localhost:8103 --model_name selector --threads 16 \ |
| --alpha 1.0 --beta 0.5 --gamma 0.5 --delta 0.3 \ |
| --out_dir eval_results 2>&1 | tee -a "$LOG.eval2" |
|
|
| echo "[$(date)] Ensemble eval (α=1.0 β=1.0 γ=0.5 δ=0.3)..." | tee -a "$LOG" |
| $PY scripts/compute_bestofn_ensemble_v6.py \ |
| "$DEV_FILE" v6e_paper_SFT_VF_a1b10g5d3 \ |
| --selector_host http://localhost:8103 --model_name selector --threads 16 \ |
| --alpha 1.0 --beta 1.0 --gamma 0.5 --delta 0.3 \ |
| --out_dir eval_results 2>&1 | tee -a "$LOG.eval3" |
|
|
| echo "[$(date)] DONE" | tee -a "$LOG" |
| kill_vllm |
|
|