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