aien-train
AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.
Brought by drakestapleton
aien-train / streams / data / fetch.sh
| 1 | #!/bin/bash |
| 2 | # Fetch FineWeb-Edu sample-10BT parquet shards at a pinned Hub revision, verify each against the |
| 3 | # sha256 the Hub publishes (LFS oid), resume-safe. Usage: fetch.sh <dest-dir> <tree.json> |
| 4 | set -u |
| 5 | REV=87f09149ef4734204d70ed1d046ddc9ca3f2b8f9 |
| 6 | DEST=$1; TREE=$2 |
| 7 | python3 -I - "$TREE" <<'P' > "$DEST/.list" |
| 8 | import json,sys |
| 9 | for f in json.load(open(sys.argv[1])): |
| 10 | print(f['path'].split('/')[-1], f['size'], f['lfs']['oid']) |
| 11 | P |
| 12 | while read -r name size oid; do |
| 13 | f="$DEST/$name" |
| 14 | have=$(stat -c %s "$f" 2>/dev/null || echo 0) |
| 15 | if [ "$have" != "$size" ]; then |
| 16 | nice -n 19 ionice -c 3 curl -sSL --retry 8 --retry-delay 5 -C - -o "$f" \ |
| 17 | "https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu/resolve/$REV/sample/10BT/$name" || { echo "FAIL $name"; continue; } |
| 18 | fi |
| 19 | got=$(nice -n 19 ionice -c 3 sha256sum "$f" | cut -d' ' -f1) |
| 20 | if [ "$got" = "$oid" ]; then echo "OK $name $got"; else echo "MISMATCH $name got=$got want=$oid"; fi |
| 21 | done < "$DEST/.list" |