Buckets:

download
raw
13 kB
import{s as he,n as je,o as xe}from"../chunks/scheduler.f3b1e791.js";import{S as Ie,i as ge,e as i,s,c as y,h as Ce,a as r,d as l,b as a,f as we,g as p,j as o,k as ie,l as fe,m as n,n as c,t as u,o as T,p as m}from"../chunks/index.023a9934.js";import{C as be}from"../chunks/CopyLLMTxtMenu.260ef33c.js";import{C as Ue}from"../chunks/CodeBlock.f5a2404f.js";import{H as B,E as ke}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.07a4ec62.js";function ve(re){let M,X,_,Y,d,S,w,L,U,H,h,q,j,oe=`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 is an error in kernels 0.15. Instead, use of a kernel should
always specify a version or revision (except for local kernels).`,V,x,Me=`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,J,ye=`<p>Version <code>0</code> kernels are excluded from the API compatibility requirement,
since it is used for alpha/beta-quality kernels that may still have
rapidly changing APIs.</p>`,R,I,pe=`You can find the versions that are supported by a kernel using the
<code>kernels versions command</code>. For example:`,G,g,Z,C,ce=`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.`,z,f,ue="Code that uses a kernel can be updated as follows:",O,b,F,k,P,v,K,$,Te=`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.`,ee,N,me=`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”).`,te,A,Je="To migrate an existing <code>model</code>-type kernel repository:",le,E,de=`<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’ <a href="/docs/kernels/pr_653/en/api/kernels#kernels.get_kernel">get_kernel()</a> and <a href="/docs/kernels/pr_653/en/api/layers#kernels.LayerRepository">LayerRepository</a> calls
to reference the new repository if the <code>repo-id</code> changed.</li>`,ne,W,se,Q,ae;return d=new be({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),w=new B({props:{title:"Migrating from older versions",local:"migrating-from-older-versions",headingTag:"h1"}}),U=new B({props:{title:"0.12",local:"012",headingTag:"h2"}}),h=new B({props:{title:"Adopting kernel versions",local:"adopting-kernel-versions",headingTag:"h3"}}),g=new Ue({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 Ue({props:{code:"JTIzJTIwT2xkJTNBJTBBYWN0aXZhdGlvbiUyMCUzRCUyMGdldF9rZXJuZWwoJTIya2VybmVscy1jb21tdW5pdHklMkZhY3RpdmF0aW9uJTIyKSUwQWFjdGl2YXRpb24lMjAlM0QlMjBnZXRfa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MiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGxheWVyX25hbWUlM0QlMjJTaWx1QW5kTXVsJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwdmVyc2lvbiUzRCUyMiUzRSUzRDAuMC4yJTIwJTI2JTI2JTIwJTNDMC4xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjApJTJDJTBBJTIwJTIwJTIwJTIwJTdEJTBBJTdEJTBBJTBBJTIzJTIwTmV3JTNBJTBBa2VybmVsX2xheWVyX21hcHBpbmclMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJTaWx1QW5kTXVsJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyY3VkYSUyMiUzQSUyMExheWVyUmVwb3NpdG9yeSglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXBvX2lkJTNEJTIya2VybmVscy1jb21tdW5pdHklMkZhY3RpdmF0aW9uJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbGF5ZXJfbmFtZSUzRCUyMlNpbHVBbmRNdWwlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB2ZXJzaW9uJTNEMSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCklMkMlMEElMjAlMjAlMjAlMjAlN0QlMEElN0Q=",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}}),k=new B({props:{title:"0.14",local:"014",headingTag:"h2"}}),v=new B({props:{title:"kernel repo type on the Hub",local:"kernel-repo-type-on-the-hub",headingTag:"h3"}}),W=new ke({props:{source:"https://github.com/huggingface/kernels/blob/main/docs/source/migration.md"}}),{c(){M=i("meta"),X=s(),_=i("p"),Y=s(),y(d.$$.fragment),S=s(),y(w.$$.fragment),L=s(),y(U.$$.fragment),H=s(),y(h.$$.fragment),q=s(),j=i("p"),j.innerHTML=oe,V=s(),x=i("p"),x.textContent=Me,D=s(),J=i("blockquote"),J.innerHTML=ye,R=s(),I=i("p"),I.innerHTML=pe,G=s(),y(g.$$.fragment),Z=s(),C=i("p"),C.textContent=ce,z=s(),f=i("p"),f.textContent=ue,O=s(),y(b.$$.fragment),F=s(),y(k.$$.fragment),P=s(),y(v.$$.fragment),K=s(),$=i("p"),$.innerHTML=Te,ee=s(),N=i("p"),N.innerHTML=me,te=s(),A=i("p"),A.innerHTML=Je,le=s(),E=i("ol"),E.innerHTML=de,ne=s(),y(W.$$.fragment),se=s(),Q=i("p"),this.h()},l(e){const t=Ce("svelte-u9bgzb",document.head);M=r(t,"META",{name:!0,content:!0}),t.forEach(l),X=a(e),_=r(e,"P",{}),we(_).forEach(l),Y=a(e),p(d.$$.fragment,e),S=a(e),p(w.$$.fragment,e),L=a(e),p(U.$$.fragment,e),H=a(e),p(h.$$.fragment,e),q=a(e),j=r(e,"P",{"data-svelte-h":!0}),o(j)!=="svelte-1ypqadk"&&(j.innerHTML=oe),V=a(e),x=r(e,"P",{"data-svelte-h":!0}),o(x)!=="svelte-1cirsrj"&&(x.textContent=Me),D=a(e),J=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(J)!=="svelte-n51n6u"&&(J.innerHTML=ye),R=a(e),I=r(e,"P",{"data-svelte-h":!0}),o(I)!=="svelte-2bt5ad"&&(I.innerHTML=pe),G=a(e),p(g.$$.fragment,e),Z=a(e),C=r(e,"P",{"data-svelte-h":!0}),o(C)!=="svelte-eoylg7"&&(C.textContent=ce),z=a(e),f=r(e,"P",{"data-svelte-h":!0}),o(f)!=="svelte-1y70x1q"&&(f.textContent=ue),O=a(e),p(b.$$.fragment,e),F=a(e),p(k.$$.fragment,e),P=a(e),p(v.$$.fragment,e),K=a(e),$=r(e,"P",{"data-svelte-h":!0}),o($)!=="svelte-1b86c4m"&&($.innerHTML=Te),ee=a(e),N=r(e,"P",{"data-svelte-h":!0}),o(N)!=="svelte-4bp98y"&&(N.innerHTML=me),te=a(e),A=r(e,"P",{"data-svelte-h":!0}),o(A)!=="svelte-rwp3tm"&&(A.innerHTML=Je),le=a(e),E=r(e,"OL",{"data-svelte-h":!0}),o(E)!=="svelte-1d8t3iq"&&(E.innerHTML=de),ne=a(e),p(W.$$.fragment,e),se=a(e),Q=r(e,"P",{}),we(Q).forEach(l),this.h()},h(){ie(M,"name","hf:doc:metadata"),ie(M,"content",$e),ie(J,"class","note")},m(e,t){fe(document.head,M),n(e,X,t),n(e,_,t),n(e,Y,t),c(d,e,t),n(e,S,t),c(w,e,t),n(e,L,t),c(U,e,t),n(e,H,t),c(h,e,t),n(e,q,t),n(e,j,t),n(e,V,t),n(e,x,t),n(e,D,t),n(e,J,t),n(e,R,t),n(e,I,t),n(e,G,t),c(g,e,t),n(e,Z,t),n(e,C,t),n(e,z,t),n(e,f,t),n(e,O,t),c(b,e,t),n(e,F,t),c(k,e,t),n(e,P,t),c(v,e,t),n(e,K,t),n(e,$,t),n(e,ee,t),n(e,N,t),n(e,te,t),n(e,A,t),n(e,le,t),n(e,E,t),n(e,ne,t),c(W,e,t),n(e,se,t),n(e,Q,t),ae=!0},p:je,i(e){ae||(u(d.$$.fragment,e),u(w.$$.fragment,e),u(U.$$.fragment,e),u(h.$$.fragment,e),u(g.$$.fragment,e),u(b.$$.fragment,e),u(k.$$.fragment,e),u(v.$$.fragment,e),u(W.$$.fragment,e),ae=!0)},o(e){T(d.$$.fragment,e),T(w.$$.fragment,e),T(U.$$.fragment,e),T(h.$$.fragment,e),T(g.$$.fragment,e),T(b.$$.fragment,e),T(k.$$.fragment,e),T(v.$$.fragment,e),T(W.$$.fragment,e),ae=!1},d(e){e&&(l(X),l(_),l(Y),l(S),l(L),l(H),l(q),l(j),l(V),l(x),l(D),l(J),l(R),l(I),l(G),l(Z),l(C),l(z),l(f),l(O),l(F),l(P),l(K),l($),l(ee),l(N),l(te),l(A),l(le),l(E),l(ne),l(se),l(Q)),l(M),m(d,e),m(w,e),m(U,e),m(h,e),m(g,e),m(b,e),m(k,e),m(v,e),m(W,e)}}}const $e='{"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 Ne(re){return xe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Be extends Ie{constructor(M){super(),ge(this,M,Ne,ve,he,{})}}export{Be as component};

Xet Storage Details

Size:
13 kB
·
Xet hash:
5519fa4cd2327212d99f57acc18b5c0eb0749886f0fab6fe1f68735ccfbb93da

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