Skip to content

Commit 78a29d6

Browse files
committed
Merge branch 'update-inference-providers-docs-automated-pr' of github.com:huggingface/hub-docs into update-inference-providers-docs-automated-pr
2 parents 397ad04 + 4a5cf0c commit 78a29d6

File tree

109 files changed

+3487
-819
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+3487
-819
lines changed
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
name: Build sagemaker documentation
1+
name: Build SageMaker Documentation
22

33
on:
44
push:
5-
paths:
6-
- "docs/sagemaker/**"
75
branches:
86
- main
7+
- doc-builder*
8+
paths:
9+
- docs/sagemaker/**
10+
- .github/workflows/sagemaker_build_documentation.yaml
911

1012
jobs:
1113
build:
@@ -14,7 +16,9 @@ jobs:
1416
commit_sha: ${{ github.sha }}
1517
package: hub-docs
1618
package_name: sagemaker
17-
path_to_docs: hub-docs/docs/sagemaker/
19+
path_to_docs: hub-docs/docs/sagemaker/source
1820
additional_args: --not_python_module
21+
pre_command: cd hub-docs/docs/sagemaker && make docs
1922
secrets:
23+
token: ${{ secrets.HUGGINGFACE_PUSH }}
2024
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}

.github/workflows/sagemaker_build_pr_documentation.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
name: Build sagemaker PR Documentation
1+
name: Build SageMaker PR Documentation
22

33
on:
44
pull_request:
55
paths:
6-
- "docs/sagemaker/**"
6+
- docs/sagemaker/**
7+
- .github/workflows/sagemaker_build_pr_documentation.yaml
78

89
concurrency:
910
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -17,5 +18,6 @@ jobs:
1718
pr_number: ${{ github.event.number }}
1819
package: hub-docs
1920
package_name: sagemaker
20-
path_to_docs: hub-docs/docs/sagemaker/
21+
path_to_docs: hub-docs/docs/sagemaker/source
2122
additional_args: --not_python_module
23+
pre_command: cd hub-docs/docs/sagemaker && make docs

.github/workflows/sagemaker_delete_doc_comment.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: Delete sagemaker doc comment trigger
1+
name: Delete SageMaker PR Documentation Comment
22

33
on:
44
pull_request:
55
types: [ closed ]
66

7-
87
jobs:
98
delete:
109
uses: huggingface/doc-builder/.github/workflows/delete_doc_comment_trigger.yml@main
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Upload sagemaker PR Documentation
1+
name: Upload SageMaker PR Documentation
22

33
on:
44
workflow_run:
5-
workflows: ["Build sagemaker PR Documentation"]
5+
workflows: ["Build SageMaker PR Documentation"]
66
types:
77
- completed
88

@@ -13,4 +13,4 @@ jobs:
1313
package_name: sagemaker
1414
secrets:
1515
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
16-
comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }}
16+
comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }}

docs/hub/_toctree.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@
254254
title: Spaces Dev Mode
255255
- local: spaces-storage
256256
title: Spaces Persistent Storage
257+
- local: spaces-mcp-servers
258+
title: Spaces as MCP servers
257259
- local: spaces-sdks-gradio
258260
title: Gradio Spaces
259261
- local: spaces-sdks-streamlit
@@ -342,12 +344,14 @@
342344
sections:
343345
- local: enterprise-sso
344346
title: Single Sign-On (SSO)
347+
- local: enterprise-hub-advanced-sso
348+
title: Advanced Single Sign-On (SSO)
345349
- local: audit-logs
346350
title: Audit Logs
347351
- local: storage-regions
348352
title: Storage Regions
349353
- local: enterprise-hub-datasets
350-
title: Dataset viewer for Private datasets
354+
title: Data Studio for Private datasets
351355
- local: enterprise-hub-resource-groups
352356
title: Resource Groups (Access Control)
353357
- local: advanced-compute-options

docs/hub/academia-hub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Academia Hub is designed for:
2222
Key Features of Academia Hub:
2323

2424
- **ZeroGPU:** Get 5x usage quota and highest GPU queue priority.
25-
- **Spaces Hosting:** Create ZeroGPU Spaces with A100 hardware.
25+
- **Spaces Hosting:** Create ZeroGPU Spaces with H200 hardware.
2626
- **Spaces Dev Mode:** Fast iterations via SSH/VS Code for Spaces.
2727
- **Inference Providers:** Get monthly included credits across all Inference Providers.
2828
- **Dataset Viewer:** Activate it on private datasets.

docs/hub/advanced-compute-options.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Advanced Compute Options
22

33
<Tip warning={true}>
4-
This feature is part of the <a href="https://huggingface.co/enterprise">Enterprise Hub</a>.
4+
This feature is part of the <a href="https://huggingface.co/enterprise">Team & Enterprise</a> plans.
55
</Tip>
66

77
Enterprise Hub organizations gain access to advanced compute options to accelerate their machine learning journey.
88

99
## Host ZeroGPU Spaces in your organization
1010

11-
ZeroGPU is a dynamic GPU allocation system that optimizes AI deployment on Hugging Face Spaces. By automatically allocating and releasing NVIDIA A100 GPUs (40GB VRAM) as needed, organizations can efficiently serve their AI applications without dedicated GPU instances.
11+
ZeroGPU is a dynamic GPU allocation system that optimizes AI deployment on Hugging Face Spaces. By automatically allocating and releasing NVIDIA H200 GPU slices (70GB VRAM) as needed, organizations can efficiently serve their AI applications without dedicated GPU instances.
1212

1313
<div class="flex justify-center" style="max-width: 550px">
1414
<img
@@ -25,9 +25,9 @@ ZeroGPU is a dynamic GPU allocation system that optimizes AI deployment on Huggi
2525

2626
**Key benefits for organizations**
2727

28-
- **Free GPU Access**: Access powerful NVIDIA A100 GPUs at no additional cost through dynamic allocation
28+
- **Free GPU Access**: Access powerful NVIDIA H200 GPUs at no additional cost through dynamic allocation
2929
- **Enhanced Resource Management**: Host up to 50 ZeroGPU Spaces for efficient team-wide AI deployment
3030
- **Simplified Deployment**: Easy integration with PyTorch-based models, Gradio apps, and other Hugging Face libraries
31-
- **Enterprise-Grade Infrastructure**: Access to high-performance NVIDIA A100 GPUs with 40GB VRAM per workload
31+
- **Enterprise-Grade Infrastructure**: Access to high-performance NVIDIA H200 GPUs with 70GB VRAM per workload
3232

3333
[Learn more about ZeroGPU →](https://huggingface.co/docs/hub/spaces-zerogpu)

docs/hub/agents.md

Lines changed: 139 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
# Agents on the Hub
22

3-
This page compiles all the libraries and tools Hugging Face offers for agentic workflows: huggingface.js mcp-client, Gradio MCP Server and smolagents.
3+
This page compiles all the libraries and tools Hugging Face offers for agentic workflows:
4+
- `HF MCP Server`: Connect your MCP-compatible AI assistant directly to the Hugging Face Hub.
5+
- `tiny-agents`: A lightweight toolkit for MCP-powered agents, available in both JS (`@huggingface/tiny-agents`) and Python (`huggingface_hub`).
6+
- `Gradio MCP Server`: Easily create MCP servers from Gradio apps and Spaces.
7+
- `smolagents`: a Python library that enables you to run powerful agents in a few lines of code.
8+
9+
## HF MCP Server
10+
11+
The official **Hugging Face MCP (Model Context Protocol) Server** enables seamless integration between the Hugging Face Hub and any MCP-compatible AI assistant—including VSCode, Cursor, and Claude Desktop.
12+
13+
With the HF MCP Server, you can enhance your AI assistant's capabilities by connecting directly to the Hub's ecosystem. It comes with:
14+
- a curated set of **built-in tools** like Spaces and Papers Semantic Search, Model and Dataset exploration, etc
15+
- **MCP-compatible Gradio apps**: Connect to any [MCP-compatible Gradio app](https://huggingface.co/spaces?filter=mcp-server) built by the Hugging Face community
16+
17+
#### Getting Started
18+
19+
Visit [huggingface.co/settings/mcp](https://huggingface.co/settings/mcp) to configure your MCP client and get started.
20+
21+
<Tip warning={true}>
22+
23+
This feature is experimental ⚗️ and will continue to evolve.
24+
25+
</Tip>
426

527
## smolagents
628

@@ -43,27 +65,132 @@ with MCPClient(server_parameters) as tools:
4365

4466
Learn more [in the documentation](https://huggingface.co/docs/smolagents/tutorials/tools#use-mcp-tools-with-mcpclient-directly).
4567

46-
## huggingface.js mcp-client
68+
## tiny-agents (JS and Python)
69+
70+
`tiny-agents` is a lightweight toolkit for running and building MCP-powered agents on top of the Hugging Face Inference Client + Model Context Protocol (MCP). It is available as a JS package `@huggingface/tiny-agents` and in the `huggingface_hub` Python package.
71+
72+
73+
### @huggingface/tiny-agents (JS)
74+
75+
The `@huggingface/tiny-agents` package offers a simple and straightforward CLI and a simple programmatic API for running and building MCP-powered agents in JS.
4776

48-
Huggingface.js offers an MCP client served with [Inference Providers](https://huggingface.co/docs/inference-providers/en/index) or local LLMs. Getting started with them is as simple as running `pnpm agent`. You can plug and play different models and providers by setting `PROVIDER` and `MODEL_ID` environment variables.
4977

78+
**Getting Started**
79+
80+
First, you need to install the package:
81+
82+
```bash
83+
npm install @huggingface/tiny-agents
84+
# or
85+
pnpm add @huggingface/tiny-agents
86+
```
87+
88+
Then, you can your agent:
5089
```bash
51-
export HF_TOKEN="hf_..."
52-
export MODEL_ID="Qwen/Qwen2.5-72B-Instruct"
53-
export PROVIDER="nebius"
54-
npx @huggingface/mcp-client
90+
npx @huggingface/tiny-agents [command] "agent/id"
91+
92+
Usage:
93+
tiny-agents [flags]
94+
tiny-agents run "agent/id"
95+
tiny-agents serve "agent/id"
96+
97+
Available Commands:
98+
run Run the Agent in command-line
99+
serve Run the Agent as an OpenAI-compatible HTTP server
55100
```
56101

57-
or, you can use any Local LLM (for example via lmstudio):
102+
You can load agents directly from the [tiny-agents](https://huggingface.co/datasets/tiny-agents/tiny-agents) Dataset, or specify a path to your own local agent configuration.
103+
104+
**Advanced Usage**
105+
In addition to the CLI, you can use the `Agent` class for more fine-grained control. For lower-level interactions, use the `MCPClient` from the `@huggingface/mcp-client` package to connect directly to MCP servers and manage tool calls.
106+
107+
Learn more about tiny-agents in the [huggingface.js documentation](https://huggingface.co/docs/huggingface.js/en/tiny-agents/README).
108+
109+
### huggingface_hub (Python)
110+
111+
The `huggingface_hub` library is the easiest way to run MCP-powered agents in Python. It includes a high-level `tiny-agents` CLI as well as programmatic access via the `Agent` and `MCPClient` classes — all built to work with [Hugging Face Inference Providers](https://huggingface.co/docs/inference-providers/index), local LLMs, or any inference endpoint compatible with OpenAI's API specs.
112+
113+
**Getting started**
58114

115+
Install the latest version with MCP support:
59116
```bash
60-
ENDPOINT_URL=http://localhost:1234/v1 \
61-
MODEL_ID=lmstudio-community/Qwen3-14B-GGUF \
62-
npx @huggingface/mcp-client
117+
pip install "huggingface_hub[mcp]>=0.32.2"
63118
```
119+
Then, you can run your agent:
120+
```bash
121+
> tiny-agents run --help
122+
123+
Usage: tiny-agents run [OPTIONS] [PATH] COMMAND [ARGS]...
124+
125+
Run the Agent in the CLI
126+
127+
128+
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
129+
│ path [PATH] Path to a local folder containing an agent.json file or a built-in agent stored in the 'tiny-agents/tiny-agents' Hugging Face dataset │
130+
│ (https://huggingface.co/datasets/tiny-agents/tiny-agents) │
131+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
132+
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
133+
│ --help Show this message and exit. │
134+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
135+
136+
```
137+
138+
The CLI pulls the config, connects to its MCP servers, prints the available tools, and waits for your prompt.
139+
140+
**Advanced Usage**
141+
142+
For more fine-grained control, use the `MCPClient` directly. This low-level interface extends `AsyncInferenceClient` and allows LLMs to call tools via the Model Context Protocol (MCP). It supports both local (`stdio`) and remote (`http`/`sse`) MCP servers, handles tool registration and execution, and streams results back to the model in real-time.
143+
144+
Learn more in the [`huggingface_hub` MCP documentation](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/mcp).
145+
146+
147+
### Custom Agents
148+
149+
To create your own agent, simply create a folder (e.g., `my-agent/`) and define your agent’s configuration in an `agent.json` file.
150+
The following example shows a web-browsing agent configured to use the [Qwen/Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct) model via Nebius inference provider, and it comes equipped with a playwright MCP server, which lets it use a web browser
151+
152+
```json
153+
{
154+
"model": "Qwen/Qwen2.5-72B-Instruct",
155+
"provider": "nebius",
156+
"servers": [
157+
{
158+
"type": "stdio",
159+
"config": {
160+
"command": "npx",
161+
"args": ["@playwright/mcp@latest"]
162+
}
163+
}
164+
]
165+
}
166+
```
167+
168+
To use a local LLM (such as [llama.cpp](https://github.com/ggerganov/llama.cpp), or [LM Studio](https://lmstudio.ai/)), just provide an `endpointUrl`:
169+
170+
```json
171+
{
172+
"model": "Qwen/Qwen3-32B",
173+
"endpointUrl": "http://localhost:1234/v1",
174+
"servers": [
175+
{
176+
"type": "stdio",
177+
"config": {
178+
"command": "npx",
179+
"args": ["@playwright/mcp@latest"]
180+
}
181+
}
182+
]
183+
}
184+
185+
```
186+
187+
Optionally, add a `PROMPT.md` to customize the system prompt.
188+
189+
<Tip>
64190

65-
You can get more information about mcp-client [here](https://huggingface.co/docs/huggingface.js/en/mcp-client/README).
191+
Don't hesitate to contribute your agent to the community by opening a Pull Request in the [tiny-agents](https://huggingface.co/datasets/tiny-agents/tiny-agents) Hugging Face dataset.
66192

193+
</Tip>
67194

68195
## Gradio MCP Server / Tools
69196

docs/hub/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hub API Endpoints
22

3-
We have open endpoints that you can use to retrieve information from the Hub as well as perform certain actions such as creating model, dataset or Space repos. We offer a wrapper Python library, [`huggingface_hub`](https://github.com/huggingface/huggingface_hub), that allows easy access to these endpoints. We also provide [webhooks](./webhooks) to receive real-time incremental info about repos. Enjoy!
3+
We have open endpoints that you can use to retrieve information from the Hub as well as perform certain actions such as creating model, dataset or Space repos. We offer a wrapper Python client, [`huggingface_hub`](https://github.com/huggingface/huggingface_hub), and a JS client, [`huggingface.js`](https://github.com/huggingface/huggingface.js), that allow easy access to these endpoints. We also provide [webhooks](./webhooks) to receive real-time incremental info about repos. Enjoy!
44

55
The base URL for those endpoints below is `https://huggingface.co`. For example, to construct the `/api/models` call below, one can call the URL [https://huggingface.co/api/models](https://huggingface.co/api/models)
66

docs/hub/audit-logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Audit Logs
22

33
<Tip warning={true}>
4-
This feature is part of the <a href="https://huggingface.co/enterprise">Enterprise Hub</a>.
4+
This feature is part of the <a href="https://huggingface.co/enterprise">Team & Enterprise</a> plans.
55
</Tip>
66

77
Audit Logs enable organization admins to easily review actions taken by members, including organization membership, repository settings and billing changes.

0 commit comments

Comments
 (0)