Download push_script.sh from Phocinae/Phocinae-Largha-150M-v1: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/Phocinae/Phocinae-Largha-150M-v1/resolve/92ac0dfbf3d93074262438e7172f5c178f921905/push_script.sh
- Command line
-
hf download hf://Phocinae/Phocinae-Largha-150M-v1@92ac0dfbf3d93074262438e7172f5c178f921905/push_script.sh
-
curl -L -o push_script.sh https://huggingface.co/Phocinae/Phocinae-Largha-150M-v1/resolve/92ac0dfbf3d93074262438e7172f5c178f921905/push_script.sh
1.79 kB
| # ============================================================ | |
| # Phocinae-Largha-150M-v1 — HF push script (T-day: 2026-10-08) | |
| # ============================================================ | |
| # PREP-ONLY: this script must NOT be run before T-day, and is | |
| # executed by the release main session, not by the prep chain. | |
| # | |
| # Usage (run from this directory, i.e. hf_repo/): | |
| # HF_TOKEN=hf_xxx bash push_script.sh | |
| # | |
| # Requirements: huggingface-cli (pip install huggingface_hub), | |
| # write token for the org "Phocinae". | |
| # ------------------------------------------------------------ | |
| set -euo pipefail | |
| cd "$(dirname "$0")" | |
| # Mirror endpoint for the push; disable XET so the upload uses | |
| # the classic HTTPS path (avoiding XET-specific edge cases). | |
| export HF_ENDPOINT=https://hf-mirror.com | |
| export HF_HUB_DISABLE_XET=1 | |
| REPO="Phocinae/Phocinae-Largha-150M-v1" | |
| EXPECTED_SHA="db79d5ee2f16597f34e564f5a4363bddb5b5bbd9827c01819725dabcc7802697" | |
| if [[ -z "${HF_TOKEN:-}" ]]; then | |
| echo "ERROR: HF_TOKEN is not set (Phocinae org write token required)." >&2 | |
| exit 1 | |
| fi | |
| if ! command -v huggingface-cli >/dev/null 2>&1; then | |
| echo "ERROR: huggingface-cli not found. Install with: pip install huggingface_hub" >&2 | |
| exit 1 | |
| fi | |
| # Pre-push integrity check: the weights must match the recorded sha256. | |
| ACTUAL_SHA=$(sha256sum model.safetensors | awk '{print $1}') | |
| if [[ "$ACTUAL_SHA" != "$EXPECTED_SHA" ]]; then | |
| echo "ERROR: model.safetensors sha256 mismatch!" >&2 | |
| echo " expected: $EXPECTED_SHA" >&2 | |
| echo " actual: $ACTUAL_SHA" >&2 | |
| exit 1 | |
| fi | |
| echo "sha256 OK: $ACTUAL_SHA" | |
| echo "Pushing repo: $REPO (HF_ENDPOINT=$HF_ENDPOINT, HF_HUB_DISABLE_XET=$HF_HUB_DISABLE_XET)" | |
| huggingface-cli upload "$REPO" . --repo-type model | |
| echo "Push complete. Verify at: https://hf-mirror.com/$REPO" | |