import{s as Oe,n as ta,o as ea}from"../chunks/scheduler.9cda857a.js";import{S as aa,i as la,e as i,s,c as o,h as sa,a as d,d as a,b as n,f as Ke,g as p,j as r,k as gt,l as na,m as l,n as u,t as m,o as c,p as f}from"../chunks/index.f47f3121.js";import{C as ia}from"../chunks/CopyLLMTxtMenu.676ed699.js";import{C as ht}from"../chunks/CodeBlock.24d62f98.js";import{H as g,E as da}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.64d112fc.js";function ra(we){let h,vt,$t,wt,T,bt,x,Tt,U,be="You can upgrade your Space to use a GPU accelerator using the <em>Settings</em> button in the top navigation bar of the Space. You can even request a free upgrade if you are building a cool demo for a side project!",xt,$,Te='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-gpu-settings.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-gpu-settings-dark.png"/>',Ut,y,xe="<p>Longer-term, we would also like to expose non-GPU hardware, like HPU, IPU or TPU. If you have a specific AI hardware you’d like to run on, please let us know (website at huggingface.co).</p>",Ct,C,Ue="As soon as your Space is running on GPU you can see which hardware it’s running on directly from this badge:",Mt,v,Ce='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-running-badge.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-running-badge-dark.png"/>',Gt,M,Pt,G,Me="In the following tables, you can see the Specs for the different upgrade options.",kt,P,jt,k,Ge="<thead><tr><th><strong>Hardware</strong></th> <th><strong>CPU</strong></th> <th><strong>Memory</strong></th> <th><strong>GPU Memory</strong></th> <th><strong>Disk</strong></th> <th><strong>Hourly Price</strong></th></tr></thead> <tbody><tr><td>CPU Basic</td> <td>2 vCPU</td> <td>16 GB</td> <td>-</td> <td>50 GB</td> <td>Free!</td></tr> <tr><td>CPU Upgrade</td> <td>8 vCPU</td> <td>32 GB</td> <td>-</td> <td>50 GB</td> <td>$0.03</td></tr></tbody>",Bt,j,St,B,Pe="<thead><tr><th><strong>Hardware</strong></th> <th><strong>CPU</strong></th> <th><strong>Memory</strong></th> <th><strong>GPU Memory</strong></th> <th><strong>Disk</strong></th> <th><strong>Hourly Price</strong></th></tr></thead> <tbody><tr><td>Nvidia T4 - small</td> <td>4 vCPU</td> <td>15 GB</td> <td>16 GB</td> <td>50 GB</td> <td>$0.40</td></tr> <tr><td>Nvidia T4 - medium</td> <td>8 vCPU</td> <td>30 GB</td> <td>16 GB</td> <td>100 GB</td> <td>$0.60</td></tr> <tr><td>1x Nvidia L4</td> <td>8 vCPU</td> <td>30 GB</td> <td>24 GB</td> <td>400 GB</td> <td>$0.80</td></tr> <tr><td>4x Nvidia L4</td> <td>48 vCPU</td> <td>186 GB</td> <td>96 GB</td> <td>3200 GB</td> <td>$3.80</td></tr> <tr><td>1x Nvidia L40S</td> <td>8 vCPU</td> <td>62 GB</td> <td>48 GB</td> <td>380 GB</td> <td>$1.80</td></tr> <tr><td>4x Nvidia L40S</td> <td>48 vCPU</td> <td>382 GB</td> <td>192 GB</td> <td>3200 GB</td> <td>$8.30</td></tr> <tr><td>8x Nvidia L40S</td> <td>192 vCPU</td> <td>1534 GB</td> <td>384 GB</td> <td>6500 GB</td> <td>$23.50</td></tr> <tr><td>Nvidia A10G - small</td> <td>4 vCPU</td> <td>14 GB</td> <td>24 GB</td> <td>110 GB</td> <td>$1.00</td></tr> <tr><td>Nvidia A10G - large</td> <td>12 vCPU</td> <td>46 GB</td> <td>24 GB</td> <td>200 GB</td> <td>$1.50</td></tr> <tr><td>2x Nvidia A10G - large</td> <td>24 vCPU</td> <td>92 GB</td> <td>48 GB</td> <td>1000 GB</td> <td>$3.00</td></tr> <tr><td>4x Nvidia A10G - large</td> <td>48 vCPU</td> <td>184 GB</td> <td>96 GB</td> <td>2000 GB</td> <td>$5.00</td></tr> <tr><td>Nvidia A100 - large</td> <td>12 vCPU</td> <td>142 GB</td> <td>80 GB</td> <td>1000 GB</td> <td>$2.50</td></tr> <tr><td>Nvidia H100</td> <td>23 vCPU</td> <td>240 GB</td> <td>80 GB</td> <td>3000 GB</td> <td>$4.50</td></tr> <tr><td>8x Nvidia H100</td> <td>184 vCPU</td> <td>1920 GB</td> <td>640 GB</td> <td>24 TB</td> <td>$36.00</td></tr></tbody>",_t,S,Ht,_,ke=`You can programmatically configure your Space hardware using <code>huggingface_hub</code>. This allows for a wide range of use cases where you need to dynamically assign GPUs.
Check out <a href="https://huggingface.co/docs/huggingface_hub/main/en/guides/manage_spaces" rel="nofollow">this guide</a> for more details.`,Jt,H,Lt,J,je="Most Spaces should run out of the box after a GPU upgrade, but sometimes you’ll need to install CUDA versions of the machine learning frameworks you use. Please, follow this guide to ensure your Space takes advantage of the improved hardware.",Yt,L,Zt,Y,Be="You’ll need to install a version of PyTorch compatible with the built-in CUDA drivers. Adding the following two lines to your <code>requirements.txt</code> file should work:",Nt,Z,At,N,Se="You can verify whether the installation was successful by running the following code in your <code>app.py</code> and checking the output in your Space logs:",Et,A,It,E,_e="Many frameworks automatically use the GPU if one is available. This is the case for the Pipelines in 🤗 <code>transformers</code>, <code>fastai</code> and many others. In other cases, or if you use PyTorch directly, you may need to move your models and data to the GPU to ensure computation is done on the accelerator and not on the CPU. You can use PyTorch’s <code>.to()</code> syntax, for example:",Rt,I,Wt,R,Vt,W,He="If you use JAX, you need to specify the URL that contains CUDA compatible packages. Please, add the following lines to your <code>requirements.txt</code> file:",Xt,V,qt,X,Je="After that, you can verify the installation by printing the output from the following code and checking it in your Space logs.",Ft,q,zt,F,Qt,z,Le="The default <code>tensorflow</code> installation should recognize the CUDA device. Just add <code>tensorflow</code> to your <code>requirements.txt</code> file and use the following code in your <code>app.py</code> to verify in your Space logs.",Dt,Q,Kt,D,Ot,K,Ye=`Billing on Spaces is based on hardware usage and is computed by the minute: you get charged for every minute the Space runs on the requested hardware,
regardless of whether the Space is used.`,te,O,Ze="During a Space’s lifecycle, it is only billed when the Space is actually <code>Running</code>. This means that there is no cost during build or startup.",ee,tt,Ne="If a running Space starts to fail, it will be automatically suspended and the billing will stop.",ae,et,Ae='Spaces running on free hardware are suspended automatically if they are not used for an extended period of time (e.g. two days). Upgraded Spaces run indefinitely by default, even if there is no usage. You can change this behavior by <a href="#sleep-time">setting a custom “sleep time”</a> in the Space’s settings. To interrupt the billing on your Space, you can change the Hardware to CPU basic, or <a href="#pause">pause</a> it.',le,at,Ee='Additional information about billing can be found in the <a href="./billing">dedicated Hub-wide section</a>.',se,lt,ne,st,Ie="Do you have an awesome Space but need help covering the GPU hardware upgrade costs? We love helping out those with an innovative Space so please feel free to apply for a community GPU grant and see if yours makes the cut! This application can be found in your Space hardware repo settings in the lower left corner under “sleep time settings”:",ie,nt,Re='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/ask-for-community-grant.png" alt="Community GPU Grant"/>',de,it,re,dt,We="If your Space runs on the default <code>cpu-basic</code> hardware, it will go to sleep if inactive for more than a set time (currently, 48 hours). Anyone visiting your Space will restart it automatically.",oe,rt,Ve="If you want your Space never to deactivate or if you want to set a custom sleep time, you need to upgrade to paid hardware.",pe,ot,Xe="By default, an upgraded Space will never go to sleep. However, you can use this setting for your upgraded Space to become idle (<code>stopped</code> stage) when it’s unused 😴. You are not going to be charged for the upgraded hardware while it is asleep. The Space will ‘wake up’ or get restarted once it receives a new visitor.",ue,pt,qe="The following interface will then be available in your Spaces hardware settings:",me,w,Fe='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-sleep-time.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-sleep-time-dark.png"/>',ce,ut,ze="The following options are available:",fe,b,Qe='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-sleep-time-options.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-sleep-time-options-dark.png"/>',ge,mt,he,ct,De="You can <code>pause</code> a Space from the repo settings. A “paused” Space means that the Space is on hold and will not use resources until manually restarted, and only the owner of a paused Space can restart it. Paused time is not billed.",$e,ft,ye,yt,ve;return T=new ia({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),x=new g({props:{title:"Using GPU Spaces",local:"using-gpu-spaces",headingTag:"h1"}}),M=new g({props:{title:"Hardware Specs",local:"hardware-specs",headingTag:"h2"}}),P=new g({props:{title:"CPU",local:"cpu",headingTag:"h3"}}),j=new g({props:{title:"GPU",local:"gpu",headingTag:"h3"}}),S=new g({props:{title:"Configure hardware programmatically",local:"configure-hardware-programmatically",headingTag:"h2"}}),H=new g({props:{title:"Framework specific requirements",local:"frameworks",headingTag:"h2"}}),L=new g({props:{title:"PyTorch",local:"pytorch",headingTag:"h3"}}),Z=new ht({props:{code:"LS1leHRyYS1pbmRleC11cmwlMjBodHRwcyUzQSUyRiUyRmRvd25sb2FkLnB5dG9yY2gub3JnJTJGd2hsJTJGY3UxMTMlMEF0b3JjaA==",highlighted:`--extra-index-url https:<span class="hljs-regexp">//</span>download.pytorch.org<span class="hljs-regexp">/whl/</span>cu113
torch`,wrap:!1}}),A=new ht({props:{code:"aW1wb3J0JTIwdG9yY2glMEFwcmludChmJTIySXMlMjBDVURBJTIwYXZhaWxhYmxlJTNBJTIwJTdCdG9yY2guY3VkYS5pc19hdmFpbGFibGUoKSU3RCUyMiklMEElMjMlMjBUcnVlJTBBcHJpbnQoZiUyMkNVREElMjBkZXZpY2UlM0ElMjAlN0J0b3JjaC5jdWRhLmdldF9kZXZpY2VfbmFtZSh0b3JjaC5jdWRhLmN1cnJlbnRfZGV2aWNlKCkpJTdEJTIyKSUwQSUyMyUyMFRlc2xhJTIwVDQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Is CUDA available: <span class="hljs-subst">{torch.cuda.is_available()}</span>&quot;</span>)
<span class="hljs-comment"># True</span>
<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;CUDA device: <span class="hljs-subst">{torch.cuda.get_device_name(torch.cuda.current_device())}</span>&quot;</span>)
<span class="hljs-comment"># Tesla T4</span>`,wrap:!1}}),I=new ht({props:{code:"bW9kZWwlMjAlM0QlMjBsb2FkX3B5dG9yY2hfbW9kZWwoKSUwQW1vZGVsJTIwJTNEJTIwbW9kZWwudG8oJTIyY3VkYSUyMik=",highlighted:`model = load_pytorch_model()
model = model.to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),R=new g({props:{title:"JAX",local:"jax",headingTag:"h3"}}),V=new ht({props:{code:"LWYlMjBodHRwcyUzQSUyRiUyRnN0b3JhZ2UuZ29vZ2xlYXBpcy5jb20lMkZqYXgtcmVsZWFzZXMlMkZqYXhfY3VkYV9yZWxlYXNlcy5odG1sJTBBamF4JTVCY3VkYTExX3BpcCU1RCUwQWpheGxpYg==",highlighted:`-f https:<span class="hljs-regexp">//</span>storage.googleapis.com<span class="hljs-regexp">/jax-releases/</span>jax_cuda_releases.html
jax[cuda11_pip]
jaxlib`,wrap:!1}}),q=new ht({props:{code:"aW1wb3J0JTIwamF4JTBBJTBBcHJpbnQoZiUyMkpBWCUyMGRldmljZXMlM0ElMjAlN0JqYXguZGV2aWNlcygpJTdEJTIyKSUwQSUyMyUyMEpBWCUyMGRldmljZXMlM0ElMjAlNUJTdHJlYW1FeGVjdXRvckdwdURldmljZShpZCUzRDAlMkMlMjBwcm9jZXNzX2luZGV4JTNEMCklNUQlMEFwcmludChmJTIySkFYJTIwZGV2aWNlJTIwdHlwZSUzQSUyMCU3QmpheC5kZXZpY2VzKCklNUIwJTVELmRldmljZV9raW5kJTdEJTIyKSUwQSUyMyUyMEpBWCUyMGRldmljZSUyMHR5cGUlM0ElMjBUZXNsYSUyMFQ0",highlighted:`<span class="hljs-keyword">import</span> jax

<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;JAX devices: <span class="hljs-subst">{jax.devices()}</span>&quot;</span>)
<span class="hljs-comment"># JAX devices: [StreamExecutorGpuDevice(id=0, process_index=0)]</span>
<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;JAX device type: <span class="hljs-subst">{jax.devices()[<span class="hljs-number">0</span>].device_kind}</span>&quot;</span>)
<span class="hljs-comment"># JAX device type: Tesla T4</span>`,wrap:!1}}),F=new g({props:{title:"Tensorflow",local:"tensorflow",headingTag:"h3"}}),Q=new ht({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFwcmludCh0Zi5jb25maWcubGlzdF9waHlzaWNhbF9kZXZpY2VzKCdHUFUnKSklMEElMjMlMjAlNUJQaHlzaWNhbERldmljZShuYW1lJTNEJyUyRnBoeXNpY2FsX2RldmljZSUzQUdQVSUzQTAnJTJDJTIwZGV2aWNlX3R5cGUlM0QnR1BVJyklNUQ=",highlighted:`<span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-built_in">print</span>(tf.config.list_physical_devices(<span class="hljs-string">&#x27;GPU&#x27;</span>))
<span class="hljs-comment"># [PhysicalDevice(name=&#x27;/physical_device:GPU:0&#x27;, device_type=&#x27;GPU&#x27;)]</span>`,wrap:!1}}),D=new g({props:{title:"Billing",local:"billing",headingTag:"h2"}}),lt=new g({props:{title:"Community GPU Grants",local:"community-gpu-grants",headingTag:"h3"}}),it=new g({props:{title:"Set a custom sleep time",local:"sleep-time",headingTag:"h2"}}),mt=new g({props:{title:"Pausing a Space",local:"pause",headingTag:"h2"}}),ft=new da({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/spaces-gpus.md"}}),{c(){h=i("meta"),vt=s(),$t=i("p"),wt=s(),o(T.$$.fragment),bt=s(),o(x.$$.fragment),Tt=s(),U=i("p"),U.innerHTML=be,xt=s(),$=i("div"),$.innerHTML=Te,Ut=s(),y=i("blockquote"),y.innerHTML=xe,Ct=s(),C=i("p"),C.textContent=Ue,Mt=s(),v=i("div"),v.innerHTML=Ce,Gt=s(),o(M.$$.fragment),Pt=s(),G=i("p"),G.textContent=Me,kt=s(),o(P.$$.fragment),jt=s(),k=i("table"),k.innerHTML=Ge,Bt=s(),o(j.$$.fragment),St=s(),B=i("table"),B.innerHTML=Pe,_t=s(),o(S.$$.fragment),Ht=s(),_=i("p"),_.innerHTML=ke,Jt=s(),o(H.$$.fragment),Lt=s(),J=i("p"),J.textContent=je,Yt=s(),o(L.$$.fragment),Zt=s(),Y=i("p"),Y.innerHTML=Be,Nt=s(),o(Z.$$.fragment),At=s(),N=i("p"),N.innerHTML=Se,Et=s(),o(A.$$.fragment),It=s(),E=i("p"),E.innerHTML=_e,Rt=s(),o(I.$$.fragment),Wt=s(),o(R.$$.fragment),Vt=s(),W=i("p"),W.innerHTML=He,Xt=s(),o(V.$$.fragment),qt=s(),X=i("p"),X.textContent=Je,Ft=s(),o(q.$$.fragment),zt=s(),o(F.$$.fragment),Qt=s(),z=i("p"),z.innerHTML=Le,Dt=s(),o(Q.$$.fragment),Kt=s(),o(D.$$.fragment),Ot=s(),K=i("p"),K.textContent=Ye,te=s(),O=i("p"),O.innerHTML=Ze,ee=s(),tt=i("p"),tt.textContent=Ne,ae=s(),et=i("p"),et.innerHTML=Ae,le=s(),at=i("p"),at.innerHTML=Ee,se=s(),o(lt.$$.fragment),ne=s(),st=i("p"),st.textContent=Ie,ie=s(),nt=i("p"),nt.innerHTML=Re,de=s(),o(it.$$.fragment),re=s(),dt=i("p"),dt.innerHTML=We,oe=s(),rt=i("p"),rt.textContent=Ve,pe=s(),ot=i("p"),ot.innerHTML=Xe,ue=s(),pt=i("p"),pt.textContent=qe,me=s(),w=i("div"),w.innerHTML=Fe,ce=s(),ut=i("p"),ut.textContent=ze,fe=s(),b=i("div"),b.innerHTML=Qe,ge=s(),o(mt.$$.fragment),he=s(),ct=i("p"),ct.innerHTML=De,$e=s(),o(ft.$$.fragment),ye=s(),yt=i("p"),this.h()},l(t){const e=sa("svelte-u9bgzb",document.head);h=d(e,"META",{name:!0,content:!0}),e.forEach(a),vt=n(t),$t=d(t,"P",{}),Ke($t).forEach(a),wt=n(t),p(T.$$.fragment,t),bt=n(t),p(x.$$.fragment,t),Tt=n(t),U=d(t,"P",{"data-svelte-h":!0}),r(U)!=="svelte-1r0b8ra"&&(U.innerHTML=be),xt=n(t),$=d(t,"DIV",{class:!0,"data-svelte-h":!0}),r($)!=="svelte-195xp0n"&&($.innerHTML=Te),Ut=n(t),y=d(t,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),r(y)!=="svelte-1lwmj2x"&&(y.innerHTML=xe),Ct=n(t),C=d(t,"P",{"data-svelte-h":!0}),r(C)!=="svelte-xvc6ld"&&(C.textContent=Ue),Mt=n(t),v=d(t,"DIV",{class:!0,"data-svelte-h":!0}),r(v)!=="svelte-1a8modj"&&(v.innerHTML=Ce),Gt=n(t),p(M.$$.fragment,t),Pt=n(t),G=d(t,"P",{"data-svelte-h":!0}),r(G)!=="svelte-8bcu8s"&&(G.textContent=Me),kt=n(t),p(P.$$.fragment,t),jt=n(t),k=d(t,"TABLE",{"data-svelte-h":!0}),r(k)!=="svelte-1wfpm10"&&(k.innerHTML=Ge),Bt=n(t),p(j.$$.fragment,t),St=n(t),B=d(t,"TABLE",{"data-svelte-h":!0}),r(B)!=="svelte-11i8p0m"&&(B.innerHTML=Pe),_t=n(t),p(S.$$.fragment,t),Ht=n(t),_=d(t,"P",{"data-svelte-h":!0}),r(_)!=="svelte-hd4ipt"&&(_.innerHTML=ke),Jt=n(t),p(H.$$.fragment,t),Lt=n(t),J=d(t,"P",{"data-svelte-h":!0}),r(J)!=="svelte-wzbx3d"&&(J.textContent=je),Yt=n(t),p(L.$$.fragment,t),Zt=n(t),Y=d(t,"P",{"data-svelte-h":!0}),r(Y)!=="svelte-11wbw9n"&&(Y.innerHTML=Be),Nt=n(t),p(Z.$$.fragment,t),At=n(t),N=d(t,"P",{"data-svelte-h":!0}),r(N)!=="svelte-1xa4f2l"&&(N.innerHTML=Se),Et=n(t),p(A.$$.fragment,t),It=n(t),E=d(t,"P",{"data-svelte-h":!0}),r(E)!=="svelte-hlysi2"&&(E.innerHTML=_e),Rt=n(t),p(I.$$.fragment,t),Wt=n(t),p(R.$$.fragment,t),Vt=n(t),W=d(t,"P",{"data-svelte-h":!0}),r(W)!=="svelte-pcmtzq"&&(W.innerHTML=He),Xt=n(t),p(V.$$.fragment,t),qt=n(t),X=d(t,"P",{"data-svelte-h":!0}),r(X)!=="svelte-yvyw72"&&(X.textContent=Je),Ft=n(t),p(q.$$.fragment,t),zt=n(t),p(F.$$.fragment,t),Qt=n(t),z=d(t,"P",{"data-svelte-h":!0}),r(z)!=="svelte-ibx2cu"&&(z.innerHTML=Le),Dt=n(t),p(Q.$$.fragment,t),Kt=n(t),p(D.$$.fragment,t),Ot=n(t),K=d(t,"P",{"data-svelte-h":!0}),r(K)!=="svelte-1waltjy"&&(K.textContent=Ye),te=n(t),O=d(t,"P",{"data-svelte-h":!0}),r(O)!=="svelte-be6k8f"&&(O.innerHTML=Ze),ee=n(t),tt=d(t,"P",{"data-svelte-h":!0}),r(tt)!=="svelte-1gpnuli"&&(tt.textContent=Ne),ae=n(t),et=d(t,"P",{"data-svelte-h":!0}),r(et)!=="svelte-e3ljnh"&&(et.innerHTML=Ae),le=n(t),at=d(t,"P",{"data-svelte-h":!0}),r(at)!=="svelte-a71shw"&&(at.innerHTML=Ee),se=n(t),p(lt.$$.fragment,t),ne=n(t),st=d(t,"P",{"data-svelte-h":!0}),r(st)!=="svelte-1y4zyk2"&&(st.textContent=Ie),ie=n(t),nt=d(t,"P",{"data-svelte-h":!0}),r(nt)!=="svelte-pjbwz8"&&(nt.innerHTML=Re),de=n(t),p(it.$$.fragment,t),re=n(t),dt=d(t,"P",{"data-svelte-h":!0}),r(dt)!=="svelte-crnlvc"&&(dt.innerHTML=We),oe=n(t),rt=d(t,"P",{"data-svelte-h":!0}),r(rt)!=="svelte-v5kvhb"&&(rt.textContent=Ve),pe=n(t),ot=d(t,"P",{"data-svelte-h":!0}),r(ot)!=="svelte-1obgmq7"&&(ot.innerHTML=Xe),ue=n(t),pt=d(t,"P",{"data-svelte-h":!0}),r(pt)!=="svelte-1p9yxd0"&&(pt.textContent=qe),me=n(t),w=d(t,"DIV",{class:!0,"data-svelte-h":!0}),r(w)!=="svelte-180o3b"&&(w.innerHTML=Fe),ce=n(t),ut=d(t,"P",{"data-svelte-h":!0}),r(ut)!=="svelte-k0x3k1"&&(ut.textContent=ze),fe=n(t),b=d(t,"DIV",{class:!0,"data-svelte-h":!0}),r(b)!=="svelte-19ohzoj"&&(b.innerHTML=Qe),ge=n(t),p(mt.$$.fragment,t),he=n(t),ct=d(t,"P",{"data-svelte-h":!0}),r(ct)!=="svelte-vhdjt1"&&(ct.innerHTML=De),$e=n(t),p(ft.$$.fragment,t),ye=n(t),yt=d(t,"P",{}),Ke(yt).forEach(a),this.h()},h(){gt(h,"name","hf:doc:metadata"),gt(h,"content",oa),gt($,"class","flex justify-center"),gt(y,"class","tip"),gt(v,"class","flex justify-center"),gt(w,"class","flex justify-center"),gt(b,"class","flex justify-center")},m(t,e){na(document.head,h),l(t,vt,e),l(t,$t,e),l(t,wt,e),u(T,t,e),l(t,bt,e),u(x,t,e),l(t,Tt,e),l(t,U,e),l(t,xt,e),l(t,$,e),l(t,Ut,e),l(t,y,e),l(t,Ct,e),l(t,C,e),l(t,Mt,e),l(t,v,e),l(t,Gt,e),u(M,t,e),l(t,Pt,e),l(t,G,e),l(t,kt,e),u(P,t,e),l(t,jt,e),l(t,k,e),l(t,Bt,e),u(j,t,e),l(t,St,e),l(t,B,e),l(t,_t,e),u(S,t,e),l(t,Ht,e),l(t,_,e),l(t,Jt,e),u(H,t,e),l(t,Lt,e),l(t,J,e),l(t,Yt,e),u(L,t,e),l(t,Zt,e),l(t,Y,e),l(t,Nt,e),u(Z,t,e),l(t,At,e),l(t,N,e),l(t,Et,e),u(A,t,e),l(t,It,e),l(t,E,e),l(t,Rt,e),u(I,t,e),l(t,Wt,e),u(R,t,e),l(t,Vt,e),l(t,W,e),l(t,Xt,e),u(V,t,e),l(t,qt,e),l(t,X,e),l(t,Ft,e),u(q,t,e),l(t,zt,e),u(F,t,e),l(t,Qt,e),l(t,z,e),l(t,Dt,e),u(Q,t,e),l(t,Kt,e),u(D,t,e),l(t,Ot,e),l(t,K,e),l(t,te,e),l(t,O,e),l(t,ee,e),l(t,tt,e),l(t,ae,e),l(t,et,e),l(t,le,e),l(t,at,e),l(t,se,e),u(lt,t,e),l(t,ne,e),l(t,st,e),l(t,ie,e),l(t,nt,e),l(t,de,e),u(it,t,e),l(t,re,e),l(t,dt,e),l(t,oe,e),l(t,rt,e),l(t,pe,e),l(t,ot,e),l(t,ue,e),l(t,pt,e),l(t,me,e),l(t,w,e),l(t,ce,e),l(t,ut,e),l(t,fe,e),l(t,b,e),l(t,ge,e),u(mt,t,e),l(t,he,e),l(t,ct,e),l(t,$e,e),u(ft,t,e),l(t,ye,e),l(t,yt,e),ve=!0},p:ta,i(t){ve||(m(T.$$.fragment,t),m(x.$$.fragment,t),m(M.$$.fragment,t),m(P.$$.fragment,t),m(j.$$.fragment,t),m(S.$$.fragment,t),m(H.$$.fragment,t),m(L.$$.fragment,t),m(Z.$$.fragment,t),m(A.$$.fragment,t),m(I.$$.fragment,t),m(R.$$.fragment,t),m(V.$$.fragment,t),m(q.$$.fragment,t),m(F.$$.fragment,t),m(Q.$$.fragment,t),m(D.$$.fragment,t),m(lt.$$.fragment,t),m(it.$$.fragment,t),m(mt.$$.fragment,t),m(ft.$$.fragment,t),ve=!0)},o(t){c(T.$$.fragment,t),c(x.$$.fragment,t),c(M.$$.fragment,t),c(P.$$.fragment,t),c(j.$$.fragment,t),c(S.$$.fragment,t),c(H.$$.fragment,t),c(L.$$.fragment,t),c(Z.$$.fragment,t),c(A.$$.fragment,t),c(I.$$.fragment,t),c(R.$$.fragment,t),c(V.$$.fragment,t),c(q.$$.fragment,t),c(F.$$.fragment,t),c(Q.$$.fragment,t),c(D.$$.fragment,t),c(lt.$$.fragment,t),c(it.$$.fragment,t),c(mt.$$.fragment,t),c(ft.$$.fragment,t),ve=!1},d(t){t&&(a(vt),a($t),a(wt),a(bt),a(Tt),a(U),a(xt),a($),a(Ut),a(y),a(Ct),a(C),a(Mt),a(v),a(Gt),a(Pt),a(G),a(kt),a(jt),a(k),a(Bt),a(St),a(B),a(_t),a(Ht),a(_),a(Jt),a(Lt),a(J),a(Yt),a(Zt),a(Y),a(Nt),a(At),a(N),a(Et),a(It),a(E),a(Rt),a(Wt),a(Vt),a(W),a(Xt),a(qt),a(X),a(Ft),a(zt),a(Qt),a(z),a(Dt),a(Kt),a(Ot),a(K),a(te),a(O),a(ee),a(tt),a(ae),a(et),a(le),a(at),a(se),a(ne),a(st),a(ie),a(nt),a(de),a(re),a(dt),a(oe),a(rt),a(pe),a(ot),a(ue),a(pt),a(me),a(w),a(ce),a(ut),a(fe),a(b),a(ge),a(he),a(ct),a($e),a(ye),a(yt)),a(h),f(T,t),f(x,t),f(M,t),f(P,t),f(j,t),f(S,t),f(H,t),f(L,t),f(Z,t),f(A,t),f(I,t),f(R,t),f(V,t),f(q,t),f(F,t),f(Q,t),f(D,t),f(lt,t),f(it,t),f(mt,t),f(ft,t)}}}const oa='{"title":"Using GPU Spaces","local":"using-gpu-spaces","sections":[{"title":"Hardware Specs","local":"hardware-specs","sections":[{"title":"CPU","local":"cpu","sections":[],"depth":3},{"title":"GPU","local":"gpu","sections":[],"depth":3}],"depth":2},{"title":"Configure hardware programmatically","local":"configure-hardware-programmatically","sections":[],"depth":2},{"title":"Framework specific requirements","local":"frameworks","sections":[{"title":"PyTorch","local":"pytorch","sections":[],"depth":3},{"title":"JAX","local":"jax","sections":[],"depth":3},{"title":"Tensorflow","local":"tensorflow","sections":[],"depth":3}],"depth":2},{"title":"Billing","local":"billing","sections":[{"title":"Community GPU Grants","local":"community-gpu-grants","sections":[],"depth":3}],"depth":2},{"title":"Set a custom sleep time","local":"sleep-time","sections":[],"depth":2},{"title":"Pausing a Space","local":"pause","sections":[],"depth":2}],"depth":1}';function pa(we){return ea(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ha extends aa{constructor(h){super(),la(this,h,pa,ra,Oe,{})}}export{ha as component};
