[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-huggingface--huggingface_hub":3,"similar-huggingface--huggingface_hub":194},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":8,"readme_en":9,"readme_zh":10,"quickstart_zh":11,"use_case_zh":12,"hero_image_url":13,"owner_login":14,"owner_name":15,"owner_avatar_url":16,"owner_bio":17,"owner_company":18,"owner_location":18,"owner_email":18,"owner_twitter":14,"owner_website":19,"owner_url":20,"languages":21,"stars":37,"forks":38,"last_commit_at":39,"license":40,"difficulty_score":41,"env_os":42,"env_gpu":42,"env_ram":42,"env_deps":43,"category_tags":47,"github_topics":50,"view_count":59,"oss_zip_url":18,"oss_zip_packed_at":18,"status":60,"created_at":61,"updated_at":62,"faqs":63,"releases":93},6923,"huggingface\u002Fhuggingface_hub","huggingface_hub","The official Python client for the Hugging Face Hub.","huggingface_hub 是 Hugging Face Hub 的官方 Python 客户端，旨在为开发者提供一套简洁高效的接口，以便在代码中直接与全球最大的开源机器学习社区进行交互。它主要解决了用户在管理模型、数据集和演示应用（Spaces）时面临的繁琐操作问题，让下载预训练资源、上传自有成果、版本控制以及调用云端推理服务变得像编写普通 Python 脚本一样简单。\n\n这款工具非常适合 AI 研究人员、机器学习工程师以及希望将大模型集成到应用中的开发者使用。通过 huggingface_hub，用户无需手动浏览网页下载文件，即可 programmatically 获取数千个前沿模型；同时，它还支持自动化管理仓库、生成模型文档卡片，甚至通过 Pull Request 机制与社区协作。其独特的技术亮点在于将复杂的平台交互封装为直观的函数调用，并提供了强大的搜索与过滤功能，帮助用户快速定位所需资源。无论是想要复现最新论文的研究者，还是构建 AI 应用的工程团队，huggingface_hub 都是连接本地开发环境与云端开源生态不可或缺的桥梁。","\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fdocumentation-images\u002Fraw\u002Fmain\u002Fhuggingface_hub-dark.svg\">\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fdocumentation-images\u002Fraw\u002Fmain\u002Fhuggingface_hub.svg\">\n    \u003Cimg alt=\"huggingface_hub library logo\" src=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fdocumentation-images\u002Fraw\u002Fmain\u002Fhuggingface_hub.svg\" width=\"352\" height=\"59\" style=\"max-width: 100%\">\n  \u003C\u002Fpicture>\n  \u003Cbr\u002F>\n  \u003Cbr\u002F>\n\u003C\u002Fp> \n\n\u003Cp align=\"center\">\n    \u003Ci>The official Python client for the Huggingface Hub.\u003C\u002Fi>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Findex\">\u003Cimg alt=\"Documentation\" src=\"https:\u002F\u002Fimg.shields.io\u002Fwebsite\u002Fhttp\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Findex.svg?down_color=red&down_message=offline&up_message=online&label=doc\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Freleases\">\u003Cimg alt=\"GitHub release\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease\u002Fhuggingface\u002Fhuggingface_hub.svg\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\">\u003Cimg alt=\"PyPi version\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fhuggingface_hub.svg\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fhuggingface-hub\">\u003Cimg alt=\"PyPI - Downloads\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fhuggingface_hub\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fhuggingface\u002Fhuggingface_hub\">\u003Cimg alt=\"Code coverage\" src=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fhuggingface\u002Fhuggingface_hub\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg?token=RXP95LE2XL\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Ch4 align=\"center\">\n    \u003Cp>\n        \u003Cb>English\u003C\u002Fb> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_de.md\">Deutsch\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_fr.md\">Français\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_hi.md\">हिंदी\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_ko.md\">한국어\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_cn.md\">中文 (简体)\u003C\u002Fa>\n    \u003Cp>\n\u003C\u002Fh4>\n\n---\n\n**Documentation**: \u003Ca href=\"https:\u002F\u002Fhf.co\u002Fdocs\u002Fhuggingface_hub\" target=\"_blank\">https:\u002F\u002Fhf.co\u002Fdocs\u002Fhuggingface_hub\u003C\u002Fa>\n\n**Source Code**: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\" target=\"_blank\">https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u003C\u002Fa>\n\n---\n\n## Welcome to the huggingface_hub library\n\nThe `huggingface_hub` library allows you to interact with the [Hugging Face Hub](https:\u002F\u002Fhuggingface.co\u002F), a platform democratizing open-source Machine Learning for creators and collaborators. Discover pre-trained models and datasets for your projects or play with the thousands of machine learning apps hosted on the Hub. You can also create and share your own models, datasets and demos with the community. The `huggingface_hub` library provides a simple way to do all these things with Python.\n\n## Key features\n\n- [Download files](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fdownload) from the Hub.\n- [Upload files](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fupload) to the Hub.\n- [Manage your repositories](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Frepository).\n- [Run Inference](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Finference) on deployed models.\n- [Search](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fsearch) for models, datasets and Spaces.\n- [Share Model Cards](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fmodel-cards) to document your models.\n- [Engage with the community](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fcommunity) through PRs and comments.\n\n## Installation\n\nInstall the `huggingface_hub` package with [pip](https:\u002F\u002Fpypi.org\u002Fproject\u002Fhuggingface-hub\u002F):\n\n```bash\npip install huggingface_hub\n```\n\nIf you prefer, you can also install it with [conda](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Finstallation#install-with-conda).\n\nIn order to keep the package minimal by default, `huggingface_hub` comes with optional dependencies useful for some use cases. For example, if you want to use the MCP module, run:\n\n```bash\npip install \"huggingface_hub[mcp]\"\n```\n\nTo learn more installation and optional dependencies, check out the [installation guide](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Finstallation).\n\n## Quick start\n\n### Download files\n\nDownload a single file\n\n```py\nfrom huggingface_hub import hf_hub_download\n\nhf_hub_download(repo_id=\"tiiuae\u002Ffalcon-7b-instruct\", filename=\"config.json\")\n```\n\nOr an entire repository\n\n```py\nfrom huggingface_hub import snapshot_download\n\nsnapshot_download(\"stabilityai\u002Fstable-diffusion-2-1\")\n```\n\nFiles will be downloaded in a local cache folder. More details in [this guide](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fmanage-cache).\n\n### Login\n\nThe Hugging Face Hub uses tokens to authenticate applications (see [docs](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Fsecurity-tokens)). To log in your machine, run the following CLI:\n\n```bash\nhf auth login\n# or using an environment variable\nhf auth login --token $HUGGINGFACE_TOKEN\n```\n\n### Create a repository\n\n```py\nfrom huggingface_hub import create_repo\n\ncreate_repo(repo_id=\"super-cool-model\")\n```\n\n### Upload files\n\nUpload a single file\n\n```py\nfrom huggingface_hub import upload_file\n\nupload_file(\n    path_or_fileobj=\"\u002Fhome\u002Flysandre\u002Fdummy-test\u002FREADME.md\",\n    path_in_repo=\"README.md\",\n    repo_id=\"lysandre\u002Ftest-model\",\n)\n```\n\nOr an entire folder\n\n```py\nfrom huggingface_hub import upload_folder\n\nupload_folder(\n    folder_path=\"\u002Fpath\u002Fto\u002Flocal\u002Fspace\",\n    repo_id=\"username\u002Fmy-cool-space\",\n    repo_type=\"space\",\n)\n```\n\nFor details in the [upload guide](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fupload).\n\n## Integrating to the Hub.\n\nWe're partnering with cool open source ML libraries to provide free model hosting and versioning. You can find the existing integrations [here](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Flibraries).\n\nThe advantages are:\n\n- Free model or dataset hosting for libraries and their users.\n- Built-in file versioning, even with very large files, thanks to a git-based approach.\n- In-browser widgets to play with the uploaded models.\n- Anyone can upload a new model for your library, they just need to add the corresponding tag for the model to be discoverable.\n- Fast downloads! We use Cloudfront (a CDN) to geo-replicate downloads so they're blazing fast from anywhere on the globe.\n- Usage stats and more features to come.\n\nIf you would like to integrate your library, feel free to open an issue to begin the discussion. We wrote a [step-by-step guide](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Fadding-a-library) with ❤️ showing how to do this integration.\n\n## Contributions (feature requests, bugs, etc.) are super welcome 💙💚💛💜🧡❤️\n\nEveryone is welcome to contribute, and we value everybody's contribution. Code is not the only way to help the community.\nAnswering questions, helping others, reaching out and improving the documentations are immensely valuable to the community.\nWe wrote a [contribution guide](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002FCONTRIBUTING.md) to summarize\nhow to get started to contribute to this repository.\n","\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fdocumentation-images\u002Fraw\u002Fmain\u002Fhuggingface_hub-dark.svg\">\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fdocumentation-images\u002Fraw\u002Fmain\u002Fhuggingface_hub.svg\">\n    \u003Cimg alt=\"huggingface_hub library logo\" src=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fdocumentation-images\u002Fraw\u002Fmain\u002Fhuggingface_hub.svg\" width=\"352\" height=\"59\" style=\"max-width: 100%\">\n  \u003C\u002Fpicture>\n  \u003Cbr\u002F>\n  \u003Cbr\u002F>\n\u003C\u002Fp> \n\n\u003Cp align=\"center\">\n    \u003Ci>Hugging Face Hub 的官方 Python 客户端。\u003C\u002Fi>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Findex\">\u003Cimg alt=\"文档\" src=\"https:\u002F\u002Fimg.shields.io\u002Fwebsite\u002Fhttp\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Findex.svg?down_color=red&down_message=offline&up_message=online&label=doc\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Freleases\">\u003Cimg alt=\"GitHub 发布\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease\u002Fhuggingface\u002Fhuggingface_hub.svg\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\">\u003Cimg alt=\"PyPi 版本\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fhuggingface_hub.svg\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fhuggingface-hub\">\u003Cimg alt=\"PyPI - 下载量\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fhuggingface_hub\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fhuggingface\u002Fhuggingface_hub\">\u003Cimg alt=\"代码覆盖率\" src=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fhuggingface\u002Fhuggingface_hub\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg?token=RXP95LE2XL\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Ch4 align=\"center\">\n    \u003Cp>\n        \u003Cb>English\u003C\u002Fb> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_de.md\">Deutsch\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_fr.md\">Français\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_hi.md\">हिंदी\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_ko.md\">한국어\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002Fi18n\u002FREADME_cn.md\">中文 (简体)\u003C\u002Fa>\n    \u003Cp>\n\u003C\u002Fh4>\n\n---\n\n**文档**: \u003Ca href=\"https:\u002F\u002Fhf.co\u002Fdocs\u002Fhuggingface_hub\" target=\"_blank\">https:\u002F\u002Fhf.co\u002Fdocs\u002Fhuggingface_hub\u003C\u002Fa>\n\n**源代码**: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\" target=\"_blank\">https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u003C\u002Fa>\n\n---\n\n## 欢迎使用 huggingface_hub 库\n\n`huggingface_hub` 库使您能够与 [Hugging Face Hub](https:\u002F\u002Fhuggingface.co\u002F) 进行交互，这是一个为创作者和合作者普及开源机器学习的平台。您可以发现用于项目的预训练模型和数据集，或试用 Hub 上托管的数千个机器学习应用。您还可以创建并分享自己的模型、数据集和演示作品给社区。`huggingface_hub` 库提供了一种简单的方法，让您通过 Python 实现所有这些操作。\n\n## 核心功能\n\n- 从 Hub [下载文件](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fdownload)。\n- 向 Hub [上传文件](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fupload)。\n- 管理您的 [仓库](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Frepository)。\n- 对已部署的模型进行 [推理](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Finference)。\n- 搜索模型、数据集和 Spaces [空间](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fsearch)。\n- 分享 [模型卡片](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fmodel-cards)，以记录您的模型信息。\n- 通过 PR 和评论与社区互动 [参与社区](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fcommunity)。\n\n## 安装\n\n使用 [pip](https:\u002F\u002Fpypi.org\u002Fproject\u002Fhuggingface-hub\u002F) 安装 `huggingface_hub` 包：\n\n```bash\npip install huggingface_hub\n```\n\n如果您更喜欢，也可以使用 [conda](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Finstallation#install-with-conda) 进行安装。\n\n为了保持包的默认最小化，`huggingface_hub` 带有针对某些用例的可选依赖项。例如，如果您想使用 MCP 模块，请运行：\n\n```bash\npip install \"huggingface_hub[mcp]\"\n```\n\n有关更多安装信息及可选依赖项，请参阅 [安装指南](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Finstallation)。\n\n## 快速入门\n\n### 下载文件\n\n下载单个文件：\n\n```py\nfrom huggingface_hub import hf_hub_download\n\nhf_hub_download(repo_id=\"tiiuae\u002Ffalcon-7b-instruct\", filename=\"config.json\")\n```\n\n或者下载整个仓库：\n\n```py\nfrom huggingface_hub import snapshot_download\n\nsnapshot_download(\"stabilityai\u002Fstable-diffusion-2-1\")\n```\n\n文件将被下载到本地缓存文件夹中。更多详情请参阅 [此指南](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fmanage-cache)。\n\n### 登录\n\nHugging Face Hub 使用令牌来验证应用程序（详见 [文档](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Fsecurity-tokens)）。要登录您的设备，请运行以下 CLI：\n\n```bash\nhf auth login\n# 或者使用环境变量\nhf auth login --token $HUGGINGFACE_TOKEN\n```\n\n### 创建仓库\n\n```py\nfrom huggingface_hub import create_repo\n\ncreate_repo(repo_id=\"super-cool-model\")\n```\n\n### 上传文件\n\n上传单个文件：\n\n```py\nfrom huggingface_hub import upload_file\n\nupload_file(\n    path_or_fileobj=\"\u002Fhome\u002Flysandre\u002Fdummy-test\u002FREADME.md\",\n    path_in_repo=\"README.md\",\n    repo_id=\"lysandre\u002Ftest-model\",\n)\n```\n\n或者上传整个文件夹：\n\n```py\nfrom huggingface_hub import upload_folder\n\nupload_folder(\n    folder_path=\"\u002Fpath\u002Fto\u002Flocal\u002Fspace\",\n    repo_id=\"username\u002Fmy-cool-space\",\n    repo_type=\"space\",\n)\n```\n\n详细信息请参阅 [上传指南](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fupload)。\n\n## 集成到 Hub\n\n我们正与优秀的开源机器学习库合作，为其提供免费的模型托管和版本控制服务。您可以在 [这里](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Flibraries)找到现有的集成。\n\n其优势包括：\n\n- 为库及其用户免费托管模型或数据集。\n- 内置文件版本控制，即使是超大文件也能轻松处理，这得益于基于 Git 的方法。\n- 浏览器内小工具，方便您试用上传的模型。\n- 任何人都可以为您的库上传新模型，只需添加相应的标签，即可让该模型被发现。\n- 下载速度快！我们使用 Cloudfront（CDN）对下载进行地理复制，因此无论您身处何地，都能极速下载。\n- 使用统计等更多功能即将推出。\n\n如果您希望将您的库集成到 Hugging Face Hub，请随时提交一个问题以开始讨论。我们编写了一份充满爱意的 [分步指南](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Fadding-a-library)，展示了如何完成这一集成。\n\n## 欢迎大家贡献代码、提出功能需求、报告 bug 等 💙💚💛💜🧡❤️\n\n我们欢迎所有人参与贡献，并珍视每一位贡献者的努力。为社区贡献力量的方式不止于编写代码。\n解答问题、帮助他人、主动联系并完善文档，对社区同样具有极大的价值。\n我们撰写了一份[贡献指南](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fblob\u002Fmain\u002FCONTRIBUTING.md)，总结了如何开始为本仓库做出贡献。","# huggingface_hub 快速上手指南\n\n`huggingface_hub` 是 Hugging Face Hub 的官方 Python 客户端，帮助开发者轻松下载模型、上传文件、管理仓库以及运行推理。\n\n## 环境准备\n\n- **操作系统**：Windows, macOS, Linux\n- **Python 版本**：3.8 及以上\n- **前置依赖**：需安装 `pip` 或 `conda` 包管理器\n- **网络建议**：国内用户若访问缓慢，可配置镜像源或使用代理加速\n\n## 安装步骤\n\n使用 pip 安装（推荐）：\n\n```bash\npip install huggingface_hub\n```\n\n如需使用可选功能（如 MCP 模块），可安装扩展依赖：\n\n```bash\npip install \"huggingface_hub[mcp]\"\n```\n\n国内用户可使用清华镜像源加速安装：\n\n```bash\npip install huggingface_hub -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n## 基本使用\n\n### 1. 下载文件\n\n下载单个文件：\n\n```py\nfrom huggingface_hub import hf_hub_download\n\nhf_hub_download(repo_id=\"tiiuae\u002Ffalcon-7b-instruct\", filename=\"config.json\")\n```\n\n下载整个仓库：\n\n```py\nfrom huggingface_hub import snapshot_download\n\nsnapshot_download(\"stabilityai\u002Fstable-diffusion-2-1\")\n```\n\n> 文件将默认保存至本地缓存目录。\n\n### 2. 登录认证\n\n使用前需通过 Token 登录：\n\n```bash\nhf auth login\n# 或通过环境变量指定 token\nhf auth login --token $HUGGINGFACE_TOKEN\n```\n\nToken 可在 [Hugging Face 官网](https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Ftokens) 获取。\n\n### 3. 创建仓库\n\n```py\nfrom huggingface_hub import create_repo\n\ncreate_repo(repo_id=\"super-cool-model\")\n```\n\n### 4. 上传文件\n\n上传单个文件：\n\n```py\nfrom huggingface_hub import upload_file\n\nupload_file(\n    path_or_fileobj=\"\u002Fhome\u002Flysandre\u002Fdummy-test\u002FREADME.md\",\n    path_in_repo=\"README.md\",\n    repo_id=\"lysandre\u002Ftest-model\",\n)\n```\n\n上传整个文件夹：\n\n```py\nfrom huggingface_hub import upload_folder\n\nupload_folder(\n    folder_path=\"\u002Fpath\u002Fto\u002Flocal\u002Fspace\",\n    repo_id=\"username\u002Fmy-cool-space\",\n    repo_type=\"space\",\n)\n```\n\n---\n\n更多高级用法请参考 [官方文档](https:\u002F\u002Fhf.co\u002Fdocs\u002Fhuggingface_hub)。","某初创公司的算法工程师需要快速迭代一个多语言情感分析系统，频繁地从 Hugging Face Hub 获取最新模型、上传微调版本并测试线上效果。\n\n### 没有 huggingface_hub 时\n- 下载模型需手动在浏览器搜索、复制链接再用 wget 下载，遇到大文件中断后难以断点续传，耗时且易出错。\n- 上传微调后的模型到仓库必须通过 Git 命令行操作，需熟悉复杂的 Git LFS 配置，非代码背景的团队成员难以参与协作。\n- 测试不同模型效果时，需分别编写各框架（如 PyTorch、TensorFlow）的加载代码，缺乏统一的推理接口，导致实验代码冗余杂乱。\n- 查找特定数据集或模型依赖人工浏览网页，无法在脚本中自动筛选指标（如准确率、许可证），严重拖慢选型效率。\n\n### 使用 huggingface_hub 后\n- 调用 `hf_hub_download` 即可一键下载文件，自动处理缓存与断点续传，将模型获取时间从小时级缩短至分钟级。\n- 通过 `upload_file` 函数直接推送模型至远程仓库，屏蔽底层 Git 复杂度，让数据标注人员也能轻松贡献模型版本。\n- 利用 `InferenceClient` 统一调用部署在 Hub 上的数千个模型，无需关心后端框架，几行代码即可完成多模型对比测试。\n- 使用 `list_models` 和 `list_datasets` API 在代码中按标签、热度自动检索资源，实现模型选型的自动化与标准化。\n\nhuggingface_hub 将繁琐的资源管理转化为简单的 Python 函数调用，让团队能专注于算法创新而非基础设施维护。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_huggingface_hub_2d741bb7.png","huggingface","Hugging Face","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fhuggingface_90da21a4.png","The AI community building the future.",null,"https:\u002F\u002Fhuggingface.co\u002F","https:\u002F\u002Fgithub.com\u002Fhuggingface",[22,26,30,33],{"name":23,"color":24,"percentage":25},"Python","#3572A5",99.2,{"name":27,"color":28,"percentage":29},"Shell","#89e051",0.4,{"name":31,"color":32,"percentage":29},"PowerShell","#012456",{"name":34,"color":35,"percentage":36},"Makefile","#427819",0,3506,986,"2026-04-12T09:31:47","Apache-2.0",1,"未说明",{"notes":44,"python":45,"dependencies":46},"该库是 Hugging Face Hub 的官方 Python 客户端，主要用于文件上传下载、仓库管理及推理调用。默认安装为最小化版本，部分功能（如 MCP 模块）需安装可选依赖。支持通过 pip 或 conda 安装。运行某些功能（如登录、上传）需要配置 Hugging Face Token。","3.8+",[],[48,49],"语言模型","开发框架",[51,52,53,54,55,56,57,58],"model-hub","machine-learning","models","natural-language-processing","deep-learning","pytorch","pretrained-models","hacktoberfest",2,"ready","2026-03-27T02:49:30.150509","2026-04-13T04:24:19.500440",[64,69,74,79,84,89],{"id":65,"question_zh":66,"answer_zh":67,"source_url":68},31196,"下载模型时遇到 'OSError: Consistency check failed' 错误怎么办？","这通常是因为下载过程中断导致文件不完整，重新下载时直接追加到了旧文件上。解决方法是清理缓存后重新下载：\n1. 安装 CLI 工具：pip install huggingface_hub[cli]\n2. 删除缓存：huggingface-cli delete-cache\n3. 重新运行下载代码。\n此外，该问题已在 huggingface_hub 的后续版本中修复，建议升级库版本。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fissues\u002F1498",{"id":70,"question_zh":71,"answer_zh":72,"source_url":73},31197,"如何在 Windows 上使用 huggingface_hub 而不需要管理员权限或开启开发者模式？","早期版本在 Windows 上使用符号链接（symlinks）需要管理员权限或开启开发者模式。该问题已在 huggingface_hub v0.10 版本中通过 PR #1067 和 #1077 修复。请确保将库升级到 0.10 或更高版本，升级后即可正常下载模型而无需特殊权限。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fissues\u002F1062",{"id":75,"question_zh":76,"answer_zh":77,"source_url":78},31198,"如何清理 Hugging Face 的本地缓存以释放磁盘空间？","可以使用官方提供的命令行工具来扫描和清理缓存。首先安装 CLI 工具：pip install huggingface_hub[cli]，然后运行命令 huggingface-cli delete-cache。该工具允许用户查看缓存使用情况并删除特定的模型版本或整个缓存目录，从而有效释放磁盘空间。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fissues\u002F1025",{"id":80,"question_zh":81,"answer_zh":82,"source_url":83},31199,"上传文件时如果没有内容变化，如何避免创建空的 commit？","这是一个已知问题，现已通过 PR #2389 修复。更新库版本后，当使用 upload_file 或 upload_folder 且检测到文件内容未发生变化时，系统将自动跳过提交操作并警告用户，不再创建空 commit。这依赖于远程 git-hash-object（普通文件）或 sha256（LFS 文件）来判断文件是否变更。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fissues\u002F1411",{"id":85,"question_zh":86,"answer_zh":87,"source_url":88},31200,"使用 local_dir 下载时，即使文件未改变也会重新下载，如何解决？","针对不使用符号链接的场景（如 Windows 或设置 local_dir_use_symlink=False），已优化下载机制。在新版本中，对于 LFS 文件，系统会先计算本地文件的 sha256 哈希值，仅当哈希值与远程不一致时才进行下载。请确保升级到包含此修复的最新版本（参考 PR #2223）。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fissues\u002F1738",{"id":90,"question_zh":91,"answer_zh":92,"source_url":88},31201,"如何通过命令行指定自定义缓存目录下载模型？","在使用 huggingface-cli download 命令时，可以通过 --cache-dir 标志指定自定义的缓存路径，而无需设置环境变量。例如：huggingface-cli download gpt2 README.md model.safetensors --local-dir=data\u002Fgpt2 --cache-dir=\u002Fpath\u002Fto\u002Fcustom\u002Fcache。这对于团队协作或特定目录结构的场景非常有用。",[94,99,104,109,114,119,124,129,134,139,144,149,154,159,164,169,174,179,184,189],{"id":95,"version":96,"summary_zh":97,"released_at":98},230853,"v1.10.1","- 修复将文件复制到文件夹的功能 (#4075)\n- [CLI] 略微提升 hf CLI 的可发现性 (#4079)\n- 在 list_liked_repos 中支持内核 (#4078)\n\n**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.10.0...v1.10.1","2026-04-09T15:05:52",{"id":100,"version":101,"summary_zh":102,"released_at":103},230854,"v1.10.0","## 📁 在 Bucket 和仓库之间即时复制文件\n\n本次发布引入了服务器端文件复制操作，允许您在 Hugging Face 存储空间内移动数据，而无需先下载再重新上传。现在您可以将文件从一个 Bucket 复制到另一个 Bucket、从一个仓库（模型、数据集或 Space）复制到 Bucket，或者在不同 Bucket 之间进行复制——所有这些操作都不产生带宽费用。使用 Xet 跟踪的文件会直接按哈希值复制（无需传输数据），而未使用 Xet 跟踪的小型文本文件则会自动下载并重新上传。\n\n```python\n>>> from huggingface_hub import copy_files\n\n# Bucket 到 Bucket（相同或不同 Bucket）\n>>> copy_files(\n...     \"hf:\u002F\u002Fbuckets\u002Fusername\u002Fsource-bucket\u002Fcheckpoints\u002Fmodel.safetensors\",\n...     \"hf:\u002F\u002Fbuckets\u002Fusername\u002Fdestination-bucket\u002Farchive\u002Fmodel.safetensors\",\n... )\n\n# 仓库到 Bucket\n>>> copy_files(\n...     \"hf:\u002F\u002Fdatasets\u002Fusername\u002Fmy-dataset\u002Fprocessed\u002F\",\n...     \"hf:\u002F\u002Fbuckets\u002Fusername\u002Fmy-bucket\u002Fdatasets\u002Fprocessed\u002F\",\n... )\n```\n\n同样的功能也已在 CLI 中提供：\n\n```bash\n# Bucket 到 Bucket\n>>> hf buckets cp hf:\u002F\u002Fbuckets\u002Fusername\u002Fsource-bucket\u002Flogs\u002F hf:\u002F\u002Fbuckets\u002Fusername\u002Farchives\u002Flogs\u002F\n\n# 仓库到 Bucket\n>>> hf buckets cp hf:\u002F\u002Fdatasets\u002Fusername\u002Fmy-dataset\u002Fdata\u002Ftrain\u002F hf:\u002F\u002Fbuckets\u002Fusername\u002Fmy-bucket\u002Fdatasets\u002Ftrain\u002F\n```\n\n需要注意的是，目前尚不支持从 Bucket 向仓库复制文件。\n\n📚 **文档：** [Bucket 指南](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fmain\u002Fen\u002Fguides\u002Fbuckets#copy-files-to-bucket)\n\n- [`HfApi.copy_files` 方法用于远程复制文件并更新 `hf buckets cp`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fpull\u002F3874)，由 @Wauplin 在 #3874 中实现。\n- [为集合添加 Bucket](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fpull\u002F4041)，由 @coyotte508 在 #4041 中实现。\n\n## ⚛️ 引入 Kernel 仓库\n\n> [!TIP]\n> 如需构建、发布和使用 Kernel 仓库，请使用专门的 [`kernels`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fkernels) 包。\n\nHub 现已支持一种新的 `kernel` 仓库类型，用于托管计算内核。本次发布首次正式（但明确受限）地支持通过 Python API 与 Kernel 仓库交互。目前仅有一部分方法得到官方支持：`kernel_info`、`hf_hub_download`、`snapshot_download`、`list_repo_refs`、`list_repo_files` 和 `list_repo_tree`。创建和删除操作同样受支持，但仅限于 Hub 上一小部分获授权的用户和组织。\n\n```python\n>>> from huggingface_hub import kernel_info\n>>> kernel_info(\"kernels-community\u002Fyoso\")\nKernelInfo(id='kernels-community\u002Fyoso', author='kernels-community', downloads=0, gated=False, last_modified=datetime.datetime(2026, 4, 3, 22, 27, 25, tzinfo=datetime.timezone.utc), likes=0, private=False)\n```\n\n📚 **文档：** [仓库指南](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fmain\u002Fen\u002Fguides\u002Frepository#kernel-repositories)\n\n- [[Kernels] 最小化 Kernel 仓库类型支持（创建\u002F删除、下载文件、列出引用\u002F文件","2026-04-09T12:30:35",{"id":105,"version":106,"summary_zh":107,"released_at":108},230855,"v1.9.2","- 修复 set_space_volume \u002F delete_space_volume 的返回类型 #4061，由 @abidlabs 和 @Wauplin 完成\n\n**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.9.1...v1.9.2","2026-04-08T08:44:48",{"id":110,"version":111,"summary_zh":112,"released_at":113},230856,"v1.9.1","- 修复 `set_space_volumes` 发送裸数组而非对象的问题 #4054，由 @davanstrien 提交\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.9.0...v1.9.1","2026-04-07T13:50:34",{"id":115,"version":116,"summary_zh":117,"released_at":118},230857,"v1.9.0","## 🚀 Spaces 卷：直接挂载模型、数据集和存储桶\n\nHugging Face Spaces 现在支持挂载卷，使您的 Space 能够直接访问文件系统中的模型、数据集和存储桶。这取代了已弃用的持久化存储功能。\n\n```python\nfrom huggingface_hub import HfApi, Volume\n\napi = HfApi()\napi.set_space_volumes(\n    repo_id=\"username\u002Fmy-space\",\n    volumes=[\n        Volume(type=\"model\", source=\"username\u002Fmy-model\", mount_path=\"\u002Fmodels\", read_only=True),\n        Volume(type=\"bucket\", source=\"username\u002Fmy-bucket\", mount_path=\"\u002Fdata\"),\n    ],\n)\n```\n\n卷也可以在创建时通过 `create_repo(space_volumes=...)` 和 `duplicate_repo(space_volumes=...)` 进行设置，或者使用 CLI 的 `--volume` \u002F `-v` 标志：\n\n```bash\n# 创建带有挂载卷的 Space\nhf repos create my-space --type space --space-sdk gradio \\\n    -v hf:\u002F\u002Fgpt2:\u002Fmodels -v hf:\u002F\u002Fbuckets\u002Forg\u002Fb:\u002Fdata\n\n# 复制带有卷的 Space\nhf repos duplicate org\u002Fmy-space my-space --type space \\\n    -v hf:\u002F\u002Fgpt2:\u002Fmodels -v hf:\u002F\u002Fbuckets\u002Forg\u002Fb:\u002Fdata\n```\n\n- 由 @Wauplin 在 #4018 中添加对挂载卷的支持\n- 由 @Wauplin 在 #4035 中支持在仓库创建和复制时使用卷\n\n## 🤖 `hf` CLI 现在可自动检测 AI 助手并调整输出格式\n\nAI 编程助手（Claude Code、Cursor、Codex、Copilot、Gemini 等）越来越多地使用 `hf` CLI 与 Hub 进行交互。在此之前，CLI 的输出是为人类设计的——ANSI 颜色、填充表格、带表情符号的布尔值、截断单元格等——这使得助手难以可靠地解析。\n\n从 v1.9 开始，CLI **会自动检测是否在助手内部运行**，并相应地调整输出：不使用 ANSI 颜色、不截断、以制表符分隔的表格、紧凑的 JSON 格式、完整的时间戳。无需任何配置——它就能正常工作。这只是让 `hf` CLI 成为 AI 助手进入 Hugging Face Hub 的主要入口的第一步！\n\n助手模式会自动检测，但您也可以通过 `--format` 显式指定模式：\n\n```bash\nhf models ls --limit 5                  # 自动检测\nhf models ls --limit 5 --format agent   # 强制使用适合助手的输出\nhf models ls --limit 5 --format json    # 结构化 JSON\nhf models ls --limit 5 --format quiet   # 仅显示 ID，非常适合管道操作\n```\n\n以下是助手与人类看到的内容对比：\n\n**`hf auth whoami`**\n``` \n# 人类\n✓ 已登录\n  用户: Wauplin\n  组织: huggingface, awesome-org\n\n# 助手\nuser=Wauplin orgs=huggingface,awesome-org\n\n# JSON\n{\"user\": \"Wauplin\", \"orgs\": [\"huggingface\", \"awesome-org\"]}\n```\n\n**`hf models ls --author google --limit 3`**\n``` \n# 人类\nID                         下载量   趋势分数\n-------------------------- -------- --------------\ngoogle\u002Fembeddinggemma-300m 1213145  17            \ngoogle\u002Fgemma-3-4b-it       1512637  16            \ngoogle\u002Fgemma-3-27b-it      988618   12    \n\n# 助手（TSV 格式，无截断、无 ANSI）\nid      下载量       趋势分数\ngoogle\u002Fembeddinggemma-300m      121314","2026-04-02T15:59:04",{"id":120,"version":121,"summary_zh":122,"released_at":123},230858,"v1.8.0","## 🚀 作业现在可以挂载卷了\n\n作业现在可以直接在其容器中将 Hugging Face 仓库（模型、数据集、Spaces）和存储桶作为挂载卷来访问。这使得一些强大的工作流成为可能，比如直接对数据集执行查询、无需显式下载即可加载模型，以及将训练检查点持久化到存储桶中。\n\n```python\nfrom huggingface_hub import run_job, Volume\n\njob = run_job(\n    image=\"duckdb\u002Fduckdb\",\n    command=[\"duckdb\", \"-c\", \"SELECT * FROM '\u002Fdata\u002F**\u002F*.parquet' LIMIT 5\"],\n    volumes=[\n        Volume(type=\"dataset\", source=\"HuggingFaceFW\u002Ffineweb\", mount_path=\"\u002Fdata\"),\n    ],\n)\n```\n\n```bash\nhf jobs run -v hf:\u002F\u002Fdatasets\u002FHuggingFaceFW\u002Ffineweb:\u002Fdata duckdb\u002Fduckdb duckdb -c \"SELECT * FROM '\u002Fdata\u002F**\u002F*.parquet' LIMIT 5\"\n```\n\n- @XciD 在 #3936 中添加了对存储桶和仓库的卷挂载支持\n\n## 📖 Papers CLI 现已完善\n\n`hf papers` 命令现已具备完整功能：可按关键词搜索论文、获取结构化的 JSON 元数据，并以 Markdown 格式阅读完整的论文内容。`ls` 命令也得到了增强，新增了按周、按月和提交人筛选的功能。\n\n```bash\n# 搜索论文\nhf papers search \"vision language\"\n\n# 获取元数据\nhf papers info 2601.15621\n\n# 以 Markdown 格式阅读\nhf papers read 2601.15621\n```\n\n- @mishig25 在 #3952 中完成了 `hf papers` 的搜索、信息查看、阅读及列表筛选功能\n\n## 🖥️ CLI 仓库 ID 缩写\n\n现在可以使用仓库 ID 前缀，如 `spaces\u002Fuser\u002Frepo`、`datasets\u002Fuser\u002Frepo` 和 `models\u002Fuser\u002Frepo`，作为 `user\u002Frepo --type space` 的简写形式。这一用法会自动应用于所有接受 `--type` 标志的 CLI 命令。\n\n```bash\n# 修改前\nhf download user\u002Fmy-space --type space\nhf discussions list user\u002Fmy-dataset --type dataset\n\n# 修改后\nhf download spaces\u002Fuser\u002Fmy-space\nhf discussions list datasets\u002Fuser\u002Fmy-dataset\n```\n\n- @Wauplin 在 #3929 中支持将 `spaces\u002Fuser\u002Frepo` 作为仓库 ID 前缀的简写形式\n\n## 🔧 更多仓库可见性选项\n\n现在，在创建或更新仓库时，除了现有的 `--private` 标志外，还可以通过明确的可见性设置（`--public`、`--protected`）来指定仓库的可见性。这为 `HfApi.create_repo`、`update_repo_settings` 和 `duplicate_repo` 添加了 `visibility` 参数，其中 `--protected` 仅适用于 Spaces。\n\n受保护的 Spaces 允许代码保持私密，同时仍可公开访问。\n\n- @hanouticelina 在 #3951 中为 `HfApi` 的仓库创建、更新和复制方法添加了 `visibility` 参数\n\n## 🖥️ CLI\n\n- @Wauplin 在 #3888 中为 `hf repos create` 和 `hf repos duplicate` 添加了空间专用选项\n- @hanouticelina 在 #3938 中为 `hf auth whoami` 添加了 `--format json` 选项 — [文档](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fmain\u002Fen\u002Fpackage_reference\u002Fcli)\n- @hanouticelina 在 #3941 中扩展了 `SKILL.md` 中的嵌套组、内联标志及常用选项词汇表\n- @hanouticelina 在 #3955 中将常用选项内联到生成的 `SKILL.md` 中\n- @hanouticelina 在 #3957 中修复了在 uv 管理的 Python 环境下运行 `hf extensions install` 时的问题，优先使用 uv","2026-03-25T15:46:22",{"id":125,"version":126,"summary_zh":127,"released_at":128},230859,"v1.7.2","## 🛠️ CLI 改进\n\n`hf` CLI 技能现在会完全展开子命令组，并将所有标志和选项内联显示，使 CLI 具有自描述性，便于智能体发现。\n\n- 展开嵌套组、内联标志及通用选项词汇表至 SKILL.md (#3941)，作者：@hanouticelina  \n- 将通用选项内联包含 (#3955)，作者：@hanouticelina  \n\n`hf extension install` 现在会在可用时使用 `uv` 进行 Python 扩展安装，从而加快扩展安装速度：\n```bash\n> hyperfine \"hf extensions install alvarobartt\u002Fhf-mem --force\"\n# 之前\n基准测试 1：hf extensions install alvarobartt\u002Fhf-mem --force\n  时间（平均 ± 标准差）：      3.490 秒 ±  0.220 秒    [用户：1.925 秒，系统：0.445 秒]\n  范围（最小 … 最大）：    3.348 秒 …  4.097 秒    10 次运行\n\n# 之后\n基准测试 1：hf extensions install alvarobartt\u002Fhf-mem --force\n  时间（平均 ± 标准差）：     519.6 毫秒 ± 119.7 毫秒    [用户：216.6 毫秒，系统：95.2 毫秒]\n  范围（最小 … 最大）：   371.6 毫秒 … 655.2 毫秒    10 次运行\n```\n\n- 在可用时使用 uv 进行 Python 扩展安装 (#3957)，作者：@hanouticelina  \n\n其他提升体验的改进：\n- 向 `hf auth whoami` 添加 `--format json` 选项 (#3938)，作者：@hanouticelina  \n- 将 Homebrew 升级命令中的 `huggingface-cli` 替换为 `hf` (#3946)，作者：@hanouticelina  \n\n## 🐛 Bug 与错别字修复\n\n- 修复 HfFileSystem 在缺失子目录中的 glob 匹配问题 (#3935)，作者：@lhoestq  \n- 修复：统一使用模块日志记录器，并缩小裸 except 子句的范围 (#3924)，作者：@mango766  \n- 修复 `--every` 帮助文本中的错别字 (#3950)，作者：@julien-c  \n\n## 📚 文档\n\n- 在虚拟环境说明中将 `.env` 重命名为 `.venv` (#3939)，作者：@julien-c  \n\n## 🏗️ 内部改进\n\n- 移除 Conda 工作流 (#3928)，作者：@Wauplin  \n- 修复版本检查消息泄露到生成的 SKILL.md 中的问题 (#3949)，作者：@hanouticelina  \n\n完整变更日志：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.7.1...v1.7.2","2026-03-20T11:25:19",{"id":130,"version":131,"summary_zh":132,"released_at":133},230860,"v1.7.0","本次发布对 `hf` CLI 进行了重大改进，包括扩展的可发现性、统一的列表命令以及多项用户体验优化。\n\n🎉 Hugging Face CLI 的 Homebrew formula 已更名为 `hf`。现有用户只需运行 `brew update` — Homebrew 会自动处理重命名。新用户则可以使用 `brew install hf` 进行安装。\n\n## 🧩 CLI 扩展：可通过 pip 安装的包及可发现性\n\n在本次发布中，`hf` CLI 的扩展系统得到了重大升级。除了现有的 Shell 脚本方式外，扩展现在也可以是完整的 Python 包（带有 `pyproject.toml` 文件），并安装在隔离的虚拟环境中。这意味着扩展作者可以使用 Python 依赖项，而不会与用户的系统发生冲突。安装命令会自动检测 GitHub 仓库是脚本还是 Python 包，并以透明的方式处理这两种情况。\n\n新增的 `hf extensions search` 命令允许用户通过查询标记为 `hf-extension` 主题的 GitHub 仓库，直接从终端发现可用的扩展。结果会按星数排序，并显示每个扩展是否已在本地安装。此外，文档中还添加了一篇关于如何构建、发布以及使扩展具有可发现性的全面指南。\n\n```bash\n# 安装基于 Python 的扩展\nhf extensions install alvarobartt\u002Fhf-mem\n\n# 发现可用的扩展\nhf extensions search\nNAME   REPO                    STARS 描述                         已安装\n------ ----------------------- ----- ----------------------------------- ---------\nclaude hanouticelina\u002Fhf-claude     2 `hf` CLI 的扩展，用于启动... 是\nagents hanouticelina\u002Fhf-agents       用于运行本地编码任务的 HF 扩展...\n```\n\n- [CLI] 添加对可通过 pip 安装的仓库的支持，由 @Wauplin 在 #3892 中实现\n- [CLI] 添加 `hf extensions search` 命令，由 @julien-c 在 #3905 中实现\n- [文档] 关于如何构建 CLI 扩展的指南，由 @Wauplin 在 #3908 中编写\n\n📚 **文档:** [创建 CLI 扩展](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fmain\u002Fen\u002Fguides\u002Fcli-extensions)\n\n## 🔐 `hf auth login` CLI 更新\n\n新增的 `--force` 标志允许您在需要时显式地重新执行完整的登录流程，例如切换令牌。\n\n```bash\n# 已经登录 — 立即返回\nhf auth login\n\n# 强制重新登录以切换令牌\nhf auth login --force\n```\n\n- 默认情况下，如果已登录则跳过登录流程，并添加 `--force` 标志，由 @hanouticelina 在 #3920 中实现\n\n📚 **文档:** [CLI 指南](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fmain\u002Fen\u002Fguides\u002Fcli#hf-auth-login)\n\n## 📦 Xet 优化与修复\n\n`hf-xet` 已升级至 `v1.4.2`，并进行了一些优化：\n- 在上传到模型或数据集仓库时避免重复计算 sha256 值\n- 在上传到存储桶时跳过 sha256 计算\n这些优化应能显著提升大文件的上传速度。\n\n此次 `hf-xet` 的升级还修复了大文件下载时可能出现的死锁或卡顿问题。\n\n查看 [hf","2026-03-12T17:12:11",{"id":135,"version":136,"summary_zh":137,"released_at":138},230861,"v1.6.0","本次发布引入了用于管理 Spaces、数据集、讨论和 Webhook 的重大新 CLI 命令，同时还增加了对 Bucket 的 `HfFileSystem` 支持以及 CLI 扩展系统。\n\n## 🚀 新的 CLI 命令\n\n我们新增了几组 CLI 命令，让您能够更便捷地通过终端与 Hub 进行交互。\n\n### 新的 `hf spaces dev-mode` 命令\n\n现在您可以直接通过 CLI 为 Spaces 启用或禁用开发模式。启用开发模式时，该命令会等待 Space 准备就绪，并输出连接说明（Web VSCode、SSH 或本地 VSCode\u002FCursor）。这使得在 Spaces 上进行迭代更加高效，因为您可以无需停止 Space 容器即可重启应用。\n\n```bash\n# 启用开发模式\nhf spaces dev-mode username\u002Fmy-space\n\n# 禁用开发模式\nhf spaces dev-mode username\u002Fmy-space --stop\n```\n\n- 由 @lhoestq 在 #3824 中添加 `hf spaces dev-mode` 命令\n\n### 新的 `hf discussions` 命令组\n\n现在您可以通过 CLI 直接管理 Hub 上的讨论和拉取请求。这包括列出、查看、创建、评论、关闭、重新打开、重命名以及合并讨论和 PR。\n\n```bash\n# 列出某个仓库中的未完成讨论和 PR\nhf discussions list username\u002Fmy-model\n\n# 创建一个新的讨论\nhf discussions create username\u002Fmy-model --title \"功能请求\" --body \"描述\"\n\n# 创建一个拉取请求\nhf discussions create username\u002Fmy-model --title \"修复 bug\" --pull-request\n\n# 合并一个拉取请求\nhf discussions merge username\u002Fmy-model 5 --yes\n```\n\n- 由 @Wauplin 在 #3855 中添加 `hf discussions` 命令组\n- 由 @Wauplin 在 #3878 中将 `hf discussions view` 重命名为 `hf discussions info`\n\n### 新的 `hf webhooks` 命令组\n\n现在完全支持通过 CLI 管理 Hub 的 Webhook。您可以直接在终端中列出、检查、创建、更新、启用\u002F禁用以及删除 Webhook。\n\n```bash\n# 列出所有 Webhook\nhf webhooks ls\n\n# 创建一个 Webhook\nhf webhooks create --url https:\u002F\u002Fexample.com\u002Fhook --watch model:bert-base-uncased\n\n# 启用\u002F禁用一个 Webhook\nhf webhooks enable webhook_id\nhf webhooks disable webhook_id\n\n# 删除一个 Webhook\nhf webhooks delete webhook_id\n```\n\n- 由 @omkar-334 在 #3866 中添加 `hf webhooks` CLI 命令\n\n### 新的 `hf datasets parquet` 和 `hf datasets sql` 命令\n\n新增的两条命令让处理数据集 Parquet 文件变得更加简单。使用 `hf datasets parquet` 可以发现 Parquet 文件的 URL，然后借助 DuckDB 使用 `hf datasets sql` 对其进行查询。\n\n```bash\n# 列出某个数据集的 Parquet 文件 URL\nhf datasets parquet cfahlgren1\u002Fhub-stats\nhf datasets parquet cfahlgren1\u002Fhub-stats --subset models --split train\n\n# 对数据集 Parquet 文件运行 SQL 查询\nhf datasets sql \"SELECT COUNT(*) FROM read_parquet('https:\u002F\u002Fhuggingface.co\u002Fapi\u002Fdatasets\u002F...')\"\n```\n\n- 由 @cfahlgren1 在 #3833 中添加 `hf datasets parquet` 和 `hf datasets sql` 命令\n\n### 新的 `hf repos duplicate` 命令\n\n现在您可以使用统一的方式复制任何仓库（模型、数据集或 Space）。","2026-03-06T13:52:07",{"id":140,"version":141,"summary_zh":142,"released_at":143},230862,"v1.5.0","本次发布引入了多项重大新功能，包括 **Buckets**（基于 Xet 的大规模对象存储）、CLI 扩展、Space 热重载，以及对 AI 编码代理的显著改进。CLI 已经全面重构，实现了集中式错误处理、更友好的帮助输出，并新增了用于集合、论文等操作的命令。\n\n## 🪣 Buckets：Hub 上的 S3 兼容对象存储\n\nBuckets 提供了基于 Hugging Face 的 S3 兼容对象存储，其底层由 Xet 存储后端提供支持。与基于 Git 并跟踪文件历史的仓库不同，Buckets 是专为大规模文件设计的远程对象存储容器，具备内容寻址的去重功能。您可以将其用于训练检查点、日志、中间产物，或任何不需要版本控制的大规模文件集合。\n\n```bash\n# 创建一个 Bucket\nhf buckets create my-bucket --private\n\n# 上传一个目录\nhf buckets sync .\u002Fdata hf:\u002F\u002Fbuckets\u002Fusername\u002Fmy-bucket\n\n# 从 Bucket 下载\nhf buckets sync hf:\u002F\u002Fbuckets\u002Fusername\u002Fmy-bucket .\u002Fdata\n\n# 列出文件\nhf buckets list username\u002Fmy-bucket -R --tree\n```\n\nBuckets API 提供了完整的 CLI 和 Python 支持，可用于创建、列出、移动和删除 Bucket；上传、下载和同步文件；以及通过包含\u002F排除模式管理 Bucket 内容。\n\n- @Wauplin 在 #3673 中实现了 Buckets API 和 CLI\n- @Wauplin 在 #3843 中增加了 API 和 CLI 对 Bucket 重命名\u002F移动的支持\n- @Wauplin 在 #3845 中向 HfApi 添加了 `sync_bucket` 功能\n- @Wauplin 在 #3849 中实现了 `hf buckets file deletion`\n- @Wauplin 在 #3850 中更新了未找到 Bucket 时的提示信息\n- @julien-c 在 #3846 中添加了 Buckets 的 `hf` 安装文档\n\n📚 **文档：** [Buckets 指南](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fmain\u002Fen\u002Fguides\u002Fbuckets)\n\n\n## 🤖 AI 代理支持\n\n本次发布包含多项旨在提升 AI 编码代理（Claude Code、OpenCode、Cursor 等）使用体验的功能：\n\n- **CLI 集中式错误处理**：提供简洁的用户友好型错误信息，避免显示完整堆栈跟踪（可通过设置 `HF_DEBUG=1` 查看完整堆栈）——@hanouticelina 在 #3754 中实现\n- **高效 Token 技能**：`hf skills add` 命令现在会安装一种精简版技能，仅需约 1.2k 个 Token（此前约为 12k）——@hanouticelina 在 #3802 中实现\n- **适合代理的 `hf jobs logs`**：默认情况下仅打印可用的日志并退出；若需实时流式输出，请使用 `-f` 参数——@davanstrien 在 #3783 中实现\n- **新增 AGENTS.md**：AI 代理的开发环境搭建及代码库指南——@Wauplin 在 #3789 中编写\n\n```bash\n# 为 Claude 安装 hf-cli 技能\nhf skills add --claude\n\n# 为项目级别安装技能\nhf skills add --project\n```\n\n- @julien-c 在 #3741 中添加了 `hf skills add` CLI 命令\n- @hanouticelina 在 #3755 中实现了将 `hf skills add` 安装到中央位置并使用符号链接\n- @NielsRogge 在 #3810 中增加了对 Cursor 技能的支持\n\n## 🔥 Space 热重载（实验性）\n\n无需完全重建和重启即可热重载 Space 中的 Python 文件。这对于快速迭代 Gradio 应用非常有用。\n\n```bash\n# 打开交互式编辑器以修改远程文件\nhf spaces hot-reload username\u002F","2026-02-26T15:02:54",{"id":145,"version":146,"summary_zh":147,"released_at":148},230863,"v0.36.2","Fix file corruption when server ignores Range header on download retry.\r\nFull details in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fpull\u002F3778 by @XciD.\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv0.36.1...v0.36.2","2026-02-06T09:29:13",{"id":150,"version":151,"summary_zh":152,"released_at":153},230864,"v1.4.1","Fix file corruption when server ignores Range header on download retry.\r\nFull details in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fpull\u002F3778 by @XciD.\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.4.0...v1.4.1","2026-02-06T09:28:10",{"id":155,"version":156,"summary_zh":157,"released_at":158},230865,"v1.4.0","## 🧠 `hf skills add` CLI Command\r\n\r\nA new `hf skills add` command installs the `hf-cli` skill for AI coding assistants (Claude Code, Codex, OpenCode). Your AI Agent now knows how to search the Hub, download models, run Jobs, manage repos, and more.\r\n\r\n```console\r\n> hf skills add --help\r\nUsage: hf skills add [OPTIONS]\r\n\r\n  Download a skill and install it for an AI assistant.\r\n\r\nOptions:\r\n  --claude      Install for Claude.\r\n  --codex       Install for Codex.\r\n  --opencode    Install for OpenCode.\r\n  -g, --global  Install globally (user-level) instead of in the current\r\n                project directory.\r\n  --dest PATH   Install into a custom destination (path to skills directory).\r\n  --force       Overwrite existing skills in the destination.\r\n  --help        Show this message and exit.\r\n\r\nExamples\r\n  $ hf skills add --claude\r\n  $ hf skills add --claude --global\r\n  $ hf skills add --codex --opencode\r\n\r\nLearn more\r\n  Use `hf \u003Ccommand> --help` for more information about a command.\r\n  Read the documentation at\r\n  https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fcli\r\n```\r\n\r\nThe skill is composed of two files fetched from the `huggingface_hub docs`: a CLI guide (`SKILL.md`) and the full CLI reference (`references\u002Fcli.md`). Files are installed to a central `.agents\u002Fskills\u002Fhf-cli\u002F` directory, and relative symlinks are created from agent-specific directories (e.g., `.claude\u002Fskills\u002Fhf-cli\u002F` → `..\u002F..\u002F.agents\u002Fskills\u002Fhf-cli\u002F`). This ensures a single source of truth when installing for multiple agents.\r\n\r\n- Add `hf skills add` CLI command by @julien-c in #3741\r\n- [CLI] `hf skills add` installs hf-cli skill to central location with symlinks by @hanouticelina in #3755\r\n\r\n## 🖥️ Improved CLI Help Output\r\n\r\nThe CLI help output has been reorganized to be more informative and agent-friendly:\r\n\r\n- Commands are now grouped into **Main commands** and **Help commands**\r\n- **Examples** section showing common usage patterns\r\n- **Learn more** section with links to documentation\r\n\r\n```console\r\n> hf cache --help\r\nUsage: hf cache [OPTIONS] COMMAND [ARGS]...\r\n\r\n  Manage local cache directory.\r\n\r\nOptions:\r\n  --help  Show this message and exit.\r\n\r\nMain commands:\r\n  ls      List cached repositories or revisions.\r\n  prune   Remove detached revisions from the cache.\r\n  rm      Remove cached repositories or revisions.\r\n  verify  Verify checksums for a single repo revision from cache or a local\r\n          directory.\r\n\r\nExamples\r\n  $ hf cache ls\r\n  $ hf cache ls --revisions\r\n  $ hf cache ls --filter \"size>1GB\" --limit 20\r\n  $ hf cache ls --format json\r\n  $ hf cache prune\r\n  $ hf cache prune --dry-run\r\n  $ hf cache rm model\u002Fgpt2\r\n  $ hf cache rm \u003Crevision_hash>\r\n  $ hf cache rm model\u002Fgpt2 --dry-run\r\n  $ hf cache rm model\u002Fgpt2 --yes\r\n  $ hf cache verify gpt2\r\n  $ hf cache verify gpt2 --revision refs\u002Fpr\u002F1\r\n  $ hf cache verify my-dataset --repo-type dataset\r\n\r\nLearn more\r\n  Use `hf \u003Ccommand> --help` for more information about a command.\r\n  Read the documentation at\r\n  https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fen\u002Fguides\u002Fcli\r\n```\r\n\r\n- [CLI] improve `hf` CLI help output by @hanouticelina in #3743\r\n\r\n## 📊 Evaluation Results Module\r\n\r\nThe Hub now has a decentralized system for tracking model evaluation results. Benchmark datasets (like [MMLU-Pro](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FTIGER-Lab\u002FMMLU-Pro), [HLE](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fcais\u002Fhle), [GPQA](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FIdavidrein\u002Fgpqa)) host leaderboards, and model repos store evaluation scores in `.eval_results\u002F*.yaml` files. These results automatically appear on both the model page and the benchmark's leaderboard. See the [Evaluation Results documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Feval-results) for more details.\r\n\r\nWe added helpers in `huggingface_hub` to work with this format:\r\n\r\n- `EvalResultEntry` dataclass representing evaluation scores\r\n- `eval_result_entries_to_yaml()` to serialize entries to YAML format\r\n- `parse_eval_result_entries()` to parse YAML data back into `EvalResultEntry` objects\r\n\r\n```python\r\nimport yaml\r\nfrom huggingface_hub import EvalResultEntry, eval_result_entries_to_yaml, upload_file\r\n\r\nentries = [\r\n    EvalResultEntry(dataset_id=\"cais\u002Fhle\", task_id=\"default\", value=20.90),\r\n    EvalResultEntry(dataset_id=\"Idavidrein\u002Fgpqa\", task_id=\"gpqa_diamond\", value=0.412),\r\n]\r\nyaml_content = yaml.dump(eval_result_entries_to_yaml(entries))\r\nupload_file(\r\n    path_or_fileobj=yaml_content.encode(),\r\n    path_in_repo=\".eval_results\u002Fresults.yaml\",\r\n    repo_id=\"your-username\u002Fyour-model\",\r\n)\r\n```\r\n\r\n- Add evaluation results module by @hanouticelina in #3633\r\n- Eval results synchronization by @Wauplin in #3718\r\n- Eval results notes by @Wauplin in #3738\r\n\r\n## 🖥️ Other CLI Improvements\r\n\r\nNew `hf papers ls` command to list daily papers on the Hub, with support for filtering by date and sorting by trending or publication date.\r\n\r\n```console\r\nhf papers ls                       # List most recent daily papers\r\nhf papers ls --sort=trending       # List trending papers\r\nhf pa","2026-02-03T16:19:53",{"id":160,"version":161,"summary_zh":162,"released_at":163},230866,"v1.3.7","Log 'x-amz-cf-id' on http error (if no request id) (https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fpull\u002F3759)\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.3.5...v1.3.7","2026-02-02T10:57:33",{"id":165,"version":166,"summary_zh":167,"released_at":168},230867,"v1.3.5","- Use HF_HUB_DOWNLOAD_TIMEOUT as default httpx timeout by @Wauplin in #3751\r\n\r\nDefault timeout is 10s. This is ok in most use cases but can trigger errors in CIs making a lot of requests to the Hub. Solution is to set `HF_HUB_DOWNLOAD_TIMEOUT=60` as environment variable in these cases.\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.3.4...v1.3.5","2026-01-29T13:48:35",{"id":170,"version":171,"summary_zh":172,"released_at":173},230868,"v1.3.4","- Default _endpoint to None in CommitInfo, fixes tiny regression from v1.3.3 by @tomaarsen in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fpull\u002F3737\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.3.3...v1.3.4","2026-01-26T14:06:24",{"id":175,"version":176,"summary_zh":177,"released_at":178},230869,"v1.3.3","## ⚙️ List Jobs Hardware\r\n\r\nYou can now list all available hardware options for Hugging Face Jobs, both from the CLI and programmatically.\r\n\r\n  From the CLI:\r\n```console\r\n➜ hf jobs hardware                           \r\nNAME            PRETTY NAME            CPU      RAM     ACCELERATOR      COST\u002FMIN COST\u002FHOUR \r\n--------------- ---------------------- -------- ------- ---------------- -------- --------- \r\ncpu-basic       CPU Basic              2 vCPU   16 GB   N\u002FA              $0.0002  $0.01     \r\ncpu-upgrade     CPU Upgrade            8 vCPU   32 GB   N\u002FA              $0.0005  $0.03     \r\ncpu-performance CPU Performance        8 vCPU   32 GB   N\u002FA              $0.0000  $0.00     \r\ncpu-xl          CPU XL                 16 vCPU  124 GB  N\u002FA              $0.0000  $0.00     \r\nt4-small        Nvidia T4 - small      4 vCPU   15 GB   1x T4 (16 GB)    $0.0067  $0.40     \r\nt4-medium       Nvidia T4 - medium     8 vCPU   30 GB   1x T4 (16 GB)    $0.0100  $0.60     \r\na10g-small      Nvidia A10G - small    4 vCPU   15 GB   1x A10G (24 GB)  $0.0167  $1.00     \r\na10g-large      Nvidia A10G - large    12 vCPU  46 GB   1x A10G (24 GB)  $0.0250  $1.50     \r\na10g-largex2    2x Nvidia A10G - large 24 vCPU  92 GB   2x A10G (48 GB)  $0.0500  $3.00     \r\na10g-largex4    4x Nvidia A10G - large 48 vCPU  184 GB  4x A10G (96 GB)  $0.0833  $5.00     \r\na100-large      Nvidia A100 - large    12 vCPU  142 GB  1x A100 (80 GB)  $0.0417  $2.50     \r\na100x4          4x Nvidia A100         48 vCPU  568 GB  4x A100 (320 GB) $0.1667  $10.00    \r\na100x8          8x Nvidia A100         96 vCPU  1136 GB 8x A100 (640 GB) $0.3333  $20.00    \r\nl4x1            1x Nvidia L4           8 vCPU   30 GB   1x L4 (24 GB)    $0.0133  $0.80     \r\nl4x4            4x Nvidia L4           48 vCPU  186 GB  4x L4 (96 GB)    $0.0633  $3.80     \r\nl40sx1          1x Nvidia L40S         8 vCPU   62 GB   1x L40S (48 GB)  $0.0300  $1.80     \r\nl40sx4          4x Nvidia L40S         48 vCPU  382 GB  4x L40S (192 GB) $0.1383  $8.30     \r\nl40sx8          8x Nvidia L40S         192 vCPU 1534 GB 8x L40S (384 GB) $0.3917  $23.50 \r\n```\r\n\r\nProgrammatically:\r\n```python\r\n>>> from huggingface_hub import HfApi\r\n>>> api = HfApi()\r\n>>> hardware_list = api.list_jobs_hardware()\r\n>>> hardware_list[0]\r\nJobHardware(name='cpu-basic', pretty_name='CPU Basic', cpu='2 vCPU', ram='16 GB', accelerator=None, unit_cost_micro_usd=167, unit_cost_usd=0.000167, unit_label='minute')\r\n>>> hardware_list[0].name\r\n'cpu-basic'\r\n```\r\n- [Jobs] List available hardware in #3693 by @Wauplin\r\n\r\n## 🐛 Bug Fixes\r\n\r\n- Fix severe performance regression in streaming by keeping a byte iterator in `HfFileSystemStreamFile` in #3685 by @leq6c\r\n- Fix verify incorrectly reporting folders as missing files in #3707 by @Mitix-EPI\r\n- Fix `resolve_path(`) with special char @ in #3704 by @lhoestq\r\n- Fix curlify with streaming request in #3692 by @hanouticelina\r\n\r\n## ✨ Various Improvements\r\n\r\n- Add `num_papers` field to Organization class in #3695 by @cfahlgren1\r\n- Add `limit` param to `list_papers` API method in #3697 by @Wauplin\r\n- Add repo commit count warning when exceeding recommended limits in #3698 by @Wauplin\r\n- Update `MAX_FILE_SIZE_GB` from 50 to 200 GB in #3696 by @davanstrien\r\n\r\n## 📚 Documentation\r\n\r\n- Wildcard pattern documentation in #3710 by @hanouticelina","2026-01-22T14:09:29",{"id":180,"version":181,"summary_zh":182,"released_at":183},230870,"v1.3.2","\r\n- Fix endpoint not forwarded in CommitUrl #3679 by @Wauplin \r\n- feat: zai-org provider supports text to image #3675 by @tomsun28\r\n\r\nFull Changelog: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.3.1...v1.3.2","2026-01-14T14:09:06",{"id":185,"version":186,"summary_zh":187,"released_at":188},230871,"v1.3.1","- Add `dimensions` & `encoding_format` parameter to InferenceClient for output embedding size #3671 by @mishig25 \r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fhuggingface_hub\u002Fcompare\u002Fv1.3.0...v1.3.1","2026-01-09T14:10:27",{"id":190,"version":191,"summary_zh":192,"released_at":193},230872,"v1.3.0","## 🖥️ CLI: `hf models`, `hf datasets`, `hf spaces` Commands\r\n\r\nThe CLI has been reorganized with dedicated commands for Hub discovery, while `hf repo` stays focused on managing your own repositories.\r\n\r\n**New commands:**\r\n\r\n```console\r\n# Models\r\nhf models ls --author=Qwen --limit=10\r\nhf models info Qwen\u002FQwen-Image-2512\r\n\r\n# Datasets\r\nhf datasets ls --filter \"format:parquet\" --sort=downloads\r\nhf datasets info HuggingFaceFW\u002Ffineweb\r\n\r\n# Spaces\r\nhf spaces ls --search \"3d\"\r\nhf spaces info enzostvs\u002Fdeepsite\r\n```\r\n\r\nThis organization mirrors the Python API (`list_models`, `model_info`, etc.), keeps the `hf \u003Cresource> \u003Caction>` pattern, and is extensible for future commands like `hf papers` or `hf collections`.\r\n\r\n- [CLI] Add `hf models`\u002F`hf datasets`\u002F`hf spaces` commands by @hanouticelina in #3669\r\n\r\n## 🔧 Transformers CLI Installer\r\n\r\nYou can now install the `transformers` CLI alongside the `huggingface_hub` CLI using the standalone installer scripts.\r\n\r\n```bash\r\n# Install hf CLI only (default)\r\ncurl -LsSf https:\u002F\u002Fhf.co\u002Fcli\u002Finstall.sh | bash -s\r\n\r\n# Install both hf and transformers CLIs\r\ncurl -LsSf https:\u002F\u002Fhf.co\u002Fcli\u002Finstall.sh | bash -s -- --with-transformers\r\n```\r\n\r\n```powershell\r\n# Install hf CLI only (default)\r\npowershell -c \"irm https:\u002F\u002Fhf.co\u002Fcli\u002Finstall.ps1 | iex\"\r\n\r\n# Install both hf and transformers CLIs\r\npowershell -c \"irm https:\u002F\u002Fhf.co\u002Fcli\u002Finstall.ps1 | iex\" -WithTransformers\r\n```\r\n\r\nOnce installed, you can use the `transformers` CLI directly:\r\n\r\n```bash\r\ntransformers serve\r\ntransformers chat openai\u002Fgpt-oss-120b\r\n```\r\n\r\n- Add transformers CLI installer by @Wauplin in #3666\r\n\r\n## 📊 Jobs Monitoring\r\n\r\nNew `hf jobs stats` command to monitor your running jobs in real-time, similar to `docker stats`. It displays a live table with CPU, memory, network, and GPU usage.\r\n\r\n```bash\r\n>>> hf jobs stats\r\nJOB ID                   CPU % NUM CPU MEM % MEM USAGE      NET I\u002FO         GPU UTIL % GPU MEM % GPU MEM USAGE\r\n------------------------ ----- ------- ----- -------------- --------------- ---------- --------- ---------------\r\n6953ff6274100871415c13fd 0%    3.5     0.01% 1.3MB \u002F 15.0GB 0.0bps \u002F 0.0bps 0%         0.0%      0.0B \u002F 22.8GB\r\n```\r\n\r\nA new `HfApi.fetch_jobs_metrics()` method is also available:\r\n\r\n```python\r\n>>> for metrics in fetch_job_metrics(job_id=\"6953ff6274100871415c13fd\"):\r\n...     print(metrics)\r\n{\r\n    \"cpu_usage_pct\": 0,\r\n    \"cpu_millicores\": 3500,\r\n    \"memory_used_bytes\": 1306624,\r\n    \"memory_total_bytes\": 15032385536,\r\n    \"rx_bps\": 0,\r\n    \"tx_bps\": 0,\r\n    \"gpus\": {\r\n        \"882fa930\": {\r\n            \"utilization\": 0,\r\n            \"memory_used_bytes\": 0,\r\n            \"memory_total_bytes\": 22836000000\r\n        }\r\n    },\r\n    \"replica\": \"57vr7\"\r\n}\r\n```\r\n\r\n- [Jobs] Monitor cpu, memory, network and gpu (if any) by @lhoestq in #3655\r\n\r\n## 💔 Breaking Change\r\n\r\nThe `direction` parameter in `list_models`, `list_datasets`, and `list_spaces` is now deprecated and not used. The sorting is always descending. \r\n\r\n- [HfApi] deprecate `direction` in list repos methods by @hanouticelina in #3630\r\n\r\n## 🔧 Other QoL Improvements\r\n\r\n- [Jobs][CLI] allow unknown options in jobs cli by @lhoestq in #3614\r\n- [UV Jobs] Pass local script as env variable by @Wauplin in #3616\r\n- [CLI] hf repo info + add --expand parameter by @Wauplin in #3664\r\n- log a message when HF_TOKEN is set in auth list by @hanouticelina in #3608\r\n- Support 'x | y' syntax in strict dataclasses by @Wauplin in #3668\r\n- feat: use http_backoff for LFS batch\u002Fverify\u002Fcompletion endpoints by @The-Obstacle-Is-The-Way in #3622\r\n- Support local folders safetensors metadata by @vrdn-23 in #3623\r\n- Add @dataclass_transform decorator to dataclass_with_extra by @charliermarsh in #3639\r\n- Update papers model by @Samoed in #3586\r\n\r\n## 📖 Documentation\r\n\r\n- doc fix by @jzhang533 in #3597\r\n- Fix a url in the docs by @neo in #3606\r\n- Add Job Timeout section to CLI docs by @davanstrien in #3665\r\n\r\n## 🛠️ Small fixes and maintenance\r\n\r\n### 🐛 Bug and typo fixes\r\n\r\n- Fix unbound local error when reading corrupted metadata files by @Wauplin in #3610\r\n- [CLI] Fix private should default to None, not False by @Wauplin in #3618\r\n- Fix `create_repo` returning wrong `repo_id` by @hanouticelina in #3634\r\n- Fix: Use self.endpoint in job-related APIs for custom endpoint support by @PredictiveManish in #3653\r\n- Fix hf-xet version mismatch by @Tanishq1030 in #3662\r\n\r\n### 🏗️ Internal\r\n\r\n- Prepare for v1.3 by @Wauplin in #3599\r\n- [Internal] Fix quality by @hanouticelina in #3607\r\n- [CI] Fix warn on warning tests by @Wauplin in #3617\r\n- Try update bot settings by @Wauplin in #3624\r\n- trigger sentence-transformers CI for hfh prerelease by @hanouticelina in #3626\r\n- fix by @hanouticelina in #3627\r\n- remove unnecessary test by @hanouticelina in #3631\r\n- [Bot] Update inference types by @HuggingFaceInfra in #3520\r\n- Fix ty in CI by @Wauplin in #3661\r\n- Upgrade GitHub Actions for Node 24 compatibility by @salmanmkc in #3637\r\n- Upgrade GitHub Actions to latest versions by @salmanmkc in #3638\r\n-","2026-01-08T16:07:59",[195,207,215,223,231,240],{"id":196,"name":197,"github_repo":198,"description_zh":199,"stars":200,"difficulty_score":201,"last_commit_at":202,"category_tags":203,"status":60},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[204,49,205,206],"Agent","图像","数据工具",{"id":208,"name":209,"github_repo":210,"description_zh":211,"stars":212,"difficulty_score":201,"last_commit_at":213,"category_tags":214,"status":60},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[49,205,204],{"id":216,"name":217,"github_repo":218,"description_zh":219,"stars":220,"difficulty_score":59,"last_commit_at":221,"category_tags":222,"status":60},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",151918,"2026-04-12T11:33:05",[49,204,48],{"id":224,"name":225,"github_repo":226,"description_zh":227,"stars":228,"difficulty_score":59,"last_commit_at":229,"category_tags":230,"status":60},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[49,205,204],{"id":232,"name":233,"github_repo":234,"description_zh":235,"stars":236,"difficulty_score":59,"last_commit_at":237,"category_tags":238,"status":60},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[239,204,205,49],"插件",{"id":241,"name":242,"github_repo":243,"description_zh":244,"stars":245,"difficulty_score":59,"last_commit_at":246,"category_tags":247,"status":60},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[239,49]]