Buckets:
| import{s as We,c as ul,u as cl,g as $l,d as bl,e as hl,f as je,o as Ml,n as I}from"../chunks/scheduler.852ec091.js";import{S as Ge,i as Ie,g as U,s as $,h as J,j as Xt,f as r,c as b,k as it,a as f,d as h,t as M,z as wl,m as yl,n as gl,y as Re,B as Tl,o as Ul,e as rl,p as Jl,b as Cl,r as w,A as kl,u as y,x as C,v as g,w as T}from"../chunks/index.28275fd3.js";import{T as P}from"../chunks/Tip.9f398c59.js";import{C as X}from"../chunks/CodeBlock.c3366071.js";import{H as L,E as _l}from"../chunks/EditOnGithub.582011f0.js";import{e as pl}from"../chunks/each.e59479a4.js";import{w as vl}from"../chunks/index.268e315a.js";const Lt=vl({});function jl(u,t){const a=new URL(window.location.href),e=new URLSearchParams(a.search);e.set(u,t),a.search=e.toString(),history.replaceState(null,"",a.toString())}function Rl(u){const t=new URL(window.location.href);return new URLSearchParams(t.search).get(u)}function fl(u,t,a){const e=u.slice();return e[7]=t[a],e}function dl(u){let t,a=u[7]+"",e,s,i,p,n;function d(){return u[6](u[7])}return{c(){t=U("div"),e=yl(a),s=$(),this.h()},l(o){t=J(o,"DIV",{class:!0});var c=Xt(t);e=gl(c,a),s=b(c),c.forEach(r),this.h()},h(){it(t,"class",i="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd "+(u[2][u[0]]===u[7]?"border-gray-800 bg-black dark:bg-gray-700 text-white":"text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm"))},m(o,c){f(o,t,c),Re(t,e),Re(t,s),p||(n=Tl(t,"click",d),p=!0)},p(o,c){u=o,c&2&&a!==(a=u[7]+"")&&Ul(e,a),c&7&&i!==(i="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd "+(u[2][u[0]]===u[7]?"border-gray-800 bg-black dark:bg-gray-700 text-white":"text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm"))&&it(t,"class",i)},d(o){o&&r(t),p=!1,n()}}}function Wl(u){let t,a,e,s,i=pl(u[1]),p=[];for(let o=0;o<i.length;o+=1)p[o]=dl(fl(u,i,o));const n=u[5].default,d=ul(n,u,u[4],null);return{c(){t=U("div");for(let o=0;o<p.length;o+=1)p[o].c();a=$(),e=U("div"),d&&d.c(),this.h()},l(o){t=J(o,"DIV",{class:!0});var c=Xt(t);for(let R=0;R<p.length;R+=1)p[R].l(c);c.forEach(r),a=b(o),e=J(o,"DIV",{class:!0});var _=Xt(e);d&&d.l(_),_.forEach(r),this.h()},h(){it(t,"class","flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"),it(e,"class","language-select")},m(o,c){f(o,t,c);for(let _=0;_<p.length;_+=1)p[_]&&p[_].m(t,null);f(o,a,c),f(o,e,c),d&&d.m(e,null),s=!0},p(o,[c]){if(c&15){i=pl(o[1]);let _;for(_=0;_<i.length;_+=1){const R=fl(o,i,_);p[_]?p[_].p(R,c):(p[_]=dl(R),p[_].c(),p[_].m(t,null))}for(;_<p.length;_+=1)p[_].d(1);p.length=i.length}d&&d.p&&(!s||c&16)&&cl(d,n,o,o[4],s?bl(n,o[4],c,null):$l(o[4]),null)},i(o){s||(h(d,o),s=!0)},o(o){M(d,o),s=!1},d(o){o&&(r(t),r(a),r(e)),wl(p,o),d&&d.d(o)}}}function Gl(u,t,a){let e;hl(u,Lt,c=>a(2,e=c));let{$$slots:s={},$$scope:i}=t,{id:p}=t,{options:n}=t;je(Lt,e[p]=n[0],e);function d(c){je(Lt,e[p]=c,e),jl(p,c)}Ml(()=>{const c=Rl(p);c&&n.includes(c)&&je(Lt,e[p]=c,e)});const o=c=>d(c);return u.$$set=c=>{"id"in c&&a(0,p=c.id),"options"in c&&a(1,n=c.options),"$$scope"in c&&a(4,i=c.$$scope)},[p,n,e,d,i,s,o]}class Yt extends Ge{constructor(t){super(),Ie(this,t,Gl,Wl,We,{id:0,options:1})}}function ml(u){let t;const a=u[4].default,e=ul(a,u,u[3],null);return{c(){e&&e.c()},l(s){e&&e.l(s)},m(s,i){e&&e.m(s,i),t=!0},p(s,i){e&&e.p&&(!t||i&8)&&cl(e,a,s,s[3],t?bl(a,s[3],i,null):$l(s[3]),null)},i(s){t||(h(e,s),t=!0)},o(s){M(e,s),t=!1},d(s){e&&e.d(s)}}}function Il(u){let t,a,e=u[2][u[0]]===u[1]&&ml(u);return{c(){e&&e.c(),t=rl()},l(s){e&&e.l(s),t=rl()},m(s,i){e&&e.m(s,i),f(s,t,i),a=!0},p(s,[i]){s[2][s[0]]===s[1]?e?(e.p(s,i),i&7&&h(e,1)):(e=ml(s),e.c(),h(e,1),e.m(t.parentNode,t)):e&&(Jl(),M(e,1,1,()=>{e=null}),Cl())},i(s){a||(h(e),a=!0)},o(s){M(e),a=!1},d(s){s&&r(t),e&&e.d(s)}}}function Zl(u,t,a){let e;hl(u,Lt,d=>a(2,e=d));let{$$slots:s={},$$scope:i}=t,{id:p}=t,{option:n}=t;return u.$$set=d=>{"id"in d&&a(0,p=d.id),"option"in d&&a(1,n=d.option),"$$scope"in d&&a(3,i=d.$$scope)},[p,n,e,i,s]}class Y extends Ge{constructor(t){super(),Ie(this,t,Zl,Il,We,{id:0,option:1})}}function xl(u){let t,a='For a high-level overview of backend support and compatibility, see the <a href="#multi-backend">Multi-backend Support</a> section.';return{c(){t=U("p"),t.innerHTML=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-cjext7"&&(t.innerHTML=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function Yl(u){let t,a="<code>bitsandbytes >= 0.45.0</code> no longer supports Kepler GPUs.",e,s,i="Support for Maxwell GPUs is deprecated and will be removed in a future release. For the best results, a Turing generation device or newer is recommended.";return{c(){t=U("p"),t.innerHTML=a,e=$(),s=U("p"),s.textContent=i},l(p){t=J(p,"P",{"data-svelte-h":!0}),C(t)!=="svelte-suyj9p"&&(t.innerHTML=a),e=b(p),s=J(p,"P",{"data-svelte-h":!0}),C(s)!=="svelte-5aaz3f"&&(s.textContent=i)},m(p,n){f(p,t,n),f(p,e,n),f(p,s,n)},p:I,d(p){p&&(r(t),r(e),r(s))}}}function Bl(u){let t,a;return t=new X({props:{code:"JTIzJTIwTm90ZSUyQyUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBCTkJzJTIwZGVwZW5kZW5jaWVzJTJDJTIwYXBwZW5kJTIwdGhlJTIwJTYwLS1uby1kZXBzJTYwJTIwZmxhZyElMEFwaXAlMjBpbnN0YWxsJTIwLS1mb3JjZS1yZWluc3RhbGwlMjAnaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGYml0c2FuZGJ5dGVzLWZvdW5kYXRpb24lMkZiaXRzYW5kYnl0ZXMlMkZyZWxlYXNlcyUyRmRvd25sb2FkJTJGY29udGludW91cy1yZWxlYXNlX21haW4lMkZiaXRzYW5kYnl0ZXMtMC40NC4yLmRldjAtcHkzLW5vbmUtbWFueWxpbnV4XzJfMjRfeDg2XzY0LndobCc=",highlighted:'<span class="hljs-comment"># Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!</span>\n<span class="hljs-attribute">pip</span> install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-<span class="hljs-number">0</span>.<span class="hljs-number">44</span>.<span class="hljs-number">2</span>.dev0-py3-none-manylinux_2_24_x86_64.whl'',wrap:!1}}),{c(){w(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,s){g(t,e,s),a=!0},p:I,i(e){a||(h(t.$$.fragment,e),a=!0)},o(e){M(t.$$.fragment,e),a=!1},d(e){T(t,e)}}}function Ll(u){let t,a;return t=new X({props:{code:"JTIzJTIwTm90ZSUyQyUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBCTkJzJTIwZGVwZW5kZW5jaWVzJTJDJTIwYXBwZW5kJTIwdGhlJTIwJTYwLS1uby1kZXBzJTYwJTIwZmxhZyElMEFwaXAlMjBpbnN0YWxsJTIwLS1mb3JjZS1yZWluc3RhbGwlMjAnaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGYml0c2FuZGJ5dGVzLWZvdW5kYXRpb24lMkZiaXRzYW5kYnl0ZXMlMkZyZWxlYXNlcyUyRmRvd25sb2FkJTJGY29udGludW91cy1yZWxlYXNlX211bHRpLWJhY2tlbmQtcmVmYWN0b3IlMkZiaXRzYW5kYnl0ZXMtMC40NC4xLmRldjAtcHkzLW5vbmUtbWFjb3N4XzEzXzFfYXJtNjQud2hsJw==",highlighted:'<span class="hljs-comment"># Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!</span>\n<span class="hljs-attribute">pip</span> install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-<span class="hljs-number">0</span>.<span class="hljs-number">44</span>.<span class="hljs-number">1</span>.dev0-py3-none-macosx_13_1_arm64.whl'',wrap:!1}}),{c(){w(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,s){g(t,e,s),a=!0},p:I,i(e){a||(h(t.$$.fragment,e),a=!0)},o(e){M(t.$$.fragment,e),a=!1},d(e){T(t,e)}}}function Xl(u){let t,a,e,s;return t=new Y({props:{id:"OS",option:"Linux",$$slots:{default:[Bl]},$$scope:{ctx:u}}}),e=new Y({props:{id:"OS",option:"Windows",$$slots:{default:[Ll]},$$scope:{ctx:u}}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment)},l(i){y(t.$$.fragment,i),a=b(i),y(e.$$.fragment,i)},m(i,p){g(t,i,p),f(i,a,p),g(e,i,p),s=!0},p(i,p){const n={};p&2&&(n.$$scope={dirty:p,ctx:i}),t.$set(n);const d={};p&2&&(d.$$scope={dirty:p,ctx:i}),e.$set(d)},i(i){s||(h(t.$$.fragment,i),h(e.$$.fragment,i),s=!0)},o(i){M(t.$$.fragment,i),M(e.$$.fragment,i),s=!1},d(i){i&&r(a),T(t,i),T(e,i)}}}function Nl(u){let t,a="Don’t hesitate to compile from source! The process is pretty straight forward and resilient. This might be needed for older CUDA versions or other less common configurations, which we don’t support out of the box due to package size.";return{c(){t=U("p"),t.textContent=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-4d0ae7"&&(t.textContent=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function Al(u){let t,a="If you have multiple versions of CUDA installed or installed it in a non-standard location, please refer to CMake CUDA documentation for how to configure the CUDA compiler.";return{c(){t=U("p"),t.textContent=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-raeog1"&&(t.textContent=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function Sl(u){let t,a="To compile from source, you need CMake >= <strong>3.22.1</strong> and Python >= <strong>3.9</strong> installed. Make sure you have a compiler installed to compile C++ (<code>gcc</code>, <code>make</code>, headers, etc.).",e,s,i="For example, to install a compiler and CMake on Ubuntu:",p,n,d,o,c='You should also install CUDA Toolkit by following the <a href="https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html" rel="nofollow">NVIDIA CUDA Installation Guide for Linux</a> guide from NVIDIA. The current expected CUDA Toolkit version is <strong>11.1+</strong> and it is recommended to install <strong>GCC >= 7.3</strong> and required to have at least <strong>GCC >= 6</strong>.',_,R,k="Refer to the following table if you’re using another CUDA Toolkit version.",W,x,V="<thead><tr><th>CUDA Toolkit</th> <th>GCC</th></tr></thead> <tbody><tr><td>>= 11.4.1</td> <td>>= 11</td></tr> <tr><td>>= 12.0</td> <td>>= 12</td></tr> <tr><td>>= 12.4</td> <td>>= 13</td></tr></tbody>",B,j,Z="Now to install the bitsandbytes package from source, run the following commands:",at,A,S,N,H;return n=new X({props:{code:"YXB0LWdldCUyMGluc3RhbGwlMjAteSUyMGJ1aWxkLWVzc2VudGlhbCUyMGNtYWtl",highlighted:"apt-get install -y build-essential cmake",wrap:!1}}),A=new X({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQXBpcCUyMGluc3RhbGwlMjAtciUyMHJlcXVpcmVtZW50cy1kZXYudHh0JTBBY21ha2UlMjAtRENPTVBVVEVfQkFDS0VORCUzRGN1ZGElMjAtUyUyMC4lMEFtYWtlJTBBcGlwJTIwaW5zdGFsbCUyMC1lJTIwLiUyMCUyMCUyMCUyMyUyMCU2MC1lJTYwJTIwZm9yJTIwJTIyZWRpdGFibGUlMjIlMjBpbnN0YWxsJTJDJTIwd2hlbiUyMGRldmVsb3BpbmclMjBCTkIlMjAob3RoZXJ3aXNlJTIwbGVhdmUlMjB0aGF0JTIwb3V0KQ==",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/bitsandbytes-foundation/bitsandbytes.git && <span class="hljs-built_in">cd</span> bitsandbytes/ | |
| pip install -r requirements-dev.txt | |
| cmake -DCOMPUTE_BACKEND=cuda -S . | |
| make | |
| pip install -e . <span class="hljs-comment"># \`-e\` for "editable" install, when developing BNB (otherwise leave that out)</span>`,wrap:!1}}),N=new P({props:{warning:!1,$$slots:{default:[Al]},$$scope:{ctx:u}}}),{c(){t=U("p"),t.innerHTML=a,e=$(),s=U("p"),s.textContent=i,p=$(),w(n.$$.fragment),d=$(),o=U("p"),o.innerHTML=c,_=$(),R=U("p"),R.textContent=k,W=$(),x=U("table"),x.innerHTML=V,B=$(),j=U("p"),j.textContent=Z,at=$(),w(A.$$.fragment),S=$(),w(N.$$.fragment)},l(v){t=J(v,"P",{"data-svelte-h":!0}),C(t)!=="svelte-uvcppt"&&(t.innerHTML=a),e=b(v),s=J(v,"P",{"data-svelte-h":!0}),C(s)!=="svelte-noyxvz"&&(s.textContent=i),p=b(v),y(n.$$.fragment,v),d=b(v),o=J(v,"P",{"data-svelte-h":!0}),C(o)!=="svelte-gmjw5q"&&(o.innerHTML=c),_=b(v),R=J(v,"P",{"data-svelte-h":!0}),C(R)!=="svelte-1agbdv5"&&(R.textContent=k),W=b(v),x=J(v,"TABLE",{"data-svelte-h":!0}),C(x)!=="svelte-1nj1xe4"&&(x.innerHTML=V),B=b(v),j=J(v,"P",{"data-svelte-h":!0}),C(j)!=="svelte-1fitvy1"&&(j.textContent=Z),at=b(v),y(A.$$.fragment,v),S=b(v),y(N.$$.fragment,v)},m(v,G){f(v,t,G),f(v,e,G),f(v,s,G),f(v,p,G),g(n,v,G),f(v,d,G),f(v,o,G),f(v,_,G),f(v,R,G),f(v,W,G),f(v,x,G),f(v,B,G),f(v,j,G),f(v,at,G),g(A,v,G),f(v,S,G),g(N,v,G),H=!0},p(v,G){const E={};G&2&&(E.$$scope={dirty:G,ctx:v}),N.$set(E)},i(v){H||(h(n.$$.fragment,v),h(A.$$.fragment,v),h(N.$$.fragment,v),H=!0)},o(v){M(n.$$.fragment,v),M(A.$$.fragment,v),M(N.$$.fragment,v),H=!1},d(v){v&&(r(t),r(e),r(s),r(p),r(d),r(o),r(_),r(R),r(W),r(x),r(B),r(j),r(at),r(S)),T(n,v),T(A,v),T(N,v)}}}function Hl(u){let t,a="Windows systems require Visual Studio with C++ support as well as an installation of the CUDA SDK.",e,s,i='To compile from source, you need CMake >= <strong>3.22.1</strong> and Python >= <strong>3.9</strong> installed. You should also install CUDA Toolkit by following the <a href="https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html" rel="nofollow">CUDA Installation Guide for Windows</a> guide from NVIDIA.',p,n,d="Refer to the following table if you’re using another CUDA Toolkit version.",o,c,_="<thead><tr><th>CUDA Toolkit</th> <th>MSVC</th></tr></thead> <tbody><tr><td>>= 11.6</td> <td>19.30+ (VS2022)</td></tr></tbody>",R,k,W,x,V='Big thanks to <a href="https://github.com/wkpark" rel="nofollow">wkpark</a>, <a href="https://github.com/Jamezo97" rel="nofollow">Jamezo97</a>, <a href="https://github.com/rickardp" rel="nofollow">rickardp</a>, <a href="https://github.com/akx" rel="nofollow">akx</a> for their amazing contributions to make bitsandbytes compatible with Windows.',B;return k=new X({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQWNtYWtlJTIwLURDT01QVVRFX0JBQ0tFTkQlM0RjdWRhJTIwLVMlMjAuJTBBY21ha2UlMjAtLWJ1aWxkJTIwLiUyMC0tY29uZmlnJTIwUmVsZWFzZSUwQXBpcCUyMGluc3RhbGwlMjAtZSUyMC4lMjAlMjAlMjAlMjMlMjAlNjAtZSU2MCUyMGZvciUyMCUyMmVkaXRhYmxlJTIyJTIwaW5zdGFsbCUyQyUyMHdoZW4lMjBkZXZlbG9waW5nJTIwQk5CJTIwKG90aGVyd2lzZSUyMGxlYXZlJTIwdGhhdCUyMG91dCk=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/bitsandbytes-foundation/bitsandbytes.git && <span class="hljs-built_in">cd</span> bitsandbytes/ | |
| cmake -DCOMPUTE_BACKEND=cuda -S . | |
| cmake --build . --config Release | |
| pip install -e . <span class="hljs-comment"># \`-e\` for "editable" install, when developing BNB (otherwise leave that out)</span>`,wrap:!1}}),{c(){t=U("p"),t.textContent=a,e=$(),s=U("p"),s.innerHTML=i,p=$(),n=U("p"),n.textContent=d,o=$(),c=U("table"),c.innerHTML=_,R=$(),w(k.$$.fragment),W=$(),x=U("p"),x.innerHTML=V},l(j){t=J(j,"P",{"data-svelte-h":!0}),C(t)!=="svelte-1ngyk0s"&&(t.textContent=a),e=b(j),s=J(j,"P",{"data-svelte-h":!0}),C(s)!=="svelte-1ja2l1s"&&(s.innerHTML=i),p=b(j),n=J(j,"P",{"data-svelte-h":!0}),C(n)!=="svelte-1agbdv5"&&(n.textContent=d),o=b(j),c=J(j,"TABLE",{"data-svelte-h":!0}),C(c)!=="svelte-1nj7txn"&&(c.innerHTML=_),R=b(j),y(k.$$.fragment,j),W=b(j),x=J(j,"P",{"data-svelte-h":!0}),C(x)!=="svelte-e0ivb"&&(x.innerHTML=V)},m(j,Z){f(j,t,Z),f(j,e,Z),f(j,s,Z),f(j,p,Z),f(j,n,Z),f(j,o,Z),f(j,c,Z),f(j,R,Z),g(k,j,Z),f(j,W,Z),f(j,x,Z),B=!0},p:I,i(j){B||(h(k.$$.fragment,j),B=!0)},o(j){M(k.$$.fragment,j),B=!1},d(j){j&&(r(t),r(e),r(s),r(p),r(n),r(o),r(c),r(R),r(W),r(x)),T(k,j)}}}function Pl(u){let t,a,e,s;return t=new Y({props:{id:"source",option:"Linux",$$slots:{default:[Sl]},$$scope:{ctx:u}}}),e=new Y({props:{id:"source",option:"Windows",$$slots:{default:[Hl]},$$scope:{ctx:u}}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment)},l(i){y(t.$$.fragment,i),a=b(i),y(e.$$.fragment,i)},m(i,p){g(t,i,p),f(i,a,p),g(e,i,p),s=!0},p(i,p){const n={};p&2&&(n.$$scope={dirty:p,ctx:i}),t.$set(n);const d={};p&2&&(d.$$scope={dirty:p,ctx:i}),e.$set(d)},i(i){s||(h(t.$$.fragment,i),h(e.$$.fragment,i),s=!0)},o(i){M(t.$$.fragment,i),M(e.$$.fragment,i),s=!1},d(i){i&&r(a),T(t,i),T(e,i)}}}function Vl(u){let t,a="It is recommended to add the following lines to the <code>.bashrc</code> file to make them permanent.";return{c(){t=U("p"),t.innerHTML=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-143buxs"&&(t.innerHTML=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function El(u){let t,a='This functionality is currently in preview and not yet production-ready. We very much welcome community feedback, contributions and leadership on topics like Apple Silicon as well as other less common accellerators! For more information, see <a href="./non_cuda_backends">this guide on multi-backend support</a>.';return{c(){t=U("p"),t.innerHTML=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-178d4s9"&&(t.innerHTML=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function zl(u){let t,a='<a href="https://github.com/bitsandbytes-foundation/bitsandbytes/discussions/1339" rel="nofollow"><strong>Multi-backend refactor: Alpha release (AMD ROCm ONLY)</strong></a>';return{c(){t=U("p"),t.innerHTML=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-1jd3851"&&(t.innerHTML=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function Dl(u){let t,a='<a href="https://github.com/bitsandbytes-foundation/bitsandbytes/discussions/1338" rel="nofollow"><strong>Multi-backend refactor: Alpha release (INTEL ONLY)</strong></a>';return{c(){t=U("p"),t.innerHTML=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-bbgtx3"&&(t.innerHTML=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function Ql(u){let t,a='<a href="https://github.com/bitsandbytes-foundation/bitsandbytes/discussions/1340" rel="nofollow"><strong>Github Discussion space on coordinating the kickoff of MPS backend development</strong></a>';return{c(){t=U("p"),t.innerHTML=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-1ilpxiv"&&(t.innerHTML=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function Fl(u){let t,a,e,s,i,p;return t=new Y({props:{id:"platform",option:"ROCm",$$slots:{default:[zl]},$$scope:{ctx:u}}}),e=new Y({props:{id:"platform",option:"Intel CPU+GPU",$$slots:{default:[Dl]},$$scope:{ctx:u}}}),i=new Y({props:{id:"platform",option:"Apple Silicon / Metal (MPS)",$$slots:{default:[Ql]},$$scope:{ctx:u}}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment),s=$(),w(i.$$.fragment)},l(n){y(t.$$.fragment,n),a=b(n),y(e.$$.fragment,n),s=b(n),y(i.$$.fragment,n)},m(n,d){g(t,n,d),f(n,a,d),g(e,n,d),f(n,s,d),g(i,n,d),p=!0},p(n,d){const o={};d&2&&(o.$$scope={dirty:d,ctx:n}),t.$set(o);const c={};d&2&&(c.$$scope={dirty:d,ctx:n}),e.$set(c);const _={};d&2&&(_.$$scope={dirty:d,ctx:n}),i.$set(_)},i(n){p||(h(t.$$.fragment,n),h(e.$$.fragment,n),h(i.$$.fragment,n),p=!0)},o(n){M(t.$$.fragment,n),M(e.$$.fragment,n),M(i.$$.fragment,n),p=!1},d(n){n&&(r(a),r(s)),T(t,n),T(e,n),T(i,n)}}}function Ol(u){let t,a='Pre-compiled binaries are only built for ROCm versions <code>6.1.0</code>/<code>6.1.1</code>/<code>6.1.2</code>/<code>6.2.0</code> and <code>gfx90a</code>, <code>gfx942</code>, <code>gfx1100</code> GPU architectures. <a href="#multi-backend-pip">Find the pip install instructions here</a>.',e,s,i='Other supported versions that don’t come with pre-compiled binaries <a href="#multi-backend-compile">can be compiled for with these instructions</a>.',p,n,d="<strong>Windows is not supported for the ROCm backend</strong>; also not WSL2 to our knowledge.";return{c(){t=U("p"),t.innerHTML=a,e=$(),s=U("p"),s.innerHTML=i,p=$(),n=U("p"),n.innerHTML=d},l(o){t=J(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-qw1mn7"&&(t.innerHTML=a),e=b(o),s=J(o,"P",{"data-svelte-h":!0}),C(s)!=="svelte-1yin7gn"&&(s.innerHTML=i),p=b(o),n=J(o,"P",{"data-svelte-h":!0}),C(n)!=="svelte-5vnmxq"&&(n.innerHTML=d)},m(o,c){f(o,t,c),f(o,e,c),f(o,s,c),f(o,p,c),f(o,n,c)},p:I,d(o){o&&(r(t),r(e),r(s),r(p),r(n))}}}function ql(u){let t,a='If you would like to install ROCm and PyTorch on bare metal, skip the Docker steps and refer to ROCm’s official guides at <a href="https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/install-overview.html#rocm-install-overview" rel="nofollow">ROCm installation overview</a> and <a href="https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/3rd-party/pytorch-install.html#using-wheels-package" rel="nofollow">Installing PyTorch for ROCm</a> (Step 3 of wheels build for quick installation). Special note: please make sure to get the respective ROCm-specific PyTorch wheel for the installed ROCm version, e.g. <code>https://download.pytorch.org/whl/nightly/rocm6.2/</code>!';return{c(){t=U("p"),t.innerHTML=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-1ioez28"&&(t.innerHTML=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function Kl(u){let t,a,e,s,i,p;return t=new P({props:{warning:!0,$$slots:{default:[Ol]},$$scope:{ctx:u}}}),e=new P({props:{warning:!1,$$slots:{default:[ql]},$$scope:{ctx:u}}}),i=new X({props:{code:"JTIzJTIwQ3JlYXRlJTIwYSUyMGRvY2tlciUyMGNvbnRhaW5lciUyMHdpdGglMjBsYXRlc3QlMjBST0NtJTIwaW1hZ2UlMkMlMjB3aGljaCUyMGluY2x1ZGVzJTIwUk9DbSUyMGxpYnJhcmllcyUwQWRvY2tlciUyMHB1bGwlMjByb2NtJTJGZGV2LXVidW50dS0yMi4wNCUzQTYuMS4yLWNvbXBsZXRlJTBBZG9ja2VyJTIwcnVuJTIwLWl0JTIwLS1kZXZpY2UlM0QlMkZkZXYlMkZrZmQlMjAtLWRldmljZSUzRCUyRmRldiUyRmRyaSUyMC0tZ3JvdXAtYWRkJTIwdmlkZW8lMjByb2NtJTJGZGV2LXVidW50dS0yMi4wNCUzQTYuMS4yLWNvbXBsZXRlJTBBYXB0LWdldCUyMHVwZGF0ZSUyMCUyNiUyNiUyMGFwdC1nZXQlMjBpbnN0YWxsJTIwLXklMjBnaXQlMjAlMjYlMjYlMjBjZCUyMGhvbWUlMEElMEElMjMlMjBJbnN0YWxsJTIwcHl0b3JjaCUyMGNvbXBhdGlibGUlMjB3aXRoJTIwYWJvdmUlMjBST0NtJTIwdmVyc2lvbiUwQXBpcCUyMGluc3RhbGwlMjB0b3JjaCUyMC0taW5kZXgtdXJsJTIwaHR0cHMlM0ElMkYlMkZkb3dubG9hZC5weXRvcmNoLm9yZyUyRndobCUyRnJvY202LjElMkY=",highlighted:`<span class="hljs-comment"># Create a docker container with latest ROCm image, which includes ROCm libraries</span> | |
| docker pull rocm/dev-ubuntu-22.04:6.1.2-complete | |
| docker run -it --device=/dev/kfd --device=/dev/dri --group-add video rocm/dev-ubuntu-22.04:6.1.2-complete | |
| apt-get update && apt-get install -y git && <span class="hljs-built_in">cd</span> home | |
| <span class="hljs-comment"># Install pytorch compatible with above ROCm version</span> | |
| pip install torch --index-url https://download.pytorch.org/whl/rocm6.1/`,wrap:!1}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment),s=$(),w(i.$$.fragment)},l(n){y(t.$$.fragment,n),a=b(n),y(e.$$.fragment,n),s=b(n),y(i.$$.fragment,n)},m(n,d){g(t,n,d),f(n,a,d),g(e,n,d),f(n,s,d),g(i,n,d),p=!0},p(n,d){const o={};d&2&&(o.$$scope={dirty:d,ctx:n}),t.$set(o);const c={};d&2&&(c.$$scope={dirty:d,ctx:n}),e.$set(c)},i(n){p||(h(t.$$.fragment,n),h(e.$$.fragment,n),h(i.$$.fragment,n),p=!0)},o(n){M(t.$$.fragment,n),M(e.$$.fragment,n),M(i.$$.fragment,n),p=!1},d(n){n&&(r(a),r(s)),T(t,n),T(e,n),T(i,n)}}}function tn(u){let t,a="Compatible hardware and functioning <code>import intel_extension_for_pytorch as ipex</code> capable environment with Python <code>3.10</code> as the minimum requirement.",e,s,i='Please refer to <a href="https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=cpu&version=v2.4.0%2bcpu&os=linux%2fwsl2" rel="nofollow">the official Intel installations instructions</a> for guidance on how to pip install the necessary <code>intel_extension_for_pytorch</code> dependency.';return{c(){t=U("p"),t.innerHTML=a,e=$(),s=U("p"),s.innerHTML=i},l(p){t=J(p,"P",{"data-svelte-h":!0}),C(t)!=="svelte-6y2bpf"&&(t.innerHTML=a),e=b(p),s=J(p,"P",{"data-svelte-h":!0}),C(s)!=="svelte-a5idjy"&&(s.innerHTML=i)},m(p,n){f(p,t,n),f(p,e,n),f(p,s,n)},p:I,d(p){p&&(r(t),r(e),r(s))}}}function en(u){let t,a='Apple Silicon support is still a WIP. Please visit and write us in <a href="https://github.com/bitsandbytes-foundation/bitsandbytes/discussions/1340" rel="nofollow">this Github Discussion space on coordinating the kickoff of MPS backend development</a> and coordinate a community-led effort to implement this backend.';return{c(){t=U("p"),t.innerHTML=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-xvfuyu"&&(t.innerHTML=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function ln(u){let t,a;return t=new P({props:{warning:!1,$$slots:{default:[en]},$$scope:{ctx:u}}}),{c(){w(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,s){g(t,e,s),a=!0},p(e,s){const i={};s&2&&(i.$$scope={dirty:s,ctx:e}),t.$set(i)},i(e){a||(h(t.$$.fragment,e),a=!0)},o(e){M(t.$$.fragment,e),a=!1},d(e){T(t,e)}}}function nn(u){let t,a,e,s,i,p;return t=new Y({props:{id:"backend",option:"AMD ROCm",$$slots:{default:[Kl]},$$scope:{ctx:u}}}),e=new Y({props:{id:"backend",option:"Intel CPU + GPU",$$slots:{default:[tn]},$$scope:{ctx:u}}}),i=new Y({props:{id:"backend",option:"Apple Silicon (MPS)",$$slots:{default:[ln]},$$scope:{ctx:u}}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment),s=$(),w(i.$$.fragment)},l(n){y(t.$$.fragment,n),a=b(n),y(e.$$.fragment,n),s=b(n),y(i.$$.fragment,n)},m(n,d){g(t,n,d),f(n,a,d),g(e,n,d),f(n,s,d),g(i,n,d),p=!0},p(n,d){const o={};d&2&&(o.$$scope={dirty:d,ctx:n}),t.$set(o);const c={};d&2&&(c.$$scope={dirty:d,ctx:n}),e.$set(c);const _={};d&2&&(_.$$scope={dirty:d,ctx:n}),i.$set(_)},i(n){p||(h(t.$$.fragment,n),h(e.$$.fragment,n),h(i.$$.fragment,n),p=!0)},o(n){M(t.$$.fragment,n),M(e.$$.fragment,n),M(i.$$.fragment,n),p=!1},d(n){n&&(r(a),r(s)),T(t,n),T(e,n),T(i,n)}}}function sn(u){let t,a;return t=new X({props:{code:"JTIzJTIwTm90ZSUyQyUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBCTkJzJTIwZGVwZW5kZW5jaWVzJTJDJTIwYXBwZW5kJTIwdGhlJTIwJTYwLS1uby1kZXBzJTYwJTIwZmxhZyElMEFwaXAlMjBpbnN0YWxsJTIwLS1mb3JjZS1yZWluc3RhbGwlMjAnaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGYml0c2FuZGJ5dGVzLWZvdW5kYXRpb24lMkZiaXRzYW5kYnl0ZXMlMkZyZWxlYXNlcyUyRmRvd25sb2FkJTJGY29udGludW91cy1yZWxlYXNlX211bHRpLWJhY2tlbmQtcmVmYWN0b3IlMkZiaXRzYW5kYnl0ZXMtMC40NC4xLmRldjAtcHkzLW5vbmUtbWFueWxpbnV4XzJfMjRfeDg2XzY0LndobCc=",highlighted:'<span class="hljs-comment"># Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!</span>\n<span class="hljs-attribute">pip</span> install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-<span class="hljs-number">0</span>.<span class="hljs-number">44</span>.<span class="hljs-number">1</span>.dev0-py3-none-manylinux_2_24_x86_64.whl'',wrap:!1}}),{c(){w(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,s){g(t,e,s),a=!0},p:I,i(e){a||(h(t.$$.fragment,e),a=!0)},o(e){M(t.$$.fragment,e),a=!1},d(e){T(t,e)}}}function an(u){let t,a;return t=new X({props:{code:"JTIzJTIwTm90ZSUyQyUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBCTkJzJTIwZGVwZW5kZW5jaWVzJTJDJTIwYXBwZW5kJTIwdGhlJTIwJTYwLS1uby1kZXBzJTYwJTIwZmxhZyElMEFwaXAlMjBpbnN0YWxsJTIwLS1mb3JjZS1yZWluc3RhbGwlMjAnaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGYml0c2FuZGJ5dGVzLWZvdW5kYXRpb24lMkZiaXRzYW5kYnl0ZXMlMkZyZWxlYXNlcyUyRmRvd25sb2FkJTJGY29udGludW91cy1yZWxlYXNlX211bHRpLWJhY2tlbmQtcmVmYWN0b3IlMkZiaXRzYW5kYnl0ZXMtMC40NC4xLmRldjAtcHkzLW5vbmUtd2luX2FtZDY0LndobCc=",highlighted:'<span class="hljs-comment"># Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!</span>\n<span class="hljs-attribute">pip</span> install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-<span class="hljs-number">0</span>.<span class="hljs-number">44</span>.<span class="hljs-number">1</span>.dev0-py3-none-win_amd64.whl'',wrap:!1}}),{c(){w(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,s){g(t,e,s),a=!0},p:I,i(e){a||(h(t.$$.fragment,e),a=!0)},o(e){M(t.$$.fragment,e),a=!1},d(e){T(t,e)}}}function on(u){let t,a="Compatible hardware and functioning <code>import torch_npu</code> capable environment with Python <code>3.10</code> as the minimum requirement.",e,s,i='Please refer to <a href="https://www.hiascend.com/document/detail/zh/Pytorch/60RC3/configandinstg/instg/insg_0001.html" rel="nofollow">the official Ascend installations instructions</a> for guidance on how to pip install the necessary <code>torch_npu</code> dependency.';return{c(){t=U("p"),t.innerHTML=a,e=$(),s=U("p"),s.innerHTML=i},l(p){t=J(p,"P",{"data-svelte-h":!0}),C(t)!=="svelte-2et7x5"&&(t.innerHTML=a),e=b(p),s=J(p,"P",{"data-svelte-h":!0}),C(s)!=="svelte-105ev45"&&(s.innerHTML=i)},m(p,n){f(p,t,n),f(p,e,n),f(p,s,n)},p:I,d(p){p&&(r(t),r(e),r(s))}}}function rn(u){let t,a="bitsandbytes does not yet support Apple Silicon / Metal with a dedicated backend. However, the build infrastructure is in place and the below pip install will eventually provide Apple Silicon support as it becomes available on the <code>multi-backend-refactor</code> branch based on community contributions.";return{c(){t=U("p"),t.innerHTML=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-ow22u1"&&(t.innerHTML=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function pn(u){let t,a,e,s;return t=new P({props:{warning:!0,$$slots:{default:[rn]},$$scope:{ctx:u}}}),e=new X({props:{code:"JTIzJTIwTm90ZSUyQyUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBCTkJzJTIwZGVwZW5kZW5jaWVzJTJDJTIwYXBwZW5kJTIwdGhlJTIwJTYwLS1uby1kZXBzJTYwJTIwZmxhZyElMEFwaXAlMjBpbnN0YWxsJTIwLS1mb3JjZS1yZWluc3RhbGwlMjAnaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGYml0c2FuZGJ5dGVzLWZvdW5kYXRpb24lMkZiaXRzYW5kYnl0ZXMlMkZyZWxlYXNlcyUyRmRvd25sb2FkJTJGY29udGludW91cy1yZWxlYXNlX211bHRpLWJhY2tlbmQtcmVmYWN0b3IlMkZiaXRzYW5kYnl0ZXMtMC40NC4xLmRldjAtcHkzLW5vbmUtbWFjb3N4XzEzXzFfYXJtNjQud2hsJw==",highlighted:'<span class="hljs-comment"># Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!</span>\n<span class="hljs-attribute">pip</span> install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-<span class="hljs-number">0</span>.<span class="hljs-number">44</span>.<span class="hljs-number">1</span>.dev0-py3-none-macosx_13_1_arm64.whl'',wrap:!1}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment)},l(i){y(t.$$.fragment,i),a=b(i),y(e.$$.fragment,i)},m(i,p){g(t,i,p),f(i,a,p),g(e,i,p),s=!0},p(i,p){const n={};p&2&&(n.$$scope={dirty:p,ctx:i}),t.$set(n)},i(i){s||(h(t.$$.fragment,i),h(e.$$.fragment,i),s=!0)},o(i){M(t.$$.fragment,i),M(e.$$.fragment,i),s=!1},d(i){i&&r(a),T(t,i),T(e,i)}}}function fn(u){let t,a,e,s,i,p,n,d;return t=new Y({props:{id:"platform",option:"Linux",$$slots:{default:[sn]},$$scope:{ctx:u}}}),e=new Y({props:{id:"platform",option:"Windows",$$slots:{default:[an]},$$scope:{ctx:u}}}),i=new Y({props:{id:"platform",option:"Ascend NPU",$$slots:{default:[on]},$$scope:{ctx:u}}}),n=new Y({props:{id:"platform",option:"Mac",$$slots:{default:[pn]},$$scope:{ctx:u}}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment),s=$(),w(i.$$.fragment),p=$(),w(n.$$.fragment)},l(o){y(t.$$.fragment,o),a=b(o),y(e.$$.fragment,o),s=b(o),y(i.$$.fragment,o),p=b(o),y(n.$$.fragment,o)},m(o,c){g(t,o,c),f(o,a,c),g(e,o,c),f(o,s,c),g(i,o,c),f(o,p,c),g(n,o,c),d=!0},p(o,c){const _={};c&2&&(_.$$scope={dirty:c,ctx:o}),t.$set(_);const R={};c&2&&(R.$$scope={dirty:c,ctx:o}),e.$set(R);const k={};c&2&&(k.$$scope={dirty:c,ctx:o}),i.$set(k);const W={};c&2&&(W.$$scope={dirty:c,ctx:o}),n.$set(W)},i(o){d||(h(t.$$.fragment,o),h(e.$$.fragment,o),h(i.$$.fragment,o),h(n.$$.fragment,o),d=!0)},o(o){M(t.$$.fragment,o),M(e.$$.fragment,o),M(i.$$.fragment,o),M(n.$$.fragment,o),d=!1},d(o){o&&(r(a),r(s),r(p)),T(t,o),T(e,o),T(i,o),T(n,o)}}}function dn(u){let t,a,e,s="bitsandbytes is fully supported from ROCm 6.1 onwards (currently in alpha release).",i,p,n;return t=new L({props:{title:"AMD GPU",local:"amd-gpu",headingTag:"h4"}}),p=new X({props:{code:"JTIzJTIwSW5zdGFsbCUyMGJpdHNhbmRieXRlcyUyMGZyb20lMjBzb3VyY2UlMEElMjMlMjBDbG9uZSUyMGJpdHNhbmRieXRlcyUyMHJlcG8lMkMlMjBST0NtJTIwYmFja2VuZCUyMGlzJTIwY3VycmVudGx5JTIwZW5hYmxlZCUyMG9uJTIwbXVsdGktYmFja2VuZC1yZWZhY3RvciUyMGJyYW5jaCUwQWdpdCUyMGNsb25lJTIwLWIlMjBtdWx0aS1iYWNrZW5kLXJlZmFjdG9yJTIwaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGYml0c2FuZGJ5dGVzLWZvdW5kYXRpb24lMkZiaXRzYW5kYnl0ZXMuZ2l0JTIwJTI2JTI2JTIwY2QlMjBiaXRzYW5kYnl0ZXMlMkYlMEElMEElMjMlMjBJbnN0YWxsJTIwZGVwZW5kZW5jaWVzJTBBcGlwJTIwaW5zdGFsbCUyMC1yJTIwcmVxdWlyZW1lbnRzLWRldi50eHQlMEElMEElMjMlMjBDb21waWxlJTIwJTI2JTIwaW5zdGFsbCUwQWFwdC1nZXQlMjBpbnN0YWxsJTIwLXklMjBidWlsZC1lc3NlbnRpYWwlMjBjbWFrZSUyMCUyMCUyMyUyMGluc3RhbGwlMjBidWlsZCUyMHRvb2xzJTIwZGVwZW5kZW5jaWVzJTJDJTIwdW5sZXNzJTIwcHJlc2VudCUwQWNtYWtlJTIwLURDT01QVVRFX0JBQ0tFTkQlM0RoaXAlMjAtUyUyMC4lMjAlMjAlMjMlMjBVc2UlMjAtREJOQl9ST0NNX0FSQ0glM0QlMjJnZng5MGElM0JnZng5NDIlMjIlMjB0byUyMHRhcmdldCUyMHNwZWNpZmljJTIwZ3B1JTIwYXJjaCUwQW1ha2UlMEFwaXAlMjBpbnN0YWxsJTIwLWUlMjAuJTIwJTIwJTIwJTIzJTIwJTYwLWUlNjAlMjBmb3IlMjAlMjJlZGl0YWJsZSUyMiUyMGluc3RhbGwlMkMlMjB3aGVuJTIwZGV2ZWxvcGluZyUyMEJOQiUyMChvdGhlcndpc2UlMjBsZWF2ZSUyMHRoYXQlMjBvdXQp",highlighted:`<span class="hljs-comment"># Install bitsandbytes from source</span> | |
| <span class="hljs-comment"># Clone bitsandbytes repo, ROCm backend is currently enabled on multi-backend-refactor branch</span> | |
| git <span class="hljs-built_in">clone</span> -b multi-backend-refactor https://github.com/bitsandbytes-foundation/bitsandbytes.git && <span class="hljs-built_in">cd</span> bitsandbytes/ | |
| <span class="hljs-comment"># Install dependencies</span> | |
| pip install -r requirements-dev.txt | |
| <span class="hljs-comment"># Compile & install</span> | |
| apt-get install -y build-essential cmake <span class="hljs-comment"># install build tools dependencies, unless present</span> | |
| cmake -DCOMPUTE_BACKEND=hip -S . <span class="hljs-comment"># Use -DBNB_ROCM_ARCH="gfx90a;gfx942" to target specific gpu arch</span> | |
| make | |
| pip install -e . <span class="hljs-comment"># \`-e\` for "editable" install, when developing BNB (otherwise leave that out)</span>`,wrap:!1}}),{c(){w(t.$$.fragment),a=$(),e=U("p"),e.textContent=s,i=$(),w(p.$$.fragment)},l(d){y(t.$$.fragment,d),a=b(d),e=J(d,"P",{"data-svelte-h":!0}),C(e)!=="svelte-1fw7vjl"&&(e.textContent=s),i=b(d),y(p.$$.fragment,d)},m(d,o){g(t,d,o),f(d,a,o),f(d,e,o),f(d,i,o),g(p,d,o),n=!0},p:I,i(d){n||(h(t.$$.fragment,d),h(p.$$.fragment,d),n=!0)},o(d){M(t.$$.fragment,d),M(p.$$.fragment,d),n=!1},d(d){d&&(r(a),r(e),r(i)),T(t,d),T(p,d)}}}function mn(u){let t,a="Intel CPU backend only supports building from source; for now, please follow the instructions below.";return{c(){t=U("p"),t.textContent=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11im0db"&&(t.textContent=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function un(u){let t,a,e,s,i,p="Similar to the CUDA case, you can compile bitsandbytes from source for Linux and Windows systems.",n,d,o='The below commands are for Linux. For installing on Windows, please adapt the below commands according to the same pattern as described <a href="#cuda-compile">the section above on compiling from source under the Windows tab</a>.',c,_,R;return t=new L({props:{title:"Intel CPU",local:"intel-cpu",headingTag:"h4"}}),e=new P({props:{warning:!1,$$slots:{default:[mn]},$$scope:{ctx:u}}}),_=new X({props:{code:"Z2l0JTIwY2xvbmUlMjAtLWRlcHRoJTIwMSUyMC1iJTIwbXVsdGktYmFja2VuZC1yZWZhY3RvciUyMGh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmJpdHNhbmRieXRlcy1mb3VuZGF0aW9uJTJGYml0c2FuZGJ5dGVzLmdpdCUyMCUyNiUyNiUyMGNkJTIwYml0c2FuZGJ5dGVzJTJGJTBBcGlwJTIwaW5zdGFsbCUyMGludGVsX2V4dGVuc2lvbl9mb3JfcHl0b3JjaCUwQXBpcCUyMGluc3RhbGwlMjAtciUyMHJlcXVpcmVtZW50cy1kZXYudHh0JTBBY21ha2UlMjAtRENPTVBVVEVfQkFDS0VORCUzRGNwdSUyMC1TJTIwLiUwQW1ha2UlMEFwaXAlMjBpbnN0YWxsJTIwLWUlMjAuJTIwJTIwJTIwJTIzJTIwJTYwLWUlNjAlMjBmb3IlMjAlMjJlZGl0YWJsZSUyMiUyMGluc3RhbGwlMkMlMjB3aGVuJTIwZGV2ZWxvcGluZyUyMEJOQiUyMChvdGhlcndpc2UlMjBsZWF2ZSUyMHRoYXQlMjBvdXQp",highlighted:`git clone --depth <span class="hljs-number">1</span> -b multi-backend-refactor https:<span class="hljs-regexp">//gi</span>thub.com<span class="hljs-regexp">/bitsandbytes-foundation/</span>bitsandbytes.git && cd bitsandbytes/ | |
| pip install intel_extension_for_pytorch | |
| pip install -r requirements-dev.txt | |
| cmake -DCOMPUTE_BACKEND=cpu -S . | |
| make | |
| pip install -e . <span class="hljs-comment"># \`-e\` for "editable" install, when developing BNB (otherwise leave that out)</span>`,wrap:!1}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment),s=$(),i=U("p"),i.textContent=p,n=$(),d=U("p"),d.innerHTML=o,c=$(),w(_.$$.fragment)},l(k){y(t.$$.fragment,k),a=b(k),y(e.$$.fragment,k),s=b(k),i=J(k,"P",{"data-svelte-h":!0}),C(i)!=="svelte-xkgho"&&(i.textContent=p),n=b(k),d=J(k,"P",{"data-svelte-h":!0}),C(d)!=="svelte-1wb4fir"&&(d.innerHTML=o),c=b(k),y(_.$$.fragment,k)},m(k,W){g(t,k,W),f(k,a,W),g(e,k,W),f(k,s,W),f(k,i,W),f(k,n,W),f(k,d,W),f(k,c,W),g(_,k,W),R=!0},p(k,W){const x={};W&2&&(x.$$scope={dirty:W,ctx:k}),e.$set(x)},i(k){R||(h(t.$$.fragment,k),h(e.$$.fragment,k),h(_.$$.fragment,k),R=!0)},o(k){M(t.$$.fragment,k),M(e.$$.fragment,k),M(_.$$.fragment,k),R=!1},d(k){k&&(r(a),r(s),r(i),r(n),r(d),r(c)),T(t,k),T(e,k),T(_,k)}}}function cn(u){let t,a="Ascend NPU backend only supports building from source; for now, please follow the instructions below.";return{c(){t=U("p"),t.textContent=a},l(e){t=J(e,"P",{"data-svelte-h":!0}),C(t)!=="svelte-o09iho"&&(t.textContent=a)},m(e,s){f(e,t,s)},p:I,d(e){e&&r(t)}}}function $n(u){let t,a,e,s,i,p;return t=new L({props:{title:"Ascend NPU",local:"ascend-npu",headingTag:"h4"}}),e=new P({props:{warning:!1,$$slots:{default:[cn]},$$scope:{ctx:u}}}),i=new X({props:{code:"JTIzJTIwSW5zdGFsbCUyMGJpdHNhbmRieXRlcyUyMGZyb20lMjBzb3VyY2UlMEElMjMlMjBDbG9uZSUyMGJpdHNhbmRieXRlcyUyMHJlcG8lMkMlMjBBc2NlbmQlMjBOUFUlMjBiYWNrZW5kJTIwaXMlMjBjdXJyZW50bHklMjBlbmFibGVkJTIwb24lMjBtdWx0aS1iYWNrZW5kLXJlZmFjdG9yJTIwYnJhbmNoJTBBZ2l0JTIwY2xvbmUlMjAtYiUyMG11bHRpLWJhY2tlbmQtcmVmYWN0b3IlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQSUwQSUyMyUyMEluc3RhbGwlMjBkZXBlbmRlbmNpZXMlMEFwaXAlMjBpbnN0YWxsJTIwLXIlMjByZXF1aXJlbWVudHMtZGV2LnR4dCUwQSUwQSUyMyUyMENvbXBpbGUlMjAlMjYlMjBpbnN0YWxsJTBBYXB0LWdldCUyMGluc3RhbGwlMjAteSUyMGJ1aWxkLWVzc2VudGlhbCUyMGNtYWtlJTIwJTIwJTIzJTIwaW5zdGFsbCUyMGJ1aWxkJTIwdG9vbHMlMjBkZXBlbmRlbmNpZXMlMkMlMjB1bmxlc3MlMjBwcmVzZW50JTBBY21ha2UlMjAtRENPTVBVVEVfQkFDS0VORCUzRG5wdSUyMC1TJTIwLiUwQW1ha2UlMEFwaXAlMjBpbnN0YWxsJTIwLWUlMjAuJTIwJTIwJTIwJTIzJTIwJTYwLWUlNjAlMjBmb3IlMjAlMjJlZGl0YWJsZSUyMiUyMGluc3RhbGwlMkMlMjB3aGVuJTIwZGV2ZWxvcGluZyUyMEJOQiUyMChvdGhlcndpc2UlMjBsZWF2ZSUyMHRoYXQlMjBvdXQp",highlighted:`<span class="hljs-comment"># Install bitsandbytes from source</span> | |
| <span class="hljs-comment"># Clone bitsandbytes repo, Ascend NPU backend is currently enabled on multi-backend-refactor branch</span> | |
| git clone -b multi-backend-refactor https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/ | |
| <span class="hljs-comment"># Install dependencies</span> | |
| pip <span class="hljs-keyword">install</span> -r requirements-dev.txt | |
| <span class="hljs-comment"># Compile & install</span> | |
| apt-get <span class="hljs-keyword">install</span> -y build-essential cmake <span class="hljs-comment"># install build tools dependencies, unless present</span> | |
| cmake -DCOMPUTE_BACKEND=npu -S . | |
| make | |
| pip <span class="hljs-keyword">install</span> -e . <span class="hljs-comment"># \`-e\` for "editable" install, when developing BNB (otherwise leave that out)</span>`,wrap:!1}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment),s=$(),w(i.$$.fragment)},l(n){y(t.$$.fragment,n),a=b(n),y(e.$$.fragment,n),s=b(n),y(i.$$.fragment,n)},m(n,d){g(t,n,d),f(n,a,d),g(e,n,d),f(n,s,d),g(i,n,d),p=!0},p(n,d){const o={};d&2&&(o.$$scope={dirty:d,ctx:n}),e.$set(o)},i(n){p||(h(t.$$.fragment,n),h(e.$$.fragment,n),h(i.$$.fragment,n),p=!0)},o(n){M(t.$$.fragment,n),M(e.$$.fragment,n),M(i.$$.fragment,n),p=!1},d(n){n&&(r(a),r(s)),T(t,n),T(e,n),T(i,n)}}}function bn(u){let t,a,e,s="WIP",i;return t=new L({props:{title:"Apple Silicon",local:"apple-silicon",headingTag:"h4"}}),{c(){w(t.$$.fragment),a=$(),e=U("p"),e.textContent=s},l(p){y(t.$$.fragment,p),a=b(p),e=J(p,"P",{"data-svelte-h":!0}),C(e)!=="svelte-1kg89us"&&(e.textContent=s)},m(p,n){g(t,p,n),f(p,a,n),f(p,e,n),i=!0},p:I,i(p){i||(h(t.$$.fragment,p),i=!0)},o(p){M(t.$$.fragment,p),i=!1},d(p){p&&(r(a),r(e)),T(t,p)}}}function hn(u){let t,a,e,s,i,p,n,d;return t=new Y({props:{id:"backend",option:"AMD ROCm",$$slots:{default:[dn]},$$scope:{ctx:u}}}),e=new Y({props:{id:"backend",option:"Intel CPU + GPU",$$slots:{default:[un]},$$scope:{ctx:u}}}),i=new Y({props:{id:"backend",option:"Ascend NPU",$$slots:{default:[$n]},$$scope:{ctx:u}}}),n=new Y({props:{id:"backend",option:"Apple Silicon (MPS)",$$slots:{default:[bn]},$$scope:{ctx:u}}}),{c(){w(t.$$.fragment),a=$(),w(e.$$.fragment),s=$(),w(i.$$.fragment),p=$(),w(n.$$.fragment)},l(o){y(t.$$.fragment,o),a=b(o),y(e.$$.fragment,o),s=b(o),y(i.$$.fragment,o),p=b(o),y(n.$$.fragment,o)},m(o,c){g(t,o,c),f(o,a,c),g(e,o,c),f(o,s,c),g(i,o,c),f(o,p,c),g(n,o,c),d=!0},p(o,c){const _={};c&2&&(_.$$scope={dirty:c,ctx:o}),t.$set(_);const R={};c&2&&(R.$$scope={dirty:c,ctx:o}),e.$set(R);const k={};c&2&&(k.$$scope={dirty:c,ctx:o}),i.$set(k);const W={};c&2&&(W.$$scope={dirty:c,ctx:o}),n.$set(W)},i(o){d||(h(t.$$.fragment,o),h(e.$$.fragment,o),h(i.$$.fragment,o),h(n.$$.fragment,o),d=!0)},o(o){M(t.$$.fragment,o),M(e.$$.fragment,o),M(i.$$.fragment,o),M(n.$$.fragment,o),d=!1},d(o){o&&(r(a),r(s),r(p)),T(t,o),T(e,o),T(i,o),T(n,o)}}}function Mn(u){let t,a,e,s,i,p,n,d="Welcome to the installation guide for the <code>bitsandbytes</code> library! This document provides step-by-step instructions to install <code>bitsandbytes</code> across various platforms and hardware configurations. The library primarily supports CUDA-based GPUs, but the team is actively working on enabling support for additional backends like AMD ROCm, Intel, and Apple Silicon.",o,c,_,R,k,W,x='<li><a href="#cuda">CUDA</a><ul><li><a href="#cuda-pip">Installation via PyPI</a></li> <li><a href="#cuda-compile">Compile from Source</a></li></ul></li> <li><a href="#multi-backend">Multi-backend Support (Alpha Release)</a><ul><li><a href="#multi-backend-supported-backends">Supported Backends</a></li> <li><a href="#multi-backend-pre-requisites">Pre-requisites</a></li> <li><a href="#multi-backend-pip">Installation</a></li> <li><a href="#multi-backend-compile">Compile from Source</a></li></ul></li> <li><a href="#pytorch-cuda-versions">PyTorch CUDA Versions</a></li>',V,B,j,Z,at='<code>bitsandbytes</code> is currently only supported on CUDA GPUs for CUDA versions <strong>11.0 - 12.6</strong>. However, there’s an ongoing multi-backend effort under development, which is currently in alpha. If you’re interested in providing feedback or testing, check out <a href="#multi-backend">the multi-backend section below</a>.',A,S,N,H,v="The latest version of the distributed <code>bitsandbytes</code> package is built with the following configurations:",G,E,Ze="<thead><tr><th><strong>OS</strong></th> <th><strong>CUDA Toolkit</strong></th> <th><strong>Host Compiler</strong></th></tr></thead> <tbody><tr><td><strong>Linux</strong></td> <td>11.7 - 12.3</td> <td>GCC 11.4</td></tr> <tr><td></td> <td>12.4 - 12.6</td> <td>GCC 13.2</td></tr> <tr><td><strong>Windows</strong></td> <td>11.7 - 12.6</td> <td>MSVC 19.42+ (VS2022)</td></tr> <tr><td></td> <td>12.4+</td> <td>GCC 13.2</td></tr> <tr><td><strong>Windows</strong></td> <td>11.7 - 12.6</td> <td>MSVC 19.38+ (VS2022)</td></tr></tbody>",Nt,ot,xe="For CUDA systems, ensure your hardware meets the following requirements:",At,rt,Ye="<thead><tr><th><strong>Feature</strong></th> <th><strong>Minimum Hardware Requirement</strong></th></tr></thead> <tbody><tr><td>LLM.int8()</td> <td>NVIDIA Turing (RTX 20 series, T4) or newer GPUs</td></tr> <tr><td>8-bit optimizers/quantization</td> <td>NVIDIA Maxwell (GTX 900 series, TITAN X, M40) or newer GPUs *</td></tr> <tr><td>NF4/FP4 quantization</td> <td>NVIDIA Maxwell (GTX 900 series, TITAN X, M40) or newer GPUs *</td></tr></tbody>",St,z,Ht,pt,Pt,ft,Vt,dt,Be="If you would like to use new feature even before they are officially released and help us test them, feel free to install the wheel directly from our CI (<em>the wheel links will remain stable!</em>):",Et,D,zt,mt,Dt,Q,Qt,ut,Le="For Linux and Windows systems, compiling from source allows you to customize the build configurations. See below for detailed platform-specific instructions (see the <code>CMakeLists.txt</code> if you want to check the specifics and explore some additional options):",Ft,F,Ot,ct,qt,$t,Xe="Some bitsandbytes features may need a newer CUDA version than the one currently supported by PyTorch binaries from Conda and pip. In this case, you should follow these instructions to load a precompiled bitsandbytes binary.",Kt,bt,Ne="<li>Determine the path of the CUDA version you want to use. Common paths include:</li>",te,ht,Ae="<li><code>/usr/local/cuda</code></li> <li><code>/usr/local/cuda-XX.X</code> where <code>XX.X</code> is the CUDA version number</li>",ee,Mt,Se="Then locally install the CUDA version you need with this script from bitsandbytes:",le,wt,ne,O,He="<li>Set the environment variables <code>BNB_CUDA_VERSION</code> and <code>LD_LIBRARY_PATH</code> by manually overriding the CUDA version installed by PyTorch.</li>",se,q,ie,yt,ae,gt,Pe="For example, to use a local install path:",oe,Tt,re,K,Ve="<li>Now when you launch bitsandbytes with these environment variables, the PyTorch CUDA version is overridden by the new CUDA version (in this example, version 11.7) and a different bitsandbytes library is loaded.</li>",pe,Ut,fe,tt,de,Jt,Ee="<strong>Link to give us feedback</strong> (bugs, install issues, perf results, requests, etc.)<strong>:</strong>",me,et,ue,Ct,ce,kt,ze="<thead><tr><th><strong>Backend</strong></th> <th><strong>Supported Versions</strong></th> <th><strong>Python versions</strong></th> <th><strong>Architecture Support</strong></th> <th><strong>Status</strong></th></tr></thead> <tbody><tr><td><strong>AMD ROCm</strong></td> <td>6.1+</td> <td>3.10+</td> <td>minimum CDNA - <code>gfx90a</code>, RDNA - <code>gfx1100</code></td> <td>Alpha</td></tr> <tr><td><strong>Apple Silicon (MPS)</strong></td> <td>WIP</td> <td>3.10+</td> <td>M1/M2 chips</td> <td>Planned</td></tr> <tr><td><strong>Intel CPU</strong></td> <td>v2.4.0+ (<code>ipex</code>)</td> <td>3.10+</td> <td>Intel CPU</td> <td>Alpha</td></tr> <tr><td><strong>Intel GPU</strong></td> <td>v2.4.0+ (<code>ipex</code>)</td> <td>3.10+</td> <td>Intel GPU</td> <td>Experimental</td></tr> <tr><td><strong>Ascend NPU</strong></td> <td>2.1.0+ (<code>torch_npu</code>)</td> <td>3.10+</td> <td>Ascend NPU</td> <td>Experimental</td></tr></tbody>",$e,_t,De="For each supported backend, follow the respective instructions below:",be,vt,he,jt,Qe="To use bitsandbytes non-CUDA backends, be sure to install:",Me,Rt,we,lt,ye,Wt,ge,Gt,Fe="You can install the pre-built wheels for each backend, or compile from source for custom configurations.",Te,It,Ue,nt,Je,Zt,Ce,st,ke,xt,_e,Bt,ve;return i=new L({props:{title:"Installation Guide",local:"installation-guide",headingTag:"h1"}}),c=new P({props:{warning:!1,$$slots:{default:[xl]},$$scope:{ctx:u}}}),R=new L({props:{title:"Table of Contents",local:"table-of-contents",headingTag:"h2"}}),B=new L({props:{title:"CUDA",local:"cuda",headingTag:"h2"}}),S=new L({props:{title:"Supported CUDA Configurations",local:"cuda-pip",headingTag:"h3"}}),z=new P({props:{warning:!0,$$slots:{default:[Yl]},$$scope:{ctx:u}}}),pt=new X({props:{code:"cGlwJTIwaW5zdGFsbCUyMGJpdHNhbmRieXRlcw==",highlighted:"pip install bitsandbytes",wrap:!1}}),ft=new L({props:{title:"pip install pre-built wheel from latest main commit",local:"pip-install-pre-built-wheel-from-latest-main-commit",headingTag:"h3"}}),D=new Yt({props:{id:"OS",options:["Linux","Windows"],$$slots:{default:[Xl]},$$scope:{ctx:u}}}),mt=new L({props:{title:"Compile from source",local:"cuda-compile",headingTag:"h3"}}),Q=new P({props:{warning:!1,$$slots:{default:[Nl]},$$scope:{ctx:u}}}),F=new Yt({props:{id:"source",options:["Linux","Windows"],$$slots:{default:[Pl]},$$scope:{ctx:u}}}),ct=new L({props:{title:"PyTorch CUDA versions",local:"pytorch-cuda-versions",headingTag:"h3"}}),wt=new X({props:{code:"d2dldCUyMGh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRmJpdHNhbmRieXRlcy1mb3VuZGF0aW9uJTJGYml0c2FuZGJ5dGVzJTJGbWFpbiUyRmluc3RhbGxfY3VkYS5zaCUwQSUyMyUyMFN5bnRheCUyMGN1ZGFfaW5zdGFsbCUyMENVREFfVkVSU0lPTiUyMElOU1RBTExfUFJFRklYJTIwRVhQT1JUX1RPX0JBU0glMEElMjMlMjAlMjAlMjBDVURBX1ZFUlNJT04lMjBpbiUyMCU3QjExMCUyQyUyMDExMSUyQyUyMDExMiUyQyUyMDExMyUyQyUyMDExNCUyQyUyMDExNSUyQyUyMDExNiUyQyUyMDExNyUyQyUyMDExOCUyQyUyMDEyMCUyQyUyMDEyMSUyQyUyMDEyMiUyQyUyMDEyMyUyQyUyMDEyNCUyQyUyMDEyNSUyQyUyMDEyNiU3RCUwQSUyMyUyMCUyMCUyMEVYUE9SVF9UT19CQVNIJTIwaW4lMjAlN0IwJTJDJTIwMSU3RCUyMHdpdGglMjAwJTNERmFsc2UlMjBhbmQlMjAxJTNEVHJ1ZSUwQSUwQSUyMyUyMEZvciUyMGV4YW1wbGUlMkMlMjB0aGUlMjBmb2xsb3dpbmclMjBpbnN0YWxscyUyMENVREElMjAxMi42JTIwdG8lMjB+JTJGbG9jYWwlMkZjdWRhLTEyLjYlMjBhbmQlMjBleHBvcnRzJTIwdGhlJTIwcGF0aCUyMHRvJTIweW91ciUyMC5iYXNocmMlMEElMEFiYXNoJTIwaW5zdGFsbF9jdWRhLnNoJTIwMTI2JTIwfiUyRmxvY2FsJTIwMQ==",highlighted:`wget https://raw.githubusercontent.com/bitsandbytes-foundation/bitsandbytes/main/install_cuda.sh | |
| <span class="hljs-comment"># Syntax cuda_install CUDA_VERSION INSTALL_PREFIX EXPORT_TO_BASH</span> | |
| <span class="hljs-comment"># CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125, 126}</span> | |
| <span class="hljs-comment"># EXPORT_TO_BASH in {0, 1} with 0=False and 1=True</span> | |
| <span class="hljs-comment"># For example, the following installs CUDA 12.6 to ~/local/cuda-12.6 and exports the path to your .bashrc</span> | |
| bash install_cuda.sh 126 ~/local 1`,wrap:!1}}),q=new P({props:{warning:!1,$$slots:{default:[Vl]},$$scope:{ctx:u}}}),yt=new X({props:{code:"ZXhwb3J0JTIwQk5CX0NVREFfVkVSU0lPTiUzRCUzQ1ZFUlNJT04lM0UlMEFleHBvcnQlMjBMRF9MSUJSQVJZX1BBVEglM0QlMjRMRF9MSUJSQVJZX1BBVEglM0ElM0NQQVRIJTNF",highlighted:`<span class="hljs-built_in">export</span> BNB_CUDA_VERSION=<VERSION> | |
| <span class="hljs-built_in">export</span> LD_LIBRARY_PATH=<span class="hljs-variable">$LD_LIBRARY_PATH</span>:<PATH>`,wrap:!1}}),Tt=new X({props:{code:"ZXhwb3J0JTIwQk5CX0NVREFfVkVSU0lPTiUzRDEyNiUwQWV4cG9ydCUyMExEX0xJQlJBUllfUEFUSCUzRCUyNExEX0xJQlJBUllfUEFUSCUzQSUyRmhvbWUlMkZZT1VSX1VTRVJOQU1FJTJGbG9jYWwlMkZjdWRhLTEyLjY=",highlighted:`<span class="hljs-built_in">export</span> BNB_CUDA_VERSION=126 | |
| <span class="hljs-built_in">export</span> LD_LIBRARY_PATH=<span class="hljs-variable">$LD_LIBRARY_PATH</span>:/home/YOUR_USERNAME/local/cuda-12.6`,wrap:!1}}),Ut=new L({props:{title:"Multi-backend Support (Alpha Release)",local:"multi-backend",headingTag:"h2"}}),tt=new P({props:{warning:!1,$$slots:{default:[El]},$$scope:{ctx:u}}}),et=new Yt({props:{id:"platform",options:["ROCm","Intel CPU+GPU","Apple Silicon / Metal (MPS)"],$$slots:{default:[Fl]},$$scope:{ctx:u}}}),Ct=new L({props:{title:"Supported Backends",local:"multi-backend-supported-backends",headingTag:"h3"}}),vt=new L({props:{title:"Pre-requisites",local:"multi-backend-pre-requisites",headingTag:"h3"}}),Rt=new X({props:{code:"cGlwJTIwaW5zdGFsbCUyMCUyMnRyYW5zZm9ybWVycyUzRSUzRDQuNDUuMSUyMg==",highlighted:'pip <span class="hljs-keyword">install</span> <span class="hljs-string">"transformers>=4.45.1"</span>',wrap:!1}}),lt=new Yt({props:{id:"backend",options:["AMD ROCm","Intel CPU + GPU","Apple Silicon (MPS)"],$$slots:{default:[nn]},$$scope:{ctx:u}}}),Wt=new L({props:{title:"Installation",local:"installation",headingTag:"h3"}}),It=new L({props:{title:"Pre-built Wheel Installation (recommended)",local:"multi-backend-pip",headingTag:"h4"}}),nt=new Yt({props:{id:"platform",options:["Linux","Windows","Ascend NPU","Mac"],$$slots:{default:[fn]},$$scope:{ctx:u}}}),Zt=new L({props:{title:"Compile from Source",local:"multi-backend-compile",headingTag:"h4"}}),st=new Yt({props:{id:"backend",options:["AMD ROCm","Intel CPU + GPU","Ascend NPU","Apple Silicon (MPS)"],$$slots:{default:[hn]},$$scope:{ctx:u}}}),xt=new _l({props:{source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/main/docs/source/installation.mdx"}}),{c(){t=U("meta"),a=$(),e=U("p"),s=$(),w(i.$$.fragment),p=$(),n=U("p"),n.innerHTML=d,o=$(),w(c.$$.fragment),_=$(),w(R.$$.fragment),k=$(),W=U("ul"),W.innerHTML=x,V=$(),w(B.$$.fragment),j=$(),Z=U("p"),Z.innerHTML=at,A=$(),w(S.$$.fragment),N=$(),H=U("p"),H.innerHTML=v,G=$(),E=U("table"),E.innerHTML=Ze,Nt=$(),ot=U("p"),ot.textContent=xe,At=$(),rt=U("table"),rt.innerHTML=Ye,St=$(),w(z.$$.fragment),Ht=$(),w(pt.$$.fragment),Pt=$(),w(ft.$$.fragment),Vt=$(),dt=U("p"),dt.innerHTML=Be,Et=$(),w(D.$$.fragment),zt=$(),w(mt.$$.fragment),Dt=$(),w(Q.$$.fragment),Qt=$(),ut=U("p"),ut.innerHTML=Le,Ft=$(),w(F.$$.fragment),Ot=$(),w(ct.$$.fragment),qt=$(),$t=U("p"),$t.textContent=Xe,Kt=$(),bt=U("ol"),bt.innerHTML=Ne,te=$(),ht=U("ul"),ht.innerHTML=Ae,ee=$(),Mt=U("p"),Mt.textContent=Se,le=$(),w(wt.$$.fragment),ne=$(),O=U("ol"),O.innerHTML=He,se=$(),w(q.$$.fragment),ie=$(),w(yt.$$.fragment),ae=$(),gt=U("p"),gt.textContent=Pe,oe=$(),w(Tt.$$.fragment),re=$(),K=U("ol"),K.innerHTML=Ve,pe=$(),w(Ut.$$.fragment),fe=$(),w(tt.$$.fragment),de=$(),Jt=U("p"),Jt.innerHTML=Ee,me=$(),w(et.$$.fragment),ue=$(),w(Ct.$$.fragment),ce=$(),kt=U("table"),kt.innerHTML=ze,$e=$(),_t=U("p"),_t.textContent=De,be=$(),w(vt.$$.fragment),he=$(),jt=U("p"),jt.textContent=Qe,Me=$(),w(Rt.$$.fragment),we=$(),w(lt.$$.fragment),ye=$(),w(Wt.$$.fragment),ge=$(),Gt=U("p"),Gt.textContent=Fe,Te=$(),w(It.$$.fragment),Ue=$(),w(nt.$$.fragment),Je=$(),w(Zt.$$.fragment),Ce=$(),w(st.$$.fragment),ke=$(),w(xt.$$.fragment),_e=$(),Bt=U("p"),this.h()},l(l){const m=kl("svelte-u9bgzb",document.head);t=J(m,"META",{name:!0,content:!0}),m.forEach(r),a=b(l),e=J(l,"P",{}),Xt(e).forEach(r),s=b(l),y(i.$$.fragment,l),p=b(l),n=J(l,"P",{"data-svelte-h":!0}),C(n)!=="svelte-1jlm1j8"&&(n.innerHTML=d),o=b(l),y(c.$$.fragment,l),_=b(l),y(R.$$.fragment,l),k=b(l),W=J(l,"UL",{"data-svelte-h":!0}),C(W)!=="svelte-152x96h"&&(W.innerHTML=x),V=b(l),y(B.$$.fragment,l),j=b(l),Z=J(l,"P",{"data-svelte-h":!0}),C(Z)!=="svelte-1c42kt8"&&(Z.innerHTML=at),A=b(l),y(S.$$.fragment,l),N=b(l),H=J(l,"P",{"data-svelte-h":!0}),C(H)!=="svelte-1s2jy3v"&&(H.innerHTML=v),G=b(l),E=J(l,"TABLE",{"data-svelte-h":!0}),C(E)!=="svelte-1ensi0d"&&(E.innerHTML=Ze),Nt=b(l),ot=J(l,"P",{"data-svelte-h":!0}),C(ot)!=="svelte-19zld5n"&&(ot.textContent=xe),At=b(l),rt=J(l,"TABLE",{"data-svelte-h":!0}),C(rt)!=="svelte-1623rd"&&(rt.innerHTML=Ye),St=b(l),y(z.$$.fragment,l),Ht=b(l),y(pt.$$.fragment,l),Pt=b(l),y(ft.$$.fragment,l),Vt=b(l),dt=J(l,"P",{"data-svelte-h":!0}),C(dt)!=="svelte-wzqh43"&&(dt.innerHTML=Be),Et=b(l),y(D.$$.fragment,l),zt=b(l),y(mt.$$.fragment,l),Dt=b(l),y(Q.$$.fragment,l),Qt=b(l),ut=J(l,"P",{"data-svelte-h":!0}),C(ut)!=="svelte-1ovl1gx"&&(ut.innerHTML=Le),Ft=b(l),y(F.$$.fragment,l),Ot=b(l),y(ct.$$.fragment,l),qt=b(l),$t=J(l,"P",{"data-svelte-h":!0}),C($t)!=="svelte-n0pdc4"&&($t.textContent=Xe),Kt=b(l),bt=J(l,"OL",{"data-svelte-h":!0}),C(bt)!=="svelte-w9mxyz"&&(bt.innerHTML=Ne),te=b(l),ht=J(l,"UL",{"data-svelte-h":!0}),C(ht)!=="svelte-r36v8e"&&(ht.innerHTML=Ae),ee=b(l),Mt=J(l,"P",{"data-svelte-h":!0}),C(Mt)!=="svelte-1dhvzk8"&&(Mt.textContent=Se),le=b(l),y(wt.$$.fragment,l),ne=b(l),O=J(l,"OL",{start:!0,"data-svelte-h":!0}),C(O)!=="svelte-y8zpl2"&&(O.innerHTML=He),se=b(l),y(q.$$.fragment,l),ie=b(l),y(yt.$$.fragment,l),ae=b(l),gt=J(l,"P",{"data-svelte-h":!0}),C(gt)!=="svelte-wx07f3"&&(gt.textContent=Pe),oe=b(l),y(Tt.$$.fragment,l),re=b(l),K=J(l,"OL",{start:!0,"data-svelte-h":!0}),C(K)!=="svelte-lfqu8"&&(K.innerHTML=Ve),pe=b(l),y(Ut.$$.fragment,l),fe=b(l),y(tt.$$.fragment,l),de=b(l),Jt=J(l,"P",{"data-svelte-h":!0}),C(Jt)!=="svelte-1jdzqrl"&&(Jt.innerHTML=Ee),me=b(l),y(et.$$.fragment,l),ue=b(l),y(Ct.$$.fragment,l),ce=b(l),kt=J(l,"TABLE",{"data-svelte-h":!0}),C(kt)!=="svelte-9l7dym"&&(kt.innerHTML=ze),$e=b(l),_t=J(l,"P",{"data-svelte-h":!0}),C(_t)!=="svelte-19x599i"&&(_t.textContent=De),be=b(l),y(vt.$$.fragment,l),he=b(l),jt=J(l,"P",{"data-svelte-h":!0}),C(jt)!=="svelte-abm2bq"&&(jt.textContent=Qe),Me=b(l),y(Rt.$$.fragment,l),we=b(l),y(lt.$$.fragment,l),ye=b(l),y(Wt.$$.fragment,l),ge=b(l),Gt=J(l,"P",{"data-svelte-h":!0}),C(Gt)!=="svelte-pvlxk7"&&(Gt.textContent=Fe),Te=b(l),y(It.$$.fragment,l),Ue=b(l),y(nt.$$.fragment,l),Je=b(l),y(Zt.$$.fragment,l),Ce=b(l),y(st.$$.fragment,l),ke=b(l),y(xt.$$.fragment,l),_e=b(l),Bt=J(l,"P",{}),Xt(Bt).forEach(r),this.h()},h(){it(t,"name","hf:doc:metadata"),it(t,"content",wn),it(O,"start","2"),it(K,"start","3")},m(l,m){Re(document.head,t),f(l,a,m),f(l,e,m),f(l,s,m),g(i,l,m),f(l,p,m),f(l,n,m),f(l,o,m),g(c,l,m),f(l,_,m),g(R,l,m),f(l,k,m),f(l,W,m),f(l,V,m),g(B,l,m),f(l,j,m),f(l,Z,m),f(l,A,m),g(S,l,m),f(l,N,m),f(l,H,m),f(l,G,m),f(l,E,m),f(l,Nt,m),f(l,ot,m),f(l,At,m),f(l,rt,m),f(l,St,m),g(z,l,m),f(l,Ht,m),g(pt,l,m),f(l,Pt,m),g(ft,l,m),f(l,Vt,m),f(l,dt,m),f(l,Et,m),g(D,l,m),f(l,zt,m),g(mt,l,m),f(l,Dt,m),g(Q,l,m),f(l,Qt,m),f(l,ut,m),f(l,Ft,m),g(F,l,m),f(l,Ot,m),g(ct,l,m),f(l,qt,m),f(l,$t,m),f(l,Kt,m),f(l,bt,m),f(l,te,m),f(l,ht,m),f(l,ee,m),f(l,Mt,m),f(l,le,m),g(wt,l,m),f(l,ne,m),f(l,O,m),f(l,se,m),g(q,l,m),f(l,ie,m),g(yt,l,m),f(l,ae,m),f(l,gt,m),f(l,oe,m),g(Tt,l,m),f(l,re,m),f(l,K,m),f(l,pe,m),g(Ut,l,m),f(l,fe,m),g(tt,l,m),f(l,de,m),f(l,Jt,m),f(l,me,m),g(et,l,m),f(l,ue,m),g(Ct,l,m),f(l,ce,m),f(l,kt,m),f(l,$e,m),f(l,_t,m),f(l,be,m),g(vt,l,m),f(l,he,m),f(l,jt,m),f(l,Me,m),g(Rt,l,m),f(l,we,m),g(lt,l,m),f(l,ye,m),g(Wt,l,m),f(l,ge,m),f(l,Gt,m),f(l,Te,m),g(It,l,m),f(l,Ue,m),g(nt,l,m),f(l,Je,m),g(Zt,l,m),f(l,Ce,m),g(st,l,m),f(l,ke,m),g(xt,l,m),f(l,_e,m),f(l,Bt,m),ve=!0},p(l,[m]){const Oe={};m&2&&(Oe.$$scope={dirty:m,ctx:l}),c.$set(Oe);const qe={};m&2&&(qe.$$scope={dirty:m,ctx:l}),z.$set(qe);const Ke={};m&2&&(Ke.$$scope={dirty:m,ctx:l}),D.$set(Ke);const tl={};m&2&&(tl.$$scope={dirty:m,ctx:l}),Q.$set(tl);const el={};m&2&&(el.$$scope={dirty:m,ctx:l}),F.$set(el);const ll={};m&2&&(ll.$$scope={dirty:m,ctx:l}),q.$set(ll);const nl={};m&2&&(nl.$$scope={dirty:m,ctx:l}),tt.$set(nl);const sl={};m&2&&(sl.$$scope={dirty:m,ctx:l}),et.$set(sl);const il={};m&2&&(il.$$scope={dirty:m,ctx:l}),lt.$set(il);const al={};m&2&&(al.$$scope={dirty:m,ctx:l}),nt.$set(al);const ol={};m&2&&(ol.$$scope={dirty:m,ctx:l}),st.$set(ol)},i(l){ve||(h(i.$$.fragment,l),h(c.$$.fragment,l),h(R.$$.fragment,l),h(B.$$.fragment,l),h(S.$$.fragment,l),h(z.$$.fragment,l),h(pt.$$.fragment,l),h(ft.$$.fragment,l),h(D.$$.fragment,l),h(mt.$$.fragment,l),h(Q.$$.fragment,l),h(F.$$.fragment,l),h(ct.$$.fragment,l),h(wt.$$.fragment,l),h(q.$$.fragment,l),h(yt.$$.fragment,l),h(Tt.$$.fragment,l),h(Ut.$$.fragment,l),h(tt.$$.fragment,l),h(et.$$.fragment,l),h(Ct.$$.fragment,l),h(vt.$$.fragment,l),h(Rt.$$.fragment,l),h(lt.$$.fragment,l),h(Wt.$$.fragment,l),h(It.$$.fragment,l),h(nt.$$.fragment,l),h(Zt.$$.fragment,l),h(st.$$.fragment,l),h(xt.$$.fragment,l),ve=!0)},o(l){M(i.$$.fragment,l),M(c.$$.fragment,l),M(R.$$.fragment,l),M(B.$$.fragment,l),M(S.$$.fragment,l),M(z.$$.fragment,l),M(pt.$$.fragment,l),M(ft.$$.fragment,l),M(D.$$.fragment,l),M(mt.$$.fragment,l),M(Q.$$.fragment,l),M(F.$$.fragment,l),M(ct.$$.fragment,l),M(wt.$$.fragment,l),M(q.$$.fragment,l),M(yt.$$.fragment,l),M(Tt.$$.fragment,l),M(Ut.$$.fragment,l),M(tt.$$.fragment,l),M(et.$$.fragment,l),M(Ct.$$.fragment,l),M(vt.$$.fragment,l),M(Rt.$$.fragment,l),M(lt.$$.fragment,l),M(Wt.$$.fragment,l),M(It.$$.fragment,l),M(nt.$$.fragment,l),M(Zt.$$.fragment,l),M(st.$$.fragment,l),M(xt.$$.fragment,l),ve=!1},d(l){l&&(r(a),r(e),r(s),r(p),r(n),r(o),r(_),r(k),r(W),r(V),r(j),r(Z),r(A),r(N),r(H),r(G),r(E),r(Nt),r(ot),r(At),r(rt),r(St),r(Ht),r(Pt),r(Vt),r(dt),r(Et),r(zt),r(Dt),r(Qt),r(ut),r(Ft),r(Ot),r(qt),r($t),r(Kt),r(bt),r(te),r(ht),r(ee),r(Mt),r(le),r(ne),r(O),r(se),r(ie),r(ae),r(gt),r(oe),r(re),r(K),r(pe),r(fe),r(de),r(Jt),r(me),r(ue),r(ce),r(kt),r($e),r(_t),r(be),r(he),r(jt),r(Me),r(we),r(ye),r(ge),r(Gt),r(Te),r(Ue),r(Je),r(Ce),r(ke),r(_e),r(Bt)),r(t),T(i,l),T(c,l),T(R,l),T(B,l),T(S,l),T(z,l),T(pt,l),T(ft,l),T(D,l),T(mt,l),T(Q,l),T(F,l),T(ct,l),T(wt,l),T(q,l),T(yt,l),T(Tt,l),T(Ut,l),T(tt,l),T(et,l),T(Ct,l),T(vt,l),T(Rt,l),T(lt,l),T(Wt,l),T(It,l),T(nt,l),T(Zt,l),T(st,l),T(xt,l)}}}const wn='{"title":"Installation Guide","local":"installation-guide","sections":[{"title":"Table of Contents","local":"table-of-contents","sections":[],"depth":2},{"title":"CUDA","local":"cuda","sections":[{"title":"Supported CUDA Configurations","local":"cuda-pip","sections":[],"depth":3},{"title":"pip install pre-built wheel from latest main commit","local":"pip-install-pre-built-wheel-from-latest-main-commit","sections":[],"depth":3},{"title":"Compile from source","local":"cuda-compile","sections":[],"depth":3},{"title":"PyTorch CUDA versions","local":"pytorch-cuda-versions","sections":[],"depth":3}],"depth":2},{"title":"Multi-backend Support (Alpha Release)","local":"multi-backend","sections":[{"title":"Supported Backends","local":"multi-backend-supported-backends","sections":[],"depth":3},{"title":"Pre-requisites","local":"multi-backend-pre-requisites","sections":[],"depth":3},{"title":"Installation","local":"installation","sections":[{"title":"Pre-built Wheel Installation (recommended)","local":"multi-backend-pip","sections":[],"depth":4},{"title":"Compile from Source","local":"multi-backend-compile","sections":[],"depth":4},{"title":"AMD GPU","local":"amd-gpu","sections":[],"depth":4},{"title":"Intel CPU","local":"intel-cpu","sections":[],"depth":4},{"title":"Ascend NPU","local":"ascend-npu","sections":[],"depth":4},{"title":"Apple Silicon","local":"apple-silicon","sections":[],"depth":4}],"depth":3}],"depth":2}],"depth":1}';function yn(u){return Ml(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vn extends Ge{constructor(t){super(),Ie(this,t,yn,Mn,We,{})}}export{vn as component}; | |
Xet Storage Details
- Size:
- 61 kB
- Xet hash:
- bb8addd2607cacf63e95a65094fcbeade755daa495397337d2ece809add6343e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.