mlandia commited on
Commit
fc5e34c
·
verified ·
1 Parent(s): d077cfe

Document ZeroGPU deploy and gated-model troubleshooting

Browse files
Files changed (1) hide show
  1. README.md +34 -9
README.md CHANGED
@@ -48,19 +48,28 @@ If the Space already exists on `cpu-basic`, switch hardware:
48
  hf spaces settings build-small-hackathon/tiny-aya-compare --hardware zero-a10g
49
  ```
50
 
51
- ### 2. Add the gated-model token
52
 
53
- Both Tiny Aya checkpoints are gated. Add a Space secret so the runtime can download them:
 
 
 
 
 
 
 
 
 
54
 
55
  ```bash
56
- hf spaces secrets add build-small-hackathon/tiny-aya-compare \
57
- --key HF_TOKEN \
58
- --value "$(hf auth token)"
59
  ```
60
 
61
- Use a token with access to `CohereLabs/tiny-aya-global` and `CohereLabs/tiny-aya-earth`.
 
 
62
 
63
- ### 3. Push the app
64
 
65
  From this repo:
66
 
@@ -81,7 +90,7 @@ hf upload build-small-hackathon/tiny-aya-compare . \
81
  --include "requirements.txt"
82
  ```
83
 
84
- ### 4. Verify the deployment
85
 
86
  ```bash
87
  # Runtime stage and hardware
@@ -97,7 +106,23 @@ gradio predict build-small-hackathon/tiny-aya-compare /compare \
97
 
98
  Expect `requested_hardware: zero-a10g` and both models loading at startup (~6 GB each in bf16).
99
 
100
- ### 5. Update after changes
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
 
102
  | Change | Action |
103
  |--------|--------|
 
48
  hf spaces settings build-small-hackathon/tiny-aya-compare --hardware zero-a10g
49
  ```
50
 
51
+ ### 2. Accept gated model access
52
 
53
+ Both checkpoints are **gated** (`auto`). The account whose token you store as `HF_TOKEN` must accept access first:
54
+
55
+ 1. https://huggingface.co/CohereLabs/tiny-aya-global — click **Agree and access**
56
+ 2. https://huggingface.co/CohereLabs/tiny-aya-earth — click **Agree and access**
57
+
58
+ Without this, startup fails with `403 Client Error` / `Cannot access gated repo`.
59
+
60
+ ### 3. Add the gated-model token
61
+
62
+ Add a Space secret so the runtime can download the weights:
63
 
64
  ```bash
65
+ hf spaces secrets add build-small-hackathon/tiny-aya-compare -s HF_TOKEN
 
 
66
  ```
67
 
68
+ This uses your logged-in `hf` token. Re-run after accepting model access if the Space already failed once.
69
+
70
+ Use a token with `read` scope and access to both CohereLabs repos.
71
 
72
+ ### 4. Push the app
73
 
74
  From this repo:
75
 
 
90
  --include "requirements.txt"
91
  ```
92
 
93
+ ### 5. Verify the deployment
94
 
95
  ```bash
96
  # Runtime stage and hardware
 
106
 
107
  Expect `requested_hardware: zero-a10g` and both models loading at startup (~6 GB each in bf16).
108
 
109
+ ### Troubleshooting
110
+
111
+ | Symptom | Fix |
112
+ |---------|-----|
113
+ | `Cannot access gated repo` / `403` on startup | Accept access on both model pages (step 2), then **Factory reboot** the Space |
114
+ | `RUNTIME_ERROR` after changing secrets | Factory reboot: Space Settings → Factory rebuild |
115
+ | `ZeroGPU quota exceeded` (visitors) | Visitors need GPU quota; creators don't pay per visit |
116
+ | Hardware shows `cpu-basic` | `hf spaces settings build-small-hackathon/tiny-aya-compare --hardware zero-a10g` |
117
+
118
+ Restart after fixing access:
119
+
120
+ ```bash
121
+ # Re-upload or reboot from the Space Settings UI → "Factory rebuild"
122
+ hf spaces info build-small-hackathon/tiny-aya-compare --expand runtime
123
+ ```
124
+
125
+ ### 6. Update after changes
126
 
127
  | Change | Action |
128
  |--------|--------|