#!/usr/bin/env bash # THE DECISIVE TEST: YaRN OFF (scale=1). virtual position == real position. # Everything inside the 4,096 pretrain range, no compression, no interpolation. # # Every score we have is a function of VIRTUAL position and not token count: # v128 -> ~99, v1023 -> ~92, v2047 -> 45-63, v4094 -> 41 # and t128c EQUALS t64 at v128 and v1023. So extension training added no new # positional competence; only inference-time compression ever helped. # # If these models fail at REAL position 2,048-4,096 with scale=1, the ceiling is # in the base model's pretraining (theta=500,000 at a 4,096 pretrain leaves 32 of # 64 RoPE dims without a full rotation) and no extension recipe can fix it. # If they score ~95 flat, positions 1-4096 are healthy and YaRN's ramp at # scale>1 is what destroys v2047 -- a fixable extension problem. set -uo pipefail; cd "$(dirname "$0")" export LD_LIBRARY_PATH="$(cd ../.. && pwd)/Tensor-Implementations/lib:$(cd ../.. && pwd)/Profiler/lib:${LD_LIBRARY_PATH:-}" export PATH=/usr/local/cuda/bin:$PATH; export PY=/root/Adhi/BluTrain/envv/bin/python L=eval_scale1_logs; mkdir -p "$L" A680="CP_N_EMBD=1536 CP_N_LAYER=24 CP_N_HEAD=12 CP_N_KVHEAD=4 CP_FFN=4096 CP_WEIGHT_TYING=1" say(){ echo "[$(date -u +%H:%M:%S)] $*" | tee -a "$L/master.log" >&2; } : # ordering handled by eval_chain.sh say "=== scale=1 (YaRN OFF): p1_s200 / t64 / c300 at 1024, 2048, 4096 ===" for PL in 1024 2048 4096; do O="es1_${PL}" A1B="$A680" HAY="data/mix128_b6_60/val_shard_00000.bin" GEN_DATA_ROOT="data/mix128_b6_60" \ CKPT_EXTRA="p1=p1_s200.ckpt t64=t64.ckpt c300=t128c_s300.ckpt" CKPTS="p1 t64 c300" \ TASKS="niah_single" N=100 T=8192 YARN=1 YARN_ORIG=4096 PROMPT_LEN="$PL" \ GPUS="0,1,2,3" NP=1 JOBS_PER_GPU=3 OUT="$O" ./run_longeval.sh > "$L/len_${PL}.log" 2>&1 say " real pos $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')" done say "compare: at virtual 1023 every model scores ~92; at v2047, 45-63" say "EVAL_SCALE1_DONE"