├── docs ├── hub │ ├── _config.py │ ├── models-advanced.md │ ├── enterprise-sso.md │ ├── spaces-organization-cards.md │ ├── enterprise-hub-resource-groups.md │ ├── spaces-using-opencv.md │ ├── audit-logs.md │ ├── spaces-advanced.md │ ├── spaces-settings.md │ ├── enterprise-hub.md │ ├── other.md │ ├── _redirects.yml │ ├── gguf-llamacpp.md │ ├── datasets-download-stats.md │ ├── spaces-more-ways-to-create.md │ ├── spaces-run-with-docker.md │ ├── datasets.md │ ├── organizations.md │ ├── models-the-hub.md │ ├── models.md │ ├── repositories.md │ ├── enterprise-hub-datasets.md │ ├── security-secrets.md │ ├── spaces-sdks-static.md │ ├── organizations-managing.md │ ├── notebooks.md │ ├── spaces-sdks-python.md │ ├── tensorboard.md │ ├── spaces-sdks-docker-examples.md │ ├── moderation.md │ ├── datasets-usage.md │ ├── datasets-viewer-configure.md │ ├── security.md │ ├── organizations-cards.md │ ├── spaces-cookie-limitations.md │ ├── spaces-handle-url-parameters.md │ ├── model-cards-components.md │ ├── security-malware.md │ ├── search.md │ ├── datasets-overview.md │ ├── datasets-duckdb-auth.md │ ├── spaces-dependencies.md │ ├── datasets-libraries.md │ ├── stanza.md │ ├── gguf-gpt4all.md │ ├── billing.md │ ├── datasets-dask.md │ ├── rl-baselines3-zoo.md │ ├── datasets-pandas.md │ ├── models-downloading.md │ ├── spaces.md │ ├── datasets-downloading.md │ ├── storage-regions.md │ ├── datasets-data-files-configuration.md │ ├── spaces-github-actions.md │ ├── models-inference.md │ ├── spaces-circleci.md │ ├── spaces-sdks-docker-jupyter.md │ ├── transformers-js.md │ ├── repositories-settings.md │ ├── spaces-sdks-docker-chatui.md │ ├── speechbrain.md │ ├── spaces-embed.md │ ├── ml-agents.md │ ├── flair.md │ ├── organizations-security.md │ ├── datasets-duckdb.md │ ├── setfit.md │ ├── fastai.md │ ├── models-download-stats.md │ ├── espnet.md │ ├── asteroid.md │ ├── diffusers.md │ ├── stable-baselines3.md │ ├── open_clip.md │ ├── span_marker.md │ ├── paper-pages.md │ ├── doi.md │ ├── model-cards-co2.md │ ├── peft.md │ ├── spaces-sdks-docker-tabby.md │ ├── datasets-cards.md │ ├── datasets-manual-configuration.md │ ├── datasets-webdataset.md │ ├── spaces-sdks-docker-aim.md │ ├── security-resource-groups.md │ ├── spaces-storage.md │ ├── models-faq.md │ ├── security-sso.md │ ├── mlx.md │ ├── model-card-guidebook.md │ ├── spaces-sdks-docker-panel.md │ ├── mlx-image.md │ └── keras.md └── sagemaker │ └── _toctree.yml ├── .gitignore ├── .git-blame-ignore-revs ├── .github ├── workflows │ ├── delete_doc_comment_trigger.yml │ ├── sagemaker_delete_doc_comment.yml │ ├── delete_doc_comment.yml │ ├── upload_pr_documentation.yml │ ├── sagemaker_upload_pr_documentation.yml │ ├── build_documentation.yml │ ├── sagemaker_build_documentation.yml │ ├── build_pr_documentation.yml │ ├── sagemaker_build_pr_documentation.yml │ └── model_card_consistency_reminder.yml └── ISSUE_TEMPLATE │ ├── documentation-request.md │ ├── feature_request.md │ └── bugs.md └── README.md /docs/hub/_config.py: -------------------------------------------------------------------------------- 1 | disable_toc_check = True 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .vscode/ 3 | .idea/ 4 | 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Format & lint all files see https://github.com/huggingface/hub-docs/pull/924 and https://github.com/huggingface/hub-docs/pull/936 2 | b1a591d6174852341bfd69e9e0be4168c53b2ebb 3 | -------------------------------------------------------------------------------- /docs/hub/models-advanced.md: -------------------------------------------------------------------------------- 1 | # Advanced Topics 2 | 3 | ## Contents 4 | 5 | - [Integrate your library with the Hub](./models-adding-libraries) 6 | - [Adding new tasks to the Hub](./models-tasks) 7 | - [GGUF format](./gguf) -------------------------------------------------------------------------------- /docs/hub/enterprise-sso.md: -------------------------------------------------------------------------------- 1 | # Single Sign-On (SSO) 2 | 3 | 4 | This feature is part of the Enterprise Hub. 5 | 6 | 7 | Read the [documentation for SSO under the Security section](./security-sso). 8 | -------------------------------------------------------------------------------- /docs/hub/spaces-organization-cards.md: -------------------------------------------------------------------------------- 1 | # Using Spaces for Organization Cards 2 | 3 | Organization cards are a way to describe your organization to other users. They take the form of a `README.md` static file, inside a Space repo named `README`. 4 | 5 | Please read more in the [dedicated doc section](./organizations-cards). 6 | -------------------------------------------------------------------------------- /docs/sagemaker/_toctree.yml: -------------------------------------------------------------------------------- 1 | - local: index 2 | title: Hugging Face on Amazon SageMaker 3 | - local: getting-started 4 | title: Get started 5 | - local: train 6 | title: Run training on Amazon SageMaker 7 | - local: inference 8 | title: Deploy models to Amazon SageMaker 9 | - local: reference 10 | title: Reference -------------------------------------------------------------------------------- /.github/workflows/delete_doc_comment_trigger.yml: -------------------------------------------------------------------------------- 1 | name: Delete doc comment trigger 2 | 3 | on: 4 | pull_request: 5 | types: [ closed ] 6 | 7 | 8 | jobs: 9 | delete: 10 | uses: huggingface/doc-builder/.github/workflows/delete_doc_comment_trigger.yml@main 11 | with: 12 | pr_number: ${{ github.event.number }} 13 | 14 | -------------------------------------------------------------------------------- /.github/workflows/sagemaker_delete_doc_comment.yml: -------------------------------------------------------------------------------- 1 | name: Delete sagemaker doc comment trigger 2 | 3 | on: 4 | pull_request: 5 | types: [ closed ] 6 | 7 | 8 | jobs: 9 | delete: 10 | uses: huggingface/doc-builder/.github/workflows/delete_doc_comment_trigger.yml@main 11 | with: 12 | pr_number: ${{ github.event.number }} 13 | 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation request 3 | about: Suggest an idea for new docs 4 | title: '' 5 | labels: 'docs' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Doc request** 11 | A clear and concise description of what you would like to see documented or what is unclear. 12 | 13 | **Additional context** 14 | Add any other context or screenshots about the feature request here. 15 | -------------------------------------------------------------------------------- /.github/workflows/delete_doc_comment.yml: -------------------------------------------------------------------------------- 1 | name: Delete doc comment 2 | 3 | on: 4 | workflow_run: 5 | workflows: ["Delete doc comment trigger", "Delete sagemaker doc comment trigger"] 6 | types: 7 | - completed 8 | 9 | 10 | jobs: 11 | delete: 12 | uses: huggingface/doc-builder/.github/workflows/delete_doc_comment.yml@main 13 | secrets: 14 | comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} -------------------------------------------------------------------------------- /docs/hub/enterprise-hub-resource-groups.md: -------------------------------------------------------------------------------- 1 | # Resource groups 2 | 3 | 4 | This feature is part of the Enterprise Hub. 5 | 6 | 7 | Resource Groups allow Enterprise Hub organizations to enforce fine-grained access control to their repositories. 8 | 9 | Read the [documentation for Resource Groups under the Security section](./security-resource-groups). 10 | -------------------------------------------------------------------------------- /.github/workflows/upload_pr_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Upload PR Documentation 2 | 3 | on: 4 | workflow_run: 5 | workflows: ["Build PR Documentation"] 6 | types: 7 | - completed 8 | 9 | jobs: 10 | build: 11 | uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main 12 | with: 13 | package_name: hub 14 | secrets: 15 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} 16 | comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} -------------------------------------------------------------------------------- /docs/hub/spaces-using-opencv.md: -------------------------------------------------------------------------------- 1 | # Using OpenCV in Spaces 2 | 3 | In order to use OpenCV in your Gradio or Streamlit Spaces, you'll need to make the Space install both the Python and Debian dependencies 4 | 5 | This means adding `python3-opencv` to the `packages.txt` file, and adding `opencv-python` to the `requirements.txt` file. If those files don't exist, you'll need to create them. 6 | 7 | To see an example, [see this Gradio project](https://huggingface.co/spaces/templates/gradio_opencv/tree/main). 8 | -------------------------------------------------------------------------------- /.github/workflows/sagemaker_upload_pr_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Upload sagemaker PR Documentation 2 | 3 | on: 4 | workflow_run: 5 | workflows: ["Build sagemaker PR DocumentationDocumentation"] 6 | types: 7 | - completed 8 | 9 | jobs: 10 | build: 11 | uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main 12 | with: 13 | package_name: sagemaker 14 | secrets: 15 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} 16 | comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} -------------------------------------------------------------------------------- /docs/hub/audit-logs.md: -------------------------------------------------------------------------------- 1 | # Audit Logs 2 | 3 | 4 | This feature is part of the Enterprise Hub. 5 | 6 | 7 | Audit Logs enable organization admins to easily review actions taken by members, including organization membership, repository settings and billing changes. 8 | 9 | Audit Logs are accessible through your organization admin settings. 10 | 11 | ![](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/storage-regions/audit-logs.png) 12 | -------------------------------------------------------------------------------- /.github/workflows/build_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Build documentation 2 | 3 | on: 4 | push: 5 | paths: 6 | - "docs/hub/**" 7 | branches: 8 | - main 9 | 10 | jobs: 11 | build: 12 | uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main 13 | with: 14 | commit_sha: ${{ github.sha }} 15 | package: hub-docs 16 | package_name: hub 17 | path_to_docs: hub-docs/docs/hub/ 18 | additional_args: --not_python_module 19 | secrets: 20 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} 21 | -------------------------------------------------------------------------------- /docs/hub/spaces-advanced.md: -------------------------------------------------------------------------------- 1 | # Advanced Topics 2 | 3 | ## Contents 4 | 5 | - [Using OpenCV in Spaces](./spaces-using-opencv) 6 | - [More ways to create Spaces](./spaces-more-ways-to-create) 7 | - [Managing Spaces with Github Actions](./spaces-github-actions) 8 | - [Managing Spaces with CircleCI Workflows](./spaces-circleci) 9 | - [Custom Python Spaces](./spaces-sdks-python) 10 | - [How to Add a Space to ArXiv](./spaces-add-to-arxiv) 11 | - [Cookie limitations in Spaces](./spaces-cookie-limitations) 12 | - [How to handle URL parameters in Spaces](./spaces-handle-url-parameters) 13 | -------------------------------------------------------------------------------- /docs/hub/spaces-settings.md: -------------------------------------------------------------------------------- 1 | # Spaces Settings 2 | 3 | You can configure your Space's appearance and other settings inside the `YAML` block at the top of the **README.md** file at the root of the repository. For example, if you want to create a Space with Gradio named `Demo Space` with a yellow to orange gradient thumbnail: 4 | 5 | ```yaml 6 | --- 7 | title: Demo Space 8 | emoji: 🤗 9 | colorFrom: yellow 10 | colorTo: orange 11 | sdk: gradio 12 | app_file: app.py 13 | pinned: false 14 | --- 15 | ``` 16 | 17 | For additional settings, refer to the [Reference](./spaces-config-reference) section. 18 | -------------------------------------------------------------------------------- /.github/workflows/sagemaker_build_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Build sagemaker documentation 2 | 3 | on: 4 | push: 5 | paths: 6 | - "docs/sagemaker/**" 7 | branches: 8 | - main 9 | 10 | jobs: 11 | build: 12 | uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main 13 | with: 14 | commit_sha: ${{ github.sha }} 15 | package: hub-docs 16 | package_name: sagemaker 17 | path_to_docs: hub-docs/docs/sagemaker/ 18 | additional_args: --not_python_module 19 | secrets: 20 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} 21 | -------------------------------------------------------------------------------- /docs/hub/enterprise-hub.md: -------------------------------------------------------------------------------- 1 | # Enterprise Hub 2 | 3 | Enterprise Hub adds advanced capabilities to organizations, enabling safe, compliant and managed collaboration for companies and teams on Hugging Face. 4 | 5 | ![](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/storage-regions/enterprise-hub.png) 6 | 7 | In this section we will document the following Enterprise Hub features: 8 | 9 | - [SSO](./enterprise-sso) 10 | - [Audit Logs](./audit-logs) 11 | - [Storage Regions](./storage-regions) 12 | - [Dataset viewer for Private datasets](./enterprise-hub-datasets) 13 | - [Resource Groups](./security-resource-groups) 14 | -------------------------------------------------------------------------------- /.github/workflows/build_pr_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Build PR Documentation 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - "docs/hub/**" 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | build: 14 | uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main 15 | with: 16 | commit_sha: ${{ github.event.pull_request.head.sha }} 17 | pr_number: ${{ github.event.number }} 18 | package: hub-docs 19 | package_name: hub 20 | path_to_docs: hub-docs/docs/hub/ 21 | additional_args: --not_python_module 22 | 23 | -------------------------------------------------------------------------------- /docs/hub/other.md: -------------------------------------------------------------------------------- 1 | # Organizations, Security, and the Hub API 2 | 3 | ## Contents 4 | 5 | - [Organizations](./organizations) 6 | - [Managing Organizations](./organizations-managing) 7 | - [Organization Cards](./organizations-cards) 8 | - [Access control in organizations](./organizations-security) 9 | - [Moderation](./moderation) 10 | - [Billing](./billing) 11 | - [Digital Object Identifier (DOI)](./doi) 12 | - [Security](./security) 13 | - [User Access Tokens](./security-tokens) 14 | - [Signing commits with GPG](./security-gpg) 15 | - [Malware Scanning](./security-malware) 16 | - [Pickle Scanning](./security-pickle) 17 | - [Hub API Endpoints](./api) 18 | - [Webhooks](./webhooks) -------------------------------------------------------------------------------- /.github/workflows/sagemaker_build_pr_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Build sagemaker PR Documentation 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - "docs/sagemaker/**" 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | build: 14 | uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main 15 | with: 16 | commit_sha: ${{ github.event.pull_request.head.sha }} 17 | pr_number: ${{ github.event.number }} 18 | package: hub-docs 19 | package_name: sagemaker 20 | path_to_docs: hub-docs/docs/sagemaker/ 21 | additional_args: --not_python_module 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /docs/hub/_redirects.yml: -------------------------------------------------------------------------------- 1 | # This first_section was backported from nginx 2 | adding-a-model: models-uploading 3 | model-repos: models 4 | endpoints: api 5 | adding-a-library: models-adding-libraries 6 | libraries: models-libraries 7 | inference: models-inference 8 | org-cards: organizations-cards 9 | adding-a-task: models-tasks 10 | models-cards: model-cards 11 | models-cards-co2: model-cards-co 12 | how-to-downstream: /docs/huggingface_hub/how-to-downstream 13 | how-to-upstream: /docs/huggingface_hub/how-to-upstream 14 | how-to-inference: /docs/huggingface_hub/how-to-inference 15 | searching-the-hub: /docs/huggingface_hub/searching-the-hub 16 | # end of first_section 17 | api-webhook: webhooks 18 | adapter-transformers: adapters 19 | security-two-fa: security-2fa 20 | -------------------------------------------------------------------------------- /docs/hub/gguf-llamacpp.md: -------------------------------------------------------------------------------- 1 | # GGUF usage with llama.cpp 2 | 3 | Llama.cpp directly allows you to download and run inference on a GGUF simply by providing a path to the Hugging Face repo path and the file name. llama.cpp would download the model checkpoint in the directory you invoke it from: 4 | 5 | ```bash 6 | ./main \ 7 | --hf-repo lmstudio-community/Meta-Llama-3-8B-Instruct-GGUF \ 8 | -m Meta-Llama-3-8B-Instruct-Q8_0.gguf \ 9 | -p "I believe the meaning of life is " -n 128 10 | ``` 11 | 12 | Replace `--hf-repo` with any valid Hugging Face hub repo name and `-m` with the GGUF file name in the hub repo - off you go! 🦙 13 | 14 | Find more information [here](https://github.com/ggerganov/llama.cpp/pull/6234). 15 | 16 | Note: Remember to `build` llama.cpp with `LLAMA_CURL=ON` :) -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bugs.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug 3 | about: Report a bug you face in the Hub 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **This repository is focused on the Hub experience and documentation. If you're facing an issue with a specific library, please open an issue in the corresponding GitHub repo. If you're facing an issue with a specific model or dataset, please open an issue in the corresponding HF repo.** 11 | 12 | 13 | **Bug description.** 14 | A clear and concise description of what the problem is. Ex. Clicking this button is not working when [...] 15 | 16 | **Describe the expected behaviour** 17 | A clear and concise description of what you want to happen. 18 | 19 | **Additional context** 20 | Add any other relevant context or screenshots here. Please share details such as browser when appropriate. 21 | -------------------------------------------------------------------------------- /docs/hub/datasets-download-stats.md: -------------------------------------------------------------------------------- 1 | # Datasets Download Stats 2 | 3 | ## How are download stats generated for datasets? 4 | 5 | The Hub provides download stats for all datasets loadable via the `datasets` library. To determine the number of downloads, the Hub counts every time `load_dataset` is called in Python, excluding Hugging Face's CI tooling on GitHub. No information is sent from the user, and no additional calls are made for this. The count is done server-side as we serve files for downloads. This means that: 6 | 7 | * The download count is the same regardless of whether the data is directly stored on the Hub repo or if the repository has a [script](https://huggingface.co/docs/datasets/dataset_script) to load the data from an external source. 8 | * If a user manually downloads the data using tools like `wget` or the Hub's user interface (UI), those downloads will not be included in the download count. 9 | -------------------------------------------------------------------------------- /docs/hub/spaces-more-ways-to-create.md: -------------------------------------------------------------------------------- 1 | # More ways to create Spaces 2 | 3 | ## Duplicating a Space 4 | 5 | You can duplicate a Space by clicking the three dots at the top right and selecting **Duplicate this Space**. Learn more about it [here](./spaces-overview#duplicating-a-space). 6 | 7 | ## Creating a Space from a model 8 | 9 | New! You can now create a Gradio demo directly from most model pages, using the "Deploy -> Spaces" button. 10 | 11 |