Upload scripts/eval_basex32.sh with huggingface_hub
Browse files- scripts/eval_basex32.sh +32 -0
scripts/eval_basex32.sh
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# base680 at the SAME config as t128c: T=131072, YaRN x32, ORIG=4096.
|
| 3 |
+
# Identical scale AND identical real lengths -> the only difference is the
|
| 4 |
+
# extension training. This is the "what did 128k training actually buy" test,
|
| 5 |
+
# and it removes the real-length confound in my earlier virtual-position claim.
|
| 6 |
+
set -uo pipefail; cd "$(dirname "$0")"
|
| 7 |
+
export LD_LIBRARY_PATH="$(cd ../.. && pwd)/Tensor-Implementations/lib:$(cd ../.. && pwd)/Profiler/lib:${LD_LIBRARY_PATH:-}"
|
| 8 |
+
export PATH=/usr/local/cuda/bin:$PATH; export PY=/root/Adhi/BluTrain/envv/bin/python
|
| 9 |
+
A680="CP_N_EMBD=1536 CP_N_LAYER=24 CP_N_HEAD=12 CP_N_KVHEAD=4 CP_FFN=4096 CP_WEIGHT_TYING=1"
|
| 10 |
+
L=eval_bx32_logs; mkdir -p "$L"; M="$L/master.log"
|
| 11 |
+
say(){ echo "[$(date -u +%H:%M:%S)] $*" | tee -a "$M" >&2; }
|
| 12 |
+
one(){
|
| 13 |
+
local PL="$1"; local G="$2"
|
| 14 |
+
local O="bx32_${PL}"
|
| 15 |
+
A1B="$A680" HAY="data/mix128_b6_60/val_shard_00000.bin" GEN_DATA_ROOT="data/mix128_b6_60" \
|
| 16 |
+
CKPT_EXTRA="base=base680.ckpt" CKPTS="base" TASKS="niah_single" N=100 \
|
| 17 |
+
T=131072 YARN=32 YARN_ORIG=4096 PROMPT_LEN="$PL" GPUS="$G" NP=1 JOBS_PER_GPU=1 OUT="$O" \
|
| 18 |
+
./run_longeval.sh > "$L/len_${PL}.log" 2>&1
|
| 19 |
+
say " base680 x32 len $PL (virtual $((PL/32))) -> $(grep -h '^niah_single,' $O/summary.csv 2>/dev/null|cut -d, -f2|tr -d '\r')"
|
| 20 |
+
}
|
| 21 |
+
say "=== base680 @ x32, T=131072 -- matched to t128c ==="
|
| 22 |
+
one 4096 0 & one 8192 1 & one 16360 2 & one 32744 3 &
|
| 23 |
+
wait
|
| 24 |
+
one 65512 0 & one 131000 1 &
|
| 25 |
+
wait
|
| 26 |
+
say "=== base680 x32 vs t128c x32 (identical config) ==="
|
| 27 |
+
printf " %-8s %-8s %-8s %s\n" len virtual base680 t128c | tee -a "$M"
|
| 28 |
+
for c in "4096 99" "8192 97" "16360 99" "32744 92" "65512 45" "131000 28"; do
|
| 29 |
+
set -- $c; b=$(grep -h '^niah_single,' bx32_$1/summary.csv 2>/dev/null|cut -d, -f2|tr -d '\r')
|
| 30 |
+
printf " %-8s %-8s %-8s %s\n" "$1" "$(($1/32))" "${b:-.}" "$2" | tee -a "$M"
|
| 31 |
+
done
|
| 32 |
+
say "BASEX32 DONE"
|