#!/usr/bin/env bash #SBATCH --job-name=ftb-sciworld #SBATCH --nodes=1 #SBATCH --ntasks-per-node=1 #SBATCH --gpus-per-node=8 #SBATCH --cpus-per-task=32 #SBATCH --time=24:00:00 #SBATCH --output=outputs/logs/slurm_%x_%j.out #SBATCH --error=outputs/logs/slurm_%x_%j.out # # Optional Slurm wrapper. Only useful if your 8-GPU node is behind a scheduler; # on a node you already own, just run scripts/run.sh directly. # # sbatch --export=ALL,METHOD=ftb scripts/run_slurm.sbatch # # Add your site's flags on the command line rather than editing this file, e.g. # sbatch -A -p --export=ALL,METHOD=opd scripts/run_slurm.sbatch # # GPU requirement: 8 devices with >= 80 GB each. The teacher is dense Qwen3-32B # at TP2, about 32 GB of weights per device before any KV cache, so 40 GB cards # cannot hold it at this parallelism. set -euo pipefail METHOD=${METHOD:-ftb} BUNDLE=${BUNDLE:-$SLURM_SUBMIT_DIR} cd "$BUNDLE" # Uncomment / adapt for your site: # module load openjdk # source /path/to/venv/bin/activate echo "[sbatch] job=$SLURM_JOB_ID node=$(hostname) method=$METHOD" echo "[sbatch] bundle=$BUNDLE" nvidia-smi --query-gpu=index,name,memory.total --format=csv,noheader || true # Keep Ray's scratch off shared/networked storage where possible. export TMPDIR="${TMPDIR:-$BUNDLE/outputs/tmp}" export RAY_TMPDIR="${RAY_TMPDIR:-$BUNDLE/outputs/ray_tmp}" mkdir -p "$TMPDIR" "$RAY_TMPDIR" outputs/logs srun --unbuffered bash scripts/run.sh "$METHOD"