unparallelled commited on
Commit
beadbc2
·
verified ·
1 Parent(s): fa955e5

Upload source/files/fetch_eval_assets.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. source/files/fetch_eval_assets.sh +48 -0
source/files/fetch_eval_assets.sh ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # Pull everything run_longeval.sh needs from HuggingFace onto a fresh Hopper box.
3
+ # Checkpoints are ~3.9 GB each (~16 GB total, ~6 min each on a typical link).
4
+ set -uo pipefail
5
+ cd "$(dirname "$0")"
6
+ HFR=${HFR:-unparallelled/BluScriptCP}
7
+ HF=${HF:-hf}
8
+ CK=checkpoints_bluscriptcp/rank_0
9
+ mkdir -p "$CK" Data_Loader/Data
10
+
11
+ command -v "$HF" >/dev/null || { echo "ERROR: 'hf' CLI not on PATH (pip install -U huggingface_hub)"; exit 1; }
12
+ "$HF" auth whoami >/dev/null 2>&1 || { echo "ERROR: run '$HF auth login' first"; exit 1; }
13
+
14
+ echo "=== checkpoints ==="
15
+ declare -A MAP=(
16
+ [extended_blumodelcp_run7_step_750.ckpt]=blumodelcp_run7_step_750.ckpt
17
+ [arm_a_blumodelcp_run12_step_400.ckpt]=blumodelcp_run12_step_400.ckpt
18
+ [arm_b_blumodelcp_run15_step_400.ckpt]=blumodelcp_run15_step_400.ckpt
19
+ [arm_c_blumodelcp_run16_step_400.ckpt]=blumodelcp_run16_step_400.ckpt
20
+ )
21
+ for SRC in "${!MAP[@]}"; do
22
+ DST="$CK/${MAP[$SRC]}"
23
+ if [ -f "$DST" ]; then echo " have ${MAP[$SRC]}"; continue; fi
24
+ echo " downloading $SRC"
25
+ "$HF" download "$HFR" "checkpoints/in2/$SRC" --local-dir /tmp/hf_ck >/dev/null \
26
+ && cp "/tmp/hf_ck/checkpoints/in2/$SRC" "$DST" && echo " -> $DST" \
27
+ || echo " FAILED $SRC"
28
+ done
29
+
30
+ # Haystack filler. The generator falls back to synthetic text without it, but real
31
+ # flux text is the distribution the model was trained on, so prefer it.
32
+ echo "=== haystack (flux val shard) ==="
33
+ if ls Data_Loader/Data/flux_val_*.bin >/dev/null 2>&1; then
34
+ echo " have $(ls Data_Loader/Data/flux_val_*.bin | head -1)"
35
+ else
36
+ "$HF" download navingv/flux --repo-type dataset --include "flux_val_000000.bin" \
37
+ --local-dir /tmp/flux >/dev/null 2>&1 \
38
+ && cp /tmp/flux/flux_val_000000.bin Data_Loader/Data/ && echo " -> Data_Loader/Data/flux_val_000000.bin" \
39
+ || echo " WARN: no flux shard; generator will use synthetic filler"
40
+ fi
41
+
42
+ echo "=== python deps ==="
43
+ python3 -c "import tiktoken" 2>/dev/null && echo " tiktoken ok" || pip install -q tiktoken && echo " tiktoken installed"
44
+
45
+ echo
46
+ echo "Next:"
47
+ echo " make CP_FUSED_ROPE=1 CP_ATTN_SPLIT=1 SM_ARCH=90 bluscript-cp -j\$(nproc)"
48
+ echo " ./run_longeval.sh"