File size: 1,468 Bytes
d261d67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# Cheap throughput probe: load Dream-7B, time a few generations per task,
# so we can size the real run before spending on it.
set -euo pipefail
pip install -q "transformers==4.46.2" "huggingface_hub<1.0" "datasets<4" "accelerate" 2>&1 | tail -1

python -c "
from huggingface_hub import snapshot_download
snapshot_download('ashishk1331/ccd-repro-code', repo_type='dataset', local_dir='/work')
print('code downloaded')
"
cd /work
nvidia-smi --query-gpu=name,memory.total --format=csv

# 2 examples each: Trip (top_p=1, 256 steps) and HumanEval (top_p=0.9, 768 steps)
python scripts/run_eval.py --task trip --method baseline --limit 2 --out outputs/probe_trip_base.json
python scripts/run_eval.py --task trip --method ccd_ds  --limit 2 --out outputs/probe_trip_ds.json
python scripts/run_eval.py --task humaneval --method baseline --limit 2 --out outputs/probe_he_base.json
python scripts/run_eval.py --task humaneval --method ccd_ds --limit 2 --out outputs/probe_he_ds.json

python - <<'EOF'
import json, glob
print("\n================ PROBE SUMMARY ================")
for f in sorted(glob.glob("outputs/probe_*.json")):
    r = json.load(open(f))
    tot = sum(r["per_example_steps"])
    print(f"{r['task']:10s} {r['method']:9s} steps/ex={r['mean_steps']:7.1f} "
          f"wall={r['wall_clock_s']:6.1f}s  per_forward={r['wall_clock_s']/tot*1000:6.1f}ms "
          f"score={r['score']:.0f}")
print("===============================================")
EOF