| #!/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 |
|
|
| PY=/weka/s225250685/conda-envs/handbook/bin/python |
| VLLM=/weka/s225250685/conda-envs/handbook/bin/vllm |
|
|
| LOG=/weka/s225250685/mats-tist/slurm_logs/gen_bird_yes_only_variations_${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..720}; do curl --noproxy '*' -fs "$1" >/dev/null 2>&1 && return 0; sleep 5; done; return 1; } |
|
|
| $VLLM serve "Qwen/Qwen2.5-72B-Instruct" \ |
| --served-model-name teacher --port 8200 \ |
| --dtype bfloat16 --tensor-parallel-size 2 \ |
| --gpu-memory-utilization 0.92 --max-model-len 4096 \ |
| --max-num-seqs 32 --enforce-eager --disable-log-requests \ |
| > "${LOG}.serve" 2>&1 & |
| wait_url http://localhost:8200/v1/models || { echo "teacher failed" | tee -a "$LOG"; exit 1; } |
|
|
| $PY scripts/gen_synsql_wrong_variations.py \ |
| --input data/external/bird_yes_only.jsonl \ |
| --out data/external/bird_yes_only_with_variations.jsonl \ |
| --teacher_host http://localhost:8200 \ |
| --k_wrong 7 --threads 32 --resume \ |
| 2>&1 | tee -a "${LOG}.gen" |
|
|
| echo "[$(date)] DONE" | tee -a "$LOG" |
| kill_vllm |
|
|