File size: 1,638 Bytes
7d05566
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
33
34
35
36
37
38
#!/bin/bash
# Extend Claim 4 from n=32 to n=64 by scoring ONLY problems 32..63 and merging
# with the runs we already paid for. At n=32 CCD showed +9.38 with a unanimous
# 3-0 McNemar split, but 3 discordant pairs floor out at p=0.250. n=64 should
# give ~6 discordant pairs -- enough for p=0.031 if the pattern holds.
# Cost: 2 x 32 problems instead of 2 x 164. ($2.70 vs $13.85)
set -uo 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')"
cd /work && mkdir -p outputs
python - <<'PY' || exit 1
import torch, sys
if not torch.cuda.is_available(): print("ABORT: no CUDA"); sys.exit(1)
try:
    (torch.zeros(8,8,device="cuda",dtype=torch.bfloat16) @
     torch.zeros(8,8,device="cuda",dtype=torch.bfloat16)).cpu()
except Exception as e:
    print(f"ABORT: GPU unusable: {e}"); sys.exit(1)
print(f"GPU OK: {torch.cuda.get_device_name(0)}")
PY
push () {
  python - <<'PY' 2>&1 | tail -1 || true
from huggingface_hub import HfApi
HfApi().upload_folder(folder_path="outputs", path_in_repo="outputs",
                      repo_id="ashishk1331/ccd-repro-results", repo_type="dataset")
print("pushed")
PY
}
for m in baseline ccd; do
  echo "=========== RUN ext $m (problems 32..63) ==========="
  python scripts/run_eval.py --task humaneval --method $m --limit 32 --offset 32 \
      --temperature 0.0 --top-p 0.9 --out "outputs/c4ext_he_${m}.json" || echo "FAILED $m"
  push
done
echo "=================== HE EXT DONE ==================="