Skip to content

docs: add hf-mount as an access method to download docs#2406

Merged
davanstrien merged 2 commits intomainfrom
add-hf-mount-to-download-docs
Apr 27, 2026
Merged

docs: add hf-mount as an access method to download docs#2406
davanstrien merged 2 commits intomainfrom
add-hf-mount-to-download-docs

Conversation

@davanstrien
Copy link
Copy Markdown
Member

@davanstrien davanstrien commented Apr 17, 2026

Summary

  • Add ## Using hf-mount section to docs/hub/datasets-downloading.md and docs/hub/models-downloading.md
  • Describes mounting a repo as a local filesystem with hf-mount as an alternative to downloading the full repo
  • Currently hf-mount is only mentioned once in hub-docs (as a subsection of storage-buckets-access.md); these cross-refs promote it as a peer access method alongside hf download, the client library, and git clone

Placement

  • On models-downloading.md, placed after ## Faster downloads so Xet-based downloads (the recommended default) stay more prominent
  • On datasets-downloading.md, at the end (page has no Faster downloads section)
  • Follows the existing file structure: one paragraph + install + example + link to canonical docs

Verified locally

Tested both examples with hf-mount v0.3.1 (NFS backend):

$ hf-mount start repo hf-internal-testing/tiny-random-gpt2 /tmp/mount-test-model
$ ls /tmp/mount-test-model
config.json  merges.txt  model.safetensors  pytorch_model.bin  ...

$ hf-mount start repo datasets/stanfordnlp/imdb /tmp/mount-test-ds
$ ls /tmp/mount-test-ds
plain_text  README.md

The datasets/ prefix on dataset repo IDs is the canonical form per hf-mount-nfs repo --help.

🤖 Generated with Claude Code


Note

Low Risk
Low risk doc-only change that adds a new recommended access option; main risk is user confusion if hf-mount behavior/commands change or platform support differs.

Overview
Adds a new "Using hf-mount" section to the model and dataset download guides, presenting hf-mount as an alternative to fully downloading repos by mounting them as a local, read-only filesystem with lazy fetching.

Includes install + example hf-mount start repo ... commands for a model and a dataset, and links back to storage-buckets-access for full setup, backend options, and caching details.

Reviewed by Cursor Bugbot for commit a1adf93. Bugbot is set up for automated code reviews on this repo. Configure here.

Adds a "Using hf-mount" section to datasets-downloading.md and
models-downloading.md, describing mounting a repo as a local filesystem
as an alternative to downloading.

Examples verified locally with hf-mount v0.3.1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Comment thread docs/hub/datasets-downloading.md Outdated
Address @pcuenca's comment on #2406: first mention of hf-mount now
links to the GitHub repo (product home), and the "see also" link at
the bottom points to the internal setup section in
storage-buckets-access.md. Same change applied symmetrically to both
files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@davanstrien davanstrien requested review from Pierrci and julien-c April 21, 2026 10:45
For large models, you can mount a repo as a local filesystem with [hf-mount](https://github.com/huggingface/hf-mount) instead of downloading the full repo. Files are fetched lazily — only the bytes your code reads hit the network.

```bash
curl -fsSL https://raw.githubusercontent.com/huggingface/hf-mount/main/install.sh | sh
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remember to mention brew after it's in brew

Copy link
Copy Markdown
Member

@Pierrci Pierrci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@davanstrien davanstrien merged commit d9d5216 into main Apr 27, 2026
3 checks passed
@davanstrien davanstrien deleted the add-hf-mount-to-download-docs branch April 27, 2026 11:18
davanstrien added a commit that referenced this pull request Apr 28, 2026
* docs: promote brew install for hf-mount

hf-mount is now in homebrew-core (brew install hf-mount).
Lead with brew across the three install snippets and keep
the install.sh one-liner as an alternative on the main
hf-mount section in storage-buckets-access.md.

Follow-up to #2406 (julien-c review note).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: keep install.sh as alt in compact hf-mount snippets

Users on Linux/servers without Homebrew can still use the
install.sh one-liner. Added as an inline `# or:` comment
in the two compact examples.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: split hf-mount install/mount into separate blocks

Match house style (xet, hf CLI, llama.cpp): brew block,
"Or using an installation script:" prose, curl block,
then the mount command. Cleaner for human readers and
more reliably parseable for agents extracting install
commands from code blocks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: drop install.sh refs for hf-mount (per XciD review)

The hf-mount install.sh script no longer exists (404).
Brew is the only install path now — drop curl alternative
across all three pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants