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