#!/usr/bin/env bash # base680 score as a function of (real position, virtual position). # 14 jobs launched CONCURRENTLY across 4 GPUs (~3-4/GPU). Short-prompt jobs are # ~4-6 GB and latency-bound, so oversubscription is nearly free -- running one # per GPU wasted 97% of the card. # # scale=1 rows give REAL positional competence (virtual==real). # scale>1 rows give the same weights at compressed positions. # If base680 is flat vs VIRTUAL position but drops vs REAL, theta/pretrain is the # ceiling. If it is flat in both to 4,096, the ladder (t32's 4x over-compression) # is the culprit and a re-run fixes it without re-pretraining. set -uo pipefail; cd "$(dirname "$0")" export LD_LIBRARY_PATH="$(cd ../.. && pwd)/Tensor-Implementations/lib:$(cd ../.. && pwd)/Profiler/lib:${LD_LIBRARY_PATH:-}" export PATH=/usr/local/cuda/bin:$PATH; export PY=/root/Adhi/BluTrain/envv/bin/python A680="CP_N_EMBD=1536 CP_N_LAYER=24 CP_N_HEAD=12 CP_N_KVHEAD=4 CP_FFN=4096 CP_WEIGHT_TYING=1" L=eval_bm_logs; mkdir -p "$L"; M="$L/master.log" say(){ echo "[$(date -u +%H:%M:%S)] $*" | tee -a "$M" >&2; } one(){ local S="$1"; local TT="$2"; local PL="$3"; local G="$4" local O="bm_s${S}_${PL}" [ -s "$O/summary.csv" ] && grep -q '^niah_single,' "$O/summary.csv" && return A1B="$A680" HAY="data/mix128_b6_60/val_shard_00000.bin" GEN_DATA_ROOT="data/mix128_b6_60" \ CKPT_EXTRA="base=base680.ckpt" CKPTS="base" TASKS="niah_single" N=100 \ T=$TT YARN=$S YARN_ORIG=4096 PROMPT_LEN=$PL GPUS="$G" NP=1 JOBS_PER_GPU=1 OUT="$O" \ ./run_longeval.sh > "$L/s${S}_${PL}.log" 2>&1; } say "=== base680 map: 14 concurrent jobs on 4 GPUs ===" one 1 8192 512 0 & one 1 8192 1024 1 & one 1 8192 2048 2 & one 1 8192 3072 3 & one 1 8192 4096 0 & one 2 8192 2048 1 & one 2 8192 4096 2 & one 2 8192 8192 3 & one 4 16384 4096 0 & one 4 16384 8192 1 & one 4 16384 16360 2 & one 8 32768 8192 3 & one 8 32768 16360 0 & one 8 32768 32744 1 & wait say "=== base680: niah_single, N=100, YARN_ORIG=4096 ===" printf " %-6s %-8s %-8s %s\n" scale len virtual score | tee -a "$M" for c in "1 512" "1 1024" "1 2048" "1 3072" "1 4096" "2 2048" "2 4096" "2 8192" \ "4 4096" "4 8192" "4 16360" "8 8192" "8 16360" "8 32744"; do set -- $c; v=$(grep -h '^niah_single,' bm_s$1_$2/summary.csv 2>/dev/null|cut -d, -f2|tr -d '\r') printf " %-6s %-8s %-8s %s\n" "x$1" "$2" "$(($2/$1))" "${v:-.}" | tee -a "$M" done say "BASEMAP DONE"