Download other_transfer/scripts/train_sft_2gpu.pbs from hk239/PhysVLM: direct link, hf CLI and curl.
- Browser
- Download file 1.59 kB
-
https://huggingface.co/datasets/hk239/PhysVLM/resolve/main/other_transfer/scripts/train_sft_2gpu.pbs
- Command line
-
hf download hf://datasets/hk239/PhysVLM/other_transfer/scripts/train_sft_2gpu.pbs
-
curl -L -o train_sft_2gpu.pbs https://huggingface.co/datasets/hk239/PhysVLM/resolve/main/other_transfer/scripts/train_sft_2gpu.pbs
1.59 kB
| #PBS -N physics_sft_2gpu | |
| #PBS -q normal | |
| #PBS -P 11714283 | |
| #PBS -l select=1:ncpus=28:ngpus=2 | |
| #PBS -l walltime=24:00:00 | |
| #PBS -j oe | |
| #PBS -k oe | |
| #PBS -o checkpoints/physics-qwen25vl-sft/pbs_2gpu.out | |
| # | |
| # Submit from the repo root: | |
| # mkdir -p checkpoints/physics-qwen25vl-sft | |
| # qsub scripts/train_sft_2gpu.pbs | |
| # Live training log: | |
| # tail -f checkpoints/physics-qwen25vl-sft/train_2gpu.txt | |
| set -euo pipefail | |
| cd "${PBS_O_WORKDIR:?qsub this from the repo root so PBS_O_WORKDIR is set}" | |
| CKPT_DIR="${PWD}/checkpoints/physics-qwen25vl-sft" | |
| LOG_TXT="${CKPT_DIR}/train_2gpu.txt" | |
| mkdir -p "${CKPT_DIR}" | |
| touch "${LOG_TXT}" | |
| export PYTHONPATH="${PWD}/src${PYTHONPATH:+:$PYTHONPATH}" | |
| export HF_HOME="${HF_HOME:-$PWD/.cache/huggingface}" | |
| export TOKENIZERS_PARALLELISM=false | |
| export PYTHONUNBUFFERED=1 | |
| source ~/.bashrc | |
| if [[ -n "${PHYSICS_SFT_CONDA_ENV:-}" ]]; then | |
| conda activate "$PHYSICS_SFT_CONDA_ENV" | |
| elif [[ -x "$PWD/.venv/bin/python" ]]; then | |
| # shellcheck disable=SC1091 | |
| source "$PWD/.venv/bin/activate" | |
| fi | |
| PYTHON="$(command -v python)" | |
| { | |
| echo "===== job start $(date -Is) =====" | |
| echo "cwd=$(pwd) python=$PYTHON host=$(hostname) PBS_JOBID=${PBS_JOBID:-}" | |
| nvidia-smi -L || true | |
| } | tee -a "${LOG_TXT}" | |
| # Line-buffered so tail -f updates as the job runs. | |
| stdbuf -oL -eL "$PYTHON" -m accelerate.commands.launch --num_processes 2 \ | |
| --config_file configs/accelerate_ddp_2gpu.yaml \ | |
| src/physics_model/sft.py --config configs/sft_qwen25vl_7b_2gpu.yaml \ | |
| --skip-length-scan \ | |
| 2>&1 | tee -a "${LOG_TXT}" | |
| echo "===== job end $(date -Is) =====" | tee -a "${LOG_TXT}" | |