Buckets:

rtrm's picture
download
raw
39.9 kB
import{s as pn,o as rn,n as Pe}from"../chunks/scheduler.b108d059.js";import{S as cn,i as un,g as o,s,r as u,A as mn,h as p,f as l,c as a,j as Oe,u as m,x as c,k as on,y as I,a as n,v as h,d,t as M,w as f}from"../chunks/index.008de539.js";import{T as qe}from"../chunks/Tip.aeb15ab7.js";import{C as g}from"../chunks/CodeBlock.3968c746.js";import{H as b,E as hn}from"../chunks/EditOnGithub.d1c48e3d.js";function dn($){let i,y='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(){i=o("p"),i.innerHTML=y},l(r){i=p(r,"P",{"data-svelte-h":!0}),c(i)!=="svelte-sm1xw4"&&(i.innerHTML=y)},m(r,T){n(r,i,T)},p:Pe,d(r){r&&l(i)}}}function Mn($){let i,y='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(){i=o("p"),i.innerHTML=y},l(r){i=p(r,"P",{"data-svelte-h":!0}),c(i)!=="svelte-1cdm5nv"&&(i.innerHTML=y)},m(r,T){n(r,i,T)},p:Pe,d(r){r&&l(i)}}}function fn($){let i,y="To select the specific version in your location of the GKE Cluster, you can run the following command:";return{c(){i=o("p"),i.textContent=y},l(r){i=p(r,"P",{"data-svelte-h":!0}),c(i)!=="svelte-a3yff9"&&(i.textContent=y)},m(r,T){n(r,i,T)},p:Pe,d(r){r&&l(i)}}}function gn($){let i,y='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(){i=o("p"),i.innerHTML=y},l(r){i=p(r,"P",{"data-svelte-h":!0}),c(i)!=="svelte-1yok7mw"&&(i.innerHTML=y)},m(r,T){n(r,i,T)},p:Pe,d(r){r&&l(i)}}}function yn($){let i,y="The Kubernetes deployment may take a few minutes to be ready, so you can check the status of the deployment with the following command:";return{c(){i=o("p"),i.textContent=y},l(r){i=p(r,"P",{"data-svelte-h":!0}),c(i)!=="svelte-qgh43p"&&(i.textContent=y)},m(r,T){n(r,i,T)},p:Pe,d(r){r&&l(i)}}}function Tn($){let i,y="To generate the <code>inputs</code> with the expected chat template formatting, you could use the following snippet:";return{c(){i=o("p"),i.innerHTML=y},l(r){i=p(r,"P",{"data-svelte-h":!0}),c(i)!=="svelte-mve1xj"&&(i.innerHTML=y)},m(r,T){n(r,i,T)},p:Pe,d(r){r&&l(i)}}}function $n($){let i,y,r,T,Z,et,N,Jl="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.",tt,k,Ul="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.",lt,x,nt,W,wl="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.",st,_,jl='<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>',at,V,Cl="Optionally, to ease the usage of the commands within this tutorial, you need to set the following environment variables for GCP:",it,Q,ot,E,vl="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.",pt,X,rt,L,Gl="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.",ct,R,ut,B,Il="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:",mt,F,ht,J,dt,A,Mt,Y,Zl="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.",ft,H,Nl="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.",gt,U,yt,S,Tt,w,$t,z,bt,D,kl='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>.',Jt,q,xl='<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"/>',Ut,P,Wl="Once the GKE Cluster is created, you can get the credentials to access it via <code>kubectl</code> with the following command:",wt,K,jt,O,Ct,ee,_l='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>.',vt,te,Vl='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:',Gt,le,It,ne,Ql="And then login in with the generated token with read-access over the gated/private model:",Zt,se,Nt,ae,El="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:",kt,ie,xt,oe,Xl="Or, alternatively, you can directly set the token as follows:",Wt,pe,_t,re,Ll='<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"/>',Vt,ce,Rl='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>.',Qt,ue,Et,me,Bl='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.',Xt,j,Lt,he,Fl="The Hugging Face DLC for TGI will be deployed via <code>kubectl</code>, from the configuration files in the <code>config/</code> directory:",Rt,de,Al='<li><p><code>deployment.yaml</code>: 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>.</p></li> <li><p><code>service.yaml</code>: contains the service details of the pod, exposing the port 80 for the TGI service.</p></li> <li><p>(optional) <code>ingress.yaml</code>: contains the ingress details of the pod, exposing the service to the external world so that it can be accessed via the ingress IP.</p></li>',Bt,Me,Ft,fe,Yl='<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"/>',At,C,Yt,ge,Ht,ye,Hl="Alternatively, you can just wait for the deployment to be ready with the following command:",St,Te,zt,$e,Dt,be,Sl="To run the inference over the deployed TGI service, you can either:",qt,v,Je,ze,zl="Port-forwarding the deployed TGI service to the port 8080, so as to access via <code>localhost</code> with the command:",Tl,Ue,$l,we,De,Dl="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:",bl,je,Pt,Ce,Kt,ve,ql="To send a POST request to the TGI service using <code>cURL</code>, you can run the following command:",Ot,Ge,el,Ie,Pl="Or send a POST request to the ingress IP instead:",tl,Ze,ll,Ne,Kl="Which produces the following output:",nl,ke,sl,G,al,xe,il,We,ol,_e,Ol='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:',pl,Ve,rl,Qe,en="Which produces the following output:",cl,Ee,ul,Xe,ml,Le,tn="Finally, once you are done using TGI on the GKE Cluster, you can safely delete the GKE Cluster to avoid incurring in unnecessary costs.",hl,Re,dl,Be,ln="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.",Ml,Fe,fl,Ae,gl,Ke,yl;return Z=new b({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"}}),x=new b({props:{title:"Setup / Configuration",local:"setup--configuration",headingTag:"h2"}}),Q=new g({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}}),X=new g({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}}),R=new g({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}}),F=new g({props:{code:"Z2Nsb3VkJTIwY29tcG9uZW50cyUyMGluc3RhbGwlMjBna2UtZ2Nsb3VkLWF1dGgtcGx1Z2lu",highlighted:"gcloud components install gke-gcloud-auth-plugin",wrap:!1}}),J=new qe({props:{$$slots:{default:[dn]},$$scope:{ctx:$}}}),A=new b({props:{title:"Create GKE Cluster",local:"create-gke-cluster",headingTag:"h2"}}),U=new qe({props:{$$slots:{default:[Mn]},$$scope:{ctx:$}}}),S=new g({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}}),w=new qe({props:{$$slots:{default:[fn]},$$scope:{ctx:$}}}),z=new g({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwZ2V0LXNlcnZlci1jb25maWclMjAlNUMlMEEtLWZsYXR0ZW4lM0QlMjJjaGFubmVscyUyMiUyMCU1QyUwQS0tZmlsdGVyJTNEJTIyY2hhbm5lbHMuY2hhbm5lbCUzRFNUQUJMRSUyMiUyMCU1QyUwQS0tZm9ybWF0JTNEJTIyeWFtbChjaGFubmVscy5jaGFubmVsJTJDY2hhbm5lbHMuZGVmYXVsdFZlcnNpb24pJTIyJTIwJTVDJTBBLS1sb2NhdGlvbiUzRCUyNExPQ0FUSU9O",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}}),K=new g({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}}),O=new b({props:{title:"Optional: Set Secrets in GKE",local:"optional-set-secrets-in-gke",headingTag:"h2"}}),le=new g({props:{code:"cGlwJTIwaW5zdGFsbCUyMC0tdXBncmFkZSUyMC0tcXVpZXQlMjBodWdnaW5nZmFjZV9odWI=",highlighted:"pip install --upgrade --quiet huggingface_hub",wrap:!1}}),se=new g({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}}),ie=new g({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}}),pe=new g({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}}),ue=new b({props:{title:"Deploy TGI",local:"deploy-tgi",headingTag:"h2"}}),j=new qe({props:{$$slots:{default:[gn]},$$scope:{ctx:$}}}),Me=new g({props:{code:"a3ViZWN0bCUyMGFwcGx5JTIwLWYlMjBjb25maWclMkY=",highlighted:"kubectl apply -f config/",wrap:!1}}),C=new qe({props:{$$slots:{default:[yn]},$$scope:{ctx:$}}}),ge=new g({props:{code:"a3ViZWN0bCUyMGdldCUyMHBvZHM=",highlighted:"kubectl get pods",wrap:!1}}),Te=new g({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}}),$e=new b({props:{title:"Inference with TGI",local:"inference-with-tgi",headingTag:"h2"}}),Ue=new g({props:{code:"a3ViZWN0bCUyMHBvcnQtZm9yd2FyZCUyMHNlcnZpY2UlMkZ0Z2ktc2VydmljZSUyMDgwODAlM0E4MDgw",highlighted:"kubectl port-forward service/tgi-service 8080:8080",wrap:!1}}),je=new g({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}}),Ce=new b({props:{title:"Via cURL",local:"via-curl",headingTag:"h3"}}),Ge=new g({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}}),Ze=new g({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}}),ke=new g({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}}),G=new qe({props:{$$slots:{default:[Tn]},$$scope:{ctx:$}}}),xe=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtZXRhLWxsYW1hJTJGTWV0YS1MbGFtYS0zLThCLUluc3RydWN0JTIyKSUwQXRva2VuaXplci5hcHBseV9jaGF0X3RlbXBsYXRlKCUwQSU1QiUwQSU3QiUyMnJvbGUlMjIlM0ElMjAlMjJzeXN0ZW0lMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyWW91JTIwYXJlJTIwYSUyMGhlbHBmdWwlMjBhc3Npc3RhbnQuJTIyJTdEJTJDJTBBJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyV2hhdCUyMGlzJTIwMiUyQjIlM0YlMjIlN0QlMkMlMEElNUQlMkMlMEF0b2tlbml6ZSUzREZhbHNlJTJDJTBBYWRkX2dlbmVyYXRpb25fcHJvbXB0JTNEVHJ1ZSUyQyUwQSk=",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}}),We=new b({props:{title:"Via Python",local:"via-python",headingTag:"h3"}}),Ve=new g({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}}),Ee=new g({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}}),Xe=new b({props:{title:"Delete GKE Cluster",local:"delete-gke-cluster",headingTag:"h2"}}),Re=new g({props:{code:"Z2Nsb3VkJTIwY29udGFpbmVyJTIwY2x1c3RlcnMlMjBkZWxldGUlMjAlMjRDTFVTVEVSX05BTUUlMjAtLWxvY2F0aW9uJTNEJTI0TE9DQVRJT04=",highlighted:'gcloud container clusters delete <span class="hljs-variable">$CLUSTER_NAME</span> --location=<span class="hljs-variable">$LOCATION</span>',wrap:!1}}),Fe=new g({props:{code:"a3ViZWN0bCUyMHNjYWxlJTIwLS1yZXBsaWNhcyUzRDAlMjBkZXBsb3ltZW50JTJGdGdpLWRlcGxveW1lbnQ=",highlighted:"kubectl scale --replicas=0 deployment/tgi-deployment",wrap:!1}}),Ae=new hn({props:{source:"https://github.com/huggingface/Google-Cloud-Containers/blob/main/docs/source/examples/gke-tgi-deployment.mdx"}}),{c(){i=o("meta"),y=s(),r=o("p"),T=s(),u(Z.$$.fragment),et=s(),N=o("p"),N.textContent=Jl,tt=s(),k=o("p"),k.textContent=Ul,lt=s(),u(x.$$.fragment),nt=s(),W=o("p"),W.innerHTML=wl,st=s(),_=o("ul"),_.innerHTML=jl,at=s(),V=o("p"),V.textContent=Cl,it=s(),u(Q.$$.fragment),ot=s(),E=o("p"),E.textContent=vl,pt=s(),u(X.$$.fragment),rt=s(),L=o("p"),L.textContent=Gl,ct=s(),u(R.$$.fragment),ut=s(),B=o("p"),B.innerHTML=Il,mt=s(),u(F.$$.fragment),ht=s(),u(J.$$.fragment),dt=s(),u(A.$$.fragment),Mt=s(),Y=o("p"),Y.textContent=Zl,ft=s(),H=o("p"),H.textContent=Nl,gt=s(),u(U.$$.fragment),yt=s(),u(S.$$.fragment),Tt=s(),u(w.$$.fragment),$t=s(),u(z.$$.fragment),bt=s(),D=o("p"),D.innerHTML=kl,Jt=s(),q=o("p"),q.innerHTML=xl,Ut=s(),P=o("p"),P.innerHTML=Wl,wt=s(),u(K.$$.fragment),jt=s(),u(O.$$.fragment),Ct=s(),ee=o("p"),ee.innerHTML=_l,vt=s(),te=o("p"),te.innerHTML=Vl,Gt=s(),u(le.$$.fragment),It=s(),ne=o("p"),ne.textContent=Ql,Zt=s(),u(se.$$.fragment),Nt=s(),ae=o("p"),ae.innerHTML=El,kt=s(),u(ie.$$.fragment),xt=s(),oe=o("p"),oe.textContent=Xl,Wt=s(),u(pe.$$.fragment),_t=s(),re=o("p"),re.innerHTML=Ll,Vt=s(),ce=o("p"),ce.innerHTML=Rl,Qt=s(),u(ue.$$.fragment),Et=s(),me=o("p"),me.innerHTML=Bl,Xt=s(),u(j.$$.fragment),Lt=s(),he=o("p"),he.innerHTML=Fl,Rt=s(),de=o("ul"),de.innerHTML=Al,Bt=s(),u(Me.$$.fragment),Ft=s(),fe=o("p"),fe.innerHTML=Yl,At=s(),u(C.$$.fragment),Yt=s(),u(ge.$$.fragment),Ht=s(),ye=o("p"),ye.textContent=Hl,St=s(),u(Te.$$.fragment),zt=s(),u($e.$$.fragment),Dt=s(),be=o("p"),be.textContent=Sl,qt=s(),v=o("ul"),Je=o("li"),ze=o("p"),ze.innerHTML=zl,Tl=s(),u(Ue.$$.fragment),$l=s(),we=o("li"),De=o("p"),De.innerHTML=Dl,bl=s(),u(je.$$.fragment),Pt=s(),u(Ce.$$.fragment),Kt=s(),ve=o("p"),ve.innerHTML=ql,Ot=s(),u(Ge.$$.fragment),el=s(),Ie=o("p"),Ie.textContent=Pl,tl=s(),u(Ze.$$.fragment),ll=s(),Ne=o("p"),Ne.textContent=Kl,nl=s(),u(ke.$$.fragment),sl=s(),u(G.$$.fragment),al=s(),u(xe.$$.fragment),il=s(),u(We.$$.fragment),ol=s(),_e=o("p"),_e.innerHTML=Ol,pl=s(),u(Ve.$$.fragment),rl=s(),Qe=o("p"),Qe.textContent=en,cl=s(),u(Ee.$$.fragment),ul=s(),u(Xe.$$.fragment),ml=s(),Le=o("p"),Le.textContent=tn,hl=s(),u(Re.$$.fragment),dl=s(),Be=o("p"),Be.innerHTML=ln,Ml=s(),u(Fe.$$.fragment),fl=s(),u(Ae.$$.fragment),gl=s(),Ke=o("p"),this.h()},l(e){const t=mn("svelte-u9bgzb",document.head);i=p(t,"META",{name:!0,content:!0}),t.forEach(l),y=a(e),r=p(e,"P",{}),Oe(r).forEach(l),T=a(e),m(Z.$$.fragment,e),et=a(e),N=p(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-12hy2a5"&&(N.textContent=Jl),tt=a(e),k=p(e,"P",{"data-svelte-h":!0}),c(k)!=="svelte-8lrikh"&&(k.textContent=Ul),lt=a(e),m(x.$$.fragment,e),nt=a(e),W=p(e,"P",{"data-svelte-h":!0}),c(W)!=="svelte-1qnmo38"&&(W.innerHTML=wl),st=a(e),_=p(e,"UL",{"data-svelte-h":!0}),c(_)!=="svelte-a8ymuw"&&(_.innerHTML=jl),at=a(e),V=p(e,"P",{"data-svelte-h":!0}),c(V)!=="svelte-1i8n6rq"&&(V.textContent=Cl),it=a(e),m(Q.$$.fragment,e),ot=a(e),E=p(e,"P",{"data-svelte-h":!0}),c(E)!=="svelte-1g39t6p"&&(E.textContent=vl),pt=a(e),m(X.$$.fragment,e),rt=a(e),L=p(e,"P",{"data-svelte-h":!0}),c(L)!=="svelte-1c0v0sp"&&(L.textContent=Gl),ct=a(e),m(R.$$.fragment,e),ut=a(e),B=p(e,"P",{"data-svelte-h":!0}),c(B)!=="svelte-wjaltb"&&(B.innerHTML=Il),mt=a(e),m(F.$$.fragment,e),ht=a(e),m(J.$$.fragment,e),dt=a(e),m(A.$$.fragment,e),Mt=a(e),Y=p(e,"P",{"data-svelte-h":!0}),c(Y)!=="svelte-lja57p"&&(Y.textContent=Zl),ft=a(e),H=p(e,"P",{"data-svelte-h":!0}),c(H)!=="svelte-l7bdz6"&&(H.textContent=Nl),gt=a(e),m(U.$$.fragment,e),yt=a(e),m(S.$$.fragment,e),Tt=a(e),m(w.$$.fragment,e),$t=a(e),m(z.$$.fragment,e),bt=a(e),D=p(e,"P",{"data-svelte-h":!0}),c(D)!=="svelte-1y4gd42"&&(D.innerHTML=kl),Jt=a(e),q=p(e,"P",{"data-svelte-h":!0}),c(q)!=="svelte-9abtu9"&&(q.innerHTML=xl),Ut=a(e),P=p(e,"P",{"data-svelte-h":!0}),c(P)!=="svelte-f29e6h"&&(P.innerHTML=Wl),wt=a(e),m(K.$$.fragment,e),jt=a(e),m(O.$$.fragment,e),Ct=a(e),ee=p(e,"P",{"data-svelte-h":!0}),c(ee)!=="svelte-ghu0vo"&&(ee.innerHTML=_l),vt=a(e),te=p(e,"P",{"data-svelte-h":!0}),c(te)!=="svelte-zags7d"&&(te.innerHTML=Vl),Gt=a(e),m(le.$$.fragment,e),It=a(e),ne=p(e,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-4hmhsl"&&(ne.textContent=Ql),Zt=a(e),m(se.$$.fragment,e),Nt=a(e),ae=p(e,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-cqv9s0"&&(ae.innerHTML=El),kt=a(e),m(ie.$$.fragment,e),xt=a(e),oe=p(e,"P",{"data-svelte-h":!0}),c(oe)!=="svelte-o99xdc"&&(oe.textContent=Xl),Wt=a(e),m(pe.$$.fragment,e),_t=a(e),re=p(e,"P",{"data-svelte-h":!0}),c(re)!=="svelte-1r3cmnu"&&(re.innerHTML=Ll),Vt=a(e),ce=p(e,"P",{"data-svelte-h":!0}),c(ce)!=="svelte-1dqrub5"&&(ce.innerHTML=Rl),Qt=a(e),m(ue.$$.fragment,e),Et=a(e),me=p(e,"P",{"data-svelte-h":!0}),c(me)!=="svelte-kglcl8"&&(me.innerHTML=Bl),Xt=a(e),m(j.$$.fragment,e),Lt=a(e),he=p(e,"P",{"data-svelte-h":!0}),c(he)!=="svelte-1a7ij1s"&&(he.innerHTML=Fl),Rt=a(e),de=p(e,"UL",{"data-svelte-h":!0}),c(de)!=="svelte-1qj2dty"&&(de.innerHTML=Al),Bt=a(e),m(Me.$$.fragment,e),Ft=a(e),fe=p(e,"P",{"data-svelte-h":!0}),c(fe)!=="svelte-12mubun"&&(fe.innerHTML=Yl),At=a(e),m(C.$$.fragment,e),Yt=a(e),m(ge.$$.fragment,e),Ht=a(e),ye=p(e,"P",{"data-svelte-h":!0}),c(ye)!=="svelte-16v3quh"&&(ye.textContent=Hl),St=a(e),m(Te.$$.fragment,e),zt=a(e),m($e.$$.fragment,e),Dt=a(e),be=p(e,"P",{"data-svelte-h":!0}),c(be)!=="svelte-1wzt8py"&&(be.textContent=Sl),qt=a(e),v=p(e,"UL",{});var Ye=Oe(v);Je=p(Ye,"LI",{});var He=Oe(Je);ze=p(He,"P",{"data-svelte-h":!0}),c(ze)!=="svelte-k3movz"&&(ze.innerHTML=zl),Tl=a(He),m(Ue.$$.fragment,He),He.forEach(l),$l=a(Ye),we=p(Ye,"LI",{});var Se=Oe(we);De=p(Se,"P",{"data-svelte-h":!0}),c(De)!=="svelte-1uskw9x"&&(De.innerHTML=Dl),bl=a(Se),m(je.$$.fragment,Se),Se.forEach(l),Ye.forEach(l),Pt=a(e),m(Ce.$$.fragment,e),Kt=a(e),ve=p(e,"P",{"data-svelte-h":!0}),c(ve)!=="svelte-1ks8djk"&&(ve.innerHTML=ql),Ot=a(e),m(Ge.$$.fragment,e),el=a(e),Ie=p(e,"P",{"data-svelte-h":!0}),c(Ie)!=="svelte-1u6gmmt"&&(Ie.textContent=Pl),tl=a(e),m(Ze.$$.fragment,e),ll=a(e),Ne=p(e,"P",{"data-svelte-h":!0}),c(Ne)!=="svelte-ddr8r5"&&(Ne.textContent=Kl),nl=a(e),m(ke.$$.fragment,e),sl=a(e),m(G.$$.fragment,e),al=a(e),m(xe.$$.fragment,e),il=a(e),m(We.$$.fragment,e),ol=a(e),_e=p(e,"P",{"data-svelte-h":!0}),c(_e)!=="svelte-w0229l"&&(_e.innerHTML=Ol),pl=a(e),m(Ve.$$.fragment,e),rl=a(e),Qe=p(e,"P",{"data-svelte-h":!0}),c(Qe)!=="svelte-ddr8r5"&&(Qe.textContent=en),cl=a(e),m(Ee.$$.fragment,e),ul=a(e),m(Xe.$$.fragment,e),ml=a(e),Le=p(e,"P",{"data-svelte-h":!0}),c(Le)!=="svelte-1laf0m8"&&(Le.textContent=tn),hl=a(e),m(Re.$$.fragment,e),dl=a(e),Be=p(e,"P",{"data-svelte-h":!0}),c(Be)!=="svelte-qo8r7n"&&(Be.innerHTML=ln),Ml=a(e),m(Fe.$$.fragment,e),fl=a(e),m(Ae.$$.fragment,e),gl=a(e),Ke=p(e,"P",{}),Oe(Ke).forEach(l),this.h()},h(){on(i,"name","hf:doc:metadata"),on(i,"content",bn)},m(e,t){I(document.head,i),n(e,y,t),n(e,r,t),n(e,T,t),h(Z,e,t),n(e,et,t),n(e,N,t),n(e,tt,t),n(e,k,t),n(e,lt,t),h(x,e,t),n(e,nt,t),n(e,W,t),n(e,st,t),n(e,_,t),n(e,at,t),n(e,V,t),n(e,it,t),h(Q,e,t),n(e,ot,t),n(e,E,t),n(e,pt,t),h(X,e,t),n(e,rt,t),n(e,L,t),n(e,ct,t),h(R,e,t),n(e,ut,t),n(e,B,t),n(e,mt,t),h(F,e,t),n(e,ht,t),h(J,e,t),n(e,dt,t),h(A,e,t),n(e,Mt,t),n(e,Y,t),n(e,ft,t),n(e,H,t),n(e,gt,t),h(U,e,t),n(e,yt,t),h(S,e,t),n(e,Tt,t),h(w,e,t),n(e,$t,t),h(z,e,t),n(e,bt,t),n(e,D,t),n(e,Jt,t),n(e,q,t),n(e,Ut,t),n(e,P,t),n(e,wt,t),h(K,e,t),n(e,jt,t),h(O,e,t),n(e,Ct,t),n(e,ee,t),n(e,vt,t),n(e,te,t),n(e,Gt,t),h(le,e,t),n(e,It,t),n(e,ne,t),n(e,Zt,t),h(se,e,t),n(e,Nt,t),n(e,ae,t),n(e,kt,t),h(ie,e,t),n(e,xt,t),n(e,oe,t),n(e,Wt,t),h(pe,e,t),n(e,_t,t),n(e,re,t),n(e,Vt,t),n(e,ce,t),n(e,Qt,t),h(ue,e,t),n(e,Et,t),n(e,me,t),n(e,Xt,t),h(j,e,t),n(e,Lt,t),n(e,he,t),n(e,Rt,t),n(e,de,t),n(e,Bt,t),h(Me,e,t),n(e,Ft,t),n(e,fe,t),n(e,At,t),h(C,e,t),n(e,Yt,t),h(ge,e,t),n(e,Ht,t),n(e,ye,t),n(e,St,t),h(Te,e,t),n(e,zt,t),h($e,e,t),n(e,Dt,t),n(e,be,t),n(e,qt,t),n(e,v,t),I(v,Je),I(Je,ze),I(Je,Tl),h(Ue,Je,null),I(v,$l),I(v,we),I(we,De),I(we,bl),h(je,we,null),n(e,Pt,t),h(Ce,e,t),n(e,Kt,t),n(e,ve,t),n(e,Ot,t),h(Ge,e,t),n(e,el,t),n(e,Ie,t),n(e,tl,t),h(Ze,e,t),n(e,ll,t),n(e,Ne,t),n(e,nl,t),h(ke,e,t),n(e,sl,t),h(G,e,t),n(e,al,t),h(xe,e,t),n(e,il,t),h(We,e,t),n(e,ol,t),n(e,_e,t),n(e,pl,t),h(Ve,e,t),n(e,rl,t),n(e,Qe,t),n(e,cl,t),h(Ee,e,t),n(e,ul,t),h(Xe,e,t),n(e,ml,t),n(e,Le,t),n(e,hl,t),h(Re,e,t),n(e,dl,t),n(e,Be,t),n(e,Ml,t),h(Fe,e,t),n(e,fl,t),h(Ae,e,t),n(e,gl,t),n(e,Ke,t),yl=!0},p(e,[t]){const Ye={};t&2&&(Ye.$$scope={dirty:t,ctx:e}),J.$set(Ye);const He={};t&2&&(He.$$scope={dirty:t,ctx:e}),U.$set(He);const Se={};t&2&&(Se.$$scope={dirty:t,ctx:e}),w.$set(Se);const nn={};t&2&&(nn.$$scope={dirty:t,ctx:e}),j.$set(nn);const sn={};t&2&&(sn.$$scope={dirty:t,ctx:e}),C.$set(sn);const an={};t&2&&(an.$$scope={dirty:t,ctx:e}),G.$set(an)},i(e){yl||(d(Z.$$.fragment,e),d(x.$$.fragment,e),d(Q.$$.fragment,e),d(X.$$.fragment,e),d(R.$$.fragment,e),d(F.$$.fragment,e),d(J.$$.fragment,e),d(A.$$.fragment,e),d(U.$$.fragment,e),d(S.$$.fragment,e),d(w.$$.fragment,e),d(z.$$.fragment,e),d(K.$$.fragment,e),d(O.$$.fragment,e),d(le.$$.fragment,e),d(se.$$.fragment,e),d(ie.$$.fragment,e),d(pe.$$.fragment,e),d(ue.$$.fragment,e),d(j.$$.fragment,e),d(Me.$$.fragment,e),d(C.$$.fragment,e),d(ge.$$.fragment,e),d(Te.$$.fragment,e),d($e.$$.fragment,e),d(Ue.$$.fragment,e),d(je.$$.fragment,e),d(Ce.$$.fragment,e),d(Ge.$$.fragment,e),d(Ze.$$.fragment,e),d(ke.$$.fragment,e),d(G.$$.fragment,e),d(xe.$$.fragment,e),d(We.$$.fragment,e),d(Ve.$$.fragment,e),d(Ee.$$.fragment,e),d(Xe.$$.fragment,e),d(Re.$$.fragment,e),d(Fe.$$.fragment,e),d(Ae.$$.fragment,e),yl=!0)},o(e){M(Z.$$.fragment,e),M(x.$$.fragment,e),M(Q.$$.fragment,e),M(X.$$.fragment,e),M(R.$$.fragment,e),M(F.$$.fragment,e),M(J.$$.fragment,e),M(A.$$.fragment,e),M(U.$$.fragment,e),M(S.$$.fragment,e),M(w.$$.fragment,e),M(z.$$.fragment,e),M(K.$$.fragment,e),M(O.$$.fragment,e),M(le.$$.fragment,e),M(se.$$.fragment,e),M(ie.$$.fragment,e),M(pe.$$.fragment,e),M(ue.$$.fragment,e),M(j.$$.fragment,e),M(Me.$$.fragment,e),M(C.$$.fragment,e),M(ge.$$.fragment,e),M(Te.$$.fragment,e),M($e.$$.fragment,e),M(Ue.$$.fragment,e),M(je.$$.fragment,e),M(Ce.$$.fragment,e),M(Ge.$$.fragment,e),M(Ze.$$.fragment,e),M(ke.$$.fragment,e),M(G.$$.fragment,e),M(xe.$$.fragment,e),M(We.$$.fragment,e),M(Ve.$$.fragment,e),M(Ee.$$.fragment,e),M(Xe.$$.fragment,e),M(Re.$$.fragment,e),M(Fe.$$.fragment,e),M(Ae.$$.fragment,e),yl=!1},d(e){e&&(l(y),l(r),l(T),l(et),l(N),l(tt),l(k),l(lt),l(nt),l(W),l(st),l(_),l(at),l(V),l(it),l(ot),l(E),l(pt),l(rt),l(L),l(ct),l(ut),l(B),l(mt),l(ht),l(dt),l(Mt),l(Y),l(ft),l(H),l(gt),l(yt),l(Tt),l($t),l(bt),l(D),l(Jt),l(q),l(Ut),l(P),l(wt),l(jt),l(Ct),l(ee),l(vt),l(te),l(Gt),l(It),l(ne),l(Zt),l(Nt),l(ae),l(kt),l(xt),l(oe),l(Wt),l(_t),l(re),l(Vt),l(ce),l(Qt),l(Et),l(me),l(Xt),l(Lt),l(he),l(Rt),l(de),l(Bt),l(Ft),l(fe),l(At),l(Yt),l(Ht),l(ye),l(St),l(zt),l(Dt),l(be),l(qt),l(v),l(Pt),l(Kt),l(ve),l(Ot),l(el),l(Ie),l(tl),l(ll),l(Ne),l(nl),l(sl),l(al),l(il),l(ol),l(_e),l(pl),l(rl),l(Qe),l(cl),l(ul),l(ml),l(Le),l(hl),l(dl),l(Be),l(Ml),l(fl),l(gl),l(Ke)),l(i),f(Z,e),f(x,e),f(Q,e),f(X,e),f(R,e),f(F,e),f(J,e),f(A,e),f(U,e),f(S,e),f(w,e),f(z,e),f(K,e),f(O,e),f(le,e),f(se,e),f(ie,e),f(pe,e),f(ue,e),f(j,e),f(Me,e),f(C,e),f(ge,e),f(Te,e),f($e,e),f(Ue),f(je),f(Ce,e),f(Ge,e),f(Ze,e),f(ke,e),f(G,e),f(xe,e),f(We,e),f(Ve,e),f(Ee,e),f(Xe,e),f(Re,e),f(Fe,e),f(Ae,e)}}}const bn='{"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 Jn($){return rn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gn extends cn{constructor(i){super(),un(this,i,Jn,$n,pn,{})}}export{Gn as component};

Xet Storage Details

Size:
39.9 kB
·
Xet hash:
edadf04181508d01080425e1433d84d4971809ccc9b3cddd8642973da32d6b19

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.