From e66d735d012a6efd010328aa3cbc65e4be9c23c8 Mon Sep 17 00:00:00 2001 From: AhnJoonSung Date: Tue, 5 Aug 2025 20:18:16 +0900 Subject: [PATCH 1/4] docs: ko: tiny_agents.md --- docs/source/ko/_toctree.yml | 4 ++++ docs/source/ko/tiny_agents.md | 45 +++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 docs/source/ko/tiny_agents.md diff --git a/docs/source/ko/_toctree.yml b/docs/source/ko/_toctree.yml index b1ebddf57986..3f17eb169473 100644 --- a/docs/source/ko/_toctree.yml +++ b/docs/source/ko/_toctree.yml @@ -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 diff --git a/docs/source/ko/tiny_agents.md b/docs/source/ko/tiny_agents.md new file mode 100644 index 000000000000..dc53d05a4bff --- /dev/null +++ b/docs/source/ko/tiny_agents.md @@ -0,0 +1,45 @@ +### `tiny-agents` CLI and MCP Tools + +To showcase the use of MCP tools, let's see how to integrate the `transformers serve` server with the [`tiny-agents`](https://huggingface.co/blog/python-tiny-agents) CLI. + +> [!TIP] +> Many Hugging Face Spaces can be used as MCP servers, as in this example. You can find all compatible Spaces [here](https://huggingface.co/spaces?filter=mcp-server). + +The first step to use MCP tools is to let the model know which tools are available. As an example, let's consider a `tiny-agents` configuration file with a reference to an [image generation MCP server](https://evalstate-flux1-schnell.hf.space/). + +```json +{ + "model": "Menlo/Jan-nano", + "endpointUrl": "http://localhost:8000", + "servers": [ + { + "type": "sse", + "url": "https://evalstate-flux1-schnell.hf.space/gradio_api/mcp/sse" + } + ] +} +``` + +You can then launch your `tiny-agents` chat interface with the following command. + +```bash +tiny-agents run path/to/your/config.json +``` + +If you have `transformers serve` running in the background, you're ready to use MCP tools from a local model! For instance, here's the example of a chat session with `tiny-agents`: + +```bash +Agent loaded with 1 tools: + • flux1_schnell_infer +» Generate an image of a cat on the moon +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 + +I have generated an image of a cat on the moon using the Flux 1 Schnell Image Generator. The image is 1024x1024 pixels and was created with 4 inference steps. Let me know if you would like to make any changes or need further assistance! +``` + From 2f0db497645a3f863b76402c59629b6f760d8591 Mon Sep 17 00:00:00 2001 From: AhnJoonSung Date: Tue, 5 Aug 2025 20:23:54 +0900 Subject: [PATCH 2/4] feat: nmt draft --- docs/source/ko/tiny_agents.md | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/docs/source/ko/tiny_agents.md b/docs/source/ko/tiny_agents.md index dc53d05a4bff..3edc56498ce7 100644 --- a/docs/source/ko/tiny_agents.md +++ b/docs/source/ko/tiny_agents.md @@ -1,32 +1,32 @@ -### `tiny-agents` CLI and MCP Tools +### `tiny-agents` CLI 및 MCP 도구[[tiny-agents-cli-and-mcp-tools]] -To showcase the use of MCP tools, let's see how to integrate the `transformers serve` server with the [`tiny-agents`](https://huggingface.co/blog/python-tiny-agents) CLI. +MCP 도구의 사용을 보여주기 위해 [`tiny-agents`](https://huggingface.co/blog/python-tiny-agents) CLI와 `transformers serve` 서버를 통합하는 방법을 살펴보겠습니다. > [!TIP] -> Many Hugging Face Spaces can be used as MCP servers, as in this example. You can find all compatible Spaces [here](https://huggingface.co/spaces?filter=mcp-server). +> 이 예시처럼 많은 Hugging Face Spaces를 MCP 서버로 사용할 수 있습니다. 호환되는 모든 Spaces는 [여기](https://huggingface.co/spaces?filter=mcp-server)에서 찾을 수 있습니다. -The first step to use MCP tools is to let the model know which tools are available. As an example, let's consider a `tiny-agents` configuration file with a reference to an [image generation MCP server](https://evalstate-flux1-schnell.hf.space/). +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" - } - ] + "model": "Menlo/Jan-nano", + "endpointUrl": "http://localhost:8000", + "servers": [ + { + "type": "sse", + "url": "https://evalstate-flux1-schnell.hf.space/gradio_api/mcp/sse" + } + ] } ``` -You can then launch your `tiny-agents` chat interface with the following command. +그런 다음 다음 명령으로 `tiny-agents` 채팅 인터페이스를 실행할 수 있습니다. ```bash tiny-agents run path/to/your/config.json ``` -If you have `transformers serve` running in the background, you're ready to use MCP tools from a local model! For instance, here's the example of a chat session with `tiny-agents`: +백그라운드에서 `transformers serve`가 실행 중이라면, 로컬 모델에서 MCP 도구를 사용할 준비가 완료됩니다! 예를 들어, 다음은 `tiny-agents`와의 채팅 세션 예시입니다: ```bash Agent loaded with 1 tools: @@ -40,6 +40,5 @@ 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 -I have generated an image of a cat on the moon using the Flux 1 Schnell Image Generator. The image is 1024x1024 pixels and was created with 4 inference steps. Let me know if you would like to make any changes or need further assistance! +Flux 1 Schnell 이미지 생성기를 사용하여 달 위의 고양이 이미지를 생성했습니다. 이미지는 1024x1024 픽셀이며 4번의 추론 단계로 생성되었습니다. 변경 사항이 필요하거나 추가 도움이 필요하시면 알려주세요! ``` - From 1bc3b1b75b289de7fbbb0fc26afb00e62c79bf32 Mon Sep 17 00:00:00 2001 From: AhnJoonSung Date: Tue, 5 Aug 2025 20:34:41 +0900 Subject: [PATCH 3/4] fix: manual edits --- docs/source/ko/tiny_agents.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/ko/tiny_agents.md b/docs/source/ko/tiny_agents.md index 3edc56498ce7..da845a6d2424 100644 --- a/docs/source/ko/tiny_agents.md +++ b/docs/source/ko/tiny_agents.md @@ -20,13 +20,13 @@ MCP 도구를 사용하는 첫 번째 단계는 모델에게 어떤 도구들이 } ``` -그런 다음 다음 명령으로 `tiny-agents` 채팅 인터페이스를 실행할 수 있습니다. +그런 다음 아래 명령으로 `tiny-agents` 채팅 인터페이스를 실행할 수 있습니다. ```bash tiny-agents run path/to/your/config.json ``` -백그라운드에서 `transformers serve`가 실행 중이라면, 로컬 모델에서 MCP 도구를 사용할 준비가 완료됩니다! 예를 들어, 다음은 `tiny-agents`와의 채팅 세션 예시입니다: +백그라운드에서 `transformers serve`가 실행 중이라면, 로컬 모델에서 MCP 도구를 사용할 준비가 완료되었습니다! 아래는 `tiny-agents`와의 채팅 세션 예시입니다: ```bash Agent loaded with 1 tools: @@ -40,5 +40,5 @@ 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번의 추론 단계로 생성되었습니다. 변경 사항이 필요하거나 추가 도움이 필요하시면 알려주세요! +Flux 1 Schnell 이미지 생성기를 사용하여 달 위의 고양이 이미지를 생성했습니다. 이미지는 1024x1024 픽셀이며 4번의 추론 단계를 거쳐 생성되었습니다. 변경 사항이 필요하거나 추가 도움이 필요하시면 알려주세요! ``` From cb0c3538e2591787c466f7ee676709664ad6e59d Mon Sep 17 00:00:00 2001 From: AhnJoonSung Date: Sat, 9 Aug 2025 16:22:54 +0900 Subject: [PATCH 4/4] fix: manual edits --- docs/source/ko/tiny_agents.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/ko/tiny_agents.md b/docs/source/ko/tiny_agents.md index da845a6d2424..4f4165d93b73 100644 --- a/docs/source/ko/tiny_agents.md +++ b/docs/source/ko/tiny_agents.md @@ -1,11 +1,11 @@ ### `tiny-agents` CLI 및 MCP 도구[[tiny-agents-cli-and-mcp-tools]] -MCP 도구의 사용을 보여주기 위해 [`tiny-agents`](https://huggingface.co/blog/python-tiny-agents) CLI와 `transformers serve` 서버를 통합하는 방법을 살펴보겠습니다. +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)에서 찾을 수 있습니다. +> 이 예시처럼 많은 Hugging Face Spaces를 MCP 서버로 활용할 수 있습니다. 호환 가능한 모든 Spaces는 [여기](https://huggingface.co/spaces?filter=mcp-server)에서 찾을 수 있습니다. -MCP 도구를 사용하는 첫 번째 단계는 모델에게 어떤 도구들이 사용 가능한지 알려주는 것입니다. 예시로, [이미지 생성 MCP 서버](https://evalstate-flux1-schnell.hf.space/)에 대한 참조가 포함된 `tiny-agents` 설정 파일을 살펴보겠습니다. +MCP 도구를 사용하려면 먼저 모델에 사용 가능한 도구를 알려야 합니다. 예를 들어, [이미지 생성 MCP 서버](https://evalstate-flux1-schnell.hf.space/)를 참조하는 `tiny-agents` 설정 파일을 살펴보겠습니다. ```json { @@ -20,13 +20,13 @@ MCP 도구를 사용하는 첫 번째 단계는 모델에게 어떤 도구들이 } ``` -그런 다음 아래 명령으로 `tiny-agents` 채팅 인터페이스를 실행할 수 있습니다. +그런 다음 아래 명령어로 `tiny-agents` 채팅 인터페이스를 실행할 수 있습니다. ```bash tiny-agents run path/to/your/config.json ``` -백그라운드에서 `transformers serve`가 실행 중이라면, 로컬 모델에서 MCP 도구를 사용할 준비가 완료되었습니다! 아래는 `tiny-agents`와의 채팅 세션 예시입니다: +백그라운드에서 `transformers serve`가 실행 중이라면, 이제 로컬 모델에서 MCP 도구를 사용할 수 있습니다. 다음은 `tiny-agents`와의 채팅 세션 예시입니다. ```bash Agent loaded with 1 tools: