Buckets:
| import{s as St,o as qt,n as jt}from"../chunks/scheduler.f3b1e791.js";import{S as Yt,i as At,e as d,s as r,c as p,h as Kt,a as c,d as n,b as o,f as N,g as m,j as _,k as L,l as a,m as s,n as k,t as g,o as u,p as f}from"../chunks/index.023a9934.js";import{C as Ot,H as j,E as en}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.4f4da6fe.js";import{D as V,E as Ct}from"../chunks/ExampleCodeBlock.d1eb96cf.js";import{C as Jt}from"../chunks/CodeBlock.6962fdee.js";function tn(F){let i,y="Example:",b,h,$;return h=new Jt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwa2VybmVscyUyMGltcG9ydCUyMGdldF9rZXJuZWwlMEElMEFhY3RpdmF0aW9uJTIwJTNEJTIwZ2V0X2tlcm5lbCglMjJrZXJuZWxzLWNvbW11bml0eSUyRnJlbHUlMjIlMkMlMjB2ZXJzaW9uJTNEMSklMEF4JTIwJTNEJTIwdG9yY2gucmFuZG4oMTAlMkMlMjAyMCUyQyUyMGRldmljZSUzRCUyMmN1ZGElMjIpJTBBb3V0JTIwJTNEJTIwdG9yY2guZW1wdHlfbGlrZSh4KSUwQXJlc3VsdCUyMCUzRCUyMGFjdGl2YXRpb24ucmVsdShvdXQlMkMlMjB4KQ==",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> kernels <span class="hljs-keyword">import</span> get_kernel | |
| activation = get_kernel(<span class="hljs-string">"kernels-community/relu"</span>, version=<span class="hljs-number">1</span>) | |
| x = torch.randn(<span class="hljs-number">10</span>, <span class="hljs-number">20</span>, device=<span class="hljs-string">"cuda"</span>) | |
| out = torch.empty_like(x) | |
| result = activation.relu(out, x)`,lang:"python",wrap:!1}}),{c(){i=d("p"),i.textContent=y,b=r(),p(h.$$.fragment)},l(l){i=c(l,"P",{"data-svelte-h":!0}),_(i)!=="svelte-11lpom8"&&(i.textContent=y),b=o(l),m(h.$$.fragment,l)},m(l,v){s(l,i,v),s(l,b,v),k(h,l,v),$=!0},p:jt,i(l){$||(g(h.$$.fragment,l),$=!0)},o(l){u(h.$$.fragment,l),$=!1},d(l){l&&(n(i),n(b)),f(h,l)}}}function nn(F){let i,y="Example:",b,h,$;return h=new Jt({props:{code:"ZnJvbSUyMGtlcm5lbHMlMjBpbXBvcnQlMjBnZXRfa2VybmVsX3ZhcmlhbnRzJTJDJTIwVmFyaWFudEFjY2VwdGVkJTBBJTBBZm9yJTIwZGVjaXNpb24lMjBpbiUyMGdldF9rZXJuZWxfdmFyaWFudHMoJTIya2VybmVscy1jb21tdW5pdHklMkZhY3RpdmF0aW9uJTIyJTJDJTIwdmVyc2lvbiUzRDEpJTNBJTBBJTIwJTIwJTIwJTIwbmFtZSUyMCUzRCUyMGRlY2lzaW9uLnZhcmlhbnQudmFyaWFudF9zdHIlMEElMjAlMjAlMjAlMjBpZiUyMGlzaW5zdGFuY2UoZGVjaXNpb24lMkMlMjBWYXJpYW50QWNjZXB0ZWQpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcHJpbnQoZiUyMiU3Qm5hbWUlN0QlM0ElMjBjb21wYXRpYmxlJTIyKSUwQSUyMCUyMCUyMCUyMGVsc2UlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBwcmludChmJTIyJTdCbmFtZSU3RCUzQSUyMHJlamVjdGVkJTIwKCU3QmRlY2lzaW9uLnJlYXNvbiU3RCklMjIpJTBB",highlighted:`<span class="hljs-keyword">from</span> kernels <span class="hljs-keyword">import</span> get_kernel_variants, VariantAccepted | |
| <span class="hljs-keyword">for</span> decision <span class="hljs-keyword">in</span> get_kernel_variants(<span class="hljs-string">"kernels-community/activation"</span>, version=<span class="hljs-number">1</span>): | |
| name = decision.variant.variant_str | |
| <span class="hljs-keyword">if</span> <span class="hljs-built_in">isinstance</span>(decision, VariantAccepted): | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"<span class="hljs-subst">{name}</span>: compatible"</span>) | |
| <span class="hljs-keyword">else</span>: | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"<span class="hljs-subst">{name}</span>: rejected (<span class="hljs-subst">{decision.reason}</span>)"</span>) | |
| `,lang:"python",wrap:!1}}),{c(){i=d("p"),i.textContent=y,b=r(),p(h.$$.fragment)},l(l){i=c(l,"P",{"data-svelte-h":!0}),_(i)!=="svelte-11lpom8"&&(i.textContent=y),b=o(l),m(h.$$.fragment,l)},m(l,v){s(l,i,v),s(l,b,v),k(h,l,v),$=!0},p:jt,i(l){$||(g(h.$$.fragment,l),$=!0)},o(l){u(h.$$.fragment,l),$=!1},d(l){l&&(n(i),n(b)),f(h,l)}}}function rn(F){let i,y="Example:",b,h,$;return h=new Jt({props:{code:"ZnJvbSUyMGtlcm5lbHMlMjBpbXBvcnQlMjBnZXRfa2VybmVsJTJDJTIwZ2V0X2xvYWRlZF9rZXJuZWxzJTBBJTBBZ2V0X2tlcm5lbCglMjJrZXJuZWxzLWNvbW11bml0eSUyRmFjdGl2YXRpb24lMjIlMkMlMjB2ZXJzaW9uJTNEMSklMEFmb3IlMjBsb2FkZWQlMjBpbiUyMGdldF9sb2FkZWRfa2VybmVscygpJTNBJTBBJTIwJTIwJTIwJTIwcHJpbnQobG9hZGVkLm1ldGFkYXRhLm5hbWUlMkMlMjBsb2FkZWQucmVwb19pbmZvKQ==",highlighted:`<span class="hljs-keyword">from</span> kernels <span class="hljs-keyword">import</span> get_kernel, get_loaded_kernels | |
| get_kernel(<span class="hljs-string">"kernels-community/activation"</span>, version=<span class="hljs-number">1</span>) | |
| <span class="hljs-keyword">for</span> loaded <span class="hljs-keyword">in</span> get_loaded_kernels(): | |
| <span class="hljs-built_in">print</span>(loaded.metadata.name, loaded.repo_info)`,lang:"python",wrap:!1}}),{c(){i=d("p"),i.textContent=y,b=r(),p(h.$$.fragment)},l(l){i=c(l,"P",{"data-svelte-h":!0}),_(i)!=="svelte-11lpom8"&&(i.textContent=y),b=o(l),m(h.$$.fragment,l)},m(l,v){s(l,i,v),s(l,b,v),k(h,l,v),$=!0},p:jt,i(l){$||(g(h.$$.fragment,l),$=!0)},o(l){u(h.$$.fragment,l),$=!1},d(l){l&&(n(i),n(b)),f(h,l)}}}function on(F){let i,y,b,h,$,l,v,Ze,X,Be,z,Ve,T,Q,st,ue,It="Load a kernel from the kernel hub.",at,fe,Nt=`This function downloads a kernel to the local Hugging Face Hub cache directory (if it was not downloaded before) | |
| and then loads the kernel.`,it,W,Fe,S,We,U,q,dt,he,Lt="Import a kernel from a local kernel repository path.",Re,Y,Ge,Z,A,ct,$e,Et="Check whether a kernel build exists for the current environment (Torch version and compute framework).",Pe,K,De,w,O,pt,_e,Ut="Resolve all build variants of a kernel against the current environment.",mt,be,Zt=`The decisions are sorted with compatible variants first, the most preferred | |
| variant leading.`,kt,R,He,ee,Xe,M,te,gt,ve,Bt="Return a snapshot of every kernel that has been loaded into the current process.",ut,xe,Vt="The returned list is a new list; mutating it does not affect the registry.",ft,G,ze,ne,Qe,re,Se,J,oe,ht,ye,Ft="Get a pre-downloaded, locked kernel.",$t,Te,Wt="If <code>lockfile</code> is not specified, the lockfile will be loaded from the caller’s package metadata.",qe,le,Ye,B,se,_t,we,Rt="Get a kernel using a lock file.",Ae,ae,Ke,ie,Oe,x,de,bt,Me,Gt="This dataclass provides information about a loaded kernel:",vt,Ce,Pt=`<li><code>metadata</code> (<code>Metadata</code>): kernel metadata.</li> <li><code>module</code> (<code>ModuleType</code>): the imported kernel module.</li> <li><code>repo_info</code> (<code>kernels.utils.RepoInfo | None</code>): populated only for | |
| kernels loaded via <code>get_kernel</code>. Loaders that work from a local path | |
| (<code>get_local_kernel</code>) or a lockfile (<code>get_locked_kernel</code>, <code>load_kernel</code>) | |
| leave this as <code>None</code>.</li>`,xt,je,Dt="The metadata includes the following properties that describe a kernel:",yt,Je,Ht="<li><code>id</code> (<code>str</code>): kernel identifier that is unique to the kernel version + backend.</li> <li><code>name</code> (<code>str</code>): the name of the kernel.</li> <li><code>version</code> (<code>int</code>): the version of the kernel.</li> <li><code>license</code> (<code>str</code>): the license of the kernel.</li> <li><code>upstream</code> (<code>str | None</code>): the original upstream repository of the kernel.</li> <li><code>source</code> (<code>str | None</code>): the kernel-builder formatted source repository.</li> <li><code>python_depends</code> (<code>list[str]</code>): required Python dependencies.</li> <li><code>backend</code>: information about the kernel’s backend.</li>",et,ce,tt,C,pe,Tt,Ie,Xt="This dataclass stores the origin of the kernel.",wt,Ne,zt="The following fields are available:",Mt,Le,Qt="<li><code>repo_id</code> (<code>str</code>): the Hub repository containing the kernel.</li> <li><code>revision</code> (<code>str</code>): the specific revision of the kernel.</li>",nt,me,rt,Ue,ot;return $=new Ot({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),v=new j({props:{title:"Loading kernels",local:"loading-kernels",headingTag:"h1"}}),X=new j({props:{title:"Main Functions",local:"main-functions",headingTag:"h2"}}),z=new j({props:{title:"get_kernel",local:"kernels.get_kernel",headingTag:"h3"}}),Q=new V({props:{name:"kernels.get_kernel",anchor:"kernels.get_kernel",parameters:[{name:"repo_id",val:": str"},{name:"revision",val:": str | None = None"},{name:"version",val:": int | None = None"},{name:"backend",val:": str | None = None"},{name:"user_agent",val:": str | dict | None = None"},{name:"trust_remote_code",val:": bool | list[str] = False"}],parametersDescription:[{anchor:"kernels.get_kernel.repo_id",description:`<strong>repo_id</strong> (<em>str</em>) — | |
| The Hub repository containing the kernel.`,name:"repo_id"},{anchor:"kernels.get_kernel.revision",description:`<strong>revision</strong> (<em>str</em>, <em>optional</em>) — | |
| The specific revision (branch, tag, or commit) to download. Cannot be used together with <em>version</em>.`,name:"revision"},{anchor:"kernels.get_kernel.version",description:`<strong>version</strong> (<em>int</em>, <em>optional</em>) — | |
| The kernel version to download. Cannot be used together with <em>revision</em>. | |
| Either <em>version</em> or <em>revision</em> must be specified.`,name:"version"},{anchor:"kernels.get_kernel.backend",description:`<strong>backend</strong> (<em>str</em>, <em>optional</em>) — | |
| The backend to load the kernel for. Can only be <em>cpu</em> or the backend that Torch is compiled for. | |
| The backend will be detected automatically if not provided.`,name:"backend"},{anchor:"kernels.get_kernel.user_agent",description:`<strong>user_agent</strong> (<em>Union[str, dict]</em>, <em>optional</em>) — | |
| The <em>user_agent</em> info to pass to <em>snapshot_download()</em> for internal telemetry.`,name:"user_agent"},{anchor:"kernels.get_kernel.trust_remote_code",description:`<strong>trust_remote_code</strong> (<em>bool | list[str]</em>, <em>optional</em>, defaults to <em>False</em>) — | |
| Whether to allow loading kernels from untrusted organisations. When <code>False</code>, | |
| only kernels from trusted organisations are allowed. When <code>True</code>, all | |
| repositories are allowed. A list of strings will be used to verify signing | |
| identities in a future release; for now it emits a warning and falls | |
| back to the default trust check.`,name:"trust_remote_code"}],source:"https://github.com/huggingface/kernels/blob/vr_645/kernels/src/kernels/utils.py#L451",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>The imported kernel module.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><em>ModuleType</em></p> | |
| `}}),W=new Ct({props:{anchor:"kernels.get_kernel.example",$$slots:{default:[tn]},$$scope:{ctx:F}}}),S=new j({props:{title:"get_local_kernel",local:"kernels.get_local_kernel",headingTag:"h3"}}),q=new V({props:{name:"kernels.get_local_kernel",anchor:"kernels.get_local_kernel",parameters:[{name:"repo_path",val:": Path"},{name:"backend",val:": str | None = None"}],parametersDescription:[{anchor:"kernels.get_local_kernel.repo_path",description:`<strong>repo_path</strong> (<code>Path</code>) — | |
| The local path to the kernel repository.`,name:"repo_path"},{anchor:"kernels.get_local_kernel.backend",description:`<strong>backend</strong> (<code>str</code>, <em>optional</em>) — | |
| The backend to load the kernel for. Can only be <code>cpu</code> or the backend that Torch is compiled for. | |
| The backend will be detected automatically if not provided.`,name:"backend"}],source:"https://github.com/huggingface/kernels/blob/vr_645/kernels/src/kernels/utils.py#L520",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>The imported kernel module.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>ModuleType</code></p> | |
| `}}),Y=new j({props:{title:"has_kernel",local:"kernels.has_kernel",headingTag:"h3"}}),A=new V({props:{name:"kernels.has_kernel",anchor:"kernels.has_kernel",parameters:[{name:"repo_id",val:": str"},{name:"revision",val:": str | None = None"},{name:"version",val:": int | None = None"},{name:"backend",val:": str | None = None"}],parametersDescription:[{anchor:"kernels.has_kernel.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) — | |
| The Hub repository containing the kernel.`,name:"repo_id"},{anchor:"kernels.has_kernel.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) — | |
| The specific revision (branch, tag, or commit) to download. Cannot be used together with <code>version</code>.`,name:"revision"},{anchor:"kernels.has_kernel.version",description:`<strong>version</strong> (<code>int</code>, <em>optional</em>) — | |
| The kernel version to download. Cannot be used together with <code>revision</code>. | |
| Either <code>version</code> or <code>revision</code> must be specified.`,name:"version"},{anchor:"kernels.has_kernel.backend",description:`<strong>backend</strong> (<code>str</code>, <em>optional</em>) — | |
| The backend to load the kernel for. Can only be <code>cpu</code> or the backend that Torch is compiled for. | |
| The backend will be detected automatically if not provided.`,name:"backend"}],source:"https://github.com/huggingface/kernels/blob/vr_645/kernels/src/kernels/utils.py#L556",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>True</code> if a kernel is available for the current environment.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>bool</code></p> | |
| `}}),K=new j({props:{title:"get_kernel_variants",local:"kernels.get_kernel_variants",headingTag:"h3"}}),O=new V({props:{name:"kernels.get_kernel_variants",anchor:"kernels.get_kernel_variants",parameters:[{name:"repo_id",val:": str"},{name:"revision",val:": str | None = None"},{name:"version",val:": int | None = None"},{name:"backend",val:": str | None = None"}],parametersDescription:[{anchor:"kernels.get_kernel_variants.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) — | |
| The Hub repository containing the kernel.`,name:"repo_id"},{anchor:"kernels.get_kernel_variants.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) — | |
| The specific revision (branch, tag, or commit) to inspect. Cannot be used together with <code>version</code>.`,name:"revision"},{anchor:"kernels.get_kernel_variants.version",description:`<strong>version</strong> (<code>int</code>, <em>optional</em>) — | |
| The kernel version to inspect. Cannot be used together with <code>revision</code>. | |
| Either <code>version</code> or <code>revision</code> must be specified.`,name:"version"},{anchor:"kernels.get_kernel_variants.backend",description:`<strong>backend</strong> (<code>str</code>, <em>optional</em>) — | |
| The backend to resolve variants for. Can only be <code>cpu</code> or the backend that Torch is compiled for. | |
| The backend will be detected automatically if not provided.`,name:"backend"}],source:"https://github.com/huggingface/kernels/blob/vr_645/kernels/src/kernels/utils.py#L597",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>One <code>VariantAccepted</code> or <code>VariantRejected</code> per build variant | |
| in the repository, compatible variants first.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>list[Decision]</code></p> | |
| `}}),R=new Ct({props:{anchor:"kernels.get_kernel_variants.example",$$slots:{default:[nn]},$$scope:{ctx:F}}}),ee=new j({props:{title:"get_loaded_kernels",local:"kernels.get_loaded_kernels",headingTag:"h3"}}),te=new V({props:{name:"kernels.get_loaded_kernels",anchor:"kernels.get_loaded_kernels",parameters:[],source:"https://github.com/huggingface/kernels/blob/vr_645/kernels/src/kernels/utils.py#L149",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>One <a | |
| href="/docs/kernels/pr_645/en/api/kernels#kernels.LoadedKernel" | |
| >LoadedKernel</a> per distinct kernel variant path | |
| loaded in this process.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>list[LoadedKernel]</code></p> | |
| `}}),G=new Ct({props:{anchor:"kernels.get_loaded_kernels.example",$$slots:{default:[rn]},$$scope:{ctx:F}}}),ne=new j({props:{title:"Loading locked kernels",local:"loading-locked-kernels",headingTag:"h2"}}),re=new j({props:{title:"load_kernel",local:"kernels.load_kernel",headingTag:"h3"}}),oe=new V({props:{name:"kernels.load_kernel",anchor:"kernels.load_kernel",parameters:[{name:"repo_id",val:": str"},{name:"lockfile",val:": pathlib.Path | None"},{name:"backend",val:": str | None = None"},{name:"revision",val:": str | None = None"}],parametersDescription:[{anchor:"kernels.load_kernel.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) — | |
| The Hub repository containing the kernel.`,name:"repo_id"},{anchor:"kernels.load_kernel.lockfile",description:`<strong>lockfile</strong> (<code>Path</code>, <em>optional</em>) — | |
| Path to the lockfile. If not provided, the lockfile will be loaded from the caller’s package metadata.`,name:"lockfile"},{anchor:"kernels.load_kernel.backend",description:`<strong>backend</strong> (<code>str</code>, <em>optional</em>) — | |
| The backend to load the kernel for. Can only be <code>cpu</code> or the backend that Torch is compiled for. | |
| The backend will be detected automatically if not provided.`,name:"backend"},{anchor:"kernels.load_kernel.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) — | |
| The specific revision (branch, tag, or commit) to download. Cannot be used together with <code>version</code>.`,name:"revision"}],source:"https://github.com/huggingface/kernels/blob/vr_645/kernels/src/kernels/utils.py#L646",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>The imported kernel module.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>ModuleType</code></p> | |
| `}}),le=new j({props:{title:"get_locked_kernel",local:"kernels.get_locked_kernel",headingTag:"h3"}}),se=new V({props:{name:"kernels.get_locked_kernel",anchor:"kernels.get_locked_kernel",parameters:[{name:"repo_id",val:": str"},{name:"local_files_only",val:": bool = False"}],parametersDescription:[{anchor:"kernels.get_locked_kernel.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) — | |
| The Hub repository containing the kernel.`,name:"repo_id"},{anchor:"kernels.get_locked_kernel.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to only use local files and not download from the Hub.`,name:"local_files_only"}],source:"https://github.com/huggingface/kernels/blob/vr_645/kernels/src/kernels/utils.py#L706",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>The imported kernel module.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>ModuleType</code></p> | |
| `}}),ae=new j({props:{title:"Classes",local:"classes",headingTag:"h2"}}),ie=new j({props:{title:"LoadedKernel",local:"kernels.LoadedKernel",headingTag:"h3"}}),de=new V({props:{name:"class kernels.LoadedKernel",anchor:"kernels.LoadedKernel",parameters:[{name:"metadata",val:": Metadata"},{name:"module",val:": module"},{name:"repo_info",val:": kernels.utils.RepoInfo | None"}],source:"https://github.com/huggingface/kernels/blob/vr_645/kernels/src/kernels/utils.py#L118"}}),ce=new j({props:{title:"RepoInfo",local:"kernels.RepoInfo",headingTag:"h3"}}),pe=new V({props:{name:"class kernels.RepoInfo",anchor:"kernels.RepoInfo",parameters:[{name:"repo_id",val:": str"},{name:"revision",val:": str"}],source:"https://github.com/huggingface/kernels/blob/vr_645/kernels/src/kernels/utils.py#L103"}}),me=new en({props:{source:"https://github.com/huggingface/kernels/blob/main/docs/source/api/kernels.md"}}),{c(){i=d("meta"),y=r(),b=d("p"),h=r(),p($.$$.fragment),l=r(),p(v.$$.fragment),Ze=r(),p(X.$$.fragment),Be=r(),p(z.$$.fragment),Ve=r(),T=d("div"),p(Q.$$.fragment),st=r(),ue=d("p"),ue.textContent=It,at=r(),fe=d("p"),fe.textContent=Nt,it=r(),p(W.$$.fragment),Fe=r(),p(S.$$.fragment),We=r(),U=d("div"),p(q.$$.fragment),dt=r(),he=d("p"),he.textContent=Lt,Re=r(),p(Y.$$.fragment),Ge=r(),Z=d("div"),p(A.$$.fragment),ct=r(),$e=d("p"),$e.textContent=Et,Pe=r(),p(K.$$.fragment),De=r(),w=d("div"),p(O.$$.fragment),pt=r(),_e=d("p"),_e.textContent=Ut,mt=r(),be=d("p"),be.textContent=Zt,kt=r(),p(R.$$.fragment),He=r(),p(ee.$$.fragment),Xe=r(),M=d("div"),p(te.$$.fragment),gt=r(),ve=d("p"),ve.textContent=Bt,ut=r(),xe=d("p"),xe.textContent=Vt,ft=r(),p(G.$$.fragment),ze=r(),p(ne.$$.fragment),Qe=r(),p(re.$$.fragment),Se=r(),J=d("div"),p(oe.$$.fragment),ht=r(),ye=d("p"),ye.textContent=Ft,$t=r(),Te=d("p"),Te.innerHTML=Wt,qe=r(),p(le.$$.fragment),Ye=r(),B=d("div"),p(se.$$.fragment),_t=r(),we=d("p"),we.textContent=Rt,Ae=r(),p(ae.$$.fragment),Ke=r(),p(ie.$$.fragment),Oe=r(),x=d("div"),p(de.$$.fragment),bt=r(),Me=d("p"),Me.textContent=Gt,vt=r(),Ce=d("ul"),Ce.innerHTML=Pt,xt=r(),je=d("p"),je.textContent=Dt,yt=r(),Je=d("ul"),Je.innerHTML=Ht,et=r(),p(ce.$$.fragment),tt=r(),C=d("div"),p(pe.$$.fragment),Tt=r(),Ie=d("p"),Ie.textContent=Xt,wt=r(),Ne=d("p"),Ne.textContent=zt,Mt=r(),Le=d("ul"),Le.innerHTML=Qt,nt=r(),p(me.$$.fragment),rt=r(),Ue=d("p"),this.h()},l(e){const t=Kt("svelte-u9bgzb",document.head);i=c(t,"META",{name:!0,content:!0}),t.forEach(n),y=o(e),b=c(e,"P",{}),N(b).forEach(n),h=o(e),m($.$$.fragment,e),l=o(e),m(v.$$.fragment,e),Ze=o(e),m(X.$$.fragment,e),Be=o(e),m(z.$$.fragment,e),Ve=o(e),T=c(e,"DIV",{class:!0});var I=N(T);m(Q.$$.fragment,I),st=o(I),ue=c(I,"P",{"data-svelte-h":!0}),_(ue)!=="svelte-v6pak5"&&(ue.textContent=It),at=o(I),fe=c(I,"P",{"data-svelte-h":!0}),_(fe)!=="svelte-1adbar6"&&(fe.textContent=Nt),it=o(I),m(W.$$.fragment,I),I.forEach(n),Fe=o(e),m(S.$$.fragment,e),We=o(e),U=c(e,"DIV",{class:!0});var ke=N(U);m(q.$$.fragment,ke),dt=o(ke),he=c(ke,"P",{"data-svelte-h":!0}),_(he)!=="svelte-ysgxyb"&&(he.textContent=Lt),ke.forEach(n),Re=o(e),m(Y.$$.fragment,e),Ge=o(e),Z=c(e,"DIV",{class:!0});var ge=N(Z);m(A.$$.fragment,ge),ct=o(ge),$e=c(ge,"P",{"data-svelte-h":!0}),_($e)!=="svelte-oel36i"&&($e.textContent=Et),ge.forEach(n),Pe=o(e),m(K.$$.fragment,e),De=o(e),w=c(e,"DIV",{class:!0});var P=N(w);m(O.$$.fragment,P),pt=o(P),_e=c(P,"P",{"data-svelte-h":!0}),_(_e)!=="svelte-1l0cwqe"&&(_e.textContent=Ut),mt=o(P),be=c(P,"P",{"data-svelte-h":!0}),_(be)!=="svelte-98ethb"&&(be.textContent=Zt),kt=o(P),m(R.$$.fragment,P),P.forEach(n),He=o(e),m(ee.$$.fragment,e),Xe=o(e),M=c(e,"DIV",{class:!0});var D=N(M);m(te.$$.fragment,D),gt=o(D),ve=c(D,"P",{"data-svelte-h":!0}),_(ve)!=="svelte-hargcl"&&(ve.textContent=Bt),ut=o(D),xe=c(D,"P",{"data-svelte-h":!0}),_(xe)!=="svelte-bvc5k7"&&(xe.textContent=Vt),ft=o(D),m(G.$$.fragment,D),D.forEach(n),ze=o(e),m(ne.$$.fragment,e),Qe=o(e),m(re.$$.fragment,e),Se=o(e),J=c(e,"DIV",{class:!0});var Ee=N(J);m(oe.$$.fragment,Ee),ht=o(Ee),ye=c(Ee,"P",{"data-svelte-h":!0}),_(ye)!=="svelte-1s7s7e5"&&(ye.textContent=Ft),$t=o(Ee),Te=c(Ee,"P",{"data-svelte-h":!0}),_(Te)!=="svelte-16266qf"&&(Te.innerHTML=Wt),Ee.forEach(n),qe=o(e),m(le.$$.fragment,e),Ye=o(e),B=c(e,"DIV",{class:!0});var lt=N(B);m(se.$$.fragment,lt),_t=o(lt),we=c(lt,"P",{"data-svelte-h":!0}),_(we)!=="svelte-ui0v8u"&&(we.textContent=Rt),lt.forEach(n),Ae=o(e),m(ae.$$.fragment,e),Ke=o(e),m(ie.$$.fragment,e),Oe=o(e),x=c(e,"DIV",{class:!0});var E=N(x);m(de.$$.fragment,E),bt=o(E),Me=c(E,"P",{"data-svelte-h":!0}),_(Me)!=="svelte-10yajky"&&(Me.textContent=Gt),vt=o(E),Ce=c(E,"UL",{"data-svelte-h":!0}),_(Ce)!=="svelte-1133git"&&(Ce.innerHTML=Pt),xt=o(E),je=c(E,"P",{"data-svelte-h":!0}),_(je)!=="svelte-eh9buy"&&(je.textContent=Dt),yt=o(E),Je=c(E,"UL",{"data-svelte-h":!0}),_(Je)!=="svelte-zzbgg4"&&(Je.innerHTML=Ht),E.forEach(n),et=o(e),m(ce.$$.fragment,e),tt=o(e),C=c(e,"DIV",{class:!0});var H=N(C);m(pe.$$.fragment,H),Tt=o(H),Ie=c(H,"P",{"data-svelte-h":!0}),_(Ie)!=="svelte-1qmhf0s"&&(Ie.textContent=Xt),wt=o(H),Ne=c(H,"P",{"data-svelte-h":!0}),_(Ne)!=="svelte-1j3sm3i"&&(Ne.textContent=zt),Mt=o(H),Le=c(H,"UL",{"data-svelte-h":!0}),_(Le)!=="svelte-nl2d40"&&(Le.innerHTML=Qt),H.forEach(n),nt=o(e),m(me.$$.fragment,e),rt=o(e),Ue=c(e,"P",{}),N(Ue).forEach(n),this.h()},h(){L(i,"name","hf:doc:metadata"),L(i,"content",ln),L(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){a(document.head,i),s(e,y,t),s(e,b,t),s(e,h,t),k($,e,t),s(e,l,t),k(v,e,t),s(e,Ze,t),k(X,e,t),s(e,Be,t),k(z,e,t),s(e,Ve,t),s(e,T,t),k(Q,T,null),a(T,st),a(T,ue),a(T,at),a(T,fe),a(T,it),k(W,T,null),s(e,Fe,t),k(S,e,t),s(e,We,t),s(e,U,t),k(q,U,null),a(U,dt),a(U,he),s(e,Re,t),k(Y,e,t),s(e,Ge,t),s(e,Z,t),k(A,Z,null),a(Z,ct),a(Z,$e),s(e,Pe,t),k(K,e,t),s(e,De,t),s(e,w,t),k(O,w,null),a(w,pt),a(w,_e),a(w,mt),a(w,be),a(w,kt),k(R,w,null),s(e,He,t),k(ee,e,t),s(e,Xe,t),s(e,M,t),k(te,M,null),a(M,gt),a(M,ve),a(M,ut),a(M,xe),a(M,ft),k(G,M,null),s(e,ze,t),k(ne,e,t),s(e,Qe,t),k(re,e,t),s(e,Se,t),s(e,J,t),k(oe,J,null),a(J,ht),a(J,ye),a(J,$t),a(J,Te),s(e,qe,t),k(le,e,t),s(e,Ye,t),s(e,B,t),k(se,B,null),a(B,_t),a(B,we),s(e,Ae,t),k(ae,e,t),s(e,Ke,t),k(ie,e,t),s(e,Oe,t),s(e,x,t),k(de,x,null),a(x,bt),a(x,Me),a(x,vt),a(x,Ce),a(x,xt),a(x,je),a(x,yt),a(x,Je),s(e,et,t),k(ce,e,t),s(e,tt,t),s(e,C,t),k(pe,C,null),a(C,Tt),a(C,Ie),a(C,wt),a(C,Ne),a(C,Mt),a(C,Le),s(e,nt,t),k(me,e,t),s(e,rt,t),s(e,Ue,t),ot=!0},p(e,[t]){const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),W.$set(I);const ke={};t&2&&(ke.$$scope={dirty:t,ctx:e}),R.$set(ke);const ge={};t&2&&(ge.$$scope={dirty:t,ctx:e}),G.$set(ge)},i(e){ot||(g($.$$.fragment,e),g(v.$$.fragment,e),g(X.$$.fragment,e),g(z.$$.fragment,e),g(Q.$$.fragment,e),g(W.$$.fragment,e),g(S.$$.fragment,e),g(q.$$.fragment,e),g(Y.$$.fragment,e),g(A.$$.fragment,e),g(K.$$.fragment,e),g(O.$$.fragment,e),g(R.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(G.$$.fragment,e),g(ne.$$.fragment,e),g(re.$$.fragment,e),g(oe.$$.fragment,e),g(le.$$.fragment,e),g(se.$$.fragment,e),g(ae.$$.fragment,e),g(ie.$$.fragment,e),g(de.$$.fragment,e),g(ce.$$.fragment,e),g(pe.$$.fragment,e),g(me.$$.fragment,e),ot=!0)},o(e){u($.$$.fragment,e),u(v.$$.fragment,e),u(X.$$.fragment,e),u(z.$$.fragment,e),u(Q.$$.fragment,e),u(W.$$.fragment,e),u(S.$$.fragment,e),u(q.$$.fragment,e),u(Y.$$.fragment,e),u(A.$$.fragment,e),u(K.$$.fragment,e),u(O.$$.fragment,e),u(R.$$.fragment,e),u(ee.$$.fragment,e),u(te.$$.fragment,e),u(G.$$.fragment,e),u(ne.$$.fragment,e),u(re.$$.fragment,e),u(oe.$$.fragment,e),u(le.$$.fragment,e),u(se.$$.fragment,e),u(ae.$$.fragment,e),u(ie.$$.fragment,e),u(de.$$.fragment,e),u(ce.$$.fragment,e),u(pe.$$.fragment,e),u(me.$$.fragment,e),ot=!1},d(e){e&&(n(y),n(b),n(h),n(l),n(Ze),n(Be),n(Ve),n(T),n(Fe),n(We),n(U),n(Re),n(Ge),n(Z),n(Pe),n(De),n(w),n(He),n(Xe),n(M),n(ze),n(Qe),n(Se),n(J),n(qe),n(Ye),n(B),n(Ae),n(Ke),n(Oe),n(x),n(et),n(tt),n(C),n(nt),n(rt),n(Ue)),n(i),f($,e),f(v,e),f(X,e),f(z,e),f(Q),f(W),f(S,e),f(q),f(Y,e),f(A),f(K,e),f(O),f(R),f(ee,e),f(te),f(G),f(ne,e),f(re,e),f(oe),f(le,e),f(se),f(ae,e),f(ie,e),f(de),f(ce,e),f(pe),f(me,e)}}}const ln='{"title":"Loading kernels","local":"loading-kernels","sections":[{"title":"Main Functions","local":"main-functions","sections":[{"title":"get_kernel","local":"kernels.get_kernel","sections":[],"depth":3},{"title":"get_local_kernel","local":"kernels.get_local_kernel","sections":[],"depth":3},{"title":"has_kernel","local":"kernels.has_kernel","sections":[],"depth":3},{"title":"get_kernel_variants","local":"kernels.get_kernel_variants","sections":[],"depth":3},{"title":"get_loaded_kernels","local":"kernels.get_loaded_kernels","sections":[],"depth":3}],"depth":2},{"title":"Loading locked kernels","local":"loading-locked-kernels","sections":[{"title":"load_kernel","local":"kernels.load_kernel","sections":[],"depth":3},{"title":"get_locked_kernel","local":"kernels.get_locked_kernel","sections":[],"depth":3}],"depth":2},{"title":"Classes","local":"classes","sections":[{"title":"LoadedKernel","local":"kernels.LoadedKernel","sections":[],"depth":3},{"title":"RepoInfo","local":"kernels.RepoInfo","sections":[],"depth":3}],"depth":2}],"depth":1}';function sn(F){return qt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class kn extends Yt{constructor(i){super(),At(this,i,sn,on,St,{})}}export{kn as component}; | |
Xet Storage Details
- Size:
- 29.2 kB
- Xet hash:
- 9f1f34947ab6bd967ba56d45243224072427063dea29dfca286b24c8751c041e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.