Buckets:

download
raw
12.5 kB
import{s as de,n as we,o as je}from"../chunks/scheduler.f3b1e791.js";import{S as Ue,i as he,e as i,s,c as M,h as xe,a as o,d as l,b as a,f as Te,g as y,j as c,k as me,l as Ie,m as n,n as p,t as u,o as T,p as m}from"../chunks/index.023a9934.js";import{C as ge}from"../chunks/CopyLLMTxtMenu.24059a0f.js";import{C as Je}from"../chunks/CodeBlock.004b11e0.js";import{H as B,E as Ce}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.3d7610ee.js";function be(se){let r,X,E,Y,J,_,d,S,w,H,j,L,U,ae=`Before <code>kernels</code> 0.12, kernels could be pulled from a repository
without specifying a version. This is deprecated in kernels 0.12
and will become an error in kernels 0.14. Instead, use of a kernel
should always specify a version (except for local kernels).`,V,h,ie=`Kernels only use a major version. The kernel maintainer is responsible
for never breaking a kernel within a major version and should bump up
the major version if the kernel API changes and/or when support for
older Torch versions is removed.`,D,x,oe=`You can find the versions that are supported by a kernel using the
<code>kernels versions command</code>. For example:`,q,I,R,g,re=`The command lists all available versions (here only version 1) with
all the variants that are supported. A check mark is printed after
the variant that is compatible with your current environment.`,G,C,Me="Code that uses a kernel can be updated as follows:",Z,b,z,f,O,k,F,v,ye=`Kernels are now a first-class repository type on the Hugging Face Hub, and
<code>kernels</code> 0.14 loads kernels exclusively from <code>kernel</code>-type repositories.
<code>model</code>-type kernel repositories are no longer supported by the loader.`,P,$,ce=`New uploads via <code>kernel-builder build-and-upload</code> default to
<code>--repo-type kernel</code>. To publish, the owning user or org must have
kernel-creation access. Request it from
<a href="https://huggingface.co/settings/account" rel="nofollow">huggingface.co/settings/account</a>
(“Request Kernels Creation”).`,K,N,pe="To migrate an existing <code>model</code>-type kernel repository:",ee,A,ue=`<li>Make sure the publishing org has been granted kernel-creation access
(see above).</li> <li>Re-upload with <code>kernel-builder build-and-upload</code> to a <code>kernel</code>-type
repository. Either keep the same <code>repo-id</code> in <code>build.toml</code> if the
repository has been migrated to the new type, or point it at a newly
created <code>kernel</code>-type repository.</li> <li>Update consumers’ <code>get_kernel(...)</code> and <code>LayerRepository(...)</code> calls
to reference the new repository if the <code>repo-id</code> changed.</li>`,te,W,le,Q,ne;return J=new ge({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),d=new B({props:{title:"Migrating from older versions",local:"migrating-from-older-versions",headingTag:"h1"}}),w=new B({props:{title:"0.12",local:"012",headingTag:"h2"}}),j=new B({props:{title:"Adopting kernel versions",local:"adopting-kernel-versions",headingTag:"h3"}}),I=new Je({props:{code:"JTI0JTIwa2VybmVscyUyMHZlcnNpb25zJTIwa2VybmVscy1jb21tdW5pdHklMkZhY3RpdmF0aW9uJTBBVmVyc2lvbiUyMDElM0ElMjB0b3JjaDIxMC1jeHgxMS1jdTEyNi14ODZfNjQtbGludXglMkMlMjB0b3JjaDIxMC1jeHgxMS1jdTEyOC14ODZfNjQtbGludXglMkMlMjB0b3JjaDIxMC1jeHgxMS1jdTEzMC14ODZfNjQtbGludXglMkMlMjB0b3JjaDI3LWN4eDExLWN1MTE4LXg4Nl82NC1saW51eCUyQyUyMHRvcmNoMjctY3h4MTEtY3UxMjYteDg2XzY0LWxpbnV4JTJDJTIwdG9yY2gyNy1jeHgxMS1jdTEyOC1hYXJjaDY0LWxpbnV4JTJDJTIwdG9yY2gyNy1jeHgxMS1jdTEyOC14ODZfNjQtbGludXglMjAlRTIlOUMlODUlMkMlMjB0b3JjaDI4LWN4eDExLWN1MTI2LWFhcmNoNjQtbGludXglMkMlMjB0b3JjaDI4LWN4eDExLWN1MTI2LXg4Nl82NC1saW51eCUyQyUyMHRvcmNoMjgtY3h4MTEtY3UxMjgtYWFyY2g2NC1saW51eCUyQyUyMHRvcmNoMjgtY3h4MTEtY3UxMjgteDg2XzY0LWxpbnV4JTJDJTIwdG9yY2gyOC1jeHgxMS1jdTEyOS1hYXJjaDY0LWxpbnV4JTJDJTIwdG9yY2gyOC1jeHgxMS1jdTEyOS14ODZfNjQtbGludXglMkMlMjB0b3JjaDI5LWN4eDExLWN1MTI2LWFhcmNoNjQtbGludXglMkMlMjB0b3JjaDI5LWN4eDExLWN1MTI2LXg4Nl82NC1saW51eCUyQyUyMHRvcmNoMjktY3h4MTEtY3UxMjgtYWFyY2g2NC1saW51eCUyQyUyMHRvcmNoMjktY3h4MTEtY3UxMjgteDg2XzY0LWxpbnV4JTJDJTIwdG9yY2gyOS1jeHgxMS1jdTEzMC1hYXJjaDY0LWxpbnV4JTJDJTIwdG9yY2gyOS1jeHgxMS1jdTEzMC14ODZfNjQtbGludXg=",highlighted:`$ kernels versions kernels-community/activation
Version 1: torch210-cxx11-cu126-x86_64-linux, torch210-cxx11-cu128-x86_64-linux, torch210-cxx11-cu130-x86_64-linux, torch27-cxx11-cu118-x86_64-linux, torch27-cxx11-cu126-x86_64-linux, torch27-cxx11-cu128-aarch64-linux, torch27-cxx11-cu128-x86_64-linux ✅, torch28-cxx11-cu126-aarch64-linux, torch28-cxx11-cu126-x86_64-linux, torch28-cxx11-cu128-aarch64-linux, torch28-cxx11-cu128-x86_64-linux, torch28-cxx11-cu129-aarch64-linux, torch28-cxx11-cu129-x86_64-linux, torch29-cxx11-cu126-aarch64-linux, torch29-cxx11-cu126-x86_64-linux, torch29-cxx11-cu128-aarch64-linux, torch29-cxx11-cu128-x86_64-linux, torch29-cxx11-cu130-aarch64-linux, torch29-cxx11-cu130-x86_64-linux`,lang:"bash",wrap:!1}}),b=new Je({props:{code:"JTIzJTIwT2xkJTNBJTBBYWN0aXZhdGlvbiUyMCUzRCUyMGdldF9rZXJuZWwoJTIya2VybmVscy1jb21tdW5pdHklMkZhY3RpdmF0aW9uJTIyKSUwQWFjdGl2YXRpb24lMjAlM0QlMjBnZXRfa2VybmVsKCUyMmtlcm5lbHMtY29tbXVuaXR5JTJGYWN0aXZhdGlvbiUyMiUyQyUyMHZlcnNpb24lM0QlMjIlM0UlM0QwLjAuMiUyMCUyNiUyNiUyMCUzQzAuMS4wJTIyKSUwQSUwQSUyMyU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TIwJTIwJTIwdmVyc2lvbiUzRCUyMiUzRSUzRDAuMC4yJTIwJTI2JTI2JTIwJTNDMC4xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjApJTJDJTBBJTIwJTIwJTIwJTIwJTdEJTBBJTdEJTBBJTBBJTIzJTIwTmV3JTNBJTBBa2VybmVsX2xheWVyX21hcHBpbmclMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJTaWx1QW5kTXVsJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyY3VkYSUyMiUzQSUyMExheWVyUmVwb3NpdG9yeSglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXBvX2lkJTNEJTIya2VybmVscy1jb21tdW5pdHklMkZhY3RpdmF0aW9uJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbGF5ZXJfbmFtZSUzRCUyMlNpbHVBbmRNdWwlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB2ZXJzaW9uJTNEMSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCklMkMlMEElMjAlMjAlMjAlMjAlN0QlMEElN0Q=",highlighted:`<span class="hljs-comment"># Old:</span>
activation = get_kernel(<span class="hljs-string">&quot;kernels-community/activation&quot;</span>)
activation = get_kernel(<span class="hljs-string">&quot;kernels-community/activation&quot;</span>, version=<span class="hljs-string">&quot;&gt;=0.0.2 &amp;&amp; &lt;0.1.0&quot;</span>)
<span class="hljs-comment"># New:</span>
activation = get_kernel(<span class="hljs-string">&quot;kernels-community/activation&quot;</span>, version=<span class="hljs-number">1</span>)
<span class="hljs-comment"># Old:</span>
kernel_layer_mapping = {
<span class="hljs-string">&quot;SiluAndMul&quot;</span>: {
<span class="hljs-string">&quot;cuda&quot;</span>: LayerRepository(
repo_id=<span class="hljs-string">&quot;kernels-community/activation&quot;</span>,
layer_name=<span class="hljs-string">&quot;SiluAndMul&quot;</span>,
),
}
}
kernel_layer_mapping = {
<span class="hljs-string">&quot;SiluAndMul&quot;</span>: {
<span class="hljs-string">&quot;cuda&quot;</span>: LayerRepository(
repo_id=<span class="hljs-string">&quot;kernels-community/activation&quot;</span>,
layer_name=<span class="hljs-string">&quot;SiluAndMul&quot;</span>,
version=<span class="hljs-string">&quot;&gt;=0.0.2 &amp;&amp; &lt;0.1.0&quot;</span>,
),
}
}
<span class="hljs-comment"># New:</span>
kernel_layer_mapping = {
<span class="hljs-string">&quot;SiluAndMul&quot;</span>: {
<span class="hljs-string">&quot;cuda&quot;</span>: LayerRepository(
repo_id=<span class="hljs-string">&quot;kernels-community/activation&quot;</span>,
layer_name=<span class="hljs-string">&quot;SiluAndMul&quot;</span>,
version=<span class="hljs-number">1</span>,
),
}
}`,lang:"python",wrap:!1}}),f=new B({props:{title:"0.14",local:"014",headingTag:"h2"}}),k=new B({props:{title:"kernel repo type on the Hub",local:"kernel-repo-type-on-the-hub",headingTag:"h3"}}),W=new Ce({props:{source:"https://github.com/huggingface/kernels/blob/main/docs/source/migration.md"}}),{c(){r=i("meta"),X=s(),E=i("p"),Y=s(),M(J.$$.fragment),_=s(),M(d.$$.fragment),S=s(),M(w.$$.fragment),H=s(),M(j.$$.fragment),L=s(),U=i("p"),U.innerHTML=ae,V=s(),h=i("p"),h.textContent=ie,D=s(),x=i("p"),x.innerHTML=oe,q=s(),M(I.$$.fragment),R=s(),g=i("p"),g.textContent=re,G=s(),C=i("p"),C.textContent=Me,Z=s(),M(b.$$.fragment),z=s(),M(f.$$.fragment),O=s(),M(k.$$.fragment),F=s(),v=i("p"),v.innerHTML=ye,P=s(),$=i("p"),$.innerHTML=ce,K=s(),N=i("p"),N.innerHTML=pe,ee=s(),A=i("ol"),A.innerHTML=ue,te=s(),M(W.$$.fragment),le=s(),Q=i("p"),this.h()},l(e){const t=xe("svelte-u9bgzb",document.head);r=o(t,"META",{name:!0,content:!0}),t.forEach(l),X=a(e),E=o(e,"P",{}),Te(E).forEach(l),Y=a(e),y(J.$$.fragment,e),_=a(e),y(d.$$.fragment,e),S=a(e),y(w.$$.fragment,e),H=a(e),y(j.$$.fragment,e),L=a(e),U=o(e,"P",{"data-svelte-h":!0}),c(U)!=="svelte-1j0u906"&&(U.innerHTML=ae),V=a(e),h=o(e,"P",{"data-svelte-h":!0}),c(h)!=="svelte-1cirsrj"&&(h.textContent=ie),D=a(e),x=o(e,"P",{"data-svelte-h":!0}),c(x)!=="svelte-2bt5ad"&&(x.innerHTML=oe),q=a(e),y(I.$$.fragment,e),R=a(e),g=o(e,"P",{"data-svelte-h":!0}),c(g)!=="svelte-eoylg7"&&(g.textContent=re),G=a(e),C=o(e,"P",{"data-svelte-h":!0}),c(C)!=="svelte-1y70x1q"&&(C.textContent=Me),Z=a(e),y(b.$$.fragment,e),z=a(e),y(f.$$.fragment,e),O=a(e),y(k.$$.fragment,e),F=a(e),v=o(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-1b86c4m"&&(v.innerHTML=ye),P=a(e),$=o(e,"P",{"data-svelte-h":!0}),c($)!=="svelte-4bp98y"&&($.innerHTML=ce),K=a(e),N=o(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-rwp3tm"&&(N.innerHTML=pe),ee=a(e),A=o(e,"OL",{"data-svelte-h":!0}),c(A)!=="svelte-j0z5he"&&(A.innerHTML=ue),te=a(e),y(W.$$.fragment,e),le=a(e),Q=o(e,"P",{}),Te(Q).forEach(l),this.h()},h(){me(r,"name","hf:doc:metadata"),me(r,"content",fe)},m(e,t){Ie(document.head,r),n(e,X,t),n(e,E,t),n(e,Y,t),p(J,e,t),n(e,_,t),p(d,e,t),n(e,S,t),p(w,e,t),n(e,H,t),p(j,e,t),n(e,L,t),n(e,U,t),n(e,V,t),n(e,h,t),n(e,D,t),n(e,x,t),n(e,q,t),p(I,e,t),n(e,R,t),n(e,g,t),n(e,G,t),n(e,C,t),n(e,Z,t),p(b,e,t),n(e,z,t),p(f,e,t),n(e,O,t),p(k,e,t),n(e,F,t),n(e,v,t),n(e,P,t),n(e,$,t),n(e,K,t),n(e,N,t),n(e,ee,t),n(e,A,t),n(e,te,t),p(W,e,t),n(e,le,t),n(e,Q,t),ne=!0},p:we,i(e){ne||(u(J.$$.fragment,e),u(d.$$.fragment,e),u(w.$$.fragment,e),u(j.$$.fragment,e),u(I.$$.fragment,e),u(b.$$.fragment,e),u(f.$$.fragment,e),u(k.$$.fragment,e),u(W.$$.fragment,e),ne=!0)},o(e){T(J.$$.fragment,e),T(d.$$.fragment,e),T(w.$$.fragment,e),T(j.$$.fragment,e),T(I.$$.fragment,e),T(b.$$.fragment,e),T(f.$$.fragment,e),T(k.$$.fragment,e),T(W.$$.fragment,e),ne=!1},d(e){e&&(l(X),l(E),l(Y),l(_),l(S),l(H),l(L),l(U),l(V),l(h),l(D),l(x),l(q),l(R),l(g),l(G),l(C),l(Z),l(z),l(O),l(F),l(v),l(P),l($),l(K),l(N),l(ee),l(A),l(te),l(le),l(Q)),l(r),m(J,e),m(d,e),m(w,e),m(j,e),m(I,e),m(b,e),m(f,e),m(k,e),m(W,e)}}}const fe='{"title":"Migrating from older versions","local":"migrating-from-older-versions","sections":[{"title":"0.12","local":"012","sections":[{"title":"Adopting kernel versions","local":"adopting-kernel-versions","sections":[],"depth":3}],"depth":2},{"title":"0.14","local":"014","sections":[{"title":"kernel repo type on the Hub","local":"kernel-repo-type-on-the-hub","sections":[],"depth":3}],"depth":2}],"depth":1}';function ke(se){return je(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ee extends Ue{constructor(r){super(),he(this,r,ke,be,de,{})}}export{Ee as component};

Xet Storage Details

Size:
12.5 kB
·
Xet hash:
2a9fa93f69c85c2729e15f50b13afeaade300b73e1ff9736a8fd484822880497

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