import{s as en,o as tn,n as De}from"../chunks/scheduler.6efaaf90.js";import{S as ln,i as nn,e as i,s,c,h as sn,a as p,d as l,b as a,f as Oe,g as u,j as d,k as Ol,l as R,m as n,n as m,t as h,o as M,p as f}from"../chunks/index.eb3e1f0f.js";import{T as ze}from"../chunks/Tip.292c2c3d.js";import{C as an,H as I,E as on}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.4cfb23c9.js";import{C as J}from"../chunks/CodeBlock.8c036e47.js";function pn(C){let o,b='Installing the <code>gke-gcloud-auth-plugin</code> does not need to be installed via <code>gcloud</code> specifically, to read more about the alternative installation methods, please visit <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_plugin" rel="nofollow">https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_plugin</a>.';return{c(){o=i("p"),o.innerHTML=b},l(r){o=p(r,"P",{"data-svelte-h":!0}),d(o)!=="svelte-sm1xw4"&&(o.innerHTML=b)},m(r,g){n(r,o,g)},p:De,d(r){r&&l(o)}}}function rn(C){let o,b='Important to check before creating the GKE Autopilot Cluster the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/performance-pods" rel="nofollow">GKE Documentation - Optimize Autopilot Pod performance by choosing a machine series</a>, since not all the versions support GPU accelerators e.g. <code>nvidia-l4</code> is not supported in the GKE cluster versions 1.28.3 or lower.';return{c(){o=i("p"),o.innerHTML=b},l(r){o=p(r,"P",{"data-svelte-h":!0}),d(o)!=="svelte-1cdm5nv"&&(o.innerHTML=b)},m(r,g){n(r,o,g)},p:De,d(r){r&&l(o)}}}function cn(C){let o,b="To select the specific version in your location of the GKE Cluster, you can run the following command:",r,g,U,y,w='For more information please visit <a href="https://cloud.google.com/kubernetes-engine/versioning#specifying_cluster_version" rel="nofollow">https://cloud.google.com/kubernetes-engine/versioning#specifying_cluster_version</a>.',G;return g=new J({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwZ2V0LXNlcnZlci1jb25maWclMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZsYXR0ZW4lM0QlMjJjaGFubmVscyUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZmlsdGVyJTNEJTIyY2hhbm5lbHMuY2hhbm5lbCUzRFNUQUJMRSUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZm9ybWF0JTNEJTIyeWFtbChjaGFubmVscy5jaGFubmVsJTJDY2hhbm5lbHMuZGVmYXVsdFZlcnNpb24pJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1sb2NhdGlvbiUzRCUyNExPQ0FUSU9O",highlighted:`gcloud container get-server-config \\
    --flatten=<span class="hljs-string">&quot;channels&quot;</span> \\
    --filter=<span class="hljs-string">&quot;channels.channel=STABLE&quot;</span> \\
    --format=<span class="hljs-string">&quot;yaml(channels.channel,channels.defaultVersion)&quot;</span> \\
    --location=<span class="hljs-variable">$LOCATION</span>`,wrap:!1}}),{c(){o=i("p"),o.textContent=b,r=s(),c(g.$$.fragment),U=s(),y=i("p"),y.innerHTML=w},l(T){o=p(T,"P",{"data-svelte-h":!0}),d(o)!=="svelte-a3yff9"&&(o.textContent=b),r=a(T),u(g.$$.fragment,T),U=a(T),y=p(T,"P",{"data-svelte-h":!0}),d(y)!=="svelte-1y4gd42"&&(y.innerHTML=w)},m(T,v){n(T,o,v),n(T,r,v),m(g,T,v),n(T,U,v),n(T,y,v),G=!0},p:De,i(T){G||(h(g.$$.fragment,T),G=!0)},o(T){M(g.$$.fragment,T),G=!1},d(T){T&&(l(o),l(r),l(U),l(y)),f(g,T)}}}function un(C){let o,b='To explore all the models that can be served via TGI, you can explore the models tagged with <code>text-generation-inference</code> in the Hub at <a href="https://huggingface.co/models?other=text-generation-inference" rel="nofollow">https://huggingface.co/models?other=text-generation-inference</a>.';return{c(){o=i("p"),o.innerHTML=b},l(r){o=p(r,"P",{"data-svelte-h":!0}),d(o)!=="svelte-1yok7mw"&&(o.innerHTML=b)},m(r,g){n(r,o,g)},p:De,d(r){r&&l(o)}}}function mn(C){let o,b="The Kubernetes deployment may take a few minutes to be ready, so you can check the status of the deployment with the following command:",r,g,U,y,w="Alternatively, you can just wait for the deployment to be ready with the following command:",G,T,v;return g=new J({props:{code:"a3ViZWN0bCUyMGdldCUyMHBvZHM=",highlighted:"kubectl get pods",wrap:!1}}),T=new J({props:{code:"a3ViZWN0bCUyMHdhaXQlMjAtLWZvciUzRGNvbmRpdGlvbiUzREF2YWlsYWJsZSUyMC0tdGltZW91dCUzRDcwMHMlMjBkZXBsb3ltZW50JTJGdGdpLWRlcGxveW1lbnQ=",highlighted:'kubectl <span class="hljs-built_in">wait</span> --<span class="hljs-keyword">for</span>=condition=Available --<span class="hljs-built_in">timeout</span>=700s deployment/tgi-deployment',wrap:!1}}),{c(){o=i("p"),o.textContent=b,r=s(),c(g.$$.fragment),U=s(),y=i("p"),y.textContent=w,G=s(),c(T.$$.fragment)},l($){o=p($,"P",{"data-svelte-h":!0}),d(o)!=="svelte-qgh43p"&&(o.textContent=b),r=a($),u(g.$$.fragment,$),U=a($),y=p($,"P",{"data-svelte-h":!0}),d(y)!=="svelte-16v3quh"&&(y.textContent=w),G=a($),u(T.$$.fragment,$)},m($,j){n($,o,j),n($,r,j),m(g,$,j),n($,U,j),n($,y,j),n($,G,j),m(T,$,j),v=!0},p:De,i($){v||(h(g.$$.fragment,$),h(T.$$.fragment,$),v=!0)},o($){M(g.$$.fragment,$),M(T.$$.fragment,$),v=!1},d($){$&&(l(o),l(r),l(U),l(y),l(G)),f(g,$),f(T,$)}}}function hn(C){let o,b="To generate the <code>inputs</code> with the expected chat template formatting, you could use the following snippet:",r,g,U;return g=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtZXRhLWxsYW1hJTJGTWV0YS1MbGFtYS0zLThCLUluc3RydWN0JTIyKSUwQXRva2VuaXplci5hcHBseV9jaGF0X3RlbXBsYXRlKCUwQSUyMCUyMCUyMCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJzeXN0ZW0lMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyWW91JTIwYXJlJTIwYSUyMGhlbHBmdWwlMjBhc3Npc3RhbnQuJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyV2hhdCUyMGlzJTIwMiUyQjIlM0YlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlNUQlMkMlMEElMjAlMjAlMjAlMjB0b2tlbml6ZSUzREZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwYWRkX2dlbmVyYXRpb25fcHJvbXB0JTNEVHJ1ZSUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;meta-llama/Meta-Llama-3-8B-Instruct&quot;</span>)
tokenizer.apply_chat_template(
    [
        {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are a helpful assistant.&quot;</span>},
        {<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;What is 2+2?&quot;</span>},
    ],
    tokenize=<span class="hljs-literal">False</span>,
    add_generation_prompt=<span class="hljs-literal">True</span>,
)`,wrap:!1}}),{c(){o=i("p"),o.innerHTML=b,r=s(),c(g.$$.fragment)},l(y){o=p(y,"P",{"data-svelte-h":!0}),d(o)!=="svelte-mve1xj"&&(o.innerHTML=b),r=a(y),u(g.$$.fragment,y)},m(y,w){n(y,o,w),n(y,r,w),m(g,y,w),U=!0},p:De,i(y){U||(h(g.$$.fragment,y),U=!0)},o(y){M(g.$$.fragment,y),U=!1},d(y){y&&(l(o),l(r)),f(g,y)}}}function Mn(C){let o,b='📍 Find the complete example on GitHub <a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-deployment" rel="nofollow">here</a>!';return{c(){o=i("p"),o.innerHTML=b},l(r){o=p(r,"P",{"data-svelte-h":!0}),d(o)!=="svelte-148xvcu"&&(o.innerHTML=b)},m(r,g){n(r,o,g)},p:De,d(r){r&&l(o)}}}function fn(C){let o,b,r,g,U,y,w,G,T,v="Meta Llama 3 is the latest LLM from the Llama family, released by Meta; coming in two sizes 8B and 70B, including both the base model and the instruction-tuned model. Text Generation Inference (TGI) is a toolkit developed by Hugging Face for deploying and serving LLMs, with high performance text generation. And, Google Kubernetes Engine (GKE) is a fully-managed Kubernetes service in Google Cloud that can be used to deploy and operate containerized applications at scale using GCP’s infrastructure.",$,j,gl="This example showcases how to deploy an LLM from the Hugging Face Hub, as Meta Llama 3 8B Instruct, on a GKE Cluster running a purpose-built container to deploy LLMs in a secure and managed environment with the Hugging Face DLC for TGI.",et,L,tt,E,yl="First, you need to install both <code>gcloud</code> and <code>kubectl</code> in your local machine, which are the command-line tools for Google Cloud and Kubernetes, respectively, to interact with the GCP and the GKE Cluster.",lt,X,Tl='<li>To install <code>gcloud</code>, follow the instructions at <a href="https://cloud.google.com/sdk/docs/install" rel="nofollow">Cloud SDK Documentation - Install the gcloud CLI</a>.</li> <li>To install <code>kubectl</code>, follow the instructions at <a href="https://kubernetes.io/docs/tasks/tools/#kubectl" rel="nofollow">Kubernetes Documentation - Install Tools</a>.</li>',nt,B,$l="Optionally, to ease the usage of the commands within this tutorial, you need to set the following environment variables for GCP:",st,A,at,F,bl="Then you need to login into your GCP account and set the project ID to the one you want to use for the deployment of the GKE Cluster.",ot,Y,it,H,Jl="Once you are logged in, you need to enable the necessary service APIs in GCP, such as the Google Kubernetes Engine API, the Google Container Registry API, and the Google Container File System API, which are necessary for the deployment of the GKE Cluster and the Hugging Face DLC for TGI.",pt,S,rt,z,Ul="Additionally, to use <code>kubectl</code> with the GKE Cluster credentials, you also need to install the <code>gke-gcloud-auth-plugin</code>, that can be installed with <code>gcloud</code> as follows:",ct,D,ut,Z,mt,q,ht,P,wl="Once everything’s set up, you can proceed with the creation of the GKE Cluster and the node pool, which in this case will be a single GPU node, in order to use the GPU accelerator for high performance inference, also following TGI recommendations based on their internal optimizations for GPUs.",Mt,K,Cl="To deploy the GKE Cluster, the “Autopilot” mode will be used as it is the recommended one for most of the workloads, since the underlying infrastructure is managed by Google. Alternatively, you can also use the “Standard” mode.",ft,k,dt,O,gt,N,yt,ee,jl='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/gke/tgi-deployment/imgs/gke-cluster.png" alt="GKE Cluster in the GCP Console"/>',Tt,te,Gl="Once the GKE Cluster is created, you can get the credentials to access it via <code>kubectl</code> with the following command:",$t,le,bt,ne,Jt,se,vl='As <a href="https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct" rel="nofollow"><code>meta-llama/Meta-Llama-3.1-8B-Instruct</code></a> is a gated model, you need to set a Kubernetes secret with the Hugging Face Hub token via <code>kubectl</code>.',Ut,ae,Il='To generate a custom token for the Hugging Face Hub, you can follow the instructions at <a href="https://huggingface.co/docs/hub/en/security-tokens" rel="nofollow">https://huggingface.co/docs/hub/en/security-tokens</a>; and the recommended way of setting it is to install the <code>huggingface_hub</code> Python SDK as follows:',wt,oe,Ct,ie,Zl="And then login in with the generated token with read-access over the gated/private model:",jt,pe,Gt,re,kl="Finally, you can create the Kubernetes secret with the generated token for the Hugging Face Hub as follows using the <code>huggingface_hub</code> Python SDK to retrieve the token:",vt,ce,It,ue,Nl="Or, alternatively, you can directly set the token as follows:",Zt,me,kt,he,xl='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/gke/tgi-deployment/imgs/gke-secrets.png" alt="GKE Secret in the GCP Console"/>',Nt,Me,Wl='More information on how to set Kubernetes secrets in a GKE Cluster at <a href="https://cloud.google.com/secret-manager/docs/secret-manager-managed-csi-component" rel="nofollow">https://cloud.google.com/secret-manager/docs/secret-manager-managed-csi-component</a>.',xt,fe,Wt,de,_l='Now you can proceed to the Kubernetes deployment of the Hugging Face DLC for TGI, serving the <a href="https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct" rel="nofollow"><code>meta-llama/Meta-Llama-3.1-8B-Instruct</code></a> model from the Hugging Face Hub.',_t,x,Qt,ge,Ql='The Hugging Face DLC for TGI will be deployed via <code>kubectl</code>, from the configuration files in the <a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-deployment/config/" rel="nofollow"><code>config/</code></a> directory:',Vt,ye,Vl='<li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-deployment/config/deployment.yaml" rel="nofollow"><code>deployment.yaml</code></a>: contains the deployment details of the pod including the reference to the Hugging Face DLC for TGI setting the <code>MODEL_ID</code> to <a href="https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct" rel="nofollow"><code>meta-llama/Meta-Llama-3.1-8B-Instruct</code></a>.</li> <li><a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-deployment/config/service.yaml" rel="nofollow"><code>service.yaml</code></a>: contains the service details of the pod, exposing the port 8080 for the TGI service.</li> <li>(optional) <a href="https://github.com/huggingface/Google-Cloud-Containers/tree/main/examples/gke/tgi-deployment/config/ingress.yaml" rel="nofollow"><code>ingress.yaml</code></a>: contains the ingress details of the pod, exposing the service to the external world so that it can be accessed via the ingress IP.</li>',Rt,Te,Lt,$e,Rl='<img src="https://raw.githubusercontent.com/huggingface/Google-Cloud-Containers/main/examples/gke/tgi-deployment/imgs/gke-deployment.png" alt="GKE Deployment in the GCP Console"/>',Et,W,Xt,be,Bt,Je,Ll="To run the inference over the deployed TGI service, you can either:",At,_,Ue,qe,El="Port-forwarding the deployed TGI service to the port 8080, so as to access via <code>localhost</code> with the command:",Ml,we,fl,Ce,Pe,Xl="Accessing the TGI service via the external IP of the ingress, which is the default scenario here since you have defined the ingress configuration in the <code>config/ingress.yaml</code> file (but it can be skipped in favour of the port-forwarding), that can be retrieved with the following command:",dl,je,Ft,Ge,Yt,ve,Bl="To send a POST request to the TGI service using <code>cURL</code>, you can run the following command:",Ht,Ie,St,Ze,Al="Or send a POST request to the ingress IP instead:",zt,ke,Dt,Ne,Fl="Which produces the following output:",qt,xe,Pt,Q,Kt,We,Ot,_e,Yl='To run the inference using Python, you can use the <code>openai</code> Python SDK (see the installation notes at <a href="https://platform.openai.com/docs/quickstart" rel="nofollow">https://platform.openai.com/docs/quickstart</a>), setting either the localhost or the ingress IP as the <code>base_url</code> for the client, and then running the following code:',el,Qe,tl,Ve,Hl="Which produces the following output:",ll,Re,nl,Le,sl,Ee,Sl="Finally, once you are done using TGI on the GKE Cluster, you can safely delete the GKE Cluster to avoid incurring in unnecessary costs.",al,Xe,ol,Be,zl="Alternatively, you can also downscale the replicas of the deployed pod to 0 in case you want to preserve the cluster, since the default GKE Cluster deployed with GKE Autopilot mode is running just a single <code>e2-small</code> instance.",il,Ae,pl,rl,cl,V,ul,Fe,ml,Ke,hl;return U=new an({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),w=new I({props:{title:"Deploy Meta Llama 3 8B with TGI DLC on GKE",local:"deploy-meta-llama-3-8b-with-tgi-dlc-on-gke",headingTag:"h1"}}),L=new I({props:{title:"Setup / Configuration",local:"setup--configuration",headingTag:"h2"}}),A=new J({props:{code:"ZXhwb3J0JTIwUFJPSkVDVF9JRCUzRHlvdXItcHJvamVjdC1pZCUwQWV4cG9ydCUyMExPQ0FUSU9OJTNEeW91ci1sb2NhdGlvbiUwQWV4cG9ydCUyMENMVVNURVJfTkFNRSUzRHlvdXItY2x1c3Rlci1uYW1l",highlighted:`<span class="hljs-built_in">export</span> PROJECT_ID=your-project-id
<span class="hljs-built_in">export</span> LOCATION=your-location
<span class="hljs-built_in">export</span> CLUSTER_NAME=your-cluster-name`,wrap:!1}}),Y=new J({props:{code:"Z2Nsb3VkJTIwYXV0aCUyMGxvZ2luJTBBZ2Nsb3VkJTIwYXV0aCUyMGFwcGxpY2F0aW9uLWRlZmF1bHQlMjBsb2dpbiUyMCUyMCUyMyUyMEZvciUyMGxvY2FsJTIwZGV2ZWxvcG1lbnQlMEFnY2xvdWQlMjBjb25maWclMjBzZXQlMjBwcm9qZWN0JTIwJTI0UFJPSkVDVF9JRA==",highlighted:`gcloud auth login
gcloud auth application-default login  <span class="hljs-comment"># For local development</span>
gcloud config <span class="hljs-built_in">set</span> project <span class="hljs-variable">$PROJECT_ID</span>`,wrap:!1}}),S=new J({props:{code:"Z2Nsb3VkJTIwc2VydmljZXMlMjBlbmFibGUlMjBjb250YWluZXIuZ29vZ2xlYXBpcy5jb20lMEFnY2xvdWQlMjBzZXJ2aWNlcyUyMGVuYWJsZSUyMGNvbnRhaW5lcnJlZ2lzdHJ5Lmdvb2dsZWFwaXMuY29tJTBBZ2Nsb3VkJTIwc2VydmljZXMlMjBlbmFibGUlMjBjb250YWluZXJmaWxlc3lzdGVtLmdvb2dsZWFwaXMuY29t",highlighted:`gcloud services <span class="hljs-built_in">enable</span> container.googleapis.com
gcloud services <span class="hljs-built_in">enable</span> containerregistry.googleapis.com
gcloud services <span class="hljs-built_in">enable</span> containerfilesystem.googleapis.com`,wrap:!1}}),D=new J({props:{code:"Z2Nsb3VkJTIwY29tcG9uZW50cyUyMGluc3RhbGwlMjBna2UtZ2Nsb3VkLWF1dGgtcGx1Z2lu",highlighted:"gcloud components install gke-gcloud-auth-plugin",wrap:!1}}),Z=new ze({props:{$$slots:{default:[pn]},$$scope:{ctx:C}}}),q=new I({props:{title:"Create GKE Cluster",local:"create-gke-cluster",headingTag:"h2"}}),k=new ze({props:{$$slots:{default:[rn]},$$scope:{ctx:C}}}),O=new J({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwY2x1c3RlcnMlMjBjcmVhdGUtYXV0byUyMCUyNENMVVNURVJfTkFNRSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcHJvamVjdCUzRCUyNFBST0pFQ1RfSUQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWxvY2F0aW9uJTNEJTI0TE9DQVRJT04lMjAlNUMlMEElMjAlMjAlMjAlMjAtLXJlbGVhc2UtY2hhbm5lbCUzRHN0YWJsZSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tY2x1c3Rlci12ZXJzaW9uJTNEMS4yOCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbm8tYXV0b3Byb3Zpc2lvbmluZy1lbmFibGUtaW5zZWN1cmUta3ViZWxldC1yZWFkb25seS1wb3J0",highlighted:`gcloud container clusters create-auto <span class="hljs-variable">$CLUSTER_NAME</span> \\
    --project=<span class="hljs-variable">$PROJECT_ID</span> \\
    --location=<span class="hljs-variable">$LOCATION</span> \\
    --release-channel=stable \\
    --cluster-version=1.28 \\
    --no-autoprovisioning-enable-insecure-kubelet-readonly-port`,wrap:!1}}),N=new ze({props:{$$slots:{default:[cn]},$$scope:{ctx:C}}}),le=new J({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwY2x1c3RlcnMlMjBnZXQtY3JlZGVudGlhbHMlMjAlMjRDTFVTVEVSX05BTUUlMjAtLWxvY2F0aW9uJTNEJTI0TE9DQVRJT04=",highlighted:'gcloud container clusters get-credentials <span class="hljs-variable">$CLUSTER_NAME</span> --location=<span class="hljs-variable">$LOCATION</span>',wrap:!1}}),ne=new I({props:{title:"Optional: Set Secrets in GKE",local:"optional-set-secrets-in-gke",headingTag:"h2"}}),oe=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMC0tdXBncmFkZSUyMC0tcXVpZXQlMjBodWdnaW5nZmFjZV9odWI=",highlighted:"pip install --upgrade --quiet huggingface_hub",wrap:!1}}),pe=new J({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}}),ce=new J({props:{code:"a3ViZWN0bCUyMGNyZWF0ZSUyMHNlY3JldCUyMGdlbmVyaWMlMjBoZi1zZWNyZXQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZyb20tbGl0ZXJhbCUzRGhmX3Rva2VuJTNEJTI0KHB5dGhvbiUyMC1jJTIwJTIyZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGdldF90b2tlbiUzQiUyMHByaW50KGdldF90b2tlbigpKSUyMiklMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRyeS1ydW4lM0RjbGllbnQlMjAtbyUyMHlhbWwlMjAlN0MlMjBrdWJlY3RsJTIwYXBwbHklMjAtZiUyMC0=",highlighted:`kubectl create secret generic hf-secret \\
    --from-literal=hf_token=$(python -c <span class="hljs-string">&quot;from huggingface_hub import get_token; print(get_token())&quot;</span>) \\
    --dry-run=client -o yaml | kubectl apply -f -`,wrap:!1}}),me=new J({props:{code:"a3ViZWN0bCUyMGNyZWF0ZSUyMHNlY3JldCUyMGdlbmVyaWMlMjBoZi1zZWNyZXQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZyb20tbGl0ZXJhbCUzRGhmX3Rva2VuJTNEaGZfKioqJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kcnktcnVuJTNEY2xpZW50JTIwLW8lMjB5YW1sJTIwJTdDJTIwa3ViZWN0bCUyMGFwcGx5JTIwLWYlMjAt",highlighted:`kubectl create secret generic hf-secret \\
    --from-literal=hf_token=hf_*** \\
    --dry-run=client -o yaml | kubectl apply -f -`,wrap:!1}}),fe=new I({props:{title:"Deploy TGI",local:"deploy-tgi",headingTag:"h2"}}),x=new ze({props:{$$slots:{default:[un]},$$scope:{ctx:C}}}),Te=new J({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRkdvb2dsZS1DbG91ZC1Db250YWluZXJzJTBBa3ViZWN0bCUyMGFwcGx5JTIwLWYlMjBHb29nbGUtQ2xvdWQtQ29udGFpbmVycyUyRmV4YW1wbGVzJTJGZ2tlJTJGdGdpLWRlcGxveW1lbnQlMkZjb25maWc=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/Google-Cloud-Containers
kubectl apply -f Google-Cloud-Containers/examples/gke/tgi-deployment/config`,wrap:!1}}),W=new ze({props:{$$slots:{default:[mn]},$$scope:{ctx:C}}}),be=new I({props:{title:"Inference with TGI",local:"inference-with-tgi",headingTag:"h2"}}),we=new J({props:{code:"a3ViZWN0bCUyMHBvcnQtZm9yd2FyZCUyMHNlcnZpY2UlMkZ0Z2ktc2VydmljZSUyMDgwODAlM0E4MDgw",highlighted:"kubectl port-forward service/tgi-service 8080:8080",wrap:!1}}),je=new J({props:{code:"a3ViZWN0bCUyMGdldCUyMGluZ3Jlc3MlMjB0Z2ktaW5ncmVzcyUyMC1vJTIwanNvbnBhdGglM0QnJTdCLnN0YXR1cy5sb2FkQmFsYW5jZXIuaW5ncmVzcyU1QjAlNUQuaXAlN0Qn",highlighted:'kubectl get ingress tgi-ingress -o jsonpath=<span class="hljs-string">&#x27;{.status.loadBalancer.ingress[0].ip}&#x27;</span>',wrap:!1}}),Ge=new I({props:{title:"Via cURL",local:"via-curl",headingTag:"h3"}}),Ie=new J({props:{code:"Y3VybCUyMGh0dHAlM0ElMkYlMkZsb2NhbGhvc3QlM0E4MDgwJTJGZ2VuZXJhdGUlMjAlNUMlMEElMjAlMjAlMjAlMjAtWCUyMFBPU1QlMjAlNUMlMEElMjAlMjAlMjAlMjAtZCUyMCclN0IlMjJpbnB1dHMlMjIlM0ElMjIlM0MlN0NiZWdpbl9vZl90ZXh0JTdDJTNFJTNDJTdDc3RhcnRfaGVhZGVyX2lkJTdDJTNFc3lzdGVtJTNDJTdDZW5kX2hlYWRlcl9pZCU3QyUzRSU1Q24lNUNuWW91JTIwYXJlJTIwYSUyMGhlbHBmdWwlMjBhc3Npc3RhbnQuJTNDJTdDZW90X2lkJTdDJTNFJTNDJTdDc3RhcnRfaGVhZGVyX2lkJTdDJTNFdXNlciUzQyU3Q2VuZF9oZWFkZXJfaWQlN0MlM0UlNUNuJTVDbldoYXQlMjBpcyUyMDIlMkIyJTNGJTNDJTdDZW90X2lkJTdDJTNFJTNDJTdDc3RhcnRfaGVhZGVyX2lkJTdDJTNFYXNzaXN0YW50JTNDJTdDZW5kX2hlYWRlcl9pZCU3QyUzRSU1Q24lNUNuJTIyJTJDJTIycGFyYW1ldGVycyUyMiUzQSU3QiUyMnRlbXBlcmF0dXJlJTIyJTNBMC43JTJDJTIwJTIydG9wX3AlMjIlM0ElMjAwLjk1JTJDJTIwJTIybWF4X25ld190b2tlbnMlMjIlM0ElMjAxMjglN0QlN0QnJTIwJTVDJTBBJTIwJTIwJTIwJTIwLUglMjAnQ29udGVudC1UeXBlJTNBJTIwYXBwbGljYXRpb24lMkZqc29uJw==",highlighted:`curl http://localhost:8080/generate \\
    -X POST \\
    -d <span class="hljs-string">&#x27;{&quot;inputs&quot;:&quot;&lt;|begin_of_text|&gt;&lt;|start_header_id|&gt;system&lt;|end_header_id|&gt;\\n\\nYou are a helpful assistant.&lt;|eot_id|&gt;&lt;|start_header_id|&gt;user&lt;|end_header_id|&gt;\\n\\nWhat is 2+2?&lt;|eot_id|&gt;&lt;|start_header_id|&gt;assistant&lt;|end_header_id|&gt;\\n\\n&quot;,&quot;parameters&quot;:{&quot;temperature&quot;:0.7, &quot;top_p&quot;: 0.95, &quot;max_new_tokens&quot;: 128}}&#x27;</span> \\
    -H <span class="hljs-string">&#x27;Content-Type: application/json&#x27;</span>`,wrap:!1}}),ke=new J({props:{code:"Y3VybCUyMGh0dHAlM0ElMkYlMkYlMjQoa3ViZWN0bCUyMGdldCUyMGluZ3Jlc3MlMjB0Z2ktaW5ncmVzcyUyMC1vJTIwanNvbnBhdGglM0QnJTdCLnN0YXR1cy5sb2FkQmFsYW5jZXIuaW5ncmVzcyU1QjAlNUQuaXAlN0QnKSUyRmdlbmVyYXRlJTIwJTVDJTBBJTIwJTIwJTIwJTIwLVglMjBQT1NUJTIwJTVDJTBBJTIwJTIwJTIwJTIwLWQlMjAnJTdCJTIyaW5wdXRzJTIyJTNBJTIyJTNDJTdDYmVnaW5fb2ZfdGV4dCU3QyUzRSUzQyU3Q3N0YXJ0X2hlYWRlcl9pZCU3QyUzRXN5c3RlbSUzQyU3Q2VuZF9oZWFkZXJfaWQlN0MlM0UlNUNuJTVDbllvdSUyMGFyZSUyMGElMjBoZWxwZnVsJTIwYXNzaXN0YW50LiUzQyU3Q2VvdF9pZCU3QyUzRSUzQyU3Q3N0YXJ0X2hlYWRlcl9pZCU3QyUzRXVzZXIlM0MlN0NlbmRfaGVhZGVyX2lkJTdDJTNFJTVDbiU1Q25XaGF0JTIwaXMlMjAyJTJCMiUzRiUzQyU3Q2VvdF9pZCU3QyUzRSUzQyU3Q3N0YXJ0X2hlYWRlcl9pZCU3QyUzRWFzc2lzdGFudCUzQyU3Q2VuZF9oZWFkZXJfaWQlN0MlM0UlNUNuJTVDbiUyMiUyQyUyMnBhcmFtZXRlcnMlMjIlM0ElN0IlMjJ0ZW1wZXJhdHVyZSUyMiUzQTAuNyUyQyUyMCUyMnRvcF9wJTIyJTNBJTIwMC45NSUyQyUyMCUyMm1heF9uZXdfdG9rZW5zJTIyJTNBJTIwMTI4JTdEJTdEJyUyMCU1QyUwQSUyMCUyMCUyMCUyMC1IJTIwJ0NvbnRlbnQtVHlwZSUzQSUyMGFwcGxpY2F0aW9uJTJGanNvbic=",highlighted:`curl http://$(kubectl get ingress tgi-ingress -o jsonpath=<span class="hljs-string">&#x27;{.status.loadBalancer.ingress[0].ip}&#x27;</span>)/generate \\
    -X POST \\
    -d <span class="hljs-string">&#x27;{&quot;inputs&quot;:&quot;&lt;|begin_of_text|&gt;&lt;|start_header_id|&gt;system&lt;|end_header_id|&gt;\\n\\nYou are a helpful assistant.&lt;|eot_id|&gt;&lt;|start_header_id|&gt;user&lt;|end_header_id|&gt;\\n\\nWhat is 2+2?&lt;|eot_id|&gt;&lt;|start_header_id|&gt;assistant&lt;|end_header_id|&gt;\\n\\n&quot;,&quot;parameters&quot;:{&quot;temperature&quot;:0.7, &quot;top_p&quot;: 0.95, &quot;max_new_tokens&quot;: 128}}&#x27;</span> \\
    -H <span class="hljs-string">&#x27;Content-Type: application/json&#x27;</span>`,wrap:!1}}),xe=new J({props:{code:"JTdCJTIyZ2VuZXJhdGVkX3RleHQlMjIlM0ElMjJUaGUlMjBhbnN3ZXIlMjB0byUyMDIlMkIyJTIwaXMlMjA0LiUyMiU3RA==",highlighted:'<span class="hljs-punctuation">{</span><span class="hljs-attr">&quot;generated_text&quot;</span><span class="hljs-punctuation">:</span><span class="hljs-string">&quot;The answer to 2+2 is 4.&quot;</span><span class="hljs-punctuation">}</span>',wrap:!1}}),Q=new ze({props:{$$slots:{default:[hn]},$$scope:{ctx:C}}}),We=new I({props:{title:"Via Python",local:"via-python",headingTag:"h3"}}),Qe=new J({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGdldF90b2tlbiUwQWZyb20lMjBvcGVuYWklMjBpbXBvcnQlMjBPcGVuQUklMEElMEFjbGllbnQlMjAlM0QlMjBPcGVuQUkoJTBBJTIwJTIwJTIwJTIwYmFzZV91cmwlM0QlMjJodHRwJTNBJTJGJTJGbG9jYWxob3N0JTNBODA4MCUyRnYxJTJGJTIyJTJDJTBBJTIwJTIwJTIwJTIwYXBpX2tleSUzRGdldF90b2tlbigpJTIwb3IlMjAlMjItJTIyJTJDJTBBKSUwQSUwQWNoYXRfY29tcGxldGlvbiUyMCUzRCUyMGNsaWVudC5jaGF0LmNvbXBsZXRpb25zLmNyZWF0ZSglMEElMjAlMjAlMjAlMjBtb2RlbCUzRCUyMnRnaSUyMiUyQyUwQSUyMCUyMCUyMCUyMG1lc3NhZ2VzJTNEJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnN5c3RlbSUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJZb3UlMjBhcmUlMjBhJTIwaGVscGZ1bCUyMGFzc2lzdGFudC4lMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJXaGF0JTIwaXMlMjAyJTJCMiUzRiUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCU1RCUyQyUwQSUyMCUyMCUyMCUyMG1heF90b2tlbnMlM0QxMjglMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> get_token
<span class="hljs-keyword">from</span> openai <span class="hljs-keyword">import</span> OpenAI

client = OpenAI(
    base_url=<span class="hljs-string">&quot;http://localhost:8080/v1/&quot;</span>,
    api_key=get_token() <span class="hljs-keyword">or</span> <span class="hljs-string">&quot;-&quot;</span>,
)

chat_completion = client.chat.completions.create(
    model=<span class="hljs-string">&quot;tgi&quot;</span>,
    messages=[
        {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are a helpful assistant.&quot;</span>},
        {<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;What is 2+2?&quot;</span>},
    ],
    max_tokens=<span class="hljs-number">128</span>,
)`,wrap:!1}}),Re=new J({props:{code:"Q2hhdENvbXBsZXRpb24oaWQlM0QnJyUyQyUyMGNob2ljZXMlM0QlNUJDaG9pY2UoZmluaXNoX3JlYXNvbiUzRCdlb3NfdG9rZW4nJTJDJTIwaW5kZXglM0QwJTJDJTIwbG9ncHJvYnMlM0ROb25lJTJDJTIwbWVzc2FnZSUzRENoYXRDb21wbGV0aW9uTWVzc2FnZShjb250ZW50JTNEJ1RoZSUyMGFuc3dlciUyMHRvJTIwMiUyQjIlMjBpcyUyMDQhJyUyQyUyMHJvbGUlM0QnYXNzaXN0YW50JyUyQyUyMGZ1bmN0aW9uX2NhbGwlM0ROb25lJTJDJTIwdG9vbF9jYWxscyUzRE5vbmUpKSU1RCUyQyUyMGNyZWF0ZWQlM0QxNzE4MTA4NTIyJTJDJTIwbW9kZWwlM0QnbWV0YS1sbGFtYSUyRk1ldGEtTGxhbWEtMy04Qi1JbnN0cnVjdCclMkMlMjBvYmplY3QlM0QndGV4dF9jb21wbGV0aW9uJyUyQyUyMHN5c3RlbV9maW5nZXJwcmludCUzRCcyLjAuMi1zaGEtNjA3M2VjZSclMkMlMjB1c2FnZSUzRENvbXBsZXRpb25Vc2FnZShjb21wbGV0aW9uX3Rva2VucyUzRDEyJTJDJTIwcHJvbXB0X3Rva2VucyUzRDI4JTJDJTIwdG90YWxfdG9rZW5zJTNENDApKQ==",highlighted:'<span class="hljs-constructor">ChatCompletion(<span class="hljs-params">id</span>=&#x27;&#x27;, <span class="hljs-params">choices</span>=[Choice(<span class="hljs-params">finish_reason</span>=&#x27;<span class="hljs-params">eos_token</span>&#x27;, <span class="hljs-params">index</span>=0, <span class="hljs-params">logprobs</span>=None, <span class="hljs-params">message</span>=ChatCompletionMessage(<span class="hljs-params">content</span>=&#x27;The <span class="hljs-params">answer</span> <span class="hljs-params">to</span> 2+2 <span class="hljs-params">is</span> 4!&#x27;, <span class="hljs-params">role</span>=&#x27;<span class="hljs-params">assistant</span>&#x27;, <span class="hljs-params">function_call</span>=None, <span class="hljs-params">tool_calls</span>=None)</span>)], created=<span class="hljs-number">1718108522</span>, model=&#x27;meta-llama/Meta-Llama-<span class="hljs-number">3</span>-<span class="hljs-number">8</span>B-Instruct&#x27;, <span class="hljs-keyword">object</span>=&#x27;text_completion&#x27;, system_fingerprint=&#x27;<span class="hljs-number">2.0</span>.<span class="hljs-number">2</span>-sha-<span class="hljs-number">6073</span>ece&#x27;, usage=<span class="hljs-constructor">CompletionUsage(<span class="hljs-params">completion_tokens</span>=12, <span class="hljs-params">prompt_tokens</span>=28, <span class="hljs-params">total_tokens</span>=40)</span>)',wrap:!1}}),Le=new I({props:{title:"Delete GKE Cluster",local:"delete-gke-cluster",headingTag:"h2"}}),Xe=new J({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwY2x1c3RlcnMlMjBkZWxldGUlMjAlMjRDTFVTVEVSX05BTUUlMjAtLWxvY2F0aW9uJTNEJTI0TE9DQVRJT04=",highlighted:'gcloud container clusters delete <span class="hljs-variable">$CLUSTER_NAME</span> --location=<span class="hljs-variable">$LOCATION</span>',wrap:!1}}),Ae=new J({props:{code:"a3ViZWN0bCUyMHNjYWxlJTIwLS1yZXBsaWNhcyUzRDAlMjBkZXBsb3ltZW50JTJGdGdpLWRlcGxveW1lbnQ=",highlighted:"kubectl scale --replicas=0 deployment/tgi-deployment",wrap:!1}}),V=new ze({props:{$$slots:{default:[Mn]},$$scope:{ctx:C}}}),Fe=new on({props:{source:"https://github.com/huggingface/Google-Cloud-Containers/blob/main/docs/source/examples/gke-tgi-deployment.mdx"}}),{c(){o=i("meta"),b=s(),r=i("p"),g=s(),c(U.$$.fragment),y=s(),c(w.$$.fragment),G=s(),T=i("p"),T.textContent=v,$=s(),j=i("p"),j.textContent=gl,et=s(),c(L.$$.fragment),tt=s(),E=i("p"),E.innerHTML=yl,lt=s(),X=i("ul"),X.innerHTML=Tl,nt=s(),B=i("p"),B.textContent=$l,st=s(),c(A.$$.fragment),at=s(),F=i("p"),F.textContent=bl,ot=s(),c(Y.$$.fragment),it=s(),H=i("p"),H.textContent=Jl,pt=s(),c(S.$$.fragment),rt=s(),z=i("p"),z.innerHTML=Ul,ct=s(),c(D.$$.fragment),ut=s(),c(Z.$$.fragment),mt=s(),c(q.$$.fragment),ht=s(),P=i("p"),P.textContent=wl,Mt=s(),K=i("p"),K.textContent=Cl,ft=s(),c(k.$$.fragment),dt=s(),c(O.$$.fragment),gt=s(),c(N.$$.fragment),yt=s(),ee=i("p"),ee.innerHTML=jl,Tt=s(),te=i("p"),te.innerHTML=Gl,$t=s(),c(le.$$.fragment),bt=s(),c(ne.$$.fragment),Jt=s(),se=i("p"),se.innerHTML=vl,Ut=s(),ae=i("p"),ae.innerHTML=Il,wt=s(),c(oe.$$.fragment),Ct=s(),ie=i("p"),ie.textContent=Zl,jt=s(),c(pe.$$.fragment),Gt=s(),re=i("p"),re.innerHTML=kl,vt=s(),c(ce.$$.fragment),It=s(),ue=i("p"),ue.textContent=Nl,Zt=s(),c(me.$$.fragment),kt=s(),he=i("p"),he.innerHTML=xl,Nt=s(),Me=i("p"),Me.innerHTML=Wl,xt=s(),c(fe.$$.fragment),Wt=s(),de=i("p"),de.innerHTML=_l,_t=s(),c(x.$$.fragment),Qt=s(),ge=i("p"),ge.innerHTML=Ql,Vt=s(),ye=i("ul"),ye.innerHTML=Vl,Rt=s(),c(Te.$$.fragment),Lt=s(),$e=i("p"),$e.innerHTML=Rl,Et=s(),c(W.$$.fragment),Xt=s(),c(be.$$.fragment),Bt=s(),Je=i("p"),Je.textContent=Ll,At=s(),_=i("ul"),Ue=i("li"),qe=i("p"),qe.innerHTML=El,Ml=s(),c(we.$$.fragment),fl=s(),Ce=i("li"),Pe=i("p"),Pe.innerHTML=Xl,dl=s(),c(je.$$.fragment),Ft=s(),c(Ge.$$.fragment),Yt=s(),ve=i("p"),ve.innerHTML=Bl,Ht=s(),c(Ie.$$.fragment),St=s(),Ze=i("p"),Ze.textContent=Al,zt=s(),c(ke.$$.fragment),Dt=s(),Ne=i("p"),Ne.textContent=Fl,qt=s(),c(xe.$$.fragment),Pt=s(),c(Q.$$.fragment),Kt=s(),c(We.$$.fragment),Ot=s(),_e=i("p"),_e.innerHTML=Yl,el=s(),c(Qe.$$.fragment),tl=s(),Ve=i("p"),Ve.textContent=Hl,ll=s(),c(Re.$$.fragment),nl=s(),c(Le.$$.fragment),sl=s(),Ee=i("p"),Ee.textContent=Sl,al=s(),c(Xe.$$.fragment),ol=s(),Be=i("p"),Be.innerHTML=zl,il=s(),c(Ae.$$.fragment),pl=s(),rl=i("hr"),cl=s(),c(V.$$.fragment),ul=s(),c(Fe.$$.fragment),ml=s(),Ke=i("p"),this.h()},l(e){const t=sn("svelte-u9bgzb",document.head);o=p(t,"META",{name:!0,content:!0}),t.forEach(l),b=a(e),r=p(e,"P",{}),Oe(r).forEach(l),g=a(e),u(U.$$.fragment,e),y=a(e),u(w.$$.fragment,e),G=a(e),T=p(e,"P",{"data-svelte-h":!0}),d(T)!=="svelte-12hy2a5"&&(T.textContent=v),$=a(e),j=p(e,"P",{"data-svelte-h":!0}),d(j)!=="svelte-8lrikh"&&(j.textContent=gl),et=a(e),u(L.$$.fragment,e),tt=a(e),E=p(e,"P",{"data-svelte-h":!0}),d(E)!=="svelte-1qnmo38"&&(E.innerHTML=yl),lt=a(e),X=p(e,"UL",{"data-svelte-h":!0}),d(X)!=="svelte-a8ymuw"&&(X.innerHTML=Tl),nt=a(e),B=p(e,"P",{"data-svelte-h":!0}),d(B)!=="svelte-1i8n6rq"&&(B.textContent=$l),st=a(e),u(A.$$.fragment,e),at=a(e),F=p(e,"P",{"data-svelte-h":!0}),d(F)!=="svelte-1g39t6p"&&(F.textContent=bl),ot=a(e),u(Y.$$.fragment,e),it=a(e),H=p(e,"P",{"data-svelte-h":!0}),d(H)!=="svelte-1c0v0sp"&&(H.textContent=Jl),pt=a(e),u(S.$$.fragment,e),rt=a(e),z=p(e,"P",{"data-svelte-h":!0}),d(z)!=="svelte-wjaltb"&&(z.innerHTML=Ul),ct=a(e),u(D.$$.fragment,e),ut=a(e),u(Z.$$.fragment,e),mt=a(e),u(q.$$.fragment,e),ht=a(e),P=p(e,"P",{"data-svelte-h":!0}),d(P)!=="svelte-lja57p"&&(P.textContent=wl),Mt=a(e),K=p(e,"P",{"data-svelte-h":!0}),d(K)!=="svelte-l7bdz6"&&(K.textContent=Cl),ft=a(e),u(k.$$.fragment,e),dt=a(e),u(O.$$.fragment,e),gt=a(e),u(N.$$.fragment,e),yt=a(e),ee=p(e,"P",{"data-svelte-h":!0}),d(ee)!=="svelte-9abtu9"&&(ee.innerHTML=jl),Tt=a(e),te=p(e,"P",{"data-svelte-h":!0}),d(te)!=="svelte-f29e6h"&&(te.innerHTML=Gl),$t=a(e),u(le.$$.fragment,e),bt=a(e),u(ne.$$.fragment,e),Jt=a(e),se=p(e,"P",{"data-svelte-h":!0}),d(se)!=="svelte-ghu0vo"&&(se.innerHTML=vl),Ut=a(e),ae=p(e,"P",{"data-svelte-h":!0}),d(ae)!=="svelte-zags7d"&&(ae.innerHTML=Il),wt=a(e),u(oe.$$.fragment,e),Ct=a(e),ie=p(e,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-4hmhsl"&&(ie.textContent=Zl),jt=a(e),u(pe.$$.fragment,e),Gt=a(e),re=p(e,"P",{"data-svelte-h":!0}),d(re)!=="svelte-cqv9s0"&&(re.innerHTML=kl),vt=a(e),u(ce.$$.fragment,e),It=a(e),ue=p(e,"P",{"data-svelte-h":!0}),d(ue)!=="svelte-o99xdc"&&(ue.textContent=Nl),Zt=a(e),u(me.$$.fragment,e),kt=a(e),he=p(e,"P",{"data-svelte-h":!0}),d(he)!=="svelte-1r3cmnu"&&(he.innerHTML=xl),Nt=a(e),Me=p(e,"P",{"data-svelte-h":!0}),d(Me)!=="svelte-1dqrub5"&&(Me.innerHTML=Wl),xt=a(e),u(fe.$$.fragment,e),Wt=a(e),de=p(e,"P",{"data-svelte-h":!0}),d(de)!=="svelte-kglcl8"&&(de.innerHTML=_l),_t=a(e),u(x.$$.fragment,e),Qt=a(e),ge=p(e,"P",{"data-svelte-h":!0}),d(ge)!=="svelte-1nrt3hc"&&(ge.innerHTML=Ql),Vt=a(e),ye=p(e,"UL",{"data-svelte-h":!0}),d(ye)!=="svelte-vvxj2d"&&(ye.innerHTML=Vl),Rt=a(e),u(Te.$$.fragment,e),Lt=a(e),$e=p(e,"P",{"data-svelte-h":!0}),d($e)!=="svelte-12mubun"&&($e.innerHTML=Rl),Et=a(e),u(W.$$.fragment,e),Xt=a(e),u(be.$$.fragment,e),Bt=a(e),Je=p(e,"P",{"data-svelte-h":!0}),d(Je)!=="svelte-1wzt8py"&&(Je.textContent=Ll),At=a(e),_=p(e,"UL",{});var Ye=Oe(_);Ue=p(Ye,"LI",{});var He=Oe(Ue);qe=p(He,"P",{"data-svelte-h":!0}),d(qe)!=="svelte-k3movz"&&(qe.innerHTML=El),Ml=a(He),u(we.$$.fragment,He),He.forEach(l),fl=a(Ye),Ce=p(Ye,"LI",{});var Se=Oe(Ce);Pe=p(Se,"P",{"data-svelte-h":!0}),d(Pe)!=="svelte-1uskw9x"&&(Pe.innerHTML=Xl),dl=a(Se),u(je.$$.fragment,Se),Se.forEach(l),Ye.forEach(l),Ft=a(e),u(Ge.$$.fragment,e),Yt=a(e),ve=p(e,"P",{"data-svelte-h":!0}),d(ve)!=="svelte-1ks8djk"&&(ve.innerHTML=Bl),Ht=a(e),u(Ie.$$.fragment,e),St=a(e),Ze=p(e,"P",{"data-svelte-h":!0}),d(Ze)!=="svelte-1u6gmmt"&&(Ze.textContent=Al),zt=a(e),u(ke.$$.fragment,e),Dt=a(e),Ne=p(e,"P",{"data-svelte-h":!0}),d(Ne)!=="svelte-ddr8r5"&&(Ne.textContent=Fl),qt=a(e),u(xe.$$.fragment,e),Pt=a(e),u(Q.$$.fragment,e),Kt=a(e),u(We.$$.fragment,e),Ot=a(e),_e=p(e,"P",{"data-svelte-h":!0}),d(_e)!=="svelte-w0229l"&&(_e.innerHTML=Yl),el=a(e),u(Qe.$$.fragment,e),tl=a(e),Ve=p(e,"P",{"data-svelte-h":!0}),d(Ve)!=="svelte-ddr8r5"&&(Ve.textContent=Hl),ll=a(e),u(Re.$$.fragment,e),nl=a(e),u(Le.$$.fragment,e),sl=a(e),Ee=p(e,"P",{"data-svelte-h":!0}),d(Ee)!=="svelte-1laf0m8"&&(Ee.textContent=Sl),al=a(e),u(Xe.$$.fragment,e),ol=a(e),Be=p(e,"P",{"data-svelte-h":!0}),d(Be)!=="svelte-qo8r7n"&&(Be.innerHTML=zl),il=a(e),u(Ae.$$.fragment,e),pl=a(e),rl=p(e,"HR",{}),cl=a(e),u(V.$$.fragment,e),ul=a(e),u(Fe.$$.fragment,e),ml=a(e),Ke=p(e,"P",{}),Oe(Ke).forEach(l),this.h()},h(){Ol(o,"name","hf:doc:metadata"),Ol(o,"content",dn)},m(e,t){R(document.head,o),n(e,b,t),n(e,r,t),n(e,g,t),m(U,e,t),n(e,y,t),m(w,e,t),n(e,G,t),n(e,T,t),n(e,$,t),n(e,j,t),n(e,et,t),m(L,e,t),n(e,tt,t),n(e,E,t),n(e,lt,t),n(e,X,t),n(e,nt,t),n(e,B,t),n(e,st,t),m(A,e,t),n(e,at,t),n(e,F,t),n(e,ot,t),m(Y,e,t),n(e,it,t),n(e,H,t),n(e,pt,t),m(S,e,t),n(e,rt,t),n(e,z,t),n(e,ct,t),m(D,e,t),n(e,ut,t),m(Z,e,t),n(e,mt,t),m(q,e,t),n(e,ht,t),n(e,P,t),n(e,Mt,t),n(e,K,t),n(e,ft,t),m(k,e,t),n(e,dt,t),m(O,e,t),n(e,gt,t),m(N,e,t),n(e,yt,t),n(e,ee,t),n(e,Tt,t),n(e,te,t),n(e,$t,t),m(le,e,t),n(e,bt,t),m(ne,e,t),n(e,Jt,t),n(e,se,t),n(e,Ut,t),n(e,ae,t),n(e,wt,t),m(oe,e,t),n(e,Ct,t),n(e,ie,t),n(e,jt,t),m(pe,e,t),n(e,Gt,t),n(e,re,t),n(e,vt,t),m(ce,e,t),n(e,It,t),n(e,ue,t),n(e,Zt,t),m(me,e,t),n(e,kt,t),n(e,he,t),n(e,Nt,t),n(e,Me,t),n(e,xt,t),m(fe,e,t),n(e,Wt,t),n(e,de,t),n(e,_t,t),m(x,e,t),n(e,Qt,t),n(e,ge,t),n(e,Vt,t),n(e,ye,t),n(e,Rt,t),m(Te,e,t),n(e,Lt,t),n(e,$e,t),n(e,Et,t),m(W,e,t),n(e,Xt,t),m(be,e,t),n(e,Bt,t),n(e,Je,t),n(e,At,t),n(e,_,t),R(_,Ue),R(Ue,qe),R(Ue,Ml),m(we,Ue,null),R(_,fl),R(_,Ce),R(Ce,Pe),R(Ce,dl),m(je,Ce,null),n(e,Ft,t),m(Ge,e,t),n(e,Yt,t),n(e,ve,t),n(e,Ht,t),m(Ie,e,t),n(e,St,t),n(e,Ze,t),n(e,zt,t),m(ke,e,t),n(e,Dt,t),n(e,Ne,t),n(e,qt,t),m(xe,e,t),n(e,Pt,t),m(Q,e,t),n(e,Kt,t),m(We,e,t),n(e,Ot,t),n(e,_e,t),n(e,el,t),m(Qe,e,t),n(e,tl,t),n(e,Ve,t),n(e,ll,t),m(Re,e,t),n(e,nl,t),m(Le,e,t),n(e,sl,t),n(e,Ee,t),n(e,al,t),m(Xe,e,t),n(e,ol,t),n(e,Be,t),n(e,il,t),m(Ae,e,t),n(e,pl,t),n(e,rl,t),n(e,cl,t),m(V,e,t),n(e,ul,t),m(Fe,e,t),n(e,ml,t),n(e,Ke,t),hl=!0},p(e,[t]){const Ye={};t&2&&(Ye.$$scope={dirty:t,ctx:e}),Z.$set(Ye);const He={};t&2&&(He.$$scope={dirty:t,ctx:e}),k.$set(He);const Se={};t&2&&(Se.$$scope={dirty:t,ctx:e}),N.$set(Se);const Dl={};t&2&&(Dl.$$scope={dirty:t,ctx:e}),x.$set(Dl);const ql={};t&2&&(ql.$$scope={dirty:t,ctx:e}),W.$set(ql);const Pl={};t&2&&(Pl.$$scope={dirty:t,ctx:e}),Q.$set(Pl);const Kl={};t&2&&(Kl.$$scope={dirty:t,ctx:e}),V.$set(Kl)},i(e){hl||(h(U.$$.fragment,e),h(w.$$.fragment,e),h(L.$$.fragment,e),h(A.$$.fragment,e),h(Y.$$.fragment,e),h(S.$$.fragment,e),h(D.$$.fragment,e),h(Z.$$.fragment,e),h(q.$$.fragment,e),h(k.$$.fragment,e),h(O.$$.fragment,e),h(N.$$.fragment,e),h(le.$$.fragment,e),h(ne.$$.fragment,e),h(oe.$$.fragment,e),h(pe.$$.fragment,e),h(ce.$$.fragment,e),h(me.$$.fragment,e),h(fe.$$.fragment,e),h(x.$$.fragment,e),h(Te.$$.fragment,e),h(W.$$.fragment,e),h(be.$$.fragment,e),h(we.$$.fragment,e),h(je.$$.fragment,e),h(Ge.$$.fragment,e),h(Ie.$$.fragment,e),h(ke.$$.fragment,e),h(xe.$$.fragment,e),h(Q.$$.fragment,e),h(We.$$.fragment,e),h(Qe.$$.fragment,e),h(Re.$$.fragment,e),h(Le.$$.fragment,e),h(Xe.$$.fragment,e),h(Ae.$$.fragment,e),h(V.$$.fragment,e),h(Fe.$$.fragment,e),hl=!0)},o(e){M(U.$$.fragment,e),M(w.$$.fragment,e),M(L.$$.fragment,e),M(A.$$.fragment,e),M(Y.$$.fragment,e),M(S.$$.fragment,e),M(D.$$.fragment,e),M(Z.$$.fragment,e),M(q.$$.fragment,e),M(k.$$.fragment,e),M(O.$$.fragment,e),M(N.$$.fragment,e),M(le.$$.fragment,e),M(ne.$$.fragment,e),M(oe.$$.fragment,e),M(pe.$$.fragment,e),M(ce.$$.fragment,e),M(me.$$.fragment,e),M(fe.$$.fragment,e),M(x.$$.fragment,e),M(Te.$$.fragment,e),M(W.$$.fragment,e),M(be.$$.fragment,e),M(we.$$.fragment,e),M(je.$$.fragment,e),M(Ge.$$.fragment,e),M(Ie.$$.fragment,e),M(ke.$$.fragment,e),M(xe.$$.fragment,e),M(Q.$$.fragment,e),M(We.$$.fragment,e),M(Qe.$$.fragment,e),M(Re.$$.fragment,e),M(Le.$$.fragment,e),M(Xe.$$.fragment,e),M(Ae.$$.fragment,e),M(V.$$.fragment,e),M(Fe.$$.fragment,e),hl=!1},d(e){e&&(l(b),l(r),l(g),l(y),l(G),l(T),l($),l(j),l(et),l(tt),l(E),l(lt),l(X),l(nt),l(B),l(st),l(at),l(F),l(ot),l(it),l(H),l(pt),l(rt),l(z),l(ct),l(ut),l(mt),l(ht),l(P),l(Mt),l(K),l(ft),l(dt),l(gt),l(yt),l(ee),l(Tt),l(te),l($t),l(bt),l(Jt),l(se),l(Ut),l(ae),l(wt),l(Ct),l(ie),l(jt),l(Gt),l(re),l(vt),l(It),l(ue),l(Zt),l(kt),l(he),l(Nt),l(Me),l(xt),l(Wt),l(de),l(_t),l(Qt),l(ge),l(Vt),l(ye),l(Rt),l(Lt),l($e),l(Et),l(Xt),l(Bt),l(Je),l(At),l(_),l(Ft),l(Yt),l(ve),l(Ht),l(St),l(Ze),l(zt),l(Dt),l(Ne),l(qt),l(Pt),l(Kt),l(Ot),l(_e),l(el),l(tl),l(Ve),l(ll),l(nl),l(sl),l(Ee),l(al),l(ol),l(Be),l(il),l(pl),l(rl),l(cl),l(ul),l(ml),l(Ke)),l(o),f(U,e),f(w,e),f(L,e),f(A,e),f(Y,e),f(S,e),f(D,e),f(Z,e),f(q,e),f(k,e),f(O,e),f(N,e),f(le,e),f(ne,e),f(oe,e),f(pe,e),f(ce,e),f(me,e),f(fe,e),f(x,e),f(Te,e),f(W,e),f(be,e),f(we),f(je),f(Ge,e),f(Ie,e),f(ke,e),f(xe,e),f(Q,e),f(We,e),f(Qe,e),f(Re,e),f(Le,e),f(Xe,e),f(Ae,e),f(V,e),f(Fe,e)}}}const dn='{"title":"Deploy Meta Llama 3 8B with TGI DLC on GKE","local":"deploy-meta-llama-3-8b-with-tgi-dlc-on-gke","sections":[{"title":"Setup / Configuration","local":"setup--configuration","sections":[],"depth":2},{"title":"Create GKE Cluster","local":"create-gke-cluster","sections":[],"depth":2},{"title":"Optional: Set Secrets in GKE","local":"optional-set-secrets-in-gke","sections":[],"depth":2},{"title":"Deploy TGI","local":"deploy-tgi","sections":[],"depth":2},{"title":"Inference with TGI","local":"inference-with-tgi","sections":[{"title":"Via cURL","local":"via-curl","sections":[],"depth":3},{"title":"Via Python","local":"via-python","sections":[],"depth":3}],"depth":2},{"title":"Delete GKE Cluster","local":"delete-gke-cluster","sections":[],"depth":2}],"depth":1}';function gn(C){return tn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Un extends ln{constructor(o){super(),nn(this,o,gn,fn,en,{})}}export{Un as component};
