File size: 1,478 Bytes
36357ab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#SBATCH -p gpu_devel
#SBATCH --gpus=2
#SBATCH -c 12
#SBATCH --mem=200G
#SBATCH -t 06:00:00
#SBATCH -J dv_train
#SBATCH -o /home/bjc75/other/finetuning/logs/%x_%j.out
# MIT License, Bryan Cheng, 2026. Devel lane (D-025): controlled-population training on 2 GPUs (resumable: runs with _ok
# are skipped). GPU 0: seed siblings; GPU 1: distillation data + opposite + targeted fine-tunes (RESEARCH_PLAN 6).
cd /home/bjc75/other/finetuning
export PYTHONUNBUFFERED=1 TOKENIZERS_PARALLELISM=false HF_HOME=/nfs/roberts/scratch/pi_skr2/bjc75/finetuning/hf_home
PY=/nfs/roberts/project/pi_skr2/bjc75/conda_envs/lorapop/bin/python; B=Qwen/Qwen2.5-0.5B-Instruct; D=data/raw/train_data
nvidia-smi --query-gpu=name --format=csv,noheader
IFS=, read -ra G <<< "$CUDA_VISIBLE_DEVICES"
( export CUDA_VISIBLE_DEVICES=${G[0]}
  $PY src/train/train_lora.py --base $B --runs $D/runs_siblings.jsonl --out data/raw/trained/siblings 2>&1 | grep -v -i warn | tail -60 ) &
( export CUDA_VISIBLE_DEVICES=${G[1]}
  $PY src/train/make_data.py distill --base $B --out $D 2>&1 | grep -v -i warn | tail -20
  $PY src/train/train_lora.py --base $B --runs $D/runs_opposite.jsonl --out data/raw/trained/opposite 2>&1 | grep -v -i warn | tail -30
  $PY src/train/train_lora.py --base $B --runs $D/runs_targeted.jsonl --out data/raw/trained/targeted 2>&1 | grep -v -i warn | tail -30 ) &
wait
for s in siblings opposite targeted; do echo "$s ok: $(ls data/raw/trained/$s/*/_ok 2>/dev/null | wc -l)"; done