unparallelled commited on
Commit
8ffce4a
·
verified ·
1 Parent(s): f5f5621

Upload scripts/run_longeval.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. scripts/run_longeval.sh +5 -2
scripts/run_longeval.sh CHANGED
@@ -111,7 +111,9 @@ fi
111
  say "longeval: T=$T prompt_len=$PROMPT_LEN max_new=$MAX_NEW n=$N greedy=$GREEDY gpus=$GPUS"
112
 
113
  # ---- 1. prompts (shared across checkpoints; identical bytes => fair compare) --
114
- HAY=$(ls Data_Loader/Data/flux_val_*.bin 2>/dev/null | head -1)
 
 
115
  [ -z "$HAY" ] && HAY=$(ls Data_Loader/Data/flux_train_*.bin 2>/dev/null | head -1)
116
  say "haystack: ${HAY:-<synthetic fallback>}"
117
  [ -z "$HAY" ] && say " WARN: synthetic filler is a weaker distractor than real text -- it INFLATES accuracy. Record this."
@@ -122,7 +124,7 @@ say "haystack: ${HAY:-<synthetic fallback>}"
122
  # scored and marked .done, permanently). The signature covers everything that
123
  # changes prompt content -- N, length, depths, seed, AND the haystack, so a
124
  # synthetic-filler run is not reused once the flux shard arrives.
125
- SIG="N=$N|LEN=$PROMPT_LEN|DEPTHS=$DEPTHS|SEED=0|HAY=$(basename "${HAY:-none}")|HAYSZ=$(stat -c %s "${HAY:-/nonexistent}" 2>/dev/null || echo 0)"
126
  if [ "$(cat "$OUT/prompts/.signature" 2>/dev/null)" != "$SIG" ]; then
127
  say "prompt signature changed -- regenerating prompts and clearing state"
128
  rm -f "$OUT"/prompts/*_prompts.bin "$OUT"/prompts/*_meta.json
@@ -200,6 +202,7 @@ for J in "${jobs[@]:-}"; do
200
  ${BF16:+CP_BF16=$BF16} \
201
  ${YARN_ORIG:+YARN_ORIG_MAXPOS=$YARN_ORIG} \
202
  CP_INIT_FROM="$PWD/$CK/$F" \
 
203
  CP_GENERATE=1 CP_GEN_TOKENS_BIN="$PWD/$PB" \
204
  CP_GEN_PROMPT_LEN=$PROMPT_LEN CP_GEN_N=$N CP_GEN_MAX_NEW=$MAX_NEW \
205
  CP_GEN_GREEDY=$GREEDY CP_GEN_OUT="$PWD/$G" \
 
111
  say "longeval: T=$T prompt_len=$PROMPT_LEN max_new=$MAX_NEW n=$N greedy=$GREEDY gpus=$GPUS"
112
 
113
  # ---- 1. prompts (shared across checkpoints; identical bytes => fair compare) --
114
+ # HAY is overridable: the length-bucket experiment needs a haystack held out from
115
+ # every training arm, and flux is not present on every box.
116
+ HAY=${HAY:-$(ls Data_Loader/Data/flux_val_*.bin 2>/dev/null | head -1)}
117
  [ -z "$HAY" ] && HAY=$(ls Data_Loader/Data/flux_train_*.bin 2>/dev/null | head -1)
118
  say "haystack: ${HAY:-<synthetic fallback>}"
119
  [ -z "$HAY" ] && say " WARN: synthetic filler is a weaker distractor than real text -- it INFLATES accuracy. Record this."
 
124
  # scored and marked .done, permanently). The signature covers everything that
125
  # changes prompt content -- N, length, depths, seed, AND the haystack, so a
126
  # synthetic-filler run is not reused once the flux shard arrives.
127
+ SIG="N=$N|LEN=$PROMPT_LEN|DEPTHS=$DEPTHS|SEED=0|HAY=$(basename "${HAY:-none}")|HAYSZ=$(stat -Lc %s "${HAY:-/nonexistent}" 2>/dev/null || echo 0)"
128
  if [ "$(cat "$OUT/prompts/.signature" 2>/dev/null)" != "$SIG" ]; then
129
  say "prompt signature changed -- regenerating prompts and clearing state"
130
  rm -f "$OUT"/prompts/*_prompts.bin "$OUT"/prompts/*_meta.json
 
202
  ${BF16:+CP_BF16=$BF16} \
203
  ${YARN_ORIG:+YARN_ORIG_MAXPOS=$YARN_ORIG} \
204
  CP_INIT_FROM="$PWD/$CK/$F" \
205
+ CP_DATA_ROOT="$PWD/${GEN_DATA_ROOT:-Data_Loader/Data}" \
206
  CP_GENERATE=1 CP_GEN_TOKENS_BIN="$PWD/$PB" \
207
  CP_GEN_PROMPT_LEN=$PROMPT_LEN CP_GEN_N=$N CP_GEN_MAX_NEW=$MAX_NEW \
208
  CP_GEN_GREEDY=$GREEDY CP_GEN_OUT="$PWD/$G" \