File size: 3,285 Bytes
5c6c847
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cf9d631
5c6c847
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# 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 <https://huggingface.co/settings/tokens>. 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 <your-username>/ZeroPoint --type model --public
```

Replace `<your-username>` 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 "<release-root>"   # the directory containing README.md, LICENSE, models/, docs/ (i.e. the parent of this scripts/ folder)

hf upload <your-username>/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/<your-username>/ZeroPoint" | head -c 2000
```

Then open <https://huggingface.co/<your-username>/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.