interplane.Get Omega
Read in your language

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

branch main Branches Tags History

aien-train / streams / data / fetch.sh

21 lines · 967 bytes Raw Blame History
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>
4set -u
5REV=87f09149ef4734204d70ed1d046ddc9ca3f2b8f9
6DEST=$1; TREE=$2
7python3 -I - "$TREE" <<'P' > "$DEST/.list"
8import json,sys
9for f in json.load(open(sys.argv[1])):
10 print(f['path'].split('/')[-1], f['size'], f['lfs']['oid'])
11P
12while 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
21done < "$DEST/.list"