#!/usr/bin/env bash # Measure, do not assume: is batch-1 decode latency-bound (concurrency helps) or # compute-bound (it does not)? The script header claims ~1.8x at 2/GPU on an # H100 for a 1.06B; this is a 680M on an H200 at a different length, so measure. set -uo pipefail cd "$(dirname "$0")" export PATH=/root/Adhi/BluTrain/envv/bin:$PATH source /root/Adhi/BluTrain/envv/bin/activate 2>/dev/null A680="CP_N_EMBD=1536 CP_N_LAYER=24 CP_N_HEAD=12 CP_N_KVHEAD=4 CP_FFN=4096 CP_WEIGHT_TYING=1" HAY=Data_Loader/Data/b2_8192_16384/val_shard_00000.bin T=16384; S=8; PL=8192 # T must exceed PL+MAX_NEW; x8 -> virtual 1,024 TASKS4="niah_single niah_multikey niah_multivalue vt" for J in 1 4; do rm -rf bench_j${J}; t0=$(date +%s) A1B="$A680" HAY="$HAY" GEN_DATA_ROOT="Data_Loader/Data/evalsrc" \ CKPT_EXTRA="t64=t64.ckpt" CKPTS="t64" TASKS="$TASKS4" N=100 \ T=$T YARN=$S YARN_ORIG=4096 PROMPT_LEN=$PL GPUS=0 NP=1 JOBS_PER_GPU=$J OUT="bench_j${J}" \ ./run_longeval.sh > "bench_j${J}.log" 2>&1 t1=$(date +%s) pk=$(grep -aoE 'mem: [0-9]+MB' bench_j${J}/gen/*.log 2>/dev/null | grep -oE '[0-9]+' | sort -n | tail -1) echo " JOBS_PER_GPU=$J : $(( (t1-t0) )) s for 4 tasks, peak/job ${pk:-?} MB" done