hugging-face-cli
Execute Hugging Face Hub operations using the `hf` CLI. Use when the user needs to download models/datasets/spaces, upload files to Hub repositories, create repos, manage local cache, or run compute jobs on HF infrastructure. Covers authentication, file transfers, repository
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Execute Hugging Face Hub operations using the hf CLI. Use when the user needs to download models/datasets/spaces, upload files to Hub repositories, create repos, manage local cache, or run compute jobs on HF infrastructure. Covers authentication, file transfers, repository creation, cache operations, and cloud compute.
How to use
Zainstaluj umiejętność w swoim środowisku agenta, upewniając się, że masz dostęp do narzędzia
hfCLI.Zaloguj się do Hugging Face Hub za pomocą komendy
hf auth login— możesz użyć trybu interaktywnego lub przekazać token bezpośrednio jako zmienną środowiskową.Aby pobrać model, użyj
hf download <repo_id>— jeśli chcesz zapisać go w konkretnym folderze, dodaj flagę--local-dir ./ścieżka.Do przesłania plików na Hub użyj
hf upload <repo_id> . .— ta komenda synchronizuje zawartość lokalnego folderu z repozytorium.Zarządzaj lokalną pamięcią podręczną komendami
hf cache ls(wylistuj),hf cache rm <repo_or_revision>(usuń) — przydatne, gdy chcesz zwolnić miejsce.Aby uruchomić zadanie obliczeniowe na GPU, użyj
hf jobs run --flavor a10g-small <image> <cmd>— wybierz odpowiedni typ instancji w zależności od potrzeb.