# Publishing ZeroPoint to the Hugging Face Hub This note records the exact steps used to publish this release tree as a **public** model repository. It is for the maintainer performing the upload; users of the release do not need it. Never commit a real access token, and never print one in a terminal that records its output. The commands below were checked against `huggingface_hub` 1.27.0 (`hf` CLI). ## 0. Environment: the local proxy is mandatory here In this environment `huggingface.co` is only reachable through the local HTTP proxy at `http://127.0.0.1:7897`. Set both proxy variables in every shell that talks to the Hub, and pin the official endpoint: ```bash export HTTPS_PROXY=http://127.0.0.1:7897 export HTTP_PROXY=http://127.0.0.1:7897 export HF_ENDPOINT=https://huggingface.co ``` If the proxy is not running on port 7897, the commands below hang and then fail with a connection or SSL error — start the proxy first. Do not leave a mirror or an offline `HF_ENDPOINT` in the environment. ## 1. Authenticate (token required) Create a **write** token at . Then either log in interactively (the token is not echoed): ```bash hf auth login ``` or pass the token from an environment variable, without ever writing it to a file: ```bash read -rs HF_TOKEN && export HF_TOKEN # paste at the prompt; input is hidden hf auth login --token "$HF_TOKEN" ``` `hf auth login --token "$HF_TOKEN"` stores the token in the local Hugging Face config (`~/.cache/huggingface/`), so the later commands pick it up automatically. Verify: ```bash hf auth whoami ``` ## 2. Create the public model repository ```bash hf repos create /ZeroPoint --type model --public ``` Replace `` with the account (or organization) that owns the release. If the repository already exists, skip this step and make sure its visibility is public in the repository settings. ## 3. Upload the release tree Upload the **contents** of `repo/` so that `README.md`, `LICENSE`, `docs/`, `models/`, `experiments/`, `tests/`, etc. land at the repository root: ```bash cd "" # the directory containing README.md, LICENSE, models/, docs/ (i.e. the parent of this scripts/ folder) hf upload /ZeroPoint . --type model \ --commit-message "ZeroPoint v0 research prototype: architecture, ZeroCG framework, comparison experiments" ``` This is a single-commit upload of the whole tree. It includes `tests/golden/zeropoint_ref.json` (the fixed reference data required by the self-checks) and must not include model weights, training runs, corpora, or tokens — see `.gitignore`; the release tree itself contains none of those. If the upload is interrupted, re-run the same command: files already uploaded are skipped and the commit is retried. ## 4. Verify the published repository ```bash hf repos ls hf auth whoami # Confirm the public API view, through the proxy: curl -sS --proxy http://127.0.0.1:7897 \ "https://huggingface.co/api/models//ZeroPoint" | head -c 2000 ``` Then open /ZeroPoint> in a browser and confirm that `README.md`, `LICENSE`, `docs/ZeroPoint.md`, `docs/ZeroPoint_EN.md`, and the `tests/golden/` file are all present.