Upload scripts/eval_long.sh with huggingface_hub
Browse files- scripts/eval_long.sh +31 -0
scripts/eval_long.sh
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# THE MISSING EVAL: 65,512 and 131,000 -- the lengths this rung actually targets.
|
| 3 |
+
# Everything measured so far was 4,096 / 32,744, i.e. a quarter of the window.
|
| 4 |
+
# T=131072 YaRN x32 ORIG=4096 -> virtual 2,047 @65,512 and 4,094 @131,000.
|
| 5 |
+
# 131,000 sits at the very edge of the 4,096 pretrain range, so expect a drop
|
| 6 |
+
# for every model; the comparison between models is what matters.
|
| 7 |
+
set -uo pipefail; cd "$(dirname "$0")"
|
| 8 |
+
export LD_LIBRARY_PATH="$(cd ../.. && pwd)/Tensor-Implementations/lib:$(cd ../.. && pwd)/Profiler/lib:${LD_LIBRARY_PATH:-}"
|
| 9 |
+
export PATH=/usr/local/cuda/bin:$PATH; export PY=/root/Adhi/BluTrain/envv/bin/python
|
| 10 |
+
L=eval_long_logs; mkdir -p "$L"; M="$L/master.log"
|
| 11 |
+
A680="CP_N_EMBD=1536 CP_N_LAYER=24 CP_N_HEAD=12 CP_N_KVHEAD=4 CP_FFN=4096 CP_WEIGHT_TYING=1"
|
| 12 |
+
EX="c300=t128c_s300.ckpt d300=t128d_s300.ckpt d360=t128d_s360.ckpt"
|
| 13 |
+
NM="c300 d300 d360"
|
| 14 |
+
say(){ echo "[$(date -u +%H:%M:%S)] $*" | tee -a "$M" >&2; }
|
| 15 |
+
blk(){ local PL="$1"; local JPG="$2"; local O="el_${PL}"
|
| 16 |
+
[ -s "$O/summary.csv" ] && grep -q '^niah_single,' "$O/summary.csv" && { say " $PL cached"; return; }
|
| 17 |
+
A1B="$A680" HAY="data/mix128_b6_60/val_shard_00000.bin" GEN_DATA_ROOT="data/mix128_b6_60" \
|
| 18 |
+
CKPT_EXTRA="$EX" CKPTS="$NM" TASKS="niah_single" N=100 \
|
| 19 |
+
T=131072 YARN=32 YARN_ORIG=4096 PROMPT_LEN="$PL" GPUS="0,1,2,3" NP=1 JOBS_PER_GPU="$JPG" OUT="$O" \
|
| 20 |
+
./run_longeval.sh > "$L/len_${PL}.log" 2>&1
|
| 21 |
+
say " len $PL: $(head -1 $O/summary.csv 2>/dev/null|tr -d '\r') -> $(grep -h '^niah_single,' $O/summary.csv 2>/dev/null|tr -d '\r')"; }
|
| 22 |
+
say "=== LONG eval: c300 / d300 / d360 at 65,512 then 131,000 ==="
|
| 23 |
+
blk 65512 2 # 3 jobs, 8 slots
|
| 24 |
+
say " 65k done, starting 131k at JOBS_PER_GPU=1 (4x the activations)"
|
| 25 |
+
blk 131000 1 # 3 jobs, 4 slots -- conservative on memory
|
| 26 |
+
say "=== LONG RESULTS ==="
|
| 27 |
+
for PL in 65512 131000; do
|
| 28 |
+
say " $PL: $(head -1 el_${PL}/summary.csv 2>/dev/null|tr -d '\r') -> $(grep -h '^niah_single,' el_${PL}/summary.csv 2>/dev/null|tr -d '\r')"
|
| 29 |
+
done
|
| 30 |
+
say "ref @65,512 x32: t64=63 old-t128=31 (@131,000 never measured for anything)"
|
| 31 |
+
say "EVAL_LONG_DONE"
|