MachineSex/hpc/llm_7b_seeds.pbs
Giorgio Gilestro 84124de143 Manuscript revision and pending experiment work, snapshot before restructuring
Clarity pass over the main text (36-item audit), Discussion rewrite and cut,
acknowledgements, Souly et al. as ref 62, lettered SI panels, model section
moved under Results; plus the untracked curriculum/society/compose/smol
configs, runners, figures, stats and tests that the SI already cites.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y64o8FKP7rCuXzC48pxpMm
2026-09-13 16:54:09 +01:00

38 lines
1.5 KiB
Bash
Executable file

#!/bin/bash
# Seeds 2-3 for the three single-seed 7B runs (manuscript review 2026-09-11): llm_merge_hpc
# (Fisher-Muller), llm_moe_hard_hpc (union vs fusion, hard) and llm_directed_hard_hpc (directed
# selection, hard). One element per seed; the hard pair stays sequential because directed reuses the
# hard specialists moe trains (models/llm/spec_*_hard_s{seed}). Seed 1 took 8 + 24 min on one L40S.
# Output lands in results/llm_<name>_hpc/s{seed}/ (seed 1 was moved to s1/).
# submit: qsub hpc/llm_7b_seeds.pbs status: qstat -u $USER -t
#PBS -l select=1:ncpus=8:mem=64gb:ngpus=1:gpu_type=L40S
#PBS -l walltime=01:30:00
#PBS -N lam_7b_seeds
#PBS -J 2-3
cd "$PBS_O_WORKDIR"
export HF_HOME="$EPHEMERAL/hf_cache"
export TOKENIZERS_PARALLELISM=false
export UV_CACHE_DIR="$EPHEMERAL/uvcache"
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
SEED=$PBS_ARRAY_INDEX
source .venv/bin/activate
nvidia-smi --query-gpu=name,memory.total,driver_version --format=csv,noheader
echo "seed=$SEED start=$(date)"
mkdir -p configs/llm/_gen
for NAME in merge moe_hard directed_hard; do
CFG="configs/llm/_gen/${NAME}_hpc_s${SEED}.yaml"
python - "$SEED" "$NAME" "$CFG" <<'PYEOF'
import sys, yaml
seed, name, out = int(sys.argv[1]), sys.argv[2], sys.argv[3]
cfg = yaml.safe_load(open(f"configs/llm/{name}_hpc.yaml"))
cfg["seed"] = seed
cfg["output"] = {"dir": f"results/llm_{name}_hpc/s{seed}"}
yaml.safe_dump(cfg, open(out, "w"), sort_keys=False)
PYEOF
echo "== $NAME seed=$SEED $(date)"
python -m llm.experiment "$CFG"
done
echo "done: $(date)"