Setup
Public models need no token. A gated or private model needs a Hugging Face access token:- For a gated model, open its page on the Hub, accept the conditions and wait for access to be granted.
- At huggingface.co/settings/tokens,
click New token and create a
readtoken, or a fine-grained token with read access to that model. - Add
token: ${HF_TOKEN}to the YAML config.
Connect
- YAML
- Python
- TypeScript
workspace.yaml
Layout
- Files keep their repo paths.
repo_idisnamespace/name, or a bare name under the token’s owner. revisionpins a branch, tag or commit (defaultmain);key_prefixmounts one folder of the repo.lsandstatnever download a file;sha256sumon an LFS file answers with the hash the Hub keeps.
Sample runs
echo >, rm, cp and
mv are refused. The hf CLI downloads a copy and
uploads changes back as one commit.
SDK guides
Python
Every config field, the VFS.md and write support.
TypeScript
Every config field, the VFS.md and write support.