import{s as $a,o as ka,n as xa}from"../chunks/scheduler.aec39e6a.js";import{S as Na,i as Wa,e as o,s,c as p,h as Za,a as i,d as n,b as a,f as Dl,g as m,j as r,k as va,l as w,m as l,n as u,t as c,o as M,p as d}from"../chunks/index.4ee0a2d0.js";import{T as _a}from"../chunks/Tip.e2132029.js";import{C as Ha,H as Nt,E as Ba}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.c1459923.js";import{C as g}from"../chunks/CodeBlock.55c9cf00.js";function Sa(Vt){let h,J='📍 Find the complete example on GitHub <a href="https://github.com/huggingface/hub-docs/tree/main/notebooks/sagemaker-sdk/neuron-agent-inf/sagemaker-notebook.ipynb" rel="nofollow">here</a>!';return{c(){h=o("p"),h.innerHTML=J},l(f){h=i(f,"P",{"data-svelte-h":!0}),r(h)!=="svelte-1c76scg"&&(h.innerHTML=J)},m(f,Wt){l(f,h,Wt)},p:xa,d(f){f&&n(h)}}}function Va(Vt){let h,J,f,Wt,U,Lt,j,Gt,C,ls="This notebook demontrates how to deploy an open-ource LLM on a real-time AWS endpoint with Neuron devices using Hugging Face library <code>optimum-neuron</code>, <code>strands-agent</code> and AWS Sagemaker.",Rt,I,At,v,ss="By the end of this notebook, you will know how to:",qt,$,as=`<li><strong>Deploy an LLM</strong> optimized for instruction-following, reasoning, and tool-calling — specifically <a href="https://huggingface.co/ibm-granite/granite-3.3-8b-instruct" rel="nofollow"><code>ibm-granite/granite-3.3-8b-instruct</code></a>.</li> <li><strong>Run it on an AWS Inferentia2 inference-optimized instance</strong> (<code>inf2.24xlarge</code>) using a <strong>SageMaker real-time endpoint</strong>.</li> <li><strong>Use the deployed endpoint in an agentic setup</strong>, including:
<ul><li>Calling external tools such as <strong>web search</strong>.</li> <li>Connecting to and interacting with <strong>MCP servers</strong>, such as the Hugging Face MCP servers, to work with the Hugging Face Hub.</li></ul></li>`,zt,k,os="This notebook guides you from deployment to practical agent-enabled usage.",Ft,x,Et,N,Qt,W,Xt,Z,Yt,_,Pt,H,Ot,B,is="<strong><em>🔧 Configure SageMaker Session</em></strong>",Dt,S,Kt,V,en,L,rs=`sagemaker.config INFO - Not applying SDK defaults from location: /etc/xdg/sagemaker/config.yaml
sagemaker.config INFO - Not applying SDK defaults from location: /home/ec2-user/.config/sagemaker/config.yaml
`,tn,G,ps="<strong><em>🔑 Configure SageMaker Role</em></strong>",nn,R,ln,A,sn,q,ms=`sagemaker role arn: arn:aws:iam::754289655784:role/sagemaker-dlcs
sagemaker session region: us-east-1
`,an,z,us="<strong><em>📦 Prepare the model</em></strong>",on,F,cs="Before deploying the model, we need to <strong>compile it for AWS Inferentia2</strong>.",rn,E,Ms=`Inferentia and Trainium devices run models using the <strong>Neuron runtime</strong>, which requires models to be <strong>compiled ahead of time</strong> into an optimized Neuron executable.<br/>
This compilation step transforms the original model (PyTorch or Transformers weights) into a hardware-optimized graph that can run efficiently on <code>inf2</code> instances.`,pn,Q,ds="Because we’re working on a <strong>Neuron-based instance</strong>, compiling the model is a mandatory step before deployment.",mn,X,gs=`SageMaker will then use the <strong>Optimum-Neuron vLLM container</strong> to load the compiled artifacts and run them efficiently on Inferentia2.<br/>
Instead of compiling the model at inference time, the container expects a <strong>pre-compiled Neuron executable</strong>, which it can serve directly through a real-time endpoint for fast and stable performance.`,un,Y,hs="<strong><em>🧩 Optimum Neuron Cache</em></strong>",cn,P,ys=`Hugging Face makes working with Neuron hardware much easier through the <strong>Optimum Neuron Cache</strong> (<a href="https://huggingface.co/aws-neuron/optimum-neuron-cache" rel="nofollow"><code>aws-neuron/optimum-neuron-cache</code></a>), a public repository that hosts <strong>pre-compiled Neuron artifacts</strong> for many popular models.<br/>
Instead of spending time compiling models yourself—a process that can take minutes to hours—you can simply reuse these ready-made artifacts.`,Mn,O,fs="This means:",dn,D,Ts="<li><strong>Instant startup</strong> with no compilation step</li> <li><strong>Consistent, reproducible performance</strong> on Inferentia2 and Trainium</li> <li><strong>Seamless integration</strong> with the Optimum-Neuron vLLM containers, which can load these cached executables directly</li>",gn,K,ws="If a matching compiled artifact is available, you can deploy your model on SageMaker immediately.",hn,ee,bs='Learn more about the Optimum Neuron model cache <a href="https://huggingface.co/docs/optimum-neuron/en/guides/cache_system" rel="nofollow">here</a>.',yn,te,Js="<strong><em>⚙️ Model compilation</em></strong>",fn,ne,Us='The model we selected, <a href="%22https://huggingface.co/ibm-granite/granite-3.3-8b-instruct%22"><code>ibm-granite/granite-3.3-8b-instruct</code></a>, provides strong instruction-following, reasoning, and tool-calling abilities while remaining lightweight enough to run efficiently on a single Inferentia2 with a large input context necessary for agentic use-cases.',Tn,le,js='At the time of writing, <strong>granite-3.3-8B-instruct</strong> was not yet available as a pre-compiled Neuron artifact, so we compile it ourselves before deploying it on Inferentia2. We followed the steps from the official Optimum Neuron export tutorial (<a href="https://huggingface.co/docs/optimum-neuron/en/guides/export_model" rel="nofollow">https://huggingface.co/docs/optimum-neuron/en/guides/export_model</a>) to compile the model for Inferentia2.',wn,se,Cs="To compile the model, we:",bn,y,Zt,Is=`<p>Launched an <strong>Inferentia2 EC2 instance</strong> using the official <strong>Hugging Face Neuron Deep Learning AMI</strong><br/>
(<a href="https://aws.amazon.com/marketplace/pp/prodview-gr3e6yiscria2" rel="nofollow">https://aws.amazon.com/marketplace/pp/prodview-gr3e6yiscria2</a>).</p>`,Kl,_t,vs="<p>Connected to the instance via <strong>SSH</strong>.</p>",es,ae,Ht,$s="Used <strong>Optimum Neuron</strong> to compile the model with the following command:",ts,oe,ns,Bt,ks=`<p>Pushed the compiled Neuron artifacts to the Hugging Face Hub:
<a href="https://huggingface.co/florentgbelidji/granite-3.3-8b-instruct-neuron-bs-1-seq-16384-tp-8" rel="nofollow"><code>florentgbelidji/granite-3.3-8b-instruct-neuron-bs-1-seq-16384-tp-8</code></a></p>`,Jn,ie,xs="At the time of writing, AWS Inferentia2 does not support dynamic shapes for inference, which means that we need to specify our sequence length and batch size ahead of time. We chose these compilation parameters to match our agentic use case and the target hardware:",Un,re,Ns=`<li><strong><code>--sequence_length 16384</code></strong>: Enables <em>large-context</em> inference, which is important when prompts include long tool definitions or multi-step reasoning typical in agent workflows.</li> <li><strong><code>--batch_size 1</code></strong>: Prioritizes <em>low latency</em> over throughput, ideal for the demo where requests are sent sequentially rather than in batches.</li> <li><strong><code>--num_cores 8</code></strong>: Maximizes hardware utilization on <code>inf2</code> instances.<br/>
An <code>inf2.24xlarge</code> exposes <em>6 Neuron devices = 12 Neuron cores</em> (learn more <a href="https://awsdocs-neuron.readthedocs-hosted.com/en/latest/about-neuron/arch/neuron-hardware/inf2-arch.html#aws-inf2-arch" rel="nofollow">https://awsdocs-neuron.readthedocs-hosted.com/en/latest/about-neuron/arch/neuron-hardware/inf2-arch.html#aws-inf2-arch</a>
)</li>`,jn,pe,Ws=`We set <strong><code>--num_cores 8</code></strong> because, at <strong>deployment time</strong>, the Neuron runtime requires that the model’s number of attention heads be divisible by the number of Neuron cores assigned to the model.<br/>
Using 8 cores satisfies this constraint on Inferentia2 and ensures the model can be loaded and served correctly.`,Cn,me,Zs="<strong>🧱 Deployment Server: HuggingFace vLLM Inference Neuronx DLC</strong>",In,ue,_s="For deployment, we use the <strong>HuggingFace vLLM Inference Neuronx</strong> Deep Learning Container from AWS ECR:",vn,ce,$n,Me,Hs='This container is built on <a href="https://huggingface.co/docs/optimum-neuron" rel="nofollow">Optimum Neuron</a> and is designed to <strong>serve Neuron-compiled models using vLLM on Inferentia2 instances</strong>, combining Neuron runtime optimizations with vLLM’s efficient inference mechanisms.',kn,de,xn,ge,Bs="<strong><em>⚙️ Configure the SageMaker Endpoint with the Hugging Face SDK</em></strong>",Nn,he,Ss="Now that we have a Neuron-compiled model and a deployment image, we can configure a SageMaker real-time endpoint using the <strong>Hugging Face SageMaker SDK</strong>",Wn,ye,Zn,fe,Vs="<strong><em>Create Sagemaker Model</em></strong>",_n,Te,Hn,we,Ls="<strong><em>🚀 Deploy</em></strong>",Bn,be,Sn,Je,Gs=`-------------------!
`,Vn,Ue,Rs="Go to console.aws.amazon.com to check the status of your endpoint and the logs",Ln,je,Gn,Ce,As="<strong><em>Reload already created endpoint</em></strong>",Rn,Ie,qs="If your endpoint is still running run the following:",An,ve,qn,$e,zn,ke,zs="<strong>Test</strong>",Fn,xe,En,Ne,Qn,We,Xn,Ze,Fs=`Hello Huggy, nice to meet you! How can I assist you today
`,Yn,_e,Pn,He,Es=`<a href="https://strandsagents.com/latest/" rel="nofollow">Strands Agents</a> is an open-source Python SDK for building <strong>production-grade AI agents</strong> with minimal code.<br/>
It provides a clean, model-driven framework for defining system prompts, tools, multi-step reasoning, and orchestration.`,On,Be,Qs="A key advantage for AWS users: <strong>Strands natively supports SageMaker real-time endpoints</strong>, allowing you to plug in your deployed LLMs directly as agent backends with no custom wrappers.",Dn,Se,Kn,Ve,el,Le,Xs="<strong><em>🔗 Link your endpoint to strands-agent</em></strong>",tl,Ge,nl,Re,Ys="<strong><em>🕸️ Define a web-search tool for the agent</em></strong>",ll,Ae,Ps="To enable our agent to fetch fresh information from the web, we install the <code>duckduckgo-search</code> package, which provides a simple Python API for performing real-time DuckDuckGo queries.",sl,qe,al,ze,ol,Fe,Os="<strong><em>📞 My first call to the agent</em></strong>",il,Ee,rl,Qe,Ds=`Tool #1: web_search
`,pl,Xe,ml,Ye,Ks=`('AWS Neuron devices refer to the accelerated machine learning chips, '
 'specifically AWS Inferentia and AWS Trainium, which are designed to enhance '
 'AI and deep learning workloads on Amazon EC2 instances. These chips are '
 'optimized for high-density, scalable, and cost-effective inference and '
 'training respectively. \\n'
 '\\n'
 'AWS Neuron is a software development kit (SDK) that facilitates the '
 'optimization of AI and deep learning models for deployment on these Neuron '
 'devices. It transforms models from popular frameworks like PyTorch or '
 'TensorFlow into a specialized, low-level representation for efficient '
 'execution on AWS Inferentia and Trainium.\\n'
 '\\n'
 'The AWS Neuron Kernel Mode Driver establishes a communication channel (FWIO) '
 'that allows the driver and an application to send specific commands to the '
 'device. \\n'
 '\\n'
 "Additionally, there's a Neuron backend for Hugging Face's Text Generation "
 'Inference (TGI) that allows deployment on AWS Trainium and Inferentia family '
 'of chips.\\n'
 '\\n'
 'For more detailed technical information, you can refer to the provided links '
 'in the web search results.')
`,ul,Pe,ea="Here’s a concise breakdown of what the logs show:",cl,Oe,ta=`<li><p><strong>Initial payload:</strong><br/>
The first block (<code>payload=...</code>) is the request sent to the SageMaker endpoint.<br/>
It includes the user message <em>(“Explain what is a Neuron device”)</em>, the tool schema,<br/>
and generation parameters (<code>max_tokens</code>, <code>temperature</code>, etc.).</p></li> <li><p><strong>Model triggers a tool:</strong><br/>
The first response contains a <code>tool_call</code>, meaning the model decided<br/>
to use the <code>web_search</code> tool.<br/>
It sends arguments like:<br/> <code>{&quot;query&quot;: &quot;what is a Neuron device&quot;, &quot;max_results&quot;: 1}</code>.</p></li> <li><p><strong>Tool execution:</strong><br/>
The notebook executes the <code>web_search</code> function locally.<br/>
It runs the DuckDuckGo/Bing query and returns the results to the agent.</p></li> <li><p><strong>Second payload:</strong><br/>
The agent sends a new request to the endpoint that includes:</p> <ul><li>the original user message</li> <li>the tool call</li> <li>the tool result<br/>
This allows the model to produce a final answer with the retrieved information.</li></ul></li> <li><p><strong>Final model response:</strong><br/>
The last block shows the assistant’s answer generated after incorporating<br/>
the tool’s output. (In this example, the model misinterprets <em>Neuron device</em>,<br/>
but the flow is correct.)</p></li>`,Ml,De,na="Overall, this demonstrates the complete agent loop:",dl,Ke,la="<li>Model decides to call a tool</li> <li>Tool runs</li> <li>Result is injected back into the model</li> <li>Model produces the final answer</li>",gl,et,sa="✨ <strong>The entire iteration—model → tool → model—completed in under 10 seconds.</strong>",hl,tt,yl,nt,aa="The <strong>Hugging Face MCP (Model Context Protocol) Server</strong> is a service that lets your MCP-compatible AI assistant (for example in VS Code, Cursor, Zed, or Claude Desktop) <strong>connect directly to the Hugging Face Hub</strong>.",fl,lt,oa="Once connected, your assistant can:",Tl,st,ia="<li>Search and explore Hub resources (models, datasets, Spaces, papers).</li> <li>Invoke community tools (Gradio apps on Spaces) as functions, returning results—metadata, links, context.</li>",wl,at,ra="It effectively turns the Hugging Face Hub into a tool-server your agent can use, enhancing its tool-calling and exploration capabilities.",bl,ot,pa='Learn more about the MCP server <a href="https://huggingface.co/docs/hub/en/hf-mcp-server" rel="nofollow">here</a>.',Jl,it,ma="<strong><em>🔧 Configure the MCP client</em></strong>",Ul,rt,ua=`To use the Hugging Face MCP server with your agent, you must first configure it at:<br/>
👉 <strong><a href="https://huggingface.co/settings/mcp" rel="nofollow">https://huggingface.co/settings/mcp</a></strong>`,jl,pt,ca="On this page, you can generate an MCP-compatible access token and configure which built-in tools your agent is allowed to use.",Cl,mt,Ma="Once enabled, your agent gains access to a rich set of Hub-powered tools, including:",Il,ut,da="<li><strong>Spaces Semantic Search</strong> – find the best AI apps on the Hub using natural language.</li> <li><strong>Model Search</strong> – query models by task, library, license, or metadata.</li> <li><strong>Documentation Semantic Search</strong> – search across all HF documentation.</li> <li><strong>Hub Repository Details</strong> – retrieve structured metadata for models, datasets, and Spaces.</li> <li><strong>Papers Semantic Search</strong> – find AI research papers semantically.</li> <li><strong>Dataset Search</strong> – search datasets by author, tags, modality, etc.</li> <li><strong>Run and Manage Jobs</strong> – schedule and monitor jobs on Hugging Face infrastructure.</li> <li><strong>Include README files</strong> – allow agents to read repository READMEs in results.</li>",vl,ct,ga="This integration lets your agent use the Hugging Face Hub as a powerful knowledge and tooling backend.",$l,Mt,ha='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/sagemaker/mcp-settings.png" alt="MCP Settings"/>',kl,dt,xl,gt,Nl,ht,ya="We are now ready to use the MCP client as a tool in our agent. we will test it to:",Wl,yt,fa="<li>Search for a Space that can transcribe audio files</li> <li>Search for trending image generation models</li> <li>Search the doc to export a model to neuron with optimum</li>",Zl,ft,Ta="<strong><em>🔉 Space search</em></strong>",_l,Tt,Hl,wt,wa=`Tool #1: space_search
`,Bl,bt,ba="<strong><em>📈 Trending model search</em></strong>",Sl,Jt,Vl,Ut,Ja=`Tool #2: model_search
`,Ll,jt,Ua="<strong><em>📚 Documentation search</em></strong>",Gl,Ct,Rl,It,ja=`To export a Hugging Face model to Neuron using Optimum, you'll need to follow these steps:

1. **Install Optimum**: If you haven't already, install Optimum using pip:

   \`\`\`bash
   pip install optimum
   \`\`\`

2. **Choose a Model**: Select a model from the Hugging Face Model Hub that you want to export. For example, let's use \`bert-base-uncased\` for a text classification task.

3. **Load the Model**: Use the \`transformers\` library to load your chosen model.

   \`\`\`python
   from transformers import AutoModelForSequenceClassification, AutoTokenizer

   model_name = "bert-base-uncased"
   model = AutoModelForSequenceClassification.from_pretrained(model_name)
   tokenizer = AutoTokenizer.from_pretrained(model_name)
   \`\`\`

4. **Prepare for Export**: Optimum provides a \`neuron_quantized\` exporter. First, you need to quantize your model.

   \`\`\`python
   from optimum.neuron.quantization import NeuronQuantizer

   quantizer = NeuronQuantizer(model)
   quantized_model = quantizer.fit(model, dataset=your_dataset)
   \`\`\`

   Replace \`your_dataset\` with a suitable dataset for fine-tuning or evaluation.

5. **Export the Model**: Use the \`export\` method provided by Optimum to export the quantized model to Neuron format.

   \`\`\`python
   from optimum.neuron.export import export_neuron

   export_neuron(quantized_model, "bert-base-uncased-neuron")
   \`\`\`

   This will save the exported model in Neuron format in a directory named \`bert-base-uncased-neuron\`.

6. **Load on Neuron**: Finally, load the exported model on Neuron hardware using the Neuron SDK.

Please note that the exact steps might vary slightly based on the model you choose and the specific Neuron hardware you are targeting. Always refer to the [Optimum documentation](https://huggingface.co/docs/optimum/index) and the [Neuron SDK documentation](https://docs.neuron.app/) for the most accurate and up-to-date instructions.

If you encounter any specific issues or need further assistance, feel free to ask!("To export a Hugging Face model to Neuron using Optimum, you'll need to "
 'follow these steps:\\n'
 '\\n'
 "1. **Install Optimum**: If you haven't already, install Optimum using pip:\\n"
 '\\n'
 '   \`\`\`bash\\n'
 '   pip install optimum\\n'
 '   \`\`\`\\n'
 '\\n'
 '2. **Choose a Model**: Select a model from the Hugging Face Model Hub that '
 "you want to export. For example, let's use \`bert-base-uncased\` for a text "
 'classification task.\\n'
 '\\n'
 '3. **Load the Model**: Use the \`transformers\` library to load your chosen '
 'model.\\n'
 '\\n'
 '   \`\`\`python\\n'
 '   from transformers import AutoModelForSequenceClassification, '
 'AutoTokenizer\\n'
 '\\n'
 '   model_name = "bert-base-uncased"\\n'
 '   model = AutoModelForSequenceClassification.from_pretrained(model_name)\\n'
 '   tokenizer = AutoTokenizer.from_pretrained(model_name)\\n'
 '   \`\`\`\\n'
 '\\n'
 '4. **Prepare for Export**: Optimum provides a \`neuron_quantized\` exporter. '
 'First, you need to quantize your model.\\n'
 '\\n'
 '   \`\`\`python\\n'
 '   from optimum.neuron.quantization import NeuronQuantizer\\n'
 '\\n'
 '   quantizer = NeuronQuantizer(model)\\n'
 '   quantized_model = quantizer.fit(model, dataset=your_dataset)\\n'
 '   \`\`\`\\n'
 '\\n'
 '   Replace \`your_dataset\` with a suitable dataset for fine-tuning or '
 'evaluation.\\n'
 '\\n'
 '5. **Export the Model**: Use the \`export\` method provided by Optimum to '
 'export the quantized model to Neuron format.\\n'
 '\\n'
 '   \`\`\`python\\n'
 '   from optimum.neuron.export import export_neuron\\n'
 '\\n'
 '   export_neuron(quantized_model, "bert-base-uncased-neuron")\\n'
 '   \`\`\`\\n'
 '\\n'
 '   This will save the exported model in Neuron format in a directory named '
 '\`bert-base-uncased-neuron\`.\\n'
 '\\n'
 '6. **Load on Neuron**: Finally, load the exported model on Neuron hardware '
 'using the Neuron SDK.\\n'
 '\\n'
 'Please note that the exact steps might vary slightly based on the model you '
 'choose and the specific Neuron hardware you are targeting. Always refer to '
 'the [Optimum documentation](https://huggingface.co/docs/optimum/index) and '
 'the [Neuron SDK documentation](https://docs.neuron.app/) for the most '
 'accurate and up-to-date instructions.\\n'
 '\\n'
 'If you encounter any specific issues or need further assistance, feel free '
 'to ask!')
`,Al,vt,ql,$t,Ca=`The long log you see comes from the agent’s <strong>full reasoning loop</strong>, not just the final answer.<br/>
Here’s what’s happening:`,zl,kt,Ia=`<li>The agent keeps a <strong>persistent conversation history</strong>, so past queries and tool calls are always included.</li> <li>When you run <code>agent(&quot;…&quot;)</code>, the model decides whether it should call a tool (e.g., HF MCP search).</li> <li>If a tool is needed, the agent:
<ol><li>emits a <code>tool_call</code>,</li> <li>executes the tool,</li> <li>appends the tool result back into the conversation,</li> <li>asks the model again to produce the final answer.</li></ol></li> <li>The printed value (<code>doc_search.message[&quot;content&quot;][0][&quot;text&quot;]</code>) only shows the <strong>assistant’s final answer</strong>, but the log shows the <strong>full chain</strong>:<br/>
user message → tool call → tool output → final completion.</li>`,Fl,El,Ql,b,Xl,xt,Yl,St,Pl;return U=new Ha({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),j=new Nt({props:{title:"Deploy an AI Agent on AWS Inferentia2 with SageMaker",local:"deploy-an-ai-agent-on-aws-inferentia2-with-sagemaker",headingTag:"h1"}}),I=new Nt({props:{title:"🎯 Goal",local:"-goal",headingTag:"h3"}}),x=new Nt({props:{title:"Configure logging and env",local:"configure-logging-and-env",headingTag:"h4"}}),N=new g({props:{code:"JTI1JTI1d3JpdGVmaWxlJTIwLmVudiUwQUhGX1RPS0VOJTNEeW91cl9oZl90b2tlbl9oZXJl",highlighted:`%%writefile .env
HF_TOKEN=your_hf_token_here`,wrap:!1}}),W=new g({props:{code:"ZnJvbSUyMHBhdGhsaWIlMjBpbXBvcnQlMjBQYXRoJTBBZnJvbSUyMGRvdGVudiUyMGltcG9ydCUyMGxvYWRfZG90ZW52JTBBJTBBJTIzJTIwTG9hZCUyMHNlY3JldHMlMjBmcm9tJTIwLmVudiUyMGlmJTIwcHJlc2VudCUyMHNvJTIwdGhlJTIwbm90ZWJvb2slMjBwaWNrcyUyMHVwJTIwbG9jYWwlMjBjb25maWd1cmF0aW9uLiUwQWRvdGVudl9wYXRoJTIwJTNEJTIwUGF0aC5jd2QoKSUyMCUyRiUyMCUyMi5lbnYlMjIlMEFpZiUyMGRvdGVudl9wYXRoLmV4aXN0cygpJTNBJTBBJTIwJTIwJTIwJTIwbG9hZF9kb3RlbnYoZG90ZW52X3BhdGgpJTBBJTIwJTIwJTIwJTIwY29uc29sZS5wcmludChmJTIyJTVCZ3JlZW4lNURMb2FkZWQlMjBlbnZpcm9ubWVudCUyMGZyb20lMjAlN0Jkb3RlbnZfcGF0aCU3RCU1QiUyRmdyZWVuJTVEJTIyKSUwQWVsc2UlM0ElMEElMjAlMjAlMjAlMjBjb25zb2xlLnByaW50KGYlMjIlNUJ5ZWxsb3clNURObyUyMC5lbnYlMjBmaWxlJTIwZm91bmQlMjBhdCUyMCU3QmRvdGVudl9wYXRoJTdEJTNCJTIwdXNpbmclMjBleGlzdGluZyUyMGVudmlyb25tZW50JTIwdmFyaWFibGVzLiU1QiUyRnllbGxvdyU1RCUyMik=",highlighted:`<span class="hljs-keyword">from</span> pathlib <span class="hljs-keyword">import</span> Path
<span class="hljs-keyword">from</span> dotenv <span class="hljs-keyword">import</span> load_dotenv

<span class="hljs-comment"># Load secrets from .env if present so the notebook picks up local configuration.</span>
dotenv_path = Path.cwd() / <span class="hljs-string">&quot;.env&quot;</span>
<span class="hljs-keyword">if</span> dotenv_path.exists():
    load_dotenv(dotenv_path)
    console.<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;[green]Loaded environment from <span class="hljs-subst">{dotenv_path}</span>[/green]&quot;</span>)
<span class="hljs-keyword">else</span>:
    console.<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;[yellow]No .env file found at <span class="hljs-subst">{dotenv_path}</span>; using existing environment variables.[/yellow]&quot;</span>)`,wrap:!1}}),Z=new g({props:{code:"IXBpcCUyMGluc3RhbGwlMjAtcSUyMHJpY2g=",highlighted:"!pip install -q rich",wrap:!1}}),_=new g({props:{code:"aW1wb3J0JTIwbG9nZ2luZyUwQWZyb20lMjByaWNoLmNvbnNvbGUlMjBpbXBvcnQlMjBDb25zb2xlJTBBZnJvbSUyMHJpY2gubG9nZ2luZyUyMGltcG9ydCUyMFJpY2hIYW5kbGVyJTBBJTBBY29uc29sZSUyMCUzRCUyMENvbnNvbGUoKSUwQWxvZ2dpbmcuYmFzaWNDb25maWcoJTBBJTIwJTIwJTIwJTIwbGV2ZWwlM0Rsb2dnaW5nLklORk8lMkMlMEElMjAlMjAlMjAlMjBmb3JtYXQlM0QlMjIlMjUobWVzc2FnZSlzJTIyJTJDJTBBJTIwJTIwJTIwJTIwZGF0ZWZtdCUzRCUyMiU1QiUyNVglNUQlMjIlMkMlMEElMjAlMjAlMjAlMjBoYW5kbGVycyUzRCU1QlJpY2hIYW5kbGVyKGNvbnNvbGUlM0Rjb25zb2xlJTJDJTIwcmljaF90cmFjZWJhY2tzJTNEVHJ1ZSUyQyUyMG1hcmt1cCUzRFRydWUpJTVEJTJDJTBBJTIwJTIwJTIwJTIwZm9yY2UlM0RUcnVlJTJDJTBBKSUwQWxvZ2dlciUyMCUzRCUyMGxvZ2dpbmcuZ2V0TG9nZ2VyKCUyMm5ldXJvbi1hZ2VudCUyMik=",highlighted:`<span class="hljs-keyword">import</span> logging
<span class="hljs-keyword">from</span> rich.console <span class="hljs-keyword">import</span> Console
<span class="hljs-keyword">from</span> rich.logging <span class="hljs-keyword">import</span> RichHandler

console = Console()
logging.basicConfig(
    level=logging.INFO,
    <span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;%(message)s&quot;</span>,
    datefmt=<span class="hljs-string">&quot;[%X]&quot;</span>,
    handlers=[RichHandler(console=console, rich_tracebacks=<span class="hljs-literal">True</span>, markup=<span class="hljs-literal">True</span>)],
    force=<span class="hljs-literal">True</span>,
)
logger = logging.getLogger(<span class="hljs-string">&quot;neuron-agent&quot;</span>)`,wrap:!1}}),H=new Nt({props:{title:"1. Deploy an LLM on a SageMaker Inferentia2 real-time endpoint",local:"1-deploy-an-llm-on-a-sagemaker-inferentia2-real-time-endpoint",headingTag:"h3"}}),S=new g({props:{code:"IXBpcCUyMGluc3RhbGwlMjBzYWdlbWFrZXIlMjAtLXVwZ3JhZGUlMjAtLXF1aWV0",highlighted:"!pip install sagemaker --upgrade --quiet",wrap:!1}}),V=new g({props:{code:"JTBBJTIwJTIwJTIwJTIwJTIzJTIwc2V0JTIwdG8lMjBkZWZhdWx0JTIwYnVja2V0JTIwaWYlMjBhJTIwYnVja2V0JTIwbmFtZSUyMGlzJTIwbm90JTIwZ2l2ZW4lMEElMjAlMjAlMjAlMjBzYWdlbWFrZXJfc2Vzc2lvbl9idWNrZXQlMjAlM0QlMjBzZXNzLmRlZmF1bHRfYnVja2V0KCk=",highlighted:`&gt;&gt; <span class="hljs-keyword">import</span> sagemaker
&gt;&gt; <span class="hljs-keyword">import</span> boto3

&gt;&gt; sess = sagemaker.Session()
&gt;&gt; <span class="hljs-comment"># sagemaker session bucket -&gt; used for uploading data, models and logs</span>
&gt;&gt; <span class="hljs-comment"># sagemaker will automatically create this bucket if it not exists</span>
&gt;&gt; sagemaker_session_bucket = <span class="hljs-literal">None</span>
&gt;&gt; <span class="hljs-keyword">if</span> sagemaker_session_bucket <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span> <span class="hljs-keyword">and</span> sess <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>:
<span class="hljs-meta">... </span>    <span class="hljs-comment"># set to default bucket if a bucket name is not given</span>
<span class="hljs-meta">... </span>    sagemaker_session_bucket = sess.default_bucket()`,wrap:!1}}),R=new g({props:{code:"c2FnZW1ha2VyX3JvbGVfbmFtZSUyMCUzRCUyMCUyMnNhZ2VtYWtlci1kbGNzJTIyJTIwJTIzJTIwVE9ETyUzQSUyMGNoYW5nZSUyMHRvJTIweW91ciUyMG93biUyMHJvbGUlMjBuYW1lJTBBaWFtJTIwJTNEJTIwYm90bzMuY2xpZW50KCUyMmlhbSUyMiklMEFyb2xlJTIwJTNEJTIwaWFtLmdldF9yb2xlKFJvbGVOYW1lJTNEc2FnZW1ha2VyX3JvbGVfbmFtZSklNUIlMjJSb2xlJTIyJTVEJTVCJTIyQXJuJTIyJTVE",highlighted:`sagemaker_role_name = <span class="hljs-string">&quot;sagemaker-dlcs&quot;</span> <span class="hljs-comment"># <span class="hljs-doctag">TODO:</span> change to your own role name</span>
iam = boto3.client(<span class="hljs-string">&quot;iam&quot;</span>)
role = iam.get_role(RoleName=sagemaker_role_name)[<span class="hljs-string">&quot;Role&quot;</span>][<span class="hljs-string">&quot;Arn&quot;</span>]`,wrap:!1}}),A=new g({props:{code:"JTNFJTNFJTIwc2VzcyUyMCUzRCUyMHNhZ2VtYWtlci5TZXNzaW9uKGRlZmF1bHRfYnVja2V0JTNEc2FnZW1ha2VyX3Nlc3Npb25fYnVja2V0KSUwQSUwQSUzRSUzRSUyMHByaW50KGYlMjJzYWdlbWFrZXIlMjByb2xlJTIwYXJuJTNBJTIwJTdCcm9sZSU3RCUyMiklMEElM0UlM0UlMjBwcmludChmJTIyc2FnZW1ha2VyJTIwc2Vzc2lvbiUyMHJlZ2lvbiUzQSUyMCU3QnNlc3MuYm90b19yZWdpb25fbmFtZSU3RCUyMik=",highlighted:`&gt;&gt; sess = sagemaker.Session(default_bucket=sagemaker_session_bucket)

&gt;&gt; <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;sagemaker role arn: <span class="hljs-subst">{role}</span>&quot;</span>)
&gt;&gt; <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;sagemaker session region: <span class="hljs-subst">{sess.boto_region_name}</span>&quot;</span>)`,wrap:!1}}),oe=new g({props:{code:"b3B0aW11bS1jbGklMjBleHBvcnQlMjBuZXVyb24lMjAlNUMlMEElMjAlMjAlMjAlMjAtLW1vZGVsJTIwaWJtLWdyYW5pdGUlMkZncmFuaXRlLTMuMy04Yi1pbnN0cnVjdCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tc2VxdWVuY2VfbGVuZ3RoJTIwMTYzODQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWJhdGNoX3NpemUlMjAxJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1udW1fY29yZXMlMjA4JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS10YXNrJTIwdGV4dC1nZW5lcmF0aW9uJTIwJTVDJTBBJTIwJTIwJTIwJTIwJTNDZm9sZGVyLXRvLXNhdmVkLWNvbXBpbGVkLWFydGlmYWN0cyUzRQ==",highlighted:`optimum-cli <span class="hljs-built_in">export</span> neuron \\
    --model ibm-granite/granite-3.3-8b-instruct \\
    --sequence_length 16384 \\
    --batch_size 1 \\
    --num_cores 8 \\
    --task text-generation \\
    &lt;folder-to-saved-compiled-artifacts&gt;`,wrap:!1}}),ce=new g({props:{code:"NzYzMTA0MzUxODg0LmRrci5lY3IudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20lMkZodWdnaW5nZmFjZS12bGxtLWluZmVyZW5jZS1uZXVyb254JTNBMC4xMS4wLW9wdGltdW0wLjQuNC1uZXVyb254LXB5MzEwLXNkazIuMjYuMS11YnVudHUyMi4wNA==",highlighted:'<span class="hljs-attribute">763104351884</span>.dkr.ecr.us-east-<span class="hljs-number">1</span>.amazonaws.com/huggingface-vllm-inference-neuronx:<span class="hljs-number">0</span>.<span class="hljs-number">11</span>.<span class="hljs-number">0</span>-optimum0.<span class="hljs-number">4</span>.<span class="hljs-number">4</span>-neuronx-py310-sdk2.<span class="hljs-number">26</span>.<span class="hljs-number">1</span>-ubuntu22.<span class="hljs-number">04</span>',wrap:!1}}),de=new g({props:{code:"bGxtX2ltYWdlJTIwJTNEJTIwJTIyNzYzMTA0MzUxODg0LmRrci5lY3IudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20lMkZodWdnaW5nZmFjZS12bGxtLWluZmVyZW5jZS1uZXVyb254JTNBMC4xMS4wLW9wdGltdW0wLjQuNC1uZXVyb254LXB5MzEwLXNkazIuMjYuMS11YnVudHUyMi4wNCUyMg==",highlighted:'llm_image = <span class="hljs-string">&quot;763104351884.dkr.ecr.us-east-1.amazonaws.com/huggingface-vllm-inference-neuronx:0.11.0-optimum0.4.4-neuronx-py310-sdk2.26.1-ubuntu22.04&quot;</span>',wrap:!1}}),ye=new g({props:{code:"aW1wb3J0JTIwb3MlMjAlMEFmcm9tJTIwc2FnZW1ha2VyLmh1Z2dpbmdmYWNlJTIwaW1wb3J0JTIwSHVnZ2luZ0ZhY2VNb2RlbCUwQSUwQSUyMyUyMHNhZ2VtYWtlciUyMGNvbmZpZyUwQWluc3RhbmNlX3R5cGUlMjAlM0QlMjAlMjJtbC5pbmYyLjI0eGxhcmdlJTIyJTBBaGVhbHRoX2NoZWNrX3RpbWVvdXQlMjAlM0QlMjAzNjAwJTIwJTIwJTIzJTIwYWRkaXRpb25hbCUyMHRpbWUlMjB0byUyMGxvYWQlMjB0aGUlMjBtb2RlbCUwQSUwQWNvbmZpZyUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMlNNX09OX01PREVMJTIyJTNBJTIwJTIyZmxvcmVudGdiZWxpZGppJTJGZ3Jhbml0ZS0zLjMtOGItaW5zdHJ1Y3QtbmV1cm9uLWJzLTEtc2VxLTE2Mzg0LXRwLTglMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJTTV9PTl9URU5TT1JfUEFSQUxMRUxfU0laRSUyMiUzQSUyMCUyMjglMjIlMkMlMjMlMjBjb3JyZXNwb25kcyUyMHRvJTIwdGhlJTIwbnVtYmVyJTIwb2YlMjBOZXVyb24lMjBjb3JlcyUwQSUyMCUyMCUyMCUyMCUyMlNNX09OX0JBVENIX1NJWkUlMjIlM0ElMjAlMjIxJTIyJTJDJTIwJTIwJTIzJTIwbWF4JTIwYmF0Y2glMjBzaXplJTIwZm9yJTIwdGhlJTIwbW9kZWwlMEElMjAlMjAlMjAlMjAlMjJTTV9PTl9TRVFVRU5DRV9MRU5HVEglMjIlM0ElMjAlMjIxNjM4NCUyMiUyQyUyMCUyMCUyMyUyMG1heCUyMGxlbmd0aCUyMG9mJTIwZ2VuZXJhdGVkJTIwdGV4dCUwQSUyMCUyMCUyMCUyMCUyMlNNX09OX0VOQUJMRV9BVVRPX1RPT0xfQ0hPSUNFJTIyJTNBJTIwJTIydHJ1ZSUyMiUyQyUyMCUyMyUyMGVuYWJsZXMlMjB0b29sJTIwY2hvaWNlJTBBJTIwJTIwJTIwJTIwJTIyU01fT05fVE9PTF9DQUxMX1BBUlNFUiUyMiUzQSUyMCUyMmdyYW5pdGUlMjIlMkMlMjAlMjMlMjBlbmFibGVzJTIwdG9vbCUyMGNhbGwlMjBwYXJzaW5nJTIwd2l0aCUyMHBhcnNlciUyMGNvbmZpZ3VyZWQlMjBmb3IlMjBncmFuaXRlJTBBJTIwJTIwJTIwJTIwJTIyU01fT05fTUFYX05VTV9CQVRDSEVEX1RPS0VOUyUyMiUzQSUyMCUyMjgxOTIlMjIlMkMlMjAlMjMlMjBtYXglMjBudW1iZXIlMjBvZiUyMHRva2VucyUyMGluJTIwYSUyMGJhdGNoJTJDJTIwY29udHJvbCUyMHByZWZpbGwlMjBjaHVua2luZyUwQSUyMCUyMCUyMCUyMCUyMkhGX1RPS0VOJTIyJTNBJTIwb3MuZW52aXJvbiU1QiUyMkhGX1RPS0VOJTIyJTVEJTJDJTBBJTdEJTBBJTBBZW5kcG9pbnRfbmFtZSUyMCUzRCUyMCUyMmdyYW5pdGUtOGItaW5zdHJ1Y3QtbmV1cm9uLWJzLTEtc2VxLTE2Mzg0LXRwLTgtZGVtby1lbmRwb2ludCUyMg==",highlighted:`<span class="hljs-keyword">import</span> os 
<span class="hljs-keyword">from</span> sagemaker.huggingface <span class="hljs-keyword">import</span> HuggingFaceModel

<span class="hljs-comment"># sagemaker config</span>
instance_type = <span class="hljs-string">&quot;ml.inf2.24xlarge&quot;</span>
health_check_timeout = <span class="hljs-number">3600</span>  <span class="hljs-comment"># additional time to load the model</span>

config = {
    <span class="hljs-string">&quot;SM_ON_MODEL&quot;</span>: <span class="hljs-string">&quot;florentgbelidji/granite-3.3-8b-instruct-neuron-bs-1-seq-16384-tp-8&quot;</span>,
    <span class="hljs-string">&quot;SM_ON_TENSOR_PARALLEL_SIZE&quot;</span>: <span class="hljs-string">&quot;8&quot;</span>,<span class="hljs-comment"># corresponds to the number of Neuron cores</span>
    <span class="hljs-string">&quot;SM_ON_BATCH_SIZE&quot;</span>: <span class="hljs-string">&quot;1&quot;</span>,  <span class="hljs-comment"># max batch size for the model</span>
    <span class="hljs-string">&quot;SM_ON_SEQUENCE_LENGTH&quot;</span>: <span class="hljs-string">&quot;16384&quot;</span>,  <span class="hljs-comment"># max length of generated text</span>
    <span class="hljs-string">&quot;SM_ON_ENABLE_AUTO_TOOL_CHOICE&quot;</span>: <span class="hljs-string">&quot;true&quot;</span>, <span class="hljs-comment"># enables tool choice</span>
    <span class="hljs-string">&quot;SM_ON_TOOL_CALL_PARSER&quot;</span>: <span class="hljs-string">&quot;granite&quot;</span>, <span class="hljs-comment"># enables tool call parsing with parser configured for granite</span>
    <span class="hljs-string">&quot;SM_ON_MAX_NUM_BATCHED_TOKENS&quot;</span>: <span class="hljs-string">&quot;8192&quot;</span>, <span class="hljs-comment"># max number of tokens in a batch, control prefill chunking</span>
    <span class="hljs-string">&quot;HF_TOKEN&quot;</span>: os.environ[<span class="hljs-string">&quot;HF_TOKEN&quot;</span>],
}

endpoint_name = <span class="hljs-string">&quot;granite-8b-instruct-neuron-bs-1-seq-16384-tp-8-demo-endpoint&quot;</span>`,wrap:!1}}),Te=new g({props:{code:"bGxtX21vZGVsJTIwJTNEJTIwSHVnZ2luZ0ZhY2VNb2RlbCglMEElMjAlMjAlMjAlMjByb2xlJTNEcm9sZSUyQyUyMCUwQSUyMCUyMCUyMCUyMGltYWdlX3VyaSUzRGxsbV9pbWFnZSUyQyUyMCUwQSUyMCUyMCUyMCUyMGVudiUzRGNvbmZpZyUyQyUyMCUwQSUyMCUyMCUyMCUyMG5hbWUlM0RlbmRwb2ludF9uYW1lJTBBJTIwJTIwJTIwJTIwKQ==",highlighted:`llm_model = HuggingFaceModel(
    role=role, 
    image_uri=llm_image, 
    env=config, 
    name=endpoint_name
    )`,wrap:!1}}),be=new g({props:{code:"JTBBJTIwJTIwJTIwJTIwaW5pdGlhbF9pbnN0YW5jZV9jb3VudCUzRDElMkMlMEElMjAlMjAlMjAlMjBpbnN0YW5jZV90eXBlJTNEaW5zdGFuY2VfdHlwZSUyQyUwQSUyMCUyMCUyMCUyMGNvbnRhaW5lcl9zdGFydHVwX2hlYWx0aF9jaGVja190aW1lb3V0JTNEaGVhbHRoX2NoZWNrX3RpbWVvdXQlMkMlMEElMjAlMjAlMjAlMjBpbmZlcmVuY2VfYW1pX3ZlcnNpb24lM0QlMjJhbDItYW1pLXNhZ2VtYWtlci1pbmZlcmVuY2UtbmV1cm9uLTIlMjIlMkMlMEEp",highlighted:`&gt;&gt; llm_model._is_compiled_model = <span class="hljs-literal">True</span>

&gt;&gt; llm = llm_model.deploy(
<span class="hljs-meta">... </span>    initial_instance_count=<span class="hljs-number">1</span>,
<span class="hljs-meta">... </span>    instance_type=instance_type,
<span class="hljs-meta">... </span>    container_startup_health_check_timeout=health_check_timeout,
<span class="hljs-meta">... </span>    inference_ami_version=<span class="hljs-string">&quot;al2-ami-sagemaker-inference-neuron-2&quot;</span>,
<span class="hljs-meta">... </span>)`,wrap:!1}}),je=new g({props:{code:"cHJpbnQobGxtLmVuZHBvaW50X25hbWUp",highlighted:'<span class="hljs-built_in">print</span>(llm.endpoint_name)',wrap:!1}}),ve=new g({props:{code:"ZXhpc3RpbmdfZW5kcG9pbnRfbmFtZSUyMCUzRCUyMCUyMmdyYW5pdGUtOGItaW5zdHJ1Y3QtbmV1cm9uLWJzLTEtc2VxLTE2My0yMDI1LTExLTI1LTE2LTM1LTIzLTQxOSUyMiUyMCUyMyUyMFRPRE8lM0ElMjBjaGFuZ2UlMjB0byUyMHlvdXIlMjBvd24lMjBlbmRwb2ludCUyMG5hbWU=",highlighted:'existing_endpoint_name = <span class="hljs-string">&quot;granite-8b-instruct-neuron-bs-1-seq-163-2025-11-25-16-35-23-419&quot;</span> <span class="hljs-comment"># <span class="hljs-doctag">TODO:</span> change to your own endpoint name</span>',wrap:!1}}),$e=new g({props:{code:"ZnJvbSUyMHNhZ2VtYWtlci5wcmVkaWN0b3IlMjBpbXBvcnQlMjBQcmVkaWN0b3IlMEFsbG0lMjAlM0QlMjBQcmVkaWN0b3IoJTBBJTIwJTIwJTIwJTIwZW5kcG9pbnRfbmFtZSUzRGV4aXN0aW5nX2VuZHBvaW50X25hbWUlMjAlMkMlMjAlMEElMjAlMjAlMjAlMjBzYWdlbWFrZXJfc2Vzc2lvbiUzRHNlc3MlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAp",highlighted:`<span class="hljs-keyword">from</span> sagemaker.predictor <span class="hljs-keyword">import</span> Predictor
llm = Predictor(
    endpoint_name=existing_endpoint_name , 
    sagemaker_session=sess
                )`,wrap:!1}}),xe=new g({props:{code:"ZnJvbSUyMHNhZ2VtYWtlci5kZXNlcmlhbGl6ZXJzJTIwaW1wb3J0JTIwSlNPTkRlc2VyaWFsaXplciUwQWZyb20lMjBzYWdlbWFrZXIuc2VyaWFsaXplcnMlMjBpbXBvcnQlMjBKU09OU2VyaWFsaXplciUwQSUwQW1lc3NhZ2VzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTVCJTdCJTIydHlwZSUyMiUzQSUyMCUyMnRleHQlMjIlMkMlMjAlMjJ0ZXh0JTIyJTNBJTIwJTIySGVsbG8lMjBteSUyMG5hbWUlMjBpcyUyMEh1Z2d5JTIyJTdEJTVEJTdEJTJDJTBBJTVEJTBBJTBBcGFyYW1ldGVycyUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMm1heF90b2tlbnMlMjIlM0ElMjAxNiUyQyUwQSUyMCUyMCUyMCUyMCUyMnRlbXBlcmF0dXJlJTIyJTNBJTIwMC4xJTJDJTBBJTIwJTIwJTIwJTIwJTIyc3RyZWFtJTIyJTNBJTIwRmFsc2UlMkMlMEElN0QlMEElMEFsbG0uc2VyaWFsaXplciUyMCUzRCUyMEpTT05TZXJpYWxpemVyKCklMEFsbG0uZGVzZXJpYWxpemVyJTIwJTNEJTIwSlNPTkRlc2VyaWFsaXplcigpJTBBJTBBcGF5bG9hZCUyMCUzRCUyMCU3QiUyMm1lc3NhZ2VzJTIyJTNBJTIwbWVzc2FnZXMlMkMlMjAqKnBhcmFtZXRlcnMlN0QlMEFjaGF0JTIwJTNEJTIwbGxtLnByZWRpY3QocGF5bG9hZCk=",highlighted:`<span class="hljs-keyword">from</span> sagemaker.deserializers <span class="hljs-keyword">import</span> JSONDeserializer
<span class="hljs-keyword">from</span> sagemaker.serializers <span class="hljs-keyword">import</span> JSONSerializer

messages = [
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: [{<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Hello my name is Huggy&quot;</span>}]},
]

parameters = {
    <span class="hljs-string">&quot;max_tokens&quot;</span>: <span class="hljs-number">16</span>,
    <span class="hljs-string">&quot;temperature&quot;</span>: <span class="hljs-number">0.1</span>,
    <span class="hljs-string">&quot;stream&quot;</span>: <span class="hljs-literal">False</span>,
}

llm.serializer = JSONSerializer()
llm.deserializer = JSONDeserializer()

payload = {<span class="hljs-string">&quot;messages&quot;</span>: messages, **parameters}
chat = llm.predict(payload)`,wrap:!1}}),Ne=new g({props:{code:"Y2hhdA==",highlighted:"chat",wrap:!1}}),We=new g({props:{code:"JTNFJTNFJTIwcHJpbnQoY2hhdCU1QiUyMmNob2ljZXMlMjIlNUQlNUIwJTVEJTVCJTIybWVzc2FnZSUyMiU1RCU1QiUyMmNvbnRlbnQlMjIlNUQp",highlighted:'&gt;&gt; <span class="hljs-built_in">print</span>(chat[<span class="hljs-string">&quot;choices&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;message&quot;</span>][<span class="hljs-string">&quot;content&quot;</span>])',wrap:!1}}),_e=new Nt({props:{title:"2. Create an Agent with Strands Agent",local:"2-create-an-agent-with-strands-agent",headingTag:"h3"}}),Se=new g({props:{code:"IXBpcCUyMGluc3RhbGwlMjAtcSUyMCdzdHJhbmRzLWFnZW50cyU1QnNhZ2VtYWtlciU1RCclMjBzdHJhbmRzLWFnZW50cy10b29scw==",highlighted:'!pip install -q <span class="hljs-string">&#x27;strands-agents[sagemaker]&#x27;</span> strands-agents-tools',wrap:!1}}),Ve=new g({props:{code:"ZnJvbSUyMHN0cmFuZHMlMjBpbXBvcnQlMjBBZ2VudCUyQyUyMHRvb2wlMEFmcm9tJTIwc3RyYW5kcy50b29scy5tY3AlMjBpbXBvcnQlMjBNQ1BDbGllbnQlMEFmcm9tJTIwc3RyYW5kcy5tb2RlbHMuc2FnZW1ha2VyJTIwaW1wb3J0JTIwU2FnZU1ha2VyQUlNb2RlbCUwQWZyb20lMjBtY3AuY2xpZW50LnN0cmVhbWFibGVfaHR0cCUyMGltcG9ydCUyMHN0cmVhbWFibGVodHRwX2NsaWVudA==",highlighted:`<span class="hljs-keyword">from</span> strands <span class="hljs-keyword">import</span> Agent, tool
<span class="hljs-keyword">from</span> strands.tools.mcp <span class="hljs-keyword">import</span> MCPClient
<span class="hljs-keyword">from</span> strands.models.sagemaker <span class="hljs-keyword">import</span> SageMakerAIModel
<span class="hljs-keyword">from</span> mcp.client.streamable_http <span class="hljs-keyword">import</span> streamablehttp_client`,wrap:!1}}),Ge=new g({props:{code:"bW9kZWwlMjAlM0QlMjBTYWdlTWFrZXJBSU1vZGVsKCUwQSUyMCUyMCUyMCUyMGVuZHBvaW50X2NvbmZpZyUzRCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmVuZHBvaW50X25hbWUlMjIlM0ElMjBlbmRwb2ludF9uYW1lJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycmVnaW9uX25hbWUlMjIlM0ElMjAlMjJ1cy1lYXN0LTElMjIlMkMlMjAlMjAlMjMlMjBvciUyMHlvdXIlMjByZWdpb24lMEElMjAlMjAlMjAlMjAlN0QlMkMlMEElMjAlMjAlMjAlMjBwYXlsb2FkX2NvbmZpZyUzRCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMm1heF90b2tlbnMlMjIlM0ElMjAyMDQ4JTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIydGVtcGVyYXR1cmUlMjIlM0ElMjAwLjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJzdHJlYW0lMjIlM0ElMjBGYWxzZSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUwQSUyMCUyMCUyMCUyMCU3RCUwQSk=",highlighted:`model = SageMakerAIModel(
    endpoint_config={
        <span class="hljs-string">&quot;endpoint_name&quot;</span>: endpoint_name,
        <span class="hljs-string">&quot;region_name&quot;</span>: <span class="hljs-string">&quot;us-east-1&quot;</span>,  <span class="hljs-comment"># or your region</span>
    },
    payload_config={
        <span class="hljs-string">&quot;max_tokens&quot;</span>: <span class="hljs-number">2048</span>,
        <span class="hljs-string">&quot;temperature&quot;</span>: <span class="hljs-number">0.2</span>,
        <span class="hljs-string">&quot;stream&quot;</span>: <span class="hljs-literal">False</span>,
        
    }
)`,wrap:!1}}),qe=new g({props:{code:"IXBpcCUyMGluc3RhbGwlMjAtcSUyMGRkZ3M=",highlighted:"!pip install -q ddgs",wrap:!1}}),ze=new g({props:{code:"ZnJvbSUyMGRkZ3MlMjBpbXBvcnQlMjBEREdTJTBBJTBBJTIzJTIwZGVmaW5lJTIwYSUyMHRvb2wlMjB0byUyMHNlYXJjaCUyMHRoZSUyMHdlYiUwQSU0MHRvb2woKSUwQWRlZiUyMHdlYl9zZWFyY2gocXVlcnklM0FzdHIlMkMlMjBtYXhfcmVzdWx0cyUzRDUpLSUzRWRpY3QlM0ElMEElMjAlMjAlMjAlMjByZXN1bHRzJTIwJTNEJTIwJTIyJTIyJTBBJTIwJTIwJTIwJTIwd2l0aCUyMERER1MoKSUyMGFzJTIwZGRncyUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJlc3VsdHMlMjAlM0QlMjAlNUJyJTIwZm9yJTIwciUyMGluJTIwZGRncy50ZXh0KHF1ZXJ5JTJDJTIwbWF4X3Jlc3VsdHMlM0RtYXhfcmVzdWx0cyklNUQlMEElMjAlMjAlMjAlMjByZXR1cm4lMjByZXN1bHRz",highlighted:`<span class="hljs-keyword">from</span> ddgs <span class="hljs-keyword">import</span> DDGS

<span class="hljs-comment"># define a tool to search the web</span>
<span class="hljs-meta">@tool()</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">web_search</span>(<span class="hljs-params">query:<span class="hljs-built_in">str</span>, max_results=<span class="hljs-number">5</span></span>)-&gt;<span class="hljs-built_in">dict</span>:
    results = <span class="hljs-string">&quot;&quot;</span>
    <span class="hljs-keyword">with</span> DDGS() <span class="hljs-keyword">as</span> ddgs:
        results = [r <span class="hljs-keyword">for</span> r <span class="hljs-keyword">in</span> ddgs.text(query, max_results=max_results)]
    <span class="hljs-keyword">return</span> results`,wrap:!1}}),Ee=new g({props:{code:"JTNFJTNFJTIwYWdlbnQlMjAlM0QlMjBBZ2VudChtb2RlbCUzRG1vZGVsJTJDJTIwdG9vbHMlM0QlNUJ3ZWJfc2VhcmNoJTVEKSUwQSUzRSUzRSUyMHJlc3BvbnNlJTIwJTNEJTIwYWdlbnQoJTIyV2hhdCUyMGFyZSUyMEFXUyUyME5ldXJvbiUyMGRldmljZXMlM0YlMjIp",highlighted:`&gt;&gt; agent = Agent(model=model, tools=[web_search])
&gt;&gt; response = agent(<span class="hljs-string">&quot;What are AWS Neuron devices?&quot;</span>)`,wrap:!1}}),Xe=new g({props:{code:"JTNFJTNFJTIwZnJvbSUyMHBwcmludCUyMGltcG9ydCUyMHBwcmludCUwQSUzRSUzRSUyMHBwcmludChyZXNwb25zZS5tZXNzYWdlJTVCJTIyY29udGVudCUyMiU1RCU1QjAlNUQlNUIlMjJ0ZXh0JTIyJTVEKQ==",highlighted:`&gt;&gt; <span class="hljs-keyword">from</span> pprint <span class="hljs-keyword">import</span> pprint
&gt;&gt; pprint(response.message[<span class="hljs-string">&quot;content&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;text&quot;</span>])`,wrap:!1}}),tt=new Nt({props:{title:"3. Use my Agent with HF MCP server 🤗",local:"3-use-my-agent-with-hf-mcp-server-",headingTag:"h3"}}),dt=new g({props:{code:"ZnJvbSUyMHN0cmFuZHMudG9vbHMubWNwJTIwaW1wb3J0JTIwTUNQQ2xpZW50JTBBZnJvbSUyMG1jcC5jbGllbnQuc3RyZWFtYWJsZV9odHRwJTIwaW1wb3J0JTIwc3RyZWFtYWJsZWh0dHBfY2xpZW50JTBBJTIzTUNQJTIwVVJMJTBBaGZfbWNwX3VybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZtY3AlMjIlMEFoZl90b2tlbiUyMCUzRCUyMG9zLmVudmlyb24uZ2V0KCUyMkhGX1RPS0VOJTIyKSUwQSUwQW1jcF9jbGllbnQlMjAlM0QlMjBNQ1BDbGllbnQoJTBBJTIwJTIwJTIwJTIwbGFtYmRhJTNBJTIwc3RyZWFtYWJsZWh0dHBfY2xpZW50KCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHVybCUzRGhmX21jcF91cmwlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBoZWFkZXJzJTNEJTdCJTIyQXV0aG9yaXphdGlvbiUyMiUzQSUyMGYlMjJCZWFyZXIlMjAlN0JoZl90b2tlbiU3RCUyMiU3RCUyMGlmJTIwaGZfdG9rZW4lMjBlbHNlJTIwJTdCJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwdGltZW91dCUzRDEyMCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHNzZV9yZWFkX3RpbWVvdXQlM0Q2MDAlMkMlMEElMjAlMjAlMjAlMjApJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> strands.tools.mcp <span class="hljs-keyword">import</span> MCPClient
<span class="hljs-keyword">from</span> mcp.client.streamable_http <span class="hljs-keyword">import</span> streamablehttp_client
<span class="hljs-comment">#MCP URL</span>
hf_mcp_url = <span class="hljs-string">&quot;https://huggingface.co/mcp&quot;</span>
hf_token = os.environ.get(<span class="hljs-string">&quot;HF_TOKEN&quot;</span>)

mcp_client = MCPClient(
    <span class="hljs-keyword">lambda</span>: streamablehttp_client(
        url=hf_mcp_url,
        headers={<span class="hljs-string">&quot;Authorization&quot;</span>: <span class="hljs-string">f&quot;Bearer <span class="hljs-subst">{hf_token}</span>&quot;</span>} <span class="hljs-keyword">if</span> hf_token <span class="hljs-keyword">else</span> {},
        timeout=<span class="hljs-number">120</span>,
        sse_read_timeout=<span class="hljs-number">600</span>,
    )
)`,wrap:!1}}),gt=new g({props:{code:"JTIzVXNlJTIwdGhlJTIwTUNQJTIwY2xpZW50JTIwYXMlMjBhJTIwdG9vbCUwQWFnZW50JTIwJTNEJTIwQWdlbnQobW9kZWwlM0Rtb2RlbCUyQyUyMHRvb2xzJTNEJTVCbWNwX2NsaWVudCU1RCk=",highlighted:`<span class="hljs-comment">#Use the MCP client as a tool</span>
agent = Agent(model=model, tools=[mcp_client])`,wrap:!1}}),Tt=new g({props:{code:"JTNFJTNFJTIwYXVkaW9fc3BhY2Vfc2VhcmNoJTIwJTNEJTIwYWdlbnQoJTIyU2VhcmNoJTIwZm9yJTIwYSUyMFNwYWNlJTIwdGhhdCUyMGNhbiUyMHRyYW5zY3JpYmUlMjBhdWRpbyUyMGZpbGVzJTIyKSUwQSUzRSUzRSUyMHBwcmludChhdWRpb19zcGFjZV9zZWFyY2gubWVzc2FnZSU1QiUyMmNvbnRlbnQlMjIlNUQlNUIwJTVEJTVCJTIydGV4dCUyMiU1RCk=",highlighted:`&gt;&gt; audio_space_search = agent(<span class="hljs-string">&quot;Search for a Space that can transcribe audio files&quot;</span>)
&gt;&gt; pprint(audio_space_search.message[<span class="hljs-string">&quot;content&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;text&quot;</span>])`,wrap:!1}}),Jt=new g({props:{code:"JTNFJTNFJTIwaW1hZ2VfbW9kZWxfc2VhcmNoJTIwJTNEJTIwYWdlbnQoJTIyU2VhcmNoJTIwZm9yJTIwdHJlbmRpbmclMjBpbWFnZSUyMGdlbmVyYXRpb24lMjBtb2RlbHMlMjIpJTBBJTNFJTNFJTIwcHByaW50KGltYWdlX21vZGVsX3NlYXJjaC5tZXNzYWdlJTVCJTIyY29udGVudCUyMiU1RCU1QjAlNUQlNUIlMjJ0ZXh0JTIyJTVEKQ==",highlighted:`&gt;&gt; image_model_search = agent(<span class="hljs-string">&quot;Search for trending image generation models&quot;</span>)
&gt;&gt; pprint(image_model_search.message[<span class="hljs-string">&quot;content&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;text&quot;</span>])`,wrap:!1}}),Ct=new g({props:{code:"JTNFJTNFJTIwZG9jX3NlYXJjaCUyMCUzRCUyMGFnZW50KCUyMkhvdyUyMHRvJTIwZXhwb3J0JTIwYSUyMG1vZGVsJTIwdG8lMjBuZXVyb24lMjB3aXRoJTIwb3B0aW11bSUyMiklMEElM0UlM0UlMjBwcHJpbnQoZG9jX3NlYXJjaC5tZXNzYWdlJTVCJTIyY29udGVudCUyMiU1RCU1QjAlNUQlNUIlMjJ0ZXh0JTIyJTVEKQ==",highlighted:`&gt;&gt; doc_search = agent(<span class="hljs-string">&quot;How to export a model to neuron with optimum&quot;</span>)
&gt;&gt; pprint(doc_search.message[<span class="hljs-string">&quot;content&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;text&quot;</span>])`,wrap:!1}}),vt=new Nt({props:{title:"🧩 Understanding the Agent Output",local:"-understanding-the-agent-output",headingTag:"h3"}}),b=new _a({props:{$$slots:{default:[Sa]},$$scope:{ctx:Vt}}}),xt=new Ba({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/sagemaker/source/examples/sagemaker-sdk-neuron-agent-inf.mdx"}}),{c(){h=o("meta"),J=s(),f=o("p"),Wt=s(),p(U.$$.fragment),Lt=s(),p(j.$$.fragment),Gt=s(),C=o("p"),C.innerHTML=ls,Rt=s(),p(I.$$.fragment),At=s(),v=o("p"),v.textContent=ss,qt=s(),$=o("ul"),$.innerHTML=as,zt=s(),k=o("p"),k.textContent=os,Ft=s(),p(x.$$.fragment),Et=s(),p(N.$$.fragment),Qt=s(),p(W.$$.fragment),Xt=s(),p(Z.$$.fragment),Yt=s(),p(_.$$.fragment),Pt=s(),p(H.$$.fragment),Ot=s(),B=o("p"),B.innerHTML=is,Dt=s(),p(S.$$.fragment),Kt=s(),p(V.$$.fragment),en=s(),L=o("pre"),L.textContent=rs,tn=s(),G=o("p"),G.innerHTML=ps,nn=s(),p(R.$$.fragment),ln=s(),p(A.$$.fragment),sn=s(),q=o("pre"),q.textContent=ms,an=s(),z=o("p"),z.innerHTML=us,on=s(),F=o("p"),F.innerHTML=cs,rn=s(),E=o("p"),E.innerHTML=Ms,pn=s(),Q=o("p"),Q.innerHTML=ds,mn=s(),X=o("p"),X.innerHTML=gs,un=s(),Y=o("p"),Y.innerHTML=hs,cn=s(),P=o("p"),P.innerHTML=ys,Mn=s(),O=o("p"),O.textContent=fs,dn=s(),D=o("ul"),D.innerHTML=Ts,gn=s(),K=o("p"),K.textContent=ws,hn=s(),ee=o("p"),ee.innerHTML=bs,yn=s(),te=o("p"),te.innerHTML=Js,fn=s(),ne=o("p"),ne.innerHTML=Us,Tn=s(),le=o("p"),le.innerHTML=js,wn=s(),se=o("p"),se.textContent=Cs,bn=s(),y=o("ul"),Zt=o("li"),Zt.innerHTML=Is,Kl=s(),_t=o("li"),_t.innerHTML=vs,es=s(),ae=o("li"),Ht=o("p"),Ht.innerHTML=$s,ts=s(),p(oe.$$.fragment),ns=s(),Bt=o("li"),Bt.innerHTML=ks,Jn=s(),ie=o("p"),ie.textContent=xs,Un=s(),re=o("ul"),re.innerHTML=Ns,jn=s(),pe=o("p"),pe.innerHTML=Ws,Cn=s(),me=o("p"),me.innerHTML=Zs,In=s(),ue=o("p"),ue.innerHTML=_s,vn=s(),p(ce.$$.fragment),$n=s(),Me=o("p"),Me.innerHTML=Hs,kn=s(),p(de.$$.fragment),xn=s(),ge=o("p"),ge.innerHTML=Bs,Nn=s(),he=o("p"),he.innerHTML=Ss,Wn=s(),p(ye.$$.fragment),Zn=s(),fe=o("p"),fe.innerHTML=Vs,_n=s(),p(Te.$$.fragment),Hn=s(),we=o("p"),we.innerHTML=Ls,Bn=s(),p(be.$$.fragment),Sn=s(),Je=o("pre"),Je.textContent=Gs,Vn=s(),Ue=o("p"),Ue.textContent=Rs,Ln=s(),p(je.$$.fragment),Gn=s(),Ce=o("p"),Ce.innerHTML=As,Rn=s(),Ie=o("p"),Ie.textContent=qs,An=s(),p(ve.$$.fragment),qn=s(),p($e.$$.fragment),zn=s(),ke=o("p"),ke.innerHTML=zs,Fn=s(),p(xe.$$.fragment),En=s(),p(Ne.$$.fragment),Qn=s(),p(We.$$.fragment),Xn=s(),Ze=o("pre"),Ze.textContent=Fs,Yn=s(),p(_e.$$.fragment),Pn=s(),He=o("p"),He.innerHTML=Es,On=s(),Be=o("p"),Be.innerHTML=Qs,Dn=s(),p(Se.$$.fragment),Kn=s(),p(Ve.$$.fragment),el=s(),Le=o("p"),Le.innerHTML=Xs,tl=s(),p(Ge.$$.fragment),nl=s(),Re=o("p"),Re.innerHTML=Ys,ll=s(),Ae=o("p"),Ae.innerHTML=Ps,sl=s(),p(qe.$$.fragment),al=s(),p(ze.$$.fragment),ol=s(),Fe=o("p"),Fe.innerHTML=Os,il=s(),p(Ee.$$.fragment),rl=s(),Qe=o("pre"),Qe.textContent=Ds,pl=s(),p(Xe.$$.fragment),ml=s(),Ye=o("pre"),Ye.textContent=Ks,ul=s(),Pe=o("p"),Pe.textContent=ea,cl=s(),Oe=o("ul"),Oe.innerHTML=ta,Ml=s(),De=o("p"),De.textContent=na,dl=s(),Ke=o("ol"),Ke.innerHTML=la,gl=s(),et=o("p"),et.innerHTML=sa,hl=s(),p(tt.$$.fragment),yl=s(),nt=o("p"),nt.innerHTML=aa,fl=s(),lt=o("p"),lt.textContent=oa,Tl=s(),st=o("ul"),st.innerHTML=ia,wl=s(),at=o("p"),at.textContent=ra,bl=s(),ot=o("p"),ot.innerHTML=pa,Jl=s(),it=o("p"),it.innerHTML=ma,Ul=s(),rt=o("p"),rt.innerHTML=ua,jl=s(),pt=o("p"),pt.textContent=ca,Cl=s(),mt=o("p"),mt.textContent=Ma,Il=s(),ut=o("ul"),ut.innerHTML=da,vl=s(),ct=o("p"),ct.textContent=ga,$l=s(),Mt=o("p"),Mt.innerHTML=ha,kl=s(),p(dt.$$.fragment),xl=s(),p(gt.$$.fragment),Nl=s(),ht=o("p"),ht.textContent=ya,Wl=s(),yt=o("ul"),yt.innerHTML=fa,Zl=s(),ft=o("p"),ft.innerHTML=Ta,_l=s(),p(Tt.$$.fragment),Hl=s(),wt=o("pre"),wt.textContent=wa,Bl=s(),bt=o("p"),bt.innerHTML=ba,Sl=s(),p(Jt.$$.fragment),Vl=s(),Ut=o("pre"),Ut.textContent=Ja,Ll=s(),jt=o("p"),jt.innerHTML=Ua,Gl=s(),p(Ct.$$.fragment),Rl=s(),It=o("pre"),It.textContent=ja,Al=s(),p(vt.$$.fragment),ql=s(),$t=o("p"),$t.innerHTML=Ca,zl=s(),kt=o("ul"),kt.innerHTML=Ia,Fl=s(),El=o("hr"),Ql=s(),p(b.$$.fragment),Xl=s(),p(xt.$$.fragment),Yl=s(),St=o("p"),this.h()},l(e){const t=Za("svelte-u9bgzb",document.head);h=i(t,"META",{name:!0,content:!0}),t.forEach(n),J=a(e),f=i(e,"P",{}),Dl(f).forEach(n),Wt=a(e),m(U.$$.fragment,e),Lt=a(e),m(j.$$.fragment,e),Gt=a(e),C=i(e,"P",{"data-svelte-h":!0}),r(C)!=="svelte-1neh50t"&&(C.innerHTML=ls),Rt=a(e),m(I.$$.fragment,e),At=a(e),v=i(e,"P",{"data-svelte-h":!0}),r(v)!=="svelte-zrb19s"&&(v.textContent=ss),qt=a(e),$=i(e,"UL",{"data-svelte-h":!0}),r($)!=="svelte-1r2qr0q"&&($.innerHTML=as),zt=a(e),k=i(e,"P",{"data-svelte-h":!0}),r(k)!=="svelte-ypfsa4"&&(k.textContent=os),Ft=a(e),m(x.$$.fragment,e),Et=a(e),m(N.$$.fragment,e),Qt=a(e),m(W.$$.fragment,e),Xt=a(e),m(Z.$$.fragment,e),Yt=a(e),m(_.$$.fragment,e),Pt=a(e),m(H.$$.fragment,e),Ot=a(e),B=i(e,"P",{"data-svelte-h":!0}),r(B)!=="svelte-knl01y"&&(B.innerHTML=is),Dt=a(e),m(S.$$.fragment,e),Kt=a(e),m(V.$$.fragment,e),en=a(e),L=i(e,"PRE",{"data-svelte-h":!0}),r(L)!=="svelte-1k0tiap"&&(L.textContent=rs),tn=a(e),G=i(e,"P",{"data-svelte-h":!0}),r(G)!=="svelte-k5o2yu"&&(G.innerHTML=ps),nn=a(e),m(R.$$.fragment,e),ln=a(e),m(A.$$.fragment,e),sn=a(e),q=i(e,"PRE",{"data-svelte-h":!0}),r(q)!=="svelte-11ud7vs"&&(q.textContent=ms),an=a(e),z=i(e,"P",{"data-svelte-h":!0}),r(z)!=="svelte-ch75wo"&&(z.innerHTML=us),on=a(e),F=i(e,"P",{"data-svelte-h":!0}),r(F)!=="svelte-124nmkx"&&(F.innerHTML=cs),rn=a(e),E=i(e,"P",{"data-svelte-h":!0}),r(E)!=="svelte-1r32t58"&&(E.innerHTML=Ms),pn=a(e),Q=i(e,"P",{"data-svelte-h":!0}),r(Q)!=="svelte-ipw77i"&&(Q.innerHTML=ds),mn=a(e),X=i(e,"P",{"data-svelte-h":!0}),r(X)!=="svelte-p275m2"&&(X.innerHTML=gs),un=a(e),Y=i(e,"P",{"data-svelte-h":!0}),r(Y)!=="svelte-hwswrp"&&(Y.innerHTML=hs),cn=a(e),P=i(e,"P",{"data-svelte-h":!0}),r(P)!=="svelte-gfe9bq"&&(P.innerHTML=ys),Mn=a(e),O=i(e,"P",{"data-svelte-h":!0}),r(O)!=="svelte-1p4vv0o"&&(O.textContent=fs),dn=a(e),D=i(e,"UL",{"data-svelte-h":!0}),r(D)!=="svelte-1xmsedh"&&(D.innerHTML=Ts),gn=a(e),K=i(e,"P",{"data-svelte-h":!0}),r(K)!=="svelte-mfv7ok"&&(K.textContent=ws),hn=a(e),ee=i(e,"P",{"data-svelte-h":!0}),r(ee)!=="svelte-17zambt"&&(ee.innerHTML=bs),yn=a(e),te=i(e,"P",{"data-svelte-h":!0}),r(te)!=="svelte-1cx03ag"&&(te.innerHTML=Js),fn=a(e),ne=i(e,"P",{"data-svelte-h":!0}),r(ne)!=="svelte-1v2wimv"&&(ne.innerHTML=Us),Tn=a(e),le=i(e,"P",{"data-svelte-h":!0}),r(le)!=="svelte-1g0753p"&&(le.innerHTML=js),wn=a(e),se=i(e,"P",{"data-svelte-h":!0}),r(se)!=="svelte-1tboauk"&&(se.textContent=Cs),bn=a(e),y=i(e,"UL",{});var T=Dl(y);Zt=i(T,"LI",{"data-svelte-h":!0}),r(Zt)!=="svelte-1xb1py4"&&(Zt.innerHTML=Is),Kl=a(T),_t=i(T,"LI",{"data-svelte-h":!0}),r(_t)!=="svelte-1mpwa1q"&&(_t.innerHTML=vs),es=a(T),ae=i(T,"LI",{});var Ol=Dl(ae);Ht=i(Ol,"P",{"data-svelte-h":!0}),r(Ht)!=="svelte-1td5nmr"&&(Ht.innerHTML=$s),ts=a(Ol),m(oe.$$.fragment,Ol),Ol.forEach(n),ns=a(T),Bt=i(T,"LI",{"data-svelte-h":!0}),r(Bt)!=="svelte-p23mf1"&&(Bt.innerHTML=ks),T.forEach(n),Jn=a(e),ie=i(e,"P",{"data-svelte-h":!0}),r(ie)!=="svelte-1nfqfnx"&&(ie.textContent=xs),Un=a(e),re=i(e,"UL",{"data-svelte-h":!0}),r(re)!=="svelte-c0cnpr"&&(re.innerHTML=Ns),jn=a(e),pe=i(e,"P",{"data-svelte-h":!0}),r(pe)!=="svelte-406pm4"&&(pe.innerHTML=Ws),Cn=a(e),me=i(e,"P",{"data-svelte-h":!0}),r(me)!=="svelte-ohmkdu"&&(me.innerHTML=Zs),In=a(e),ue=i(e,"P",{"data-svelte-h":!0}),r(ue)!=="svelte-1ni9rl8"&&(ue.innerHTML=_s),vn=a(e),m(ce.$$.fragment,e),$n=a(e),Me=i(e,"P",{"data-svelte-h":!0}),r(Me)!=="svelte-1drgj2j"&&(Me.innerHTML=Hs),kn=a(e),m(de.$$.fragment,e),xn=a(e),ge=i(e,"P",{"data-svelte-h":!0}),r(ge)!=="svelte-7g2kv1"&&(ge.innerHTML=Bs),Nn=a(e),he=i(e,"P",{"data-svelte-h":!0}),r(he)!=="svelte-1rkejri"&&(he.innerHTML=Ss),Wn=a(e),m(ye.$$.fragment,e),Zn=a(e),fe=i(e,"P",{"data-svelte-h":!0}),r(fe)!=="svelte-14x4mn1"&&(fe.innerHTML=Vs),_n=a(e),m(Te.$$.fragment,e),Hn=a(e),we=i(e,"P",{"data-svelte-h":!0}),r(we)!=="svelte-1h6to9w"&&(we.innerHTML=Ls),Bn=a(e),m(be.$$.fragment,e),Sn=a(e),Je=i(e,"PRE",{"data-svelte-h":!0}),r(Je)!=="svelte-b2by0"&&(Je.textContent=Gs),Vn=a(e),Ue=i(e,"P",{"data-svelte-h":!0}),r(Ue)!=="svelte-dh0xpk"&&(Ue.textContent=Rs),Ln=a(e),m(je.$$.fragment,e),Gn=a(e),Ce=i(e,"P",{"data-svelte-h":!0}),r(Ce)!=="svelte-qobbm6"&&(Ce.innerHTML=As),Rn=a(e),Ie=i(e,"P",{"data-svelte-h":!0}),r(Ie)!=="svelte-12gbzkn"&&(Ie.textContent=qs),An=a(e),m(ve.$$.fragment,e),qn=a(e),m($e.$$.fragment,e),zn=a(e),ke=i(e,"P",{"data-svelte-h":!0}),r(ke)!=="svelte-l3rlw1"&&(ke.innerHTML=zs),Fn=a(e),m(xe.$$.fragment,e),En=a(e),m(Ne.$$.fragment,e),Qn=a(e),m(We.$$.fragment,e),Xn=a(e),Ze=i(e,"PRE",{"data-svelte-h":!0}),r(Ze)!=="svelte-1ixdx6t"&&(Ze.textContent=Fs),Yn=a(e),m(_e.$$.fragment,e),Pn=a(e),He=i(e,"P",{"data-svelte-h":!0}),r(He)!=="svelte-1geb7w3"&&(He.innerHTML=Es),On=a(e),Be=i(e,"P",{"data-svelte-h":!0}),r(Be)!=="svelte-spmlue"&&(Be.innerHTML=Qs),Dn=a(e),m(Se.$$.fragment,e),Kn=a(e),m(Ve.$$.fragment,e),el=a(e),Le=i(e,"P",{"data-svelte-h":!0}),r(Le)!=="svelte-1f7uw8q"&&(Le.innerHTML=Xs),tl=a(e),m(Ge.$$.fragment,e),nl=a(e),Re=i(e,"P",{"data-svelte-h":!0}),r(Re)!=="svelte-33uaik"&&(Re.innerHTML=Ys),ll=a(e),Ae=i(e,"P",{"data-svelte-h":!0}),r(Ae)!=="svelte-zsnc9d"&&(Ae.innerHTML=Ps),sl=a(e),m(qe.$$.fragment,e),al=a(e),m(ze.$$.fragment,e),ol=a(e),Fe=i(e,"P",{"data-svelte-h":!0}),r(Fe)!=="svelte-1p9p656"&&(Fe.innerHTML=Os),il=a(e),m(Ee.$$.fragment,e),rl=a(e),Qe=i(e,"PRE",{"data-svelte-h":!0}),r(Qe)!=="svelte-b3z13l"&&(Qe.textContent=Ds),pl=a(e),m(Xe.$$.fragment,e),ml=a(e),Ye=i(e,"PRE",{"data-svelte-h":!0}),r(Ye)!=="svelte-hu8bzt"&&(Ye.textContent=Ks),ul=a(e),Pe=i(e,"P",{"data-svelte-h":!0}),r(Pe)!=="svelte-zk0te6"&&(Pe.textContent=ea),cl=a(e),Oe=i(e,"UL",{"data-svelte-h":!0}),r(Oe)!=="svelte-6jhalu"&&(Oe.innerHTML=ta),Ml=a(e),De=i(e,"P",{"data-svelte-h":!0}),r(De)!=="svelte-u2ndi7"&&(De.textContent=na),dl=a(e),Ke=i(e,"OL",{"data-svelte-h":!0}),r(Ke)!=="svelte-18wsyxd"&&(Ke.innerHTML=la),gl=a(e),et=i(e,"P",{"data-svelte-h":!0}),r(et)!=="svelte-120afqs"&&(et.innerHTML=sa),hl=a(e),m(tt.$$.fragment,e),yl=a(e),nt=i(e,"P",{"data-svelte-h":!0}),r(nt)!=="svelte-18kgojw"&&(nt.innerHTML=aa),fl=a(e),lt=i(e,"P",{"data-svelte-h":!0}),r(lt)!=="svelte-14kj8q3"&&(lt.textContent=oa),Tl=a(e),st=i(e,"UL",{"data-svelte-h":!0}),r(st)!=="svelte-qavied"&&(st.innerHTML=ia),wl=a(e),at=i(e,"P",{"data-svelte-h":!0}),r(at)!=="svelte-mil2tb"&&(at.textContent=ra),bl=a(e),ot=i(e,"P",{"data-svelte-h":!0}),r(ot)!=="svelte-124e5nw"&&(ot.innerHTML=pa),Jl=a(e),it=i(e,"P",{"data-svelte-h":!0}),r(it)!=="svelte-ldpm4e"&&(it.innerHTML=ma),Ul=a(e),rt=i(e,"P",{"data-svelte-h":!0}),r(rt)!=="svelte-w2k4re"&&(rt.innerHTML=ua),jl=a(e),pt=i(e,"P",{"data-svelte-h":!0}),r(pt)!=="svelte-dmeum2"&&(pt.textContent=ca),Cl=a(e),mt=i(e,"P",{"data-svelte-h":!0}),r(mt)!=="svelte-1lwgf4d"&&(mt.textContent=Ma),Il=a(e),ut=i(e,"UL",{"data-svelte-h":!0}),r(ut)!=="svelte-t79a02"&&(ut.innerHTML=da),vl=a(e),ct=i(e,"P",{"data-svelte-h":!0}),r(ct)!=="svelte-d2nn39"&&(ct.textContent=ga),$l=a(e),Mt=i(e,"P",{"data-svelte-h":!0}),r(Mt)!=="svelte-6y84cb"&&(Mt.innerHTML=ha),kl=a(e),m(dt.$$.fragment,e),xl=a(e),m(gt.$$.fragment,e),Nl=a(e),ht=i(e,"P",{"data-svelte-h":!0}),r(ht)!=="svelte-dvuyt4"&&(ht.textContent=ya),Wl=a(e),yt=i(e,"UL",{"data-svelte-h":!0}),r(yt)!=="svelte-jbxp4e"&&(yt.innerHTML=fa),Zl=a(e),ft=i(e,"P",{"data-svelte-h":!0}),r(ft)!=="svelte-dcp6sk"&&(ft.innerHTML=Ta),_l=a(e),m(Tt.$$.fragment,e),Hl=a(e),wt=i(e,"PRE",{"data-svelte-h":!0}),r(wt)!=="svelte-ur7fd5"&&(wt.textContent=wa),Bl=a(e),bt=i(e,"P",{"data-svelte-h":!0}),r(bt)!=="svelte-ukpoqp"&&(bt.innerHTML=ba),Sl=a(e),m(Jt.$$.fragment,e),Vl=a(e),Ut=i(e,"PRE",{"data-svelte-h":!0}),r(Ut)!=="svelte-twdf9x"&&(Ut.textContent=Ja),Ll=a(e),jt=i(e,"P",{"data-svelte-h":!0}),r(jt)!=="svelte-153c0en"&&(jt.innerHTML=Ua),Gl=a(e),m(Ct.$$.fragment,e),Rl=a(e),It=i(e,"PRE",{"data-svelte-h":!0}),r(It)!=="svelte-1b1asbr"&&(It.textContent=ja),Al=a(e),m(vt.$$.fragment,e),ql=a(e),$t=i(e,"P",{"data-svelte-h":!0}),r($t)!=="svelte-dzd972"&&($t.innerHTML=Ca),zl=a(e),kt=i(e,"UL",{"data-svelte-h":!0}),r(kt)!=="svelte-nyqf2v"&&(kt.innerHTML=Ia),Fl=a(e),El=i(e,"HR",{}),Ql=a(e),m(b.$$.fragment,e),Xl=a(e),m(xt.$$.fragment,e),Yl=a(e),St=i(e,"P",{}),Dl(St).forEach(n),this.h()},h(){va(h,"name","hf:doc:metadata"),va(h,"content",La)},m(e,t){w(document.head,h),l(e,J,t),l(e,f,t),l(e,Wt,t),u(U,e,t),l(e,Lt,t),u(j,e,t),l(e,Gt,t),l(e,C,t),l(e,Rt,t),u(I,e,t),l(e,At,t),l(e,v,t),l(e,qt,t),l(e,$,t),l(e,zt,t),l(e,k,t),l(e,Ft,t),u(x,e,t),l(e,Et,t),u(N,e,t),l(e,Qt,t),u(W,e,t),l(e,Xt,t),u(Z,e,t),l(e,Yt,t),u(_,e,t),l(e,Pt,t),u(H,e,t),l(e,Ot,t),l(e,B,t),l(e,Dt,t),u(S,e,t),l(e,Kt,t),u(V,e,t),l(e,en,t),l(e,L,t),l(e,tn,t),l(e,G,t),l(e,nn,t),u(R,e,t),l(e,ln,t),u(A,e,t),l(e,sn,t),l(e,q,t),l(e,an,t),l(e,z,t),l(e,on,t),l(e,F,t),l(e,rn,t),l(e,E,t),l(e,pn,t),l(e,Q,t),l(e,mn,t),l(e,X,t),l(e,un,t),l(e,Y,t),l(e,cn,t),l(e,P,t),l(e,Mn,t),l(e,O,t),l(e,dn,t),l(e,D,t),l(e,gn,t),l(e,K,t),l(e,hn,t),l(e,ee,t),l(e,yn,t),l(e,te,t),l(e,fn,t),l(e,ne,t),l(e,Tn,t),l(e,le,t),l(e,wn,t),l(e,se,t),l(e,bn,t),l(e,y,t),w(y,Zt),w(y,Kl),w(y,_t),w(y,es),w(y,ae),w(ae,Ht),w(ae,ts),u(oe,ae,null),w(y,ns),w(y,Bt),l(e,Jn,t),l(e,ie,t),l(e,Un,t),l(e,re,t),l(e,jn,t),l(e,pe,t),l(e,Cn,t),l(e,me,t),l(e,In,t),l(e,ue,t),l(e,vn,t),u(ce,e,t),l(e,$n,t),l(e,Me,t),l(e,kn,t),u(de,e,t),l(e,xn,t),l(e,ge,t),l(e,Nn,t),l(e,he,t),l(e,Wn,t),u(ye,e,t),l(e,Zn,t),l(e,fe,t),l(e,_n,t),u(Te,e,t),l(e,Hn,t),l(e,we,t),l(e,Bn,t),u(be,e,t),l(e,Sn,t),l(e,Je,t),l(e,Vn,t),l(e,Ue,t),l(e,Ln,t),u(je,e,t),l(e,Gn,t),l(e,Ce,t),l(e,Rn,t),l(e,Ie,t),l(e,An,t),u(ve,e,t),l(e,qn,t),u($e,e,t),l(e,zn,t),l(e,ke,t),l(e,Fn,t),u(xe,e,t),l(e,En,t),u(Ne,e,t),l(e,Qn,t),u(We,e,t),l(e,Xn,t),l(e,Ze,t),l(e,Yn,t),u(_e,e,t),l(e,Pn,t),l(e,He,t),l(e,On,t),l(e,Be,t),l(e,Dn,t),u(Se,e,t),l(e,Kn,t),u(Ve,e,t),l(e,el,t),l(e,Le,t),l(e,tl,t),u(Ge,e,t),l(e,nl,t),l(e,Re,t),l(e,ll,t),l(e,Ae,t),l(e,sl,t),u(qe,e,t),l(e,al,t),u(ze,e,t),l(e,ol,t),l(e,Fe,t),l(e,il,t),u(Ee,e,t),l(e,rl,t),l(e,Qe,t),l(e,pl,t),u(Xe,e,t),l(e,ml,t),l(e,Ye,t),l(e,ul,t),l(e,Pe,t),l(e,cl,t),l(e,Oe,t),l(e,Ml,t),l(e,De,t),l(e,dl,t),l(e,Ke,t),l(e,gl,t),l(e,et,t),l(e,hl,t),u(tt,e,t),l(e,yl,t),l(e,nt,t),l(e,fl,t),l(e,lt,t),l(e,Tl,t),l(e,st,t),l(e,wl,t),l(e,at,t),l(e,bl,t),l(e,ot,t),l(e,Jl,t),l(e,it,t),l(e,Ul,t),l(e,rt,t),l(e,jl,t),l(e,pt,t),l(e,Cl,t),l(e,mt,t),l(e,Il,t),l(e,ut,t),l(e,vl,t),l(e,ct,t),l(e,$l,t),l(e,Mt,t),l(e,kl,t),u(dt,e,t),l(e,xl,t),u(gt,e,t),l(e,Nl,t),l(e,ht,t),l(e,Wl,t),l(e,yt,t),l(e,Zl,t),l(e,ft,t),l(e,_l,t),u(Tt,e,t),l(e,Hl,t),l(e,wt,t),l(e,Bl,t),l(e,bt,t),l(e,Sl,t),u(Jt,e,t),l(e,Vl,t),l(e,Ut,t),l(e,Ll,t),l(e,jt,t),l(e,Gl,t),u(Ct,e,t),l(e,Rl,t),l(e,It,t),l(e,Al,t),u(vt,e,t),l(e,ql,t),l(e,$t,t),l(e,zl,t),l(e,kt,t),l(e,Fl,t),l(e,El,t),l(e,Ql,t),u(b,e,t),l(e,Xl,t),u(xt,e,t),l(e,Yl,t),l(e,St,t),Pl=!0},p(e,[t]){const T={};t&2&&(T.$$scope={dirty:t,ctx:e}),b.$set(T)},i(e){Pl||(c(U.$$.fragment,e),c(j.$$.fragment,e),c(I.$$.fragment,e),c(x.$$.fragment,e),c(N.$$.fragment,e),c(W.$$.fragment,e),c(Z.$$.fragment,e),c(_.$$.fragment,e),c(H.$$.fragment,e),c(S.$$.fragment,e),c(V.$$.fragment,e),c(R.$$.fragment,e),c(A.$$.fragment,e),c(oe.$$.fragment,e),c(ce.$$.fragment,e),c(de.$$.fragment,e),c(ye.$$.fragment,e),c(Te.$$.fragment,e),c(be.$$.fragment,e),c(je.$$.fragment,e),c(ve.$$.fragment,e),c($e.$$.fragment,e),c(xe.$$.fragment,e),c(Ne.$$.fragment,e),c(We.$$.fragment,e),c(_e.$$.fragment,e),c(Se.$$.fragment,e),c(Ve.$$.fragment,e),c(Ge.$$.fragment,e),c(qe.$$.fragment,e),c(ze.$$.fragment,e),c(Ee.$$.fragment,e),c(Xe.$$.fragment,e),c(tt.$$.fragment,e),c(dt.$$.fragment,e),c(gt.$$.fragment,e),c(Tt.$$.fragment,e),c(Jt.$$.fragment,e),c(Ct.$$.fragment,e),c(vt.$$.fragment,e),c(b.$$.fragment,e),c(xt.$$.fragment,e),Pl=!0)},o(e){M(U.$$.fragment,e),M(j.$$.fragment,e),M(I.$$.fragment,e),M(x.$$.fragment,e),M(N.$$.fragment,e),M(W.$$.fragment,e),M(Z.$$.fragment,e),M(_.$$.fragment,e),M(H.$$.fragment,e),M(S.$$.fragment,e),M(V.$$.fragment,e),M(R.$$.fragment,e),M(A.$$.fragment,e),M(oe.$$.fragment,e),M(ce.$$.fragment,e),M(de.$$.fragment,e),M(ye.$$.fragment,e),M(Te.$$.fragment,e),M(be.$$.fragment,e),M(je.$$.fragment,e),M(ve.$$.fragment,e),M($e.$$.fragment,e),M(xe.$$.fragment,e),M(Ne.$$.fragment,e),M(We.$$.fragment,e),M(_e.$$.fragment,e),M(Se.$$.fragment,e),M(Ve.$$.fragment,e),M(Ge.$$.fragment,e),M(qe.$$.fragment,e),M(ze.$$.fragment,e),M(Ee.$$.fragment,e),M(Xe.$$.fragment,e),M(tt.$$.fragment,e),M(dt.$$.fragment,e),M(gt.$$.fragment,e),M(Tt.$$.fragment,e),M(Jt.$$.fragment,e),M(Ct.$$.fragment,e),M(vt.$$.fragment,e),M(b.$$.fragment,e),M(xt.$$.fragment,e),Pl=!1},d(e){e&&(n(J),n(f),n(Wt),n(Lt),n(Gt),n(C),n(Rt),n(At),n(v),n(qt),n($),n(zt),n(k),n(Ft),n(Et),n(Qt),n(Xt),n(Yt),n(Pt),n(Ot),n(B),n(Dt),n(Kt),n(en),n(L),n(tn),n(G),n(nn),n(ln),n(sn),n(q),n(an),n(z),n(on),n(F),n(rn),n(E),n(pn),n(Q),n(mn),n(X),n(un),n(Y),n(cn),n(P),n(Mn),n(O),n(dn),n(D),n(gn),n(K),n(hn),n(ee),n(yn),n(te),n(fn),n(ne),n(Tn),n(le),n(wn),n(se),n(bn),n(y),n(Jn),n(ie),n(Un),n(re),n(jn),n(pe),n(Cn),n(me),n(In),n(ue),n(vn),n($n),n(Me),n(kn),n(xn),n(ge),n(Nn),n(he),n(Wn),n(Zn),n(fe),n(_n),n(Hn),n(we),n(Bn),n(Sn),n(Je),n(Vn),n(Ue),n(Ln),n(Gn),n(Ce),n(Rn),n(Ie),n(An),n(qn),n(zn),n(ke),n(Fn),n(En),n(Qn),n(Xn),n(Ze),n(Yn),n(Pn),n(He),n(On),n(Be),n(Dn),n(Kn),n(el),n(Le),n(tl),n(nl),n(Re),n(ll),n(Ae),n(sl),n(al),n(ol),n(Fe),n(il),n(rl),n(Qe),n(pl),n(ml),n(Ye),n(ul),n(Pe),n(cl),n(Oe),n(Ml),n(De),n(dl),n(Ke),n(gl),n(et),n(hl),n(yl),n(nt),n(fl),n(lt),n(Tl),n(st),n(wl),n(at),n(bl),n(ot),n(Jl),n(it),n(Ul),n(rt),n(jl),n(pt),n(Cl),n(mt),n(Il),n(ut),n(vl),n(ct),n($l),n(Mt),n(kl),n(xl),n(Nl),n(ht),n(Wl),n(yt),n(Zl),n(ft),n(_l),n(Hl),n(wt),n(Bl),n(bt),n(Sl),n(Vl),n(Ut),n(Ll),n(jt),n(Gl),n(Rl),n(It),n(Al),n(ql),n($t),n(zl),n(kt),n(Fl),n(El),n(Ql),n(Xl),n(Yl),n(St)),n(h),d(U,e),d(j,e),d(I,e),d(x,e),d(N,e),d(W,e),d(Z,e),d(_,e),d(H,e),d(S,e),d(V,e),d(R,e),d(A,e),d(oe),d(ce,e),d(de,e),d(ye,e),d(Te,e),d(be,e),d(je,e),d(ve,e),d($e,e),d(xe,e),d(Ne,e),d(We,e),d(_e,e),d(Se,e),d(Ve,e),d(Ge,e),d(qe,e),d(ze,e),d(Ee,e),d(Xe,e),d(tt,e),d(dt,e),d(gt,e),d(Tt,e),d(Jt,e),d(Ct,e),d(vt,e),d(b,e),d(xt,e)}}}const La='{"title":"Deploy an AI Agent on AWS Inferentia2 with SageMaker","local":"deploy-an-ai-agent-on-aws-inferentia2-with-sagemaker","sections":[{"title":"🎯 Goal","local":"-goal","sections":[{"title":"Configure logging and env","local":"configure-logging-and-env","sections":[],"depth":4}],"depth":3},{"title":"1. Deploy an LLM on a SageMaker Inferentia2 real-time endpoint","local":"1-deploy-an-llm-on-a-sagemaker-inferentia2-real-time-endpoint","sections":[],"depth":3},{"title":"2. Create an Agent with Strands Agent","local":"2-create-an-agent-with-strands-agent","sections":[],"depth":3},{"title":"3. Use my Agent with HF MCP server 🤗","local":"3-use-my-agent-with-hf-mcp-server-","sections":[],"depth":3},{"title":"🧩 Understanding the Agent Output","local":"-understanding-the-agent-output","sections":[],"depth":3}],"depth":1}';function Ga(Vt){return ka(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ea extends Na{constructor(h){super(),Wa(this,h,Ga,Va,$a,{})}}export{Ea as component};
