unparallelled commited on
Commit
f6b525a
·
verified ·
1 Parent(s): 548b016

Upload scripts/vb_t64.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. scripts/vb_t64.sh +38 -0
scripts/vb_t64.sh ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # Same diagnostic on t64 (64k-trained, invariant intact) -- does correctly
3
+ # configured long-context training move backward retrieval, or only forward?
4
+ set -uo pipefail
5
+ cd "$(dirname "$0")"
6
+ export PATH=/root/Adhi/BluTrain/envv/bin:$PATH
7
+ source /root/Adhi/BluTrain/envv/bin/activate 2>/dev/null
8
+ L=vb_logs; M="$L/t64.log"
9
+ say(){ echo "[$(date -u +%H:%M:%S)] $*" | tee -a "$M" >&2; }
10
+ say "waiting for the base/p1final pass to finish..."
11
+ while ! grep -qa '^\[.*\] DONE' "$L/master.log" 2>/dev/null; do
12
+ pgrep -x bluscriptCP_exec >/dev/null 2>&1 || sleep 20
13
+ sleep 30
14
+ done
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
+ HAY=Data_Loader/Data/b2_8192_16384/val_shard_00000.bin
17
+ run(){ local T=$1 S=$2 PL=$3
18
+ local O="vbt64_len${PL}"
19
+ [ -s "$O/summary.csv" ] && [ "$(wc -l < "$O/summary.csv")" -gt 1 ] && { say " len $PL cached"; return 0; }
20
+ say " t64 len $PL (T=$T x$S -> virtual $((PL/S)))"
21
+ A1B="$A680" HAY="$HAY" GEN_DATA_ROOT="Data_Loader/Data/evalsrc" \
22
+ CKPT_EXTRA="t64=t64.ckpt" CKPTS="t64" TASKS="val_backward niah_single" N=100 \
23
+ T=$T YARN=$S YARN_ORIG=4096 PROMPT_LEN=$PL GPUS=0 NP=1 OUT="$O" \
24
+ ./run_longeval.sh >> "$L/t64_${PL}.log" 2>&1
25
+ if [ -s "$O/summary.csv" ] && [ "$(wc -l < "$O/summary.csv")" -gt 1 ]; then
26
+ say " $(head -1 $O/summary.csv)"; tail -n +2 "$O/summary.csv"|sed 's/^/ /'|tee -a "$M" >&2
27
+ else say " FAILED"; grep -ahA2 'what()\|parameter count' "$O"/gen/*.log 2>/dev/null|head -4|tee -a "$M" >&2; fi
28
+ }
29
+ say "=== t64 (64k-trained, invariant intact) ==="
30
+ run 16384 4 1024
31
+ run 16384 4 4096
32
+ run 32768 8 8192
33
+ run 65536 16 16360
34
+ say "=== t64 SUMMARY ==="
35
+ for PL in 1024 4096 8192 16360; do
36
+ f="vbt64_len${PL}/summary.csv"; [ -f "$f" ] && say " len $PL | $(tail -n +2 $f | tr '\n' ' ')"
37
+ done
38
+ say "T64 DONE"