Skip to content

Commit 859b2d7

Browse files
Kakulukianjulien-cPierrci
authored
Extend storage limits documentation with management and LFS file dele… (#1531)
* extend storage limits documentation with management and LFS file deletion instructions * add cli * - * super squash * Apply suggestions from code review Co-authored-by: Julien Chaumond <[email protected]> * Add a line for lfs history * Apply suggestions from code review Co-authored-by: Pierric Cistac <[email protected]> --------- Co-authored-by: Julien Chaumond <[email protected]> Co-authored-by: Pierric Cistac <[email protected]>
1 parent c4401ce commit 859b2d7

File tree

1 file changed

+94
-1
lines changed

1 file changed

+94
-1
lines changed

docs/hub/storage-limits.md

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,97 @@ To do that, to ensure we can effectively support the open-source ecosystem, plea
111111

112112
### Grants for private repositories
113113

114-
If you need more model/ dataset storage than your allocated private storage for academic/ research purposes, please reach out to us at [email protected] or [email protected] along with a proposal of how you will use the storage grant.
114+
If you need more model/ dataset storage than your allocated private storage for academic/ research purposes, please reach out to us at [email protected] or [email protected] along with a proposal of how you will use the storage grant.
115+
116+
117+
## How can I free up storage space in my account/organization?
118+
119+
There are several ways to manage and free some storage space in your account or organization. First, if you need more storage space, consider upgrading to PRO or Enterprise Hub plans for increased storage limits.
120+
121+
⚠️ **Important**: Deleting LFS files is a destructive operation that cannot be undone. Make sure to backup your files before proceeding.
122+
123+
Key points to remember:
124+
- Deleting only LFS pointers doesn't free up space
125+
- If you do not rewrite the Git history, future checkouts of branches/tags containing deleted LFS files with existing lfs pointers will fail (to avoid errors, add the following line to your `.gitconfig` file: `lfs.skipdownloaderrors=true`)
126+
127+
128+
### Deleting individual LFS files
129+
130+
1. Navigate to your repository's Settings page
131+
2. Click on "List LFS files" in the "Storage" section
132+
3. Use the actions menu to delete specific files
133+
134+
135+
### Super-squash your repository using the API
136+
137+
The super-squash operation compresses your entire Git history into a single commit. Consider using super-squash when you need to reclaim storage from old LFS versions you're not using. This operation is only available through the [Hub Python Library](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.super_squash_history) or the API.
138+
139+
⚠️ **Important**: This is a destructive operation that cannot be undone, commit history will be permanently lost and **LFS file history will be removed**
140+
141+
The effects from the squash operation on your storage quota are not immediate and will be reflected on your quota within a few minutes.
142+
143+
### Advanced: Track LFS file references
144+
145+
When you find an LFS file in your repository's "List LFS files" but don't know where it came from, you can trace its history using its SHA-256 OID by using the git log command:
146+
147+
```bash
148+
git log --all -p -S <SHA-256-OID>
149+
```
150+
151+
For example:
152+
153+
```bash
154+
git log --all -p -S 68d45e234eb4a928074dfd868cead0219ab85354cc53d20e772753c6bb9169d3
155+
156+
commit 5af368743e3f1d81c2a846f7c8d4a028ad9fb021
157+
Date: Sun Apr 28 02:01:18 2024 +0200
158+
159+
Update LayerNorm tensor names to weight and bias
160+
161+
diff --git a/model.safetensors b/model.safetensors
162+
index a090ee7..e79c80e 100644
163+
--- a/model.safetensors
164+
+++ b/model.safetensors
165+
@@ -1,3 +1,3 @@
166+
version https://git-lfs.github.com/spec/v1
167+
-oid sha256:68d45e234eb4a928074dfd868cead0219ab85354cc53d20e772753c6bb9169d3
168+
+oid sha256:0bb7a1683251b832d6f4644e523b325adcf485b7193379f5515e6083b5ed174b
169+
size 440449768
170+
171+
commit 0a6aa9128b6194f4f3c4db429b6cb4891cdb421b (origin/pr/28)
172+
Date: Wed Nov 16 15:15:39 2022 +0000
173+
174+
Adding `safetensors` variant of this model (#15)
175+
176+
177+
- Adding `safetensors` variant of this model (18c87780b5e54825a2454d5855a354ad46c5b87e)
178+
179+
180+
Co-authored-by: Nicolas Patry <[email protected]>
181+
182+
diff --git a/model.safetensors b/model.safetensors
183+
new file mode 100644
184+
index 0000000..a090ee7
185+
--- /dev/null
186+
+++ b/model.safetensors
187+
@@ -0,0 +1,3 @@
188+
+version https://git-lfs.github.com/spec/v1
189+
+oid sha256:68d45e234eb4a928074dfd868cead0219ab85354cc53d20e772753c6bb9169d3
190+
+size 440449768
191+
192+
commit 18c87780b5e54825a2454d5855a354ad46c5b87e (origin/pr/15)
193+
Date: Thu Nov 10 09:35:55 2022 +0000
194+
195+
Adding `safetensors` variant of this model
196+
197+
diff --git a/model.safetensors b/model.safetensors
198+
new file mode 100644
199+
index 0000000..a090ee7
200+
--- /dev/null
201+
+++ b/model.safetensors
202+
@@ -0,0 +1,3 @@
203+
+version https://git-lfs.github.com/spec/v1
204+
+oid sha256:68d45e234eb4a928074dfd868cead0219ab85354cc53d20e772753c6bb9169d3
205+
+size 440449768
206+
207+
```

0 commit comments

Comments
 (0)