Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/source/ko/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
- local: in_translation
title: (๋ฒˆ์—ญ์ค‘) Tools and RAG
title: ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•ด ๋Œ€ํ™”ํ•˜๊ธฐ
- sections:
- local: tiny_agents
title: Tiny-Agents CLI ๋ฐ MCP ๋„๊ตฌ
title: ์„œ๋น™(Serving)
- sections:
- local: in_translation
title: (๋ฒˆ์—ญ์ค‘) torch.compile
Expand Down
44 changes: 44 additions & 0 deletions docs/source/ko/tiny_agents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
### `tiny-agents` CLI ๋ฐ MCP ๋„๊ตฌ[[tiny-agents-cli-and-mcp-tools]]

MCP ๋„๊ตฌ์˜ ์‚ฌ์šฉ์„ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด [`tiny-agents`](https://huggingface.co/blog/python-tiny-agents) CLI์™€ `transformers serve` ์„œ๋ฒ„๋ฅผ ์—ฐ๋™ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

> [!TIP]
> ์ด ์˜ˆ์‹œ์ฒ˜๋Ÿผ ๋งŽ์€ Hugging Face Spaces๋ฅผ MCP ์„œ๋ฒ„๋กœ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ˜ธํ™˜ ๊ฐ€๋Šฅํ•œ ๋ชจ๋“  Spaces๋Š” [์—ฌ๊ธฐ](https://huggingface.co/spaces?filter=mcp-server)์—์„œ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

MCP ๋„๊ตฌ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋จผ์ € ๋ชจ๋ธ์— ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋„๊ตฌ๋ฅผ ์•Œ๋ ค์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, [์ด๋ฏธ์ง€ ์ƒ์„ฑ MCP ์„œ๋ฒ„](https://evalstate-flux1-schnell.hf.space/)๋ฅผ ์ฐธ์กฐํ•˜๋Š” `tiny-agents` ์„ค์ • ํŒŒ์ผ์„ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

```json
{
"model": "Menlo/Jan-nano",
"endpointUrl": "http://localhost:8000",
"servers": [
{
"type": "sse",
"url": "https://evalstate-flux1-schnell.hf.space/gradio_api/mcp/sse"
}
]
}
```

๊ทธ๋Ÿฐ ๋‹ค์Œ ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ `tiny-agents` ์ฑ„ํŒ… ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

```bash
tiny-agents run path/to/your/config.json
```

๋ฐฑ๊ทธ๋ผ์šด๋“œ์—์„œ `transformers serve`๊ฐ€ ์‹คํ–‰ ์ค‘์ด๋ผ๋ฉด, ์ด์ œ ๋กœ์ปฌ ๋ชจ๋ธ์—์„œ MCP ๋„๊ตฌ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ์€ `tiny-agents`์™€์˜ ์ฑ„ํŒ… ์„ธ์…˜ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค.

```bash
Agent loaded with 1 tools:
โ€ข flux1_schnell_infer
ยป Generate an image of a cat on the moon
<Tool req_0_tool_call>flux1_schnell_infer {"prompt": "a cat on the moon", "seed": 42, "randomize_seed": true, "width": 1024, "height": 1024, "num_inference_steps": 4}

Tool req_0_tool_call
[Binary Content: Image image/webp, 57732 bytes]
The task is complete and the content accessible to the User
Image URL: https://evalstate-flux1-schnell.hf.space/gradio_api/file=/tmp/gradio/3dbddc0e53b5a865ed56a4e3dbdd30f3f61cf3b8aabf1b456f43e5241bd968b8/image.webp
380576952

Flux 1 Schnell ์ด๋ฏธ์ง€ ์ƒ์„ฑ๊ธฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ฌ ์œ„์˜ ๊ณ ์–‘์ด ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฏธ์ง€๋Š” 1024x1024 ํ”ฝ์…€์ด๋ฉฐ 4๋ฒˆ์˜ ์ถ”๋ก  ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณ ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ํ•„์š”ํ•˜๊ฑฐ๋‚˜ ์ถ”๊ฐ€ ๋„์›€์ด ํ•„์š”ํ•˜์‹œ๋ฉด ์•Œ๋ ค์ฃผ์„ธ์š”!
```