Hugging Face Model Hub
The Hub brings together models, datasets, demos, documentation, versions and permissions.
#Main resources
Use task/framework/language/library filters to find models. Read their model cards for training information, limitations, usage and licensing rather than choosing by download counts alone.
Datasets can offer browser previews and streaming access where supported. Spaces host demonstrations using supported application frameworks and compute tiers; verify resource availability and billing before deployment.
#Download through the SDK
bashpip install huggingface_hub
Use the installed CLI's supported login flow if access is required.
pythonfrom huggingface_hub import snapshot_download, hf_hub_download snapshot_download( repo_id="BAAI/bge-small-zh-v1.5", local_dir="./my_local_model", revision="main", ) file_path = hf_hub_download(repo_id="gpt2", filename="config.json")
For reproducible use, prefer a reviewed immutable revision rather than assuming main remains unchanged.
#Uploading is a separate action
pythonfrom huggingface_hub import HfApi api = HfApi() # These publish repository data; review visibility and contents first. # api.create_repo(repo_id="username/my-model", exist_ok=True) # api.upload_folder(folder_path="./model_files", # repo_id="username/my-model", repo_type="model")
#Versions and large files
Hub repositories retain a Git-style versioning model while large-file transport/storage tooling evolves. Use the current supported Git/SDK workflow and record the version used.
Organizations support shared administration. Gated resources can require approval and license acceptance before download. Check access, permitted use and task/language suitability before adopting a model.
Manage the configured cache location and disk needs deliberately rather than deleting unknown cached artifacts.