Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"Local Tiny Agents with AMD NPU and iGPU Acceleration","local":"local-tiny-agents-with-amd-npu-and-igpu-acceleration","sections":[{"title":"Setup","local":"setup","sections":[{"title":"Setup Lemonade Server","local":"setup-lemonade-server","sections":[],"depth":3},{"title":"Tiny Agents and NPX Setup","local":"tiny-agents-and-npx-setup","sections":[],"depth":3}],"depth":2},{"title":"Running your Tiny Agents application with AMD NPU and iGPU","local":"running-your-tiny-agents-application-with-amd-npu-and-igpu","sections":[],"depth":2},{"title":"Creating an assistant to handle sensitive information locally","local":"creating-an-assistant-to-handle-sensitive-information-locally","sections":[{"title":"Taking it for a spin","local":"taking-it-for-a-spin","sections":[],"depth":3},{"title":"Exploring other models and acceleration options","local":"exploring-other-models-and-acceleration-options","sections":[],"depth":3}],"depth":2},{"title":"Conclusion","local":"conclusion","sections":[],"depth":2}],"depth":1}"> | |
| <link href="/docs/mcp-course/pr_221/en/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/entry/start.dc55593b.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/scheduler.4048030c.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/singletons.213fc73e.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/index.dd3f5310.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/paths.e68d3b81.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/entry/app.f1430c51.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/preload-helper.ccf7f2fe.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/index.f47d7c49.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/nodes/0.654a0b07.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/each.e59479a4.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/nodes/21.230a8327.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/MermaidChart.svelte_svelte_type_style_lang.000481a1.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/CodeBlock.54d9562d.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/HfOption.7c2eaa02.js"> | |
| <link rel="modulepreload" href="/docs/mcp-course/pr_221/en/_app/immutable/chunks/stores.0a12db33.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{"title":"Local Tiny Agents with AMD NPU and iGPU Acceleration","local":"local-tiny-agents-with-amd-npu-and-igpu-acceleration","sections":[{"title":"Setup","local":"setup","sections":[{"title":"Setup Lemonade Server","local":"setup-lemonade-server","sections":[],"depth":3},{"title":"Tiny Agents and NPX Setup","local":"tiny-agents-and-npx-setup","sections":[],"depth":3}],"depth":2},{"title":"Running your Tiny Agents application with AMD NPU and iGPU","local":"running-your-tiny-agents-application-with-amd-npu-and-igpu","sections":[],"depth":2},{"title":"Creating an assistant to handle sensitive information locally","local":"creating-an-assistant-to-handle-sensitive-information-locally","sections":[{"title":"Taking it for a spin","local":"taking-it-for-a-spin","sections":[],"depth":3},{"title":"Exploring other models and acceleration options","local":"exploring-other-models-and-acceleration-options","sections":[],"depth":3}],"depth":2},{"title":"Conclusion","local":"conclusion","sections":[],"depth":2}],"depth":1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"><div class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg></span> <span>Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg></button></div> </div> <h1 class="relative group"><a id="local-tiny-agents-with-amd-npu-and-igpu-acceleration" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#local-tiny-agents-with-amd-npu-and-igpu-acceleration"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Local Tiny Agents with AMD NPU and iGPU Acceleration</span></h1> <p data-svelte-h="svelte-1x7w16c">In this section, we’ll show you how to accelerate our end-to-end Tiny Agents application using AMD Neural Processing Unit (NPU) and integrated GPU (iGPU). We then enhance our end-to-end application by providing it with access to local files and creating an assistant to handle sensitive information locally, ensuring maximum privacy.</p> <p data-svelte-h="svelte-1u55o32">To enable this, we’ll use Lemonade Server, a tool for running models locally with NPU and iGPU acceleration.</p> <h2 class="relative group"><a id="setup" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#setup"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Setup</span></h2> <h3 class="relative group"><a id="setup-lemonade-server" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#setup-lemonade-server"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Setup Lemonade Server</span></h3> <p data-svelte-h="svelte-r187va">You can install Lemonade Server on both Windows and Linux. Additional documentation can be found at <a href="https://lemonade-server.ai/" rel="nofollow">lemonade-server.ai</a>.</p> <div class="flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd border-gray-800 bg-black dark:bg-gray-700 text-white">windows </div><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm">linux </div></div> <div class="language-select"><p data-svelte-h="svelte-b6wx74">To install Lemonade Server on Windows, simply download and run the latest installer <a href="https://github.com/lemonade-sdk/lemonade/releases/latest/download/Lemonade_Server_Installer.exe" rel="nofollow">here</a>.</p> <p data-svelte-h="svelte-1qzaiix">Lemonade Server supports CPU inference across all platforms and engines on Windows x86/x64. GPU acceleration is enabled via the llamacpp engine using Vulkan, with a focus on AMD Ryzen™ AI 7000/8000/300 series and AMD Radeon™ 7000/9000 series. For NPU acceleration, the ONNX Runtime GenAI (OGA) engine enables support for AMD Ryzen™ AI 300 series devices.</p> <p data-svelte-h="svelte-10vsq5o">Once you have installed Lemonade Server, you can launch it by clicking the <code>Lemonade</code> icon added to the Desktop.</p> </div> <h3 class="relative group"><a id="tiny-agents-and-npx-setup" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#tiny-agents-and-npx-setup"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Tiny Agents and NPX Setup</span></h3> <p data-svelte-h="svelte-93ajyh">This section of the course assumes you have already installed <code>npx</code> and <code>Tiny Agents</code>. If you haven’t, please refer to the <a href="https://huggingface.co/learn/mcp-course/en/unit2/tiny-agents" rel="nofollow">Tiny Agents</a> section of the course. Please make sure to use <code>huggingface_hub[mcp]==0.33.2</code>.</p> <h2 class="relative group"><a id="running-your-tiny-agents-application-with-amd-npu-and-igpu" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#running-your-tiny-agents-application-with-amd-npu-and-igpu"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Running your Tiny Agents application with AMD NPU and iGPU</span></h2> <p data-svelte-h="svelte-pl2h70">To run your Tiny Agents application with AMD NPU and iGPU, simply point to the MCP server we created in the <a href="https://huggingface.co/learn/mcp-course/en/unit2/tiny-agents" rel="nofollow">previous section</a> to the Lemonade Server, as shown below:</p> <div class="flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd border-gray-800 bg-black dark:bg-gray-700 text-white">windows </div><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm">linux </div></div> <div class="language-select"><div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-json "><!-- HTML_TAG_START --><span class="hljs-punctuation">{</span> | |
| <span class="hljs-attr">"model"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Qwen3-8B-GGUF"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-attr">"endpointUrl"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"http://localhost:8000/api/"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-attr">"servers"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span> | |
| <span class="hljs-punctuation">{</span> | |
| <span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"stdio"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-attr">"command"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"C:\\Program Files\\nodejs\\npx.cmd"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-attr">"args"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span> | |
| <span class="hljs-string">"mcp-remote"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-string">"http://localhost:7860/gradio_api/mcp/sse"</span> | |
| <span class="hljs-punctuation">]</span> | |
| <span class="hljs-punctuation">}</span> | |
| <span class="hljs-punctuation">]</span> | |
| <span class="hljs-punctuation">}</span><!-- HTML_TAG_END --></pre></div> </div> <p data-svelte-h="svelte-hcq9nr">You can then choose from a variety of models to run on your local machine. For this example, used the <a href="https://huggingface.co/Qwen/Qwen3-8B-GGUF" rel="nofollow"><code>Qwen3-8B-GGUF</code></a> model, which runs efficiently on AMD GPUs through Vulkan acceleration. You can find the list of models supported and even import your own models by navigating to http://localhost:8000/#model-management.</p> <h2 class="relative group"><a id="creating-an-assistant-to-handle-sensitive-information-locally" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#creating-an-assistant-to-handle-sensitive-information-locally"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Creating an assistant to handle sensitive information locally</span></h2> <p data-svelte-h="svelte-1vaoqib"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/huggingface_course/hf_lemonade.png" alt="Lemonade Server Interface"></p> <p data-svelte-h="svelte-a7x1bk">Now let’s enhance our end-to-end application by enabling access to local files and introducing an assistant that processes sensitive information entirely on-device. Specifically, this assistant will help us evaluate candidate resumes and support decision-making in the hiring process—all while keeping the data private and secure.</p> <p data-svelte-h="svelte-rktitu">To do this, we’ll use the <a href="https://github.com/wonderwhy-er/DesktopCommanderMCP" rel="nofollow">Desktop Commander</a> MCP server, which allows you to run commands on your local machine and provides comprehensive file system access, terminal control, and code editing capabilities.</p> <p data-svelte-h="svelte-u3birs">Let’s setup a project with a basic Tiny Agent.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-bash "><!-- HTML_TAG_START --><span class="hljs-built_in">mkdir</span> file-assistant | |
| <span class="hljs-built_in">cd</span> file-assistant<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-a810zd">Let’s then create a new <code>agent.json</code> file in the <code>file-assistant</code> folder.</p> <div class="flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd border-gray-800 bg-black dark:bg-gray-700 text-white">windows </div><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm">linux </div></div> <div class="language-select"><div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-json "><!-- HTML_TAG_START --><span class="hljs-punctuation">{</span> | |
| <span class="hljs-attr">"model"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"user.jan-nano"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-attr">"endpointUrl"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"http://localhost:8000/api/"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-attr">"servers"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span> | |
| <span class="hljs-punctuation">{</span> | |
| <span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"stdio"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-attr">"command"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"C:\\Program Files\\nodejs\\npx.cmd"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-attr">"args"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span> | |
| <span class="hljs-string">"-y"</span><span class="hljs-punctuation">,</span> | |
| <span class="hljs-string">"@wonderwhy-er/desktop-commander"</span> | |
| <span class="hljs-punctuation">]</span> | |
| <span class="hljs-punctuation">}</span> | |
| <span class="hljs-punctuation">]</span> | |
| <span class="hljs-punctuation">}</span><!-- HTML_TAG_END --></pre></div> </div> <p data-svelte-h="svelte-1rhspuo">Finally, we have to download the <code>Jan Nano</code> model. You can do this by navigating to http://localhost:8000/#model-management, clicking on <code>Add a Model</code> and providing the following information:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=" "><!-- HTML_TAG_START -->Model <span class="hljs-type">Name</span>: <span class="hljs-keyword">user</span>.jan-nano | |
| <span class="hljs-keyword">Checkpoint</span>: Menlo/Jan-nano-gguf:jan-nano<span class="hljs-number">-4</span>b-Q4_0.gguf | |
| Recipe: llamacpp<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1sk8ue9"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/huggingface_course/custom_model.png" alt="Custom Model"></p> <p data-svelte-h="svelte-1a9tzj7">All done! Now let’s give it a try.</p> <h3 class="relative group"><a id="taking-it-for-a-spin" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#taking-it-for-a-spin"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Taking it for a spin</span></h3> <p data-svelte-h="svelte-190mlv3"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/huggingface_course/recording.gif" alt="recording"></p> <p data-svelte-h="svelte-eh2hf">Our goal is to create an assistant that can help us handle sensitive information locally. To do this, we’ll first create a job description file for our assistant to work with.</p> <p data-svelte-h="svelte-dd35oc">Create a file called <code>job_description.md</code> in the <code>file-assistant</code> folder.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-md "><!-- HTML_TAG_START --><span class="hljs-section"># Senior Food Technology Engineer</span> | |
| <span class="hljs-section">## About the Role</span> | |
| We're seeking a culinary innovator to transform cooking processes into precise algorithms and AI systems. | |
| <span class="hljs-section">## What You'll Do</span> | |
| <span class="hljs-bullet">-</span> Convert cooking instructions into measurable algorithms | |
| <span class="hljs-bullet">-</span> Develop AI-powered kitchen tools | |
| <span class="hljs-bullet">-</span> Create food quality assessment systems | |
| <span class="hljs-bullet">-</span> Build recipe-following AI models | |
| <span class="hljs-section">## Requirements</span> | |
| <span class="hljs-bullet">-</span> MS in Computer Science (food-related thesis preferred) | |
| <span class="hljs-bullet">-</span> Python and PyTorch expertise | |
| <span class="hljs-bullet">-</span> Proven experience combining food science with ML | |
| <span class="hljs-bullet">-</span> Strong communication skills using culinary metaphors | |
| <span class="hljs-section">## Perks</span> | |
| <span class="hljs-bullet">-</span> Access to experimental kitchen | |
| <span class="hljs-bullet">-</span> Continuous taste-testing opportunities | |
| <span class="hljs-bullet">-</span> Collaborative tech-foodie team environment | |
| <span class="hljs-emphasis">*Note: Must attend conferences and publish on algorithmic cooking optimization.*</span> | |
| <!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1v4gelj">Now, let’s create a <code>candidates</code> folder inside the <code>file-assistant</code> folder and add a sample resume file for our assistant to work with.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-bash "><!-- HTML_TAG_START --><span class="hljs-built_in">mkdir</span> candidates | |
| <span class="hljs-built_in">touch</span> candidates/john_resume.md<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1mzc4b8">Add the following sample resume or include your own.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-md "><!-- HTML_TAG_START --><span class="hljs-section"># John Doe</span> | |
| <span class="hljs-strong">**Contact Information**</span> | |
| <span class="hljs-bullet">-</span> Email: email@example.com | |
| <span class="hljs-bullet">-</span> Phone: (+1) 123-456-7890 | |
| <span class="hljs-bullet">-</span> Location: 1234 Abc Street, Example, EX 01234 | |
| <span class="hljs-bullet">-</span> GitHub: github.com/example | |
| <span class="hljs-bullet">-</span> LinkedIn: linkedin.com/in/example | |
| <span class="hljs-bullet">-</span> Website: example.com | |
| <span class="hljs-section">## Experience</span> | |
| <span class="hljs-strong">**Machine Learning Engineer Intern**</span> | Slow Feet Technology | Jul 2021 - Present | |
| <span class="hljs-bullet">-</span> Developed food-agnostic formulation for cross-ingredient meal cooking | |
| <span class="hljs-bullet">-</span> Created competitive cream of mushroom soup recipe, published in NeurIPS 2099 | |
| <span class="hljs-bullet">-</span> Built specialized pan for meal cooking research | |
| <span class="hljs-strong">**Research Intern**</span> | Paddling University | Aug 2020 - Present | |
| <span class="hljs-bullet">-</span> Designed efficient mapo tofu quality estimation method using thermometer | |
| <span class="hljs-bullet">-</span> Proposed fast stir frying algorithm for tofu cooking, published in CVPR 2077 | |
| <span class="hljs-bullet">-</span> Outperformed SOTA methods with improved efficiency | |
| <span class="hljs-strong">**Research Assistant**</span> | Huangdu Institute of Technology | Mar 2020 - Jun 2020 | |
| <span class="hljs-bullet">-</span> Developed novel framework using spoon and chopsticks for eating mapo tofu | |
| <span class="hljs-bullet">-</span> Designed tofu filtering strategy inspired by beans grinding method | |
| <span class="hljs-bullet">-</span> Created evaluation criteria for eating plan novelty and diversity | |
| <span class="hljs-strong">**Research Intern**</span> | Paddling University | Jul 2018 - Aug 2018 | |
| <span class="hljs-bullet">-</span> Designed dual sandwiches using traditional burger ingredients | |
| <span class="hljs-bullet">-</span> Utilized structure duality to boost cooking speed for shared ingredients | |
| <span class="hljs-bullet">-</span> Outperformed baselines on QWE'15 and ASDF'14 datasets | |
| <span class="hljs-section">## Education</span> | |
| <span class="hljs-strong">**M.S. in Computer Science**</span> | University of Charles River | Sep 2021 - Jan 2023 | |
| <span class="hljs-bullet">-</span> Location: Boston, MA | |
| <span class="hljs-strong">**B.Eng. in Software Engineering**</span> | Huangdu Institute of Technology | Sep 2016 - Jul 2020 | |
| <span class="hljs-bullet">-</span> Location: Shanghai, China | |
| <span class="hljs-section">## Skills</span> | |
| <span class="hljs-strong">**Programming Languages:**</span> Python, JavaScript/TypeScript, HTML/CSS, Java | |
| <span class="hljs-strong">**Tools and Frameworks:**</span> Git, PyTorch, Keras, scikit-learn, Linux, Vue, React, Django, LaTeX | |
| <span class="hljs-strong">**Languages:**</span> English (proficient), Indonesia (native) | |
| <span class="hljs-section">## Awards and Honors</span> | |
| <span class="hljs-bullet">-</span> <span class="hljs-strong">**Gold**</span>, International Collegiate Catching Fish Contest (ICCFC) | 2018 | |
| <span class="hljs-bullet">-</span> <span class="hljs-strong">**First Prize**</span>, China National Scholarship for Outstanding Culinary Skills | 2017, 2018 | |
| <span class="hljs-section">## Publications</span> | |
| <span class="hljs-strong">**Eating is All You Need**</span> | NeurIPS 2099 | |
| <span class="hljs-bullet">-</span> Authors: Haha Ha, San Zhang | |
| <span class="hljs-strong">**You Only Cook Once: Unified, Real-Time Mapo Tofu Recipe**</span> | CVPR 2077 (Best Paper Honorable Mention) | |
| <span class="hljs-bullet">-</span> Authors: Haha Ha, San Zhang, Si Li, Wu Wang<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-yk7odv">We can then run the agent with the following command:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-bash "><!-- HTML_TAG_START -->tiny-agents run agent.json<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-ln4r1w">You should see the following output:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=" "><!-- HTML_TAG_START -->Agent loaded with 18 tools: | |
| • get_config | |
| • <span class="hljs-keyword">set</span>_config_value | |
| • read_file | |
| • read_multiple_files | |
| • write_file | |
| • create_directory | |
| • list_directory | |
| • move_file | |
| • search_files | |
| • search_code | |
| • get_file_info | |
| • edit_block | |
| • execute_<span class="hljs-keyword">command</span> | |
| • read_output | |
| • force_terminate | |
| • list_sessions | |
| • list_processes | |
| • kill_process | |
| »<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-ccxs9i">Now let’s provide the asistant with some info to get started.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=" "><!-- HTML_TAG_START -->» Read <span class="hljs-keyword">the</span> <span class="hljs-built_in">contents</span> <span class="hljs-keyword">of</span> C:\Users\your_username\<span class="hljs-built_in">file</span>-assistant\job_description.md<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-r9m6n">You should see an output similar to the following:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=" "><!-- HTML_TAG_START --><Tool iNtxGmOuXHqZVBWmKnfxsc61xsJbsoAM>read_file {<span class="hljs-string">"path"</span>:<span class="hljs-string">"C:\\Users\\your_username\\file-assistant\\job_description.md"</span>,<span class="hljs-string">"length"</span>:<span class="hljs-number">23</span>} | |
| Tool iNtxGmOuXHqZVBWmKnfxsc61xsJbsoAM | |
| [Reading <span class="hljs-number">23</span> lines from start] | |
| (...) | |
| The <span class="hljs-keyword">job </span>description for the Senior Food Technology Engineer position emphasizes the need for a candidate who can <span class="hljs-keyword">bridge </span>the gap <span class="hljs-keyword">between </span>food <span class="hljs-keyword">science </span><span class="hljs-keyword">and </span>artificial intelligence (...). Candidates are also expected to attend conferences <span class="hljs-keyword">and </span>publish research on algorithmic cooking optimization.<!-- HTML_TAG_END --></pre></div> <blockquote class="tip" data-svelte-h="svelte-13hg0dt"><p>We are using the default system prompt, which may cause the assistant to call some tools multiple times. To create a more assertive assistant, you can provide a custom <code>PROMPT.md</code> file in the same directory as your <code>agent.json</code>.</p></blockquote> <p data-svelte-h="svelte-1n79m6a">Great! Now let’s read the candidate’s resume.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=" "><!-- HTML_TAG_START -->» Inside <span class="hljs-keyword">the</span> same <span class="hljs-built_in">folder</span> you can find <span class="hljs-keyword">a</span> candidates <span class="hljs-built_in">folder</span>. Check <span class="hljs-keyword">for</span> john_resume.md <span class="hljs-keyword">and</span> let me know <span class="hljs-keyword">if</span> he is <span class="hljs-keyword">a</span> good fit <span class="hljs-keyword">for</span> <span class="hljs-keyword">the</span> job.<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-r9m6n">You should see an output similar to the following:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=" "><!-- HTML_TAG_START --><Tool ll2oWo73YeGIft5VbOIpF9GNf0kevjEy>read_file {<span class="hljs-string">"path"</span>:<span class="hljs-string">"C:\\Users\\your_username\\file-assistant\\candidates\\john_resume.md"</span>} | |
| Tool ll2oWo73YeGIft5VbOIpF9GNf0kevjEy | |
| [Reading 58 lines <span class="hljs-keyword">from</span> start] | |
| (...) | |
| John Wayne is a <span class="hljs-comment">**strong fit** for the Senior Food Technology Engineer role. His technical expertise in AI and machine learning, combined with his experience in food-related research and publications, makes him an excellent candidate. He also has the soft skills and cultural fit needed to thrive in a collaborative, innovative environment.</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-q5ptib">Amazing! Now we can move forward with inviting the candidate to the interview.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=" "><!-- HTML_TAG_START -->» Create <span class="hljs-keyword">a</span> <span class="hljs-built_in">file</span> called <span class="hljs-string">"invitation.md"</span> <span class="hljs-keyword">in</span> <span class="hljs-keyword">the</span> <span class="hljs-string">"file-assistant"</span> <span class="hljs-built_in">folder</span> <span class="hljs-keyword">and</span> <span class="hljs-built_in">write</span> <span class="hljs-keyword">a</span> <span class="hljs-keyword">short</span> invitation <span class="hljs-built_in">to</span> John <span class="hljs-built_in">to</span> come <span class="hljs-keyword">in</span> <span class="hljs-keyword">for</span> <span class="hljs-keyword">an</span> interview.<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-fcb0nh">You should see content similar to the following being written to the <code>invitation.md</code> file:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-markdown "><!-- HTML_TAG_START --><span class="hljs-section"># Interview Invitation</span> | |
| Dear John, | |
| We would like to invite you for an interview for the Senior Food Technology Engineer position. The interview will be held on [insert date and time] at [insert location or virtual meeting details]. | |
| Please confirm your availability and let us know if you need any additional information. | |
| Best regards, | |
| [Your Name] | |
| [Your Contact Information]<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-fz3pqi">Woohoo! We successfully created an assistant that can help us handle sensitive information locally.</p> <h3 class="relative group"><a id="exploring-other-models-and-acceleration-options" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#exploring-other-models-and-acceleration-options"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Exploring other models and acceleration options</span></h3> <p data-svelte-h="svelte-5v5ikf">In the example above, the Jan-Nano model leveraged Vulkan acceleration for efficient local LLM inference on AMD GPUs. You can also try out other models and acceleration options by navigating to http://localhost:8000/#model-management or checking the <a href="https://lemonade-server.ai/docs/server/server_models/" rel="nofollow">models documentation</a>.</p> <p data-svelte-h="svelte-1jf1wat">For Windows applications that require a concise context and would benefit from NPU + iGPU acceleration, you can try the Hybrid models available with Lemonade Server — optimized for AMD Ryzen AI 300 series PCs. Models such as <code>Llama-xLAM-2-8b-fc-r-Hybrid</code> are specifically fine-tuned for tool-calling and deliver fast, responsive performance!</p> <h2 class="relative group"><a id="conclusion" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#conclusion"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Conclusion</span></h2> <p data-svelte-h="svelte-1us3hwv">In this unit, we’ve shown how to accelerate our end-to-end Tiny Agents application with AMD NPU and iGPU. We’ve also shown how to create an assistant to handle sensitive information locally.</p> <p data-svelte-h="svelte-1ok09wg">Now that you’ve learned how to leverage Lemonade Server for local model acceleration and privacy-focused applications, you can explore more examples and features in the <a href="https://github.com/lemonade-sdk/lemonade" rel="nofollow">Lemonade GitHub repository</a>. The repository contains additional documentation, example implementations, and is actively maintained by the community.</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/mcp-course/blob/main/units/en/unit2/lemonade-server.mdx" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg> <span data-svelte-h="svelte-zjs2n5"><span class="underline">Update</span> on GitHub</span></a> <p></p> | |
| <script> | |
| { | |
| __sveltekit_1xfzitx = { | |
| assets: "/docs/mcp-course/pr_221/en", | |
| base: "/docs/mcp-course/pr_221/en", | |
| env: {} | |
| }; | |
| const element = document.currentScript.parentElement; | |
| const data = [null,null]; | |
| Promise.all([ | |
| import("/docs/mcp-course/pr_221/en/_app/immutable/entry/start.dc55593b.js"), | |
| import("/docs/mcp-course/pr_221/en/_app/immutable/entry/app.f1430c51.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 21], | |
| data, | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 58.6 kB
- Xet hash:
- e61f3014ee95a3dd53942263aa76395ea1d9d2406077a8c7aa658612224af669
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.