File size: 1,475 Bytes
8c9ba62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/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 <account> -p <partition> --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"