Skip to content

Commit a1180e0

Browse files
committed
Merge branch 'main' of github.com:featherlessai/hub-docs into featherless-docs
2 parents 1eb59cb + f11adc6 commit a1180e0

Some content is hidden

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

57 files changed

+2816
-662
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@
347347
- local: storage-regions
348348
title: Storage Regions
349349
- local: enterprise-hub-datasets
350-
title: Dataset viewer for Private datasets
350+
title: Data Studio for Private datasets
351351
- local: enterprise-hub-resource-groups
352352
title: Resource Groups (Access Control)
353353
- 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Enterprise Hub organizations gain access to advanced compute options to accelera
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: 120 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
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+
- `tiny-agents`: A lightweight toolkit for MCP-powered agents, available in both JS (`@huggingface/tiny-agents`) and Python (`huggingface_hub`).
5+
- `Gradio MCP Server`: Easily create MCP servers from Gradio apps and Spaces.
6+
- `smolagents`: a Python library that enables you to run powerful agents in a few lines of code.
47

58
## smolagents
69

@@ -43,27 +46,132 @@ with MCPClient(server_parameters) as tools:
4346

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

46-
## huggingface.js mcp-client
49+
## tiny-agents (JS and Python)
4750

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.
51+
`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.
52+
53+
54+
### @huggingface/tiny-agents (JS)
55+
56+
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.
57+
58+
59+
**Getting Started**
60+
61+
First, you need to install the package:
4962

5063
```bash
51-
export HF_TOKEN="hf_..."
52-
export MODEL_ID="Qwen/Qwen2.5-72B-Instruct"
53-
export PROVIDER="nebius"
54-
npx @huggingface/mcp-client
64+
npm install @huggingface/tiny-agents
65+
# or
66+
pnpm add @huggingface/tiny-agents
67+
```
68+
69+
Then, you can your agent:
70+
```bash
71+
npx @huggingface/tiny-agents [command] "agent/id"
72+
73+
Usage:
74+
tiny-agents [flags]
75+
tiny-agents run "agent/id"
76+
tiny-agents serve "agent/id"
77+
78+
Available Commands:
79+
run Run the Agent in command-line
80+
serve Run the Agent as an OpenAI-compatible HTTP server
5581
```
5682

57-
or, you can use any Local LLM (for example via lmstudio):
83+
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.
84+
85+
**Advanced Usage**
86+
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.
87+
88+
Learn more about tiny-agents in the [huggingface.js documentation](https://huggingface.co/docs/huggingface.js/en/tiny-agents/README).
89+
90+
### huggingface_hub (Python)
91+
92+
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.
5893

94+
**Getting started**
95+
96+
Install the latest version with MCP support:
97+
```bash
98+
pip install "huggingface_hub[mcp]>=0.32.2"
99+
```
100+
Then, you can run your agent:
59101
```bash
60-
ENDPOINT_URL=http://localhost:1234/v1 \
61-
MODEL_ID=lmstudio-community/Qwen3-14B-GGUF \
62-
npx @huggingface/mcp-client
102+
> tiny-agents run --help
103+
104+
Usage: tiny-agents run [OPTIONS] [PATH] COMMAND [ARGS]...
105+
106+
Run the Agent in the CLI
107+
108+
109+
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
110+
│ 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 │
111+
│ (https://huggingface.co/datasets/tiny-agents/tiny-agents) │
112+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
113+
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
114+
│ --help Show this message and exit. │
115+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
116+
117+
```
118+
119+
The CLI pulls the config, connects to its MCP servers, prints the available tools, and waits for your prompt.
120+
121+
**Advanced Usage**
122+
123+
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.
124+
125+
Learn more in the [`huggingface_hub` MCP documentation](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/mcp).
126+
127+
128+
### Custom Agents
129+
130+
To create your own agent, simply create a folder (e.g., `my-agent/`) and define your agent’s configuration in an `agent.json` file.
131+
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
132+
133+
```json
134+
{
135+
"model": "Qwen/Qwen2.5-72B-Instruct",
136+
"provider": "nebius",
137+
"servers": [
138+
{
139+
"type": "stdio",
140+
"config": {
141+
"command": "npx",
142+
"args": ["@playwright/mcp@latest"]
143+
}
144+
}
145+
]
146+
}
147+
```
148+
149+
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`:
150+
151+
```json
152+
{
153+
"model": "Qwen/Qwen3-32B",
154+
"endpointUrl": "http://localhost:1234/v1",
155+
"servers": [
156+
{
157+
"type": "stdio",
158+
"config": {
159+
"command": "npx",
160+
"args": ["@playwright/mcp@latest"]
161+
}
162+
}
163+
]
164+
}
165+
63166
```
64167

65-
You can get more information about mcp-client [here](https://huggingface.co/docs/huggingface.js/en/mcp-client/README).
168+
Optionally, add a `PROMPT.md` to customize the system prompt.
169+
170+
<Tip>
171+
172+
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.
66173

174+
</Tip>
67175

68176
## Gradio MCP Server / Tools
69177

0 commit comments

Comments
 (0)