Buckets:

rtrm's picture
download
raw
45.6 kB
import{s as se,c as We,u as Ze,g as Ie,d as xe,e as Be,f as le,o as Xe,n as B}from"../chunks/scheduler.852ec091.js";import{S as ie,i as ae,g as v,s as c,h as J,j as Ut,f as p,c as $,k as Mt,a as m,d as b,t as M,z as Ye,m as Le,n as Ne,y as ne,B as Pe,o as He,e as Je,p as Ae,b as Se,r as g,A as Ve,u as y,x as k,v as U,w as T}from"../chunks/index.28275fd3.js";import{T as bt}from"../chunks/Tip.9f398c59.js";import{C as X}from"../chunks/CodeBlock.c866bcf2.js";import{H as x,E as ze}from"../chunks/getInferenceSnippets.f859b5ca.js";import{e as Ge}from"../chunks/each.e59479a4.js";import{w as Qe}from"../chunks/index.268e315a.js";const yt=Qe({});function Fe(u,t){const o=new URL(window.location.href),l=new URLSearchParams(o.search);l.set(u,t),o.search=l.toString(),history.replaceState(null,"",o.toString())}function De(u){const t=new URL(window.location.href);return new URLSearchParams(t.search).get(u)}function ke(u,t,o){const l=u.slice();return l[7]=t[o],l}function _e(u){let t,o=u[7]+"",l,i,n,s,a;function r(){return u[6](u[7])}return{c(){t=v("div"),l=Le(o),i=c(),this.h()},l(d){t=J(d,"DIV",{class:!0});var h=Ut(t);l=Ne(h,o),i=$(h),h.forEach(p),this.h()},h(){Mt(t,"class",n="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(d,h){m(d,t,h),ne(t,l),ne(t,i),s||(a=Pe(t,"click",r),s=!0)},p(d,h){u=d,h&2&&o!==(o=u[7]+"")&&He(l,o),h&7&&n!==(n="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"))&&Mt(t,"class",n)},d(d){d&&p(t),s=!1,a()}}}function Ee(u){let t,o,l,i,n=Ge(u[1]),s=[];for(let d=0;d<n.length;d+=1)s[d]=_e(ke(u,n,d));const a=u[5].default,r=We(a,u,u[4],null);return{c(){t=v("div");for(let d=0;d<s.length;d+=1)s[d].c();o=c(),l=v("div"),r&&r.c(),this.h()},l(d){t=J(d,"DIV",{class:!0});var h=Ut(t);for(let w=0;w<s.length;w+=1)s[w].l(h);h.forEach(p),o=$(d),l=J(d,"DIV",{class:!0});var G=Ut(l);r&&r.l(G),G.forEach(p),this.h()},h(){Mt(t,"class","flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"),Mt(l,"class","language-select")},m(d,h){m(d,t,h);for(let G=0;G<s.length;G+=1)s[G]&&s[G].m(t,null);m(d,o,h),m(d,l,h),r&&r.m(l,null),i=!0},p(d,[h]){if(h&15){n=Ge(d[1]);let G;for(G=0;G<n.length;G+=1){const w=ke(d,n,G);s[G]?s[G].p(w,h):(s[G]=_e(w),s[G].c(),s[G].m(t,null))}for(;G<s.length;G+=1)s[G].d(1);s.length=n.length}r&&r.p&&(!i||h&16)&&Ze(r,a,d,d[4],i?xe(a,d[4],h,null):Ie(d[4]),null)},i(d){i||(b(r,d),i=!0)},o(d){M(r,d),i=!1},d(d){d&&(p(t),p(o),p(l)),Ye(s,d),r&&r.d(d)}}}function Oe(u,t,o){let l;Be(u,yt,h=>o(2,l=h));let{$$slots:i={},$$scope:n}=t,{id:s}=t,{options:a}=t;le(yt,l[s]=a[0],l);function r(h){le(yt,l[s]=h,l),Fe(s,h)}Xe(()=>{const h=De(s);h&&a.includes(h)&&le(yt,l[s]=h,l)});const d=h=>r(h);return u.$$set=h=>{"id"in h&&o(0,s=h.id),"options"in h&&o(1,a=h.options),"$$scope"in h&&o(4,n=h.$$scope)},[s,a,l,r,n,i,d]}class gt extends ie{constructor(t){super(),ae(this,t,Oe,Ee,se,{id:0,options:1})}}function Re(u){let t;const o=u[4].default,l=We(o,u,u[3],null);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,n){l&&l.m(i,n),t=!0},p(i,n){l&&l.p&&(!t||n&8)&&Ze(l,o,i,i[3],t?xe(o,i[3],n,null):Ie(i[3]),null)},i(i){t||(b(l,i),t=!0)},o(i){M(l,i),t=!1},d(i){l&&l.d(i)}}}function qe(u){let t,o,l=u[2][u[0]]===u[1]&&Re(u);return{c(){l&&l.c(),t=Je()},l(i){l&&l.l(i),t=Je()},m(i,n){l&&l.m(i,n),m(i,t,n),o=!0},p(i,[n]){i[2][i[0]]===i[1]?l?(l.p(i,n),n&7&&b(l,1)):(l=Re(i),l.c(),b(l,1),l.m(t.parentNode,t)):l&&(Ae(),M(l,1,1,()=>{l=null}),Se())},i(i){o||(b(l),o=!0)},o(i){M(l),o=!1},d(i){i&&p(t),l&&l.d(i)}}}function Ke(u,t,o){let l;Be(u,yt,r=>o(2,l=r));let{$$slots:i={},$$scope:n}=t,{id:s}=t,{option:a}=t;return u.$$set=r=>{"id"in r&&o(0,s=r.id),"option"in r&&o(1,a=r.option),"$$scope"in r&&o(3,n=r.$$scope)},[s,a,l,n,i]}class Y extends ie{constructor(t){super(),ae(this,t,Ke,qe,se,{id:0,option:1})}}function tl(u){let t,o="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=v("p"),t.textContent=o},l(l){t=J(l,"P",{"data-svelte-h":!0}),k(t)!=="svelte-lsyg73"&&(t.textContent=o)},m(l,i){m(l,t,i)},p:B,d(l){l&&p(t)}}}function el(u){let t,o="Don’t hesitate to compile from source! The process is pretty straight forward and resilient. This might be needed for older CUDA Toolkit versions or Linux distributions, or other less common configurations.";return{c(){t=v("p"),t.textContent=o},l(l){t=J(l,"P",{"data-svelte-h":!0}),k(t)!=="svelte-7cdo1a"&&(t.textContent=o)},m(l,i){m(l,t,i)},p:B,d(l){l&&p(t)}}}function ll(u){let t,o="If you have multiple versions of the CUDA Toolkit installed or it is in a non-standard location, please refer to CMake CUDA documentation for how to configure the CUDA compiler.";return{c(){t=v("p"),t.textContent=o},l(l){t=J(l,"P",{"data-svelte-h":!0}),k(t)!=="svelte-5em9qm"&&(t.textContent=o)},m(l,i){m(l,t,i)},p:B,d(l){l&&p(t)}}}function nl(u){let t,o="To compile from source, you need CMake &gt;= <strong>3.22.1</strong> and Python &gt;= <strong>3.9</strong> installed. Make sure you have a compiler installed to compile C++ (<code>gcc</code>, <code>make</code>, headers, etc.). It is recommended to use GCC 9 or newer.",l,i,n="For example, to install a compiler and CMake on Ubuntu:",s,a,r,d,h='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. The current minimum supported CUDA Toolkit version that we test with is <strong>11.8</strong>.',G,w,Z,R,I;return a=new X({props:{code:"YXB0LWdldCUyMGluc3RhbGwlMjAteSUyMGJ1aWxkLWVzc2VudGlhbCUyMGNtYWtl",highlighted:"apt-get install -y build-essential cmake",wrap:!1}}),w=new X({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQWNtYWtlJTIwLURDT01QVVRFX0JBQ0tFTkQlM0RjdWRhJTIwLVMlMjAuJTBBbWFrZSUwQXBpcCUyMGluc3RhbGwlMjAtZSUyMC4lMjAlMjAlMjAlMjMlMjAlNjAtZSU2MCUyMGZvciUyMCUyMmVkaXRhYmxlJTIyJTIwaW5zdGFsbCUyQyUyMHdoZW4lMjBkZXZlbG9waW5nJTIwQk5CJTIwKG90aGVyd2lzZSUyMGxlYXZlJTIwdGhhdCUyMG91dCk=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/bitsandbytes-foundation/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
cmake -DCOMPUTE_BACKEND=cuda -S .
make
pip install -e . <span class="hljs-comment"># \`-e\` for &quot;editable&quot; install, when developing BNB (otherwise leave that out)</span>`,wrap:!1}}),R=new bt({props:{warning:!1,$$slots:{default:[ll]},$$scope:{ctx:u}}}),{c(){t=v("p"),t.innerHTML=o,l=c(),i=v("p"),i.textContent=n,s=c(),g(a.$$.fragment),r=c(),d=v("p"),d.innerHTML=h,G=c(),g(w.$$.fragment),Z=c(),g(R.$$.fragment)},l(C){t=J(C,"P",{"data-svelte-h":!0}),k(t)!=="svelte-1pw2s41"&&(t.innerHTML=o),l=$(C),i=J(C,"P",{"data-svelte-h":!0}),k(i)!=="svelte-noyxvz"&&(i.textContent=n),s=$(C),y(a.$$.fragment,C),r=$(C),d=J(C,"P",{"data-svelte-h":!0}),k(d)!=="svelte-3mlkls"&&(d.innerHTML=h),G=$(C),y(w.$$.fragment,C),Z=$(C),y(R.$$.fragment,C)},m(C,_){m(C,t,_),m(C,l,_),m(C,i,_),m(C,s,_),U(a,C,_),m(C,r,_),m(C,d,_),m(C,G,_),U(w,C,_),m(C,Z,_),U(R,C,_),I=!0},p(C,_){const L={};_&2&&(L.$$scope={dirty:_,ctx:C}),R.$set(L)},i(C){I||(b(a.$$.fragment,C),b(w.$$.fragment,C),b(R.$$.fragment,C),I=!0)},o(C){M(a.$$.fragment,C),M(w.$$.fragment,C),M(R.$$.fragment,C),I=!1},d(C){C&&(p(t),p(l),p(i),p(s),p(r),p(d),p(G),p(Z)),T(a,C),T(w,C),T(R,C)}}}function sl(u){let t,o="Compilation from source on Windows systems require Visual Studio with C++ support as well as an installation of the CUDA Toolkit.",l,i,n='To compile from source, you need CMake &gt;= <strong>3.22.1</strong> and Python &gt;= <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. The current minimum supported CUDA Toolkit version that we test with is <strong>11.8</strong>.',s,a,r,d,h='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.',G;return a=new X({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQWNtYWtlJTIwLURDT01QVVRFX0JBQ0tFTkQlM0RjdWRhJTIwLVMlMjAuJTBBY21ha2UlMjAtLWJ1aWxkJTIwLiUyMC0tY29uZmlnJTIwUmVsZWFzZSUwQXBpcCUyMGluc3RhbGwlMjAtZSUyMC4lMjAlMjAlMjAlMjMlMjAlNjAtZSU2MCUyMGZvciUyMCUyMmVkaXRhYmxlJTIyJTIwaW5zdGFsbCUyQyUyMHdoZW4lMjBkZXZlbG9waW5nJTIwQk5CJTIwKG90aGVyd2lzZSUyMGxlYXZlJTIwdGhhdCUyMG91dCk=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/bitsandbytes-foundation/bitsandbytes.git &amp;&amp; <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 &quot;editable&quot; install, when developing BNB (otherwise leave that out)</span>`,wrap:!1}}),{c(){t=v("p"),t.textContent=o,l=c(),i=v("p"),i.innerHTML=n,s=c(),g(a.$$.fragment),r=c(),d=v("p"),d.innerHTML=h},l(w){t=J(w,"P",{"data-svelte-h":!0}),k(t)!=="svelte-10x6whz"&&(t.textContent=o),l=$(w),i=J(w,"P",{"data-svelte-h":!0}),k(i)!=="svelte-s1doi7"&&(i.innerHTML=n),s=$(w),y(a.$$.fragment,w),r=$(w),d=J(w,"P",{"data-svelte-h":!0}),k(d)!=="svelte-e0ivb"&&(d.innerHTML=h)},m(w,Z){m(w,t,Z),m(w,l,Z),m(w,i,Z),m(w,s,Z),U(a,w,Z),m(w,r,Z),m(w,d,Z),G=!0},p:B,i(w){G||(b(a.$$.fragment,w),G=!0)},o(w){M(a.$$.fragment,w),G=!1},d(w){w&&(p(t),p(l),p(i),p(s),p(r),p(d)),T(a,w)}}}function il(u){let t,o,l,i;return t=new Y({props:{id:"source",option:"Linux",$$slots:{default:[nl]},$$scope:{ctx:u}}}),l=new Y({props:{id:"source",option:"Windows",$$slots:{default:[sl]},$$scope:{ctx:u}}}),{c(){g(t.$$.fragment),o=c(),g(l.$$.fragment)},l(n){y(t.$$.fragment,n),o=$(n),y(l.$$.fragment,n)},m(n,s){U(t,n,s),m(n,o,s),U(l,n,s),i=!0},p(n,s){const a={};s&2&&(a.$$scope={dirty:s,ctx:n}),t.$set(a);const r={};s&2&&(r.$$scope={dirty:s,ctx:n}),l.$set(r)},i(n){i||(b(t.$$.fragment,n),b(l.$$.fragment,n),i=!0)},o(n){M(t.$$.fragment,n),M(l.$$.fragment,n),i=!1},d(n){n&&p(o),T(t,n),T(l,n)}}}function al(u){let t,o;return t=new X({props:{code:"JTIzJTIwTm90ZSUzQSUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBvdXIlMjBkZXBlbmRlbmNpZXMlMkMlMjBhcHBlbmQlMjB0aGUlMjAlNjAtLW5vLWRlcHMlNjAlMjBmbGFnISUwQSUwQSUyMyUyMHg4Nl82NCUyMChtb3N0JTIwdXNlcnMpJTBBcGlwJTIwaW5zdGFsbCUyMC0tZm9yY2UtcmVpbnN0YWxsJTIwaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGYml0c2FuZGJ5dGVzLWZvdW5kYXRpb24lMkZiaXRzYW5kYnl0ZXMlMkZyZWxlYXNlcyUyRmRvd25sb2FkJTJGY29udGludW91cy1yZWxlYXNlX21haW4lMkZiaXRzYW5kYnl0ZXMtMS4zMy43LnByZXZpZXctcHkzLW5vbmUtbWFueWxpbnV4XzJfMjRfeDg2XzY0LndobCUwQSUwQSUyMyUyMEFSTSUyRmFhcmNoNjQlMEFwaXAlMjBpbnN0YWxsJTIwLS1mb3JjZS1yZWluc3RhbGwlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcyUyRnJlbGVhc2VzJTJGZG93bmxvYWQlMkZjb250aW51b3VzLXJlbGVhc2VfbWFpbiUyRmJpdHNhbmRieXRlcy0xLjMzLjcucHJldmlldy1weTMtbm9uZS1tYW55bGludXhfMl8yNF9hYXJjaDY0LndobA==",highlighted:`<span class="hljs-comment"># Note: if you don&#x27;t want to reinstall our dependencies, append the \`--no-deps\` flag!</span>
<span class="hljs-comment"># x86_64 (most users)</span>
pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl
<span class="hljs-comment"># ARM/aarch64</span>
pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_aarch64.whl`,wrap:!1}}),{c(){g(t.$$.fragment)},l(l){y(t.$$.fragment,l)},m(l,i){U(t,l,i),o=!0},p:B,i(l){o||(b(t.$$.fragment,l),o=!0)},o(l){M(t.$$.fragment,l),o=!1},d(l){T(t,l)}}}function ol(u){let t,o;return t=new X({props:{code:"JTIzJTIwTm90ZSUzQSUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBvdXIlMjBkZXBlbmRlbmNpZXMlMkMlMjBhcHBlbmQlMjB0aGUlMjAlNjAtLW5vLWRlcHMlNjAlMjBmbGFnISUwQXBpcCUyMGluc3RhbGwlMjAtLWZvcmNlLXJlaW5zdGFsbCUyMGh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmJpdHNhbmRieXRlcy1mb3VuZGF0aW9uJTJGYml0c2FuZGJ5dGVzJTJGcmVsZWFzZXMlMkZkb3dubG9hZCUyRmNvbnRpbnVvdXMtcmVsZWFzZV9tYWluJTJGYml0c2FuZGJ5dGVzLTEuMzMuNy5wcmV2aWV3LXB5My1ub25lLXdpbl9hbWQ2NC53aGw=",highlighted:'<span class="hljs-comment"># Note: if you don&#x27;t want to reinstall our dependencies, append the `--no-deps` flag!</span>\npip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_amd64.whl',wrap:!1}}),{c(){g(t.$$.fragment)},l(l){y(t.$$.fragment,l)},m(l,i){U(t,l,i),o=!0},p:B,i(l){o||(b(t.$$.fragment,l),o=!0)},o(l){M(t.$$.fragment,l),o=!1},d(l){T(t,l)}}}function rl(u){let t,o,l,i;return t=new Y({props:{id:"OS",option:"Linux",$$slots:{default:[al]},$$scope:{ctx:u}}}),l=new Y({props:{id:"OS",option:"Windows",$$slots:{default:[ol]},$$scope:{ctx:u}}}),{c(){g(t.$$.fragment),o=c(),g(l.$$.fragment)},l(n){y(t.$$.fragment,n),o=$(n),y(l.$$.fragment,n)},m(n,s){U(t,n,s),m(n,o,s),U(l,n,s),i=!0},p(n,s){const a={};s&2&&(a.$$scope={dirty:s,ctx:n}),t.$set(a);const r={};s&2&&(r.$$scope={dirty:s,ctx:n}),l.$set(r)},i(n){i||(b(t.$$.fragment,n),b(l.$$.fragment,n),i=!0)},o(n){M(t.$$.fragment,n),M(l.$$.fragment,n),i=!1},d(n){n&&p(o),T(t,n),T(l,n)}}}function pl(u){let t,o="This functionality existed as an early technical preview and is not recommended for production use. We are in the process of upstreaming improved support for AMD and Intel hardware into the main project.";return{c(){t=v("p"),t.textContent=o},l(l){t=J(l,"P",{"data-svelte-h":!0}),k(t)!=="svelte-1d3m18z"&&(t.textContent=o)},m(l,i){m(l,t,i)},p:B,d(l){l&&p(t)}}}function ml(u){let t,o='Pre-compiled binaries are only built for ROCm versions <code>6.1.2</code>/<code>6.2.4</code>/<code>6.3.2</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>.',l,i,n='Other supported versions that don’t come with pre-compiled binaries <a href="#multi-backend-compile">can be compiled for with these instructions</a>.',s,a,r="<strong>Windows is not supported for the ROCm backend</strong>";return{c(){t=v("p"),t.innerHTML=o,l=c(),i=v("p"),i.innerHTML=n,s=c(),a=v("p"),a.innerHTML=r},l(d){t=J(d,"P",{"data-svelte-h":!0}),k(t)!=="svelte-15tf8ep"&&(t.innerHTML=o),l=$(d),i=J(d,"P",{"data-svelte-h":!0}),k(i)!=="svelte-1yin7gn"&&(i.innerHTML=n),s=$(d),a=J(d,"P",{"data-svelte-h":!0}),k(a)!=="svelte-gwxaiq"&&(a.innerHTML=r)},m(d,h){m(d,t,h),m(d,l,h),m(d,i,h),m(d,s,h),m(d,a,h)},p:B,d(d){d&&(p(t),p(l),p(i),p(s),p(a))}}}function dl(u){let t,o='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=v("p"),t.innerHTML=o},l(l){t=J(l,"P",{"data-svelte-h":!0}),k(t)!=="svelte-1ioez28"&&(t.innerHTML=o)},m(l,i){m(l,t,i)},p:B,d(l){l&&p(t)}}}function fl(u){let t,o,l,i,n,s;return t=new bt({props:{warning:!0,$$slots:{default:[ml]},$$scope:{ctx:u}}}),l=new bt({props:{warning:!1,$$slots:{default:[dl]},$$scope:{ctx:u}}}),n=new X({props:{code:"JTIzJTIwQ3JlYXRlJTIwYSUyMGRvY2tlciUyMGNvbnRhaW5lciUyMHdpdGglMjB0aGUlMjBST0NtJTIwaW1hZ2UlMkMlMjB3aGljaCUyMGluY2x1ZGVzJTIwUk9DbSUyMGxpYnJhcmllcyUwQWRvY2tlciUyMHB1bGwlMjByb2NtJTJGZGV2LXVidW50dS0yMi4wNCUzQTYuMy40LWNvbXBsZXRlJTBBZG9ja2VyJTIwcnVuJTIwLWl0JTIwLS1kZXZpY2UlM0QlMkZkZXYlMkZrZmQlMjAtLWRldmljZSUzRCUyRmRldiUyRmRyaSUyMC0tZ3JvdXAtYWRkJTIwdmlkZW8lMjByb2NtJTJGZGV2LXVidW50dS0yMi4wNCUzQTYuMy40LWNvbXBsZXRlJTBBYXB0LWdldCUyMHVwZGF0ZSUyMCUyNiUyNiUyMGFwdC1nZXQlMjBpbnN0YWxsJTIwLXklMjBnaXQlMjAlMjYlMjYlMjBjZCUyMGhvbWUlMEElMEElMjMlMjBJbnN0YWxsJTIwcHl0b3JjaCUyMGNvbXBhdGlibGUlMjB3aXRoJTIwYWJvdmUlMjBST0NtJTIwdmVyc2lvbiUwQXBpcCUyMGluc3RhbGwlMjB0b3JjaCUyMC0taW5kZXgtdXJsJTIwaHR0cHMlM0ElMkYlMkZkb3dubG9hZC5weXRvcmNoLm9yZyUyRndobCUyRnJvY202LjMlMkY=",highlighted:`<span class="hljs-comment"># Create a docker container with the ROCm image, which includes ROCm libraries</span>
docker pull rocm/dev-ubuntu-22.04:6.3.4-complete
docker run -it --device=/dev/kfd --device=/dev/dri --group-add video rocm/dev-ubuntu-22.04:6.3.4-complete
apt-get update &amp;&amp; apt-get install -y git &amp;&amp; <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.3/`,wrap:!1}}),{c(){g(t.$$.fragment),o=c(),g(l.$$.fragment),i=c(),g(n.$$.fragment)},l(a){y(t.$$.fragment,a),o=$(a),y(l.$$.fragment,a),i=$(a),y(n.$$.fragment,a)},m(a,r){U(t,a,r),m(a,o,r),U(l,a,r),m(a,i,r),U(n,a,r),s=!0},p(a,r){const d={};r&2&&(d.$$scope={dirty:r,ctx:a}),t.$set(d);const h={};r&2&&(h.$$scope={dirty:r,ctx:a}),l.$set(h)},i(a){s||(b(t.$$.fragment,a),b(l.$$.fragment,a),b(n.$$.fragment,a),s=!0)},o(a){M(t.$$.fragment,a),M(l.$$.fragment,a),M(n.$$.fragment,a),s=!1},d(a){a&&(p(o),p(i)),T(t,a),T(l,a),T(n,a)}}}function ul(u){let t,o='<li>A compatible PyTorch version with Intel XPU support is required. It is recommended to use the latest stable release. See <a href="https://docs.pytorch.org/docs/stable/notes/get_start_xpu.html" rel="nofollow">Getting Started on Intel GPU</a> for guidance.</li> <li>The <a href="https://intel.github.io/intel-extension-for-pytorch/xpu/latest/" rel="nofollow">Intel Extension for PyTorch</a> is recommended for performance improvements.</li>';return{c(){t=v("ul"),t.innerHTML=o},l(l){t=J(l,"UL",{"data-svelte-h":!0}),k(t)!=="svelte-1m3l44e"&&(t.innerHTML=o)},m(l,i){m(l,t,i)},p:B,d(l){l&&p(t)}}}function cl(u){let t,o,l,i;return t=new Y({props:{id:"backend",option:"AMD ROCm",$$slots:{default:[fl]},$$scope:{ctx:u}}}),l=new Y({props:{id:"backend",option:"Intel XPU",$$slots:{default:[ul]},$$scope:{ctx:u}}}),{c(){g(t.$$.fragment),o=c(),g(l.$$.fragment)},l(n){y(t.$$.fragment,n),o=$(n),y(l.$$.fragment,n)},m(n,s){U(t,n,s),m(n,o,s),U(l,n,s),i=!0},p(n,s){const a={};s&2&&(a.$$scope={dirty:s,ctx:n}),t.$set(a);const r={};s&2&&(r.$$scope={dirty:s,ctx:n}),l.$set(r)},i(n){i||(b(t.$$.fragment,n),b(l.$$.fragment,n),i=!0)},o(n){M(t.$$.fragment,n),M(l.$$.fragment,n),i=!1},d(n){n&&p(o),T(t,n),T(l,n)}}}function $l(u){let t,o="This wheel provides support for ROCm and Intel XPU platforms.",l,i,n;return i=new X({props:{code:"JTIzJTIwTm90ZSUyQyUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBvdXIlMjBkZXBlbmRlbmNpZXMlMkMlMjBhcHBlbmQlMjB0aGUlMjAlNjAtLW5vLWRlcHMlNjAlMjBmbGFnISUwQXBpcCUyMGluc3RhbGwlMjAtLWZvcmNlLXJlaW5zdGFsbCUyMCdodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcyUyRnJlbGVhc2VzJTJGZG93bmxvYWQlMkZjb250aW51b3VzLXJlbGVhc2VfbXVsdGktYmFja2VuZC1yZWZhY3RvciUyRmJpdHNhbmRieXRlcy0wLjQ0LjEuZGV2MC1weTMtbm9uZS1tYW55bGludXhfMl8yNF94ODZfNjQud2hsJw==",highlighted:'<span class="hljs-comment"># Note, if you don&#x27;t want to reinstall our dependencies, append the `--no-deps` flag!</span>\n<span class="hljs-attribute">pip</span> install --force-reinstall &#x27;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&#x27;',wrap:!1}}),{c(){t=v("p"),t.textContent=o,l=c(),g(i.$$.fragment)},l(s){t=J(s,"P",{"data-svelte-h":!0}),k(t)!=="svelte-1kkilee"&&(t.textContent=o),l=$(s),y(i.$$.fragment,s)},m(s,a){m(s,t,a),m(s,l,a),U(i,s,a),n=!0},p:B,i(s){n||(b(i.$$.fragment,s),n=!0)},o(s){M(i.$$.fragment,s),n=!1},d(s){s&&(p(t),p(l)),T(i,s)}}}function hl(u){let t,o="This wheel provides support for the Intel XPU platform.",l,i,n;return i=new X({props:{code:"JTIzJTIwTm90ZSUyQyUyMGlmJTIweW91JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjByZWluc3RhbGwlMjBvdXIlMjBkZXBlbmRlbmNpZXMlMkMlMjBhcHBlbmQlMjB0aGUlMjAlNjAtLW5vLWRlcHMlNjAlMjBmbGFnISUwQXBpcCUyMGluc3RhbGwlMjAtLWZvcmNlLXJlaW5zdGFsbCUyMCdodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcyUyRnJlbGVhc2VzJTJGZG93bmxvYWQlMkZjb250aW51b3VzLXJlbGVhc2VfbXVsdGktYmFja2VuZC1yZWZhY3RvciUyRmJpdHNhbmRieXRlcy0wLjQ0LjEuZGV2MC1weTMtbm9uZS13aW5fYW1kNjQud2hsJw==",highlighted:'<span class="hljs-comment"># Note, if you don&#x27;t want to reinstall our dependencies, append the `--no-deps` flag!</span>\npip install --force-reinstall <span class="hljs-string">&#x27;https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-0.44.1.dev0-py3-none-win_amd64.whl&#x27;</span>',wrap:!1}}),{c(){t=v("p"),t.textContent=o,l=c(),g(i.$$.fragment)},l(s){t=J(s,"P",{"data-svelte-h":!0}),k(t)!=="svelte-16f90z0"&&(t.textContent=o),l=$(s),y(i.$$.fragment,s)},m(s,a){m(s,t,a),m(s,l,a),U(i,s,a),n=!0},p:B,i(s){n||(b(i.$$.fragment,s),n=!0)},o(s){M(i.$$.fragment,s),n=!1},d(s){s&&(p(t),p(l)),T(i,s)}}}function bl(u){let t,o,l,i;return t=new Y({props:{id:"platform",option:"Linux",$$slots:{default:[$l]},$$scope:{ctx:u}}}),l=new Y({props:{id:"platform",option:"Windows",$$slots:{default:[hl]},$$scope:{ctx:u}}}),{c(){g(t.$$.fragment),o=c(),g(l.$$.fragment)},l(n){y(t.$$.fragment,n),o=$(n),y(l.$$.fragment,n)},m(n,s){U(t,n,s),m(n,o,s),U(l,n,s),i=!0},p(n,s){const a={};s&2&&(a.$$scope={dirty:s,ctx:n}),t.$set(a);const r={};s&2&&(r.$$scope={dirty:s,ctx:n}),l.$set(r)},i(n){i||(b(t.$$.fragment,n),b(l.$$.fragment,n),i=!0)},o(n){M(t.$$.fragment,n),M(l.$$.fragment,n),i=!1},d(n){n&&p(o),T(t,n),T(l,n)}}}function Ml(u){let t,o,l,i="bitsandbytes is supported from ROCm 6.1 - ROCm 6.4.",n,s,a;return t=new x({props:{title:"AMD GPU",local:"amd-gpu",headingTag:"h4"}}),s=new X({props:{code:"JTIzJTIwSW5zdGFsbCUyMGJpdHNhbmRieXRlcyUyMGZyb20lMjBzb3VyY2UlMEElMjMlMjBDbG9uZSUyMGJpdHNhbmRieXRlcyUyMHJlcG8lMkMlMjBST0NtJTIwYmFja2VuZCUyMGlzJTIwY3VycmVudGx5JTIwZW5hYmxlZCUyMG9uJTIwbXVsdGktYmFja2VuZC1yZWZhY3RvciUyMGJyYW5jaCUwQWdpdCUyMGNsb25lJTIwLWIlMjBtdWx0aS1iYWNrZW5kLXJlZmFjdG9yJTIwaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGYml0c2FuZGJ5dGVzLWZvdW5kYXRpb24lMkZiaXRzYW5kYnl0ZXMuZ2l0JTIwJTI2JTI2JTIwY2QlMjBiaXRzYW5kYnl0ZXMlMkYlMEElMEElMjMlMjBDb21waWxlJTIwJTI2JTIwaW5zdGFsbCUwQWFwdC1nZXQlMjBpbnN0YWxsJTIwLXklMjBidWlsZC1lc3NlbnRpYWwlMjBjbWFrZSUyMCUyMCUyMyUyMGluc3RhbGwlMjBidWlsZCUyMHRvb2xzJTIwZGVwZW5kZW5jaWVzJTJDJTIwdW5sZXNzJTIwcHJlc2VudCUwQWNtYWtlJTIwLURDT01QVVRFX0JBQ0tFTkQlM0RoaXAlMjAtUyUyMC4lMjAlMjAlMjMlMjBVc2UlMjAtREJOQl9ST0NNX0FSQ0glM0QlMjJnZng5MGElM0JnZng5NDIlMjIlMjB0byUyMHRhcmdldCUyMHNwZWNpZmljJTIwZ3B1JTIwYXJjaCUwQW1ha2UlMEFwaXAlMjBpbnN0YWxsJTIwLWUlMjAuJTIwJTIwJTIwJTIzJTIwJTYwLWUlNjAlMjBmb3IlMjAlMjJlZGl0YWJsZSUyMiUyMGluc3RhbGwlMkMlMjB3aGVuJTIwZGV2ZWxvcGluZyUyMEJOQiUyMChvdGhlcndpc2UlMjBsZWF2ZSUyMHRoYXQlMjBvdXQp",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 &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
<span class="hljs-comment"># Compile &amp; 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=&quot;gfx90a;gfx942&quot; to target specific gpu arch</span>
make
pip install -e . <span class="hljs-comment"># \`-e\` for &quot;editable&quot; install, when developing BNB (otherwise leave that out)</span>`,wrap:!1}}),{c(){g(t.$$.fragment),o=c(),l=v("p"),l.textContent=i,n=c(),g(s.$$.fragment)},l(r){y(t.$$.fragment,r),o=$(r),l=J(r,"P",{"data-svelte-h":!0}),k(l)!=="svelte-3it2he"&&(l.textContent=i),n=$(r),y(s.$$.fragment,r)},m(r,d){U(t,r,d),m(r,o,d),m(r,l,d),m(r,n,d),U(s,r,d),a=!0},p:B,i(r){a||(b(t.$$.fragment,r),b(s.$$.fragment,r),a=!0)},o(r){M(t.$$.fragment,r),M(s.$$.fragment,r),a=!1},d(r){r&&(p(o),p(l),p(n)),T(t,r),T(s,r)}}}function wl(u){let t,o,l,i='If you are using Intel CPU on Linux or Intel XPU on Linux/Windows, please follow the <a href="https://pytorch-extension.intel.com/" rel="nofollow">instruction</a> or the following command to install intel_extension_for_pytorch so you can get better performance.',n,s,a=`CPU: <code>pip install intel_extension_for_pytorch</code>
XPU: <code>pip install intel_extension_for_pytorch --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/</code>`,r,d,h=`Install bitsandbytes:
CPU: Need to build CPU C++ codes`,G,w,Z,R,I="XPU:",C,_,L;return t=new x({props:{title:"Intel CPU + XPU",local:"intel-cpu--xpu",headingTag:"h4"}}),w=new X({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQWNtYWtlJTIwLURDT01QVVRFX0JBQ0tFTkQlM0RjcHUlMjAtUyUyMC4lMEFtYWtlJTBBcGlwJTIwaW5zdGFsbCUyMC4=",highlighted:`git clone https:<span class="hljs-regexp">//gi</span>thub.com<span class="hljs-regexp">/bitsandbytes-foundation/</span>bitsandbytes.git &amp;&amp; cd bitsandbytes/
cmake -DCOMPUTE_BACKEND=cpu -S .
make
pip install .`,wrap:!1}}),_=new X({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmJpdHNhbmRieXRlcy1mb3VuZGF0aW9uJTJGYml0c2FuZGJ5dGVzLmdpdA==",highlighted:'pip install git+https:<span class="hljs-regexp">//gi</span>thub.com<span class="hljs-regexp">/bitsandbytes-foundation/</span>bitsandbytes.git',wrap:!1}}),{c(){g(t.$$.fragment),o=c(),l=v("p"),l.innerHTML=i,n=c(),s=v("p"),s.innerHTML=a,r=c(),d=v("p"),d.textContent=h,G=c(),g(w.$$.fragment),Z=c(),R=v("p"),R.textContent=I,C=c(),g(_.$$.fragment)},l(j){y(t.$$.fragment,j),o=$(j),l=J(j,"P",{"data-svelte-h":!0}),k(l)!=="svelte-1x4tbju"&&(l.innerHTML=i),n=$(j),s=J(j,"P",{"data-svelte-h":!0}),k(s)!=="svelte-jlb38n"&&(s.innerHTML=a),r=$(j),d=J(j,"P",{"data-svelte-h":!0}),k(d)!=="svelte-ccppt5"&&(d.textContent=h),G=$(j),y(w.$$.fragment,j),Z=$(j),R=J(j,"P",{"data-svelte-h":!0}),k(R)!=="svelte-1oop59x"&&(R.textContent=I),C=$(j),y(_.$$.fragment,j)},m(j,W){U(t,j,W),m(j,o,W),m(j,l,W),m(j,n,W),m(j,s,W),m(j,r,W),m(j,d,W),m(j,G,W),U(w,j,W),m(j,Z,W),m(j,R,W),m(j,C,W),U(_,j,W),L=!0},p:B,i(j){L||(b(t.$$.fragment,j),b(w.$$.fragment,j),b(_.$$.fragment,j),L=!0)},o(j){M(t.$$.fragment,j),M(w.$$.fragment,j),M(_.$$.fragment,j),L=!1},d(j){j&&(p(o),p(l),p(n),p(s),p(r),p(d),p(G),p(Z),p(R),p(C)),T(t,j),T(w,j),T(_,j)}}}function gl(u){let t,o,l,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 install the necessary <code>torch_npu</code> dependency.',n,s,a;return t=new x({props:{title:"Ascend NPU",local:"ascend-npu",headingTag:"h4"}}),s=new X({props:{code:"JTIzJTIwSW5zdGFsbCUyMGJpdHNhbmRieXRlcyUyMGZyb20lMjBzb3VyY2UlMEElMjMlMjBDbG9uZSUyMGJpdHNhbmRieXRlcyUyMHJlcG8lMkMlMjBBc2NlbmQlMjBOUFUlMjBiYWNrZW5kJTIwaXMlMjBjdXJyZW50bHklMjBlbmFibGVkJTIwb24lMjBtdWx0aS1iYWNrZW5kLXJlZmFjdG9yJTIwYnJhbmNoJTBBZ2l0JTIwY2xvbmUlMjAtYiUyMG11bHRpLWJhY2tlbmQtcmVmYWN0b3IlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZiaXRzYW5kYnl0ZXMtZm91bmRhdGlvbiUyRmJpdHNhbmRieXRlcy5naXQlMjAlMjYlMjYlMjBjZCUyMGJpdHNhbmRieXRlcyUyRiUwQSUwQSUyMyUyMENvbXBpbGUlMjAlMjYlMjBpbnN0YWxsJTBBYXB0LWdldCUyMGluc3RhbGwlMjAteSUyMGJ1aWxkLWVzc2VudGlhbCUyMGNtYWtlJTIwJTIwJTIzJTIwaW5zdGFsbCUyMGJ1aWxkJTIwdG9vbHMlMjBkZXBlbmRlbmNpZXMlMkMlMjB1bmxlc3MlMjBwcmVzZW50JTBBY21ha2UlMjAtRENPTVBVVEVfQkFDS0VORCUzRG5wdSUyMC1TJTIwLiUwQW1ha2UlMEFwaXAlMjBpbnN0YWxsJTIwLWUlMjAuJTIwJTIwJTIwJTIzJTIwJTYwLWUlNjAlMjBmb3IlMjAlMjJlZGl0YWJsZSUyMiUyMGluc3RhbGwlMkMlMjB3aGVuJTIwZGV2ZWxvcGluZyUyMEJOQiUyMChvdGhlcndpc2UlMjBsZWF2ZSUyMHRoYXQlMjBvdXQp",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 <span class="hljs-built_in">clone</span> -b multi-backend-refactor https://github.com/bitsandbytes-foundation/bitsandbytes.git &amp;&amp; <span class="hljs-built_in">cd</span> bitsandbytes/
<span class="hljs-comment"># Compile &amp; install</span>
apt-get install -y build-essential cmake <span class="hljs-comment"># install build tools dependencies, unless present</span>
cmake -DCOMPUTE_BACKEND=npu -S .
make
pip install -e . <span class="hljs-comment"># \`-e\` for &quot;editable&quot; install, when developing BNB (otherwise leave that out)</span>`,wrap:!1}}),{c(){g(t.$$.fragment),o=c(),l=v("p"),l.innerHTML=i,n=c(),g(s.$$.fragment)},l(r){y(t.$$.fragment,r),o=$(r),l=J(r,"P",{"data-svelte-h":!0}),k(l)!=="svelte-jqx2eo"&&(l.innerHTML=i),n=$(r),y(s.$$.fragment,r)},m(r,d){U(t,r,d),m(r,o,d),m(r,l,d),m(r,n,d),U(s,r,d),a=!0},p:B,i(r){a||(b(t.$$.fragment,r),b(s.$$.fragment,r),a=!0)},o(r){M(t.$$.fragment,r),M(s.$$.fragment,r),a=!1},d(r){r&&(p(o),p(l),p(n)),T(t,r),T(s,r)}}}function yl(u){let t,o,l,i,n,s;return t=new Y({props:{id:"backend",option:"AMD ROCm",$$slots:{default:[Ml]},$$scope:{ctx:u}}}),l=new Y({props:{id:"backend",option:"Intel CPU + GPU",$$slots:{default:[wl]},$$scope:{ctx:u}}}),n=new Y({props:{id:"backend",option:"Ascend NPU",$$slots:{default:[gl]},$$scope:{ctx:u}}}),{c(){g(t.$$.fragment),o=c(),g(l.$$.fragment),i=c(),g(n.$$.fragment)},l(a){y(t.$$.fragment,a),o=$(a),y(l.$$.fragment,a),i=$(a),y(n.$$.fragment,a)},m(a,r){U(t,a,r),m(a,o,r),U(l,a,r),m(a,i,r),U(n,a,r),s=!0},p(a,r){const d={};r&2&&(d.$$scope={dirty:r,ctx:a}),t.$set(d);const h={};r&2&&(h.$$scope={dirty:r,ctx:a}),l.$set(h);const G={};r&2&&(G.$$scope={dirty:r,ctx:a}),n.$set(G)},i(a){s||(b(t.$$.fragment,a),b(l.$$.fragment,a),b(n.$$.fragment,a),s=!0)},o(a){M(t.$$.fragment,a),M(l.$$.fragment,a),M(n.$$.fragment,a),s=!1},d(a){a&&(p(o),p(i)),T(t,a),T(l,a),T(n,a)}}}function Ul(u){let t,o,l,i,n,s,a,r="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 CPU, AMD ROCm, Intel XPU, and Gaudi HPU.",d,h,G,w,Z='<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> <li><a href="#cuda-preview">Preview Wheels from <code>main</code></a></li></ul></li> <li><a href="#multi-backend">Multi-Backend Preview</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>',R,I,C,_,L=`<code>bitsandbytes</code> is currently supported on NVIDIA GPUs with <a href="https://developer.nvidia.com/cuda-gpus" rel="nofollow">Compute Capability</a> 5.0+.
The library can be built using CUDA Toolkit versions as old as <strong>11.6</strong> on Windows and <strong>11.4</strong> on Linux.`,j,W,oe="<thead><tr><th><strong>Feature</strong></th> <th><strong>CC Required</strong></th> <th><strong>Example Hardware Requirement</strong></th></tr></thead> <tbody><tr><td>LLM.int8()</td> <td>7.5+</td> <td>Turing (RTX 20 series, T4) or newer GPUs</td></tr> <tr><td>8-bit optimizers/quantization</td> <td>5.0+</td> <td>Maxwell (GTX 900 series, TITAN X, M40) or newer GPUs</td></tr> <tr><td>NF4/FP4 quantization</td> <td>5.0+</td> <td>Maxwell (GTX 900 series, TITAN X, M40) or newer GPUs</td></tr></tbody>",Tt,N,Ct,F,jt,D,re="This is the most straightforward and recommended installation option.",vt,E,pe="The currently distributed <code>bitsandbytes</code> packages are built with the following configurations:",Jt,O,me="<thead><tr><th><strong>OS</strong></th> <th><strong>CUDA Toolkit</strong></th> <th><strong>Host Compiler</strong></th> <th><strong>Targets</strong></th></tr></thead> <tbody><tr><td><strong>Linux x86-64</strong></td> <td>11.8 - 12.6</td> <td>GCC 11.2</td> <td>sm50, sm60, sm75, sm80, sm86, sm89, sm90</td></tr> <tr><td><strong>Linux x86-64</strong></td> <td>12.8</td> <td>GCC 11.2</td> <td>sm75, sm80, sm86, sm89, sm90, sm100, sm120</td></tr> <tr><td><strong>Linux aarch64</strong></td> <td>11.8 - 12.6</td> <td>GCC 11.2</td> <td>sm75, sm80, sm90</td></tr> <tr><td><strong>Linux aarch64</strong></td> <td>12.8</td> <td>GCC 11.2</td> <td>sm75, sm80, sm90, sm100</td></tr> <tr><td><strong>Windows x86-64</strong></td> <td>11.8 - 12.6</td> <td>MSVC 19.43+ (VS2022)</td> <td>sm50, sm60, sm75, sm80, sm86, sm89, sm90</td></tr> <tr><td><strong>Windows x86-64</strong></td> <td>12.8</td> <td>MSVC 19.43+ (VS2022)</td> <td>sm75, sm80, sm86, sm89, sm90, sm100, sm120</td></tr></tbody>",Gt,q,de="Use <code>pip</code> or <code>uv</code> to install:",kt,K,_t,tt,Rt,P,Wt,et,fe="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):",Zt,H,It,lt,xt,nt,ue="If you would like to use new features 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>):",Bt,A,Xt,st,Yt,S,Lt,it,ce="We provide an early preview of support for AMD and Intel hardware as part of a development branch.",Nt,at,Pt,ot,$e="<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>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>",Ht,rt,he="For each supported backend, follow the respective instructions below:",At,pt,St,mt,be="To use this preview version of <code>bitsandbytes</code> with <code>transformers</code>, be sure to install:",Vt,dt,zt,V,Qt,ft,Ft,ut,Me="You can install the pre-built wheels for each backend, or compile from source for custom configurations.",Dt,ct,Et,z,Ot,$t,qt,Q,Kt,ht,te,wt,ee;return n=new x({props:{title:"Installation Guide",local:"installation-guide",headingTag:"h1"}}),h=new x({props:{title:"Table of Contents",local:"table-of-contents",headingTag:"h2"}}),I=new x({props:{title:"CUDA",local:"cuda",headingTag:"h2"}}),N=new bt({props:{warning:!0,$$slots:{default:[tl]},$$scope:{ctx:u}}}),F=new x({props:{title:"Installation via PyPI",local:"cuda-pip",headingTag:"h3"}}),K=new X({props:{code:"cGlwJTIwaW5zdGFsbCUyMGJpdHNhbmRieXRlcw==",highlighted:"pip install bitsandbytes",wrap:!1}}),tt=new x({props:{title:"Compile from source",local:"cuda-compile",headingTag:"h3"}}),P=new bt({props:{warning:!1,$$slots:{default:[el]},$$scope:{ctx:u}}}),H=new gt({props:{id:"source",options:["Linux","Windows"],$$slots:{default:[il]},$$scope:{ctx:u}}}),lt=new x({props:{title:"Preview Wheels from main",local:"cuda-preview",headingTag:"h3"}}),A=new gt({props:{id:"OS",options:["Linux","Windows"],$$slots:{default:[rl]},$$scope:{ctx:u}}}),st=new x({props:{title:"Multi-Backend Preview",local:"multi-backend",headingTag:"h2"}}),S=new bt({props:{warning:!0,$$slots:{default:[pl]},$$scope:{ctx:u}}}),at=new x({props:{title:"Supported Backends",local:"multi-backend-supported-backends",headingTag:"h3"}}),pt=new x({props:{title:"Pre-requisites",local:"multi-backend-pre-requisites",headingTag:"h3"}}),dt=new X({props:{code:"cGlwJTIwaW5zdGFsbCUyMCUyMnRyYW5zZm9ybWVycyUzRSUzRDQuNDUuMSUyMg==",highlighted:'pip install <span class="hljs-string">&quot;transformers&gt;=4.45.1&quot;</span>',wrap:!1}}),V=new gt({props:{id:"backend",options:["AMD ROCm","Intel XPU"],$$slots:{default:[cl]},$$scope:{ctx:u}}}),ft=new x({props:{title:"Installation",local:"installation",headingTag:"h3"}}),ct=new x({props:{title:"Pre-built Wheel Installation (recommended)",local:"multi-backend-pip",headingTag:"h4"}}),z=new gt({props:{id:"platform",options:["Linux","Windows"],$$slots:{default:[bl]},$$scope:{ctx:u}}}),$t=new x({props:{title:"Compile from Source",local:"multi-backend-compile",headingTag:"h4"}}),Q=new gt({props:{id:"backend",options:["AMD ROCm","Intel CPU + GPU","Ascend NPU"],$$slots:{default:[yl]},$$scope:{ctx:u}}}),ht=new ze({props:{source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/main/docs/source/installation.mdx"}}),{c(){t=v("meta"),o=c(),l=v("p"),i=c(),g(n.$$.fragment),s=c(),a=v("p"),a.innerHTML=r,d=c(),g(h.$$.fragment),G=c(),w=v("ul"),w.innerHTML=Z,R=c(),g(I.$$.fragment),C=c(),_=v("p"),_.innerHTML=L,j=c(),W=v("table"),W.innerHTML=oe,Tt=c(),g(N.$$.fragment),Ct=c(),g(F.$$.fragment),jt=c(),D=v("p"),D.textContent=re,vt=c(),E=v("p"),E.innerHTML=pe,Jt=c(),O=v("table"),O.innerHTML=me,Gt=c(),q=v("p"),q.innerHTML=de,kt=c(),g(K.$$.fragment),_t=c(),g(tt.$$.fragment),Rt=c(),g(P.$$.fragment),Wt=c(),et=v("p"),et.innerHTML=fe,Zt=c(),g(H.$$.fragment),It=c(),g(lt.$$.fragment),xt=c(),nt=v("p"),nt.innerHTML=ue,Bt=c(),g(A.$$.fragment),Xt=c(),g(st.$$.fragment),Yt=c(),g(S.$$.fragment),Lt=c(),it=v("p"),it.textContent=ce,Nt=c(),g(at.$$.fragment),Pt=c(),ot=v("table"),ot.innerHTML=$e,Ht=c(),rt=v("p"),rt.textContent=he,At=c(),g(pt.$$.fragment),St=c(),mt=v("p"),mt.innerHTML=be,Vt=c(),g(dt.$$.fragment),zt=c(),g(V.$$.fragment),Qt=c(),g(ft.$$.fragment),Ft=c(),ut=v("p"),ut.textContent=Me,Dt=c(),g(ct.$$.fragment),Et=c(),g(z.$$.fragment),Ot=c(),g($t.$$.fragment),qt=c(),g(Q.$$.fragment),Kt=c(),g(ht.$$.fragment),te=c(),wt=v("p"),this.h()},l(e){const f=Ve("svelte-u9bgzb",document.head);t=J(f,"META",{name:!0,content:!0}),f.forEach(p),o=$(e),l=J(e,"P",{}),Ut(l).forEach(p),i=$(e),y(n.$$.fragment,e),s=$(e),a=J(e,"P",{"data-svelte-h":!0}),k(a)!=="svelte-1ibabjh"&&(a.innerHTML=r),d=$(e),y(h.$$.fragment,e),G=$(e),w=J(e,"UL",{"data-svelte-h":!0}),k(w)!=="svelte-1yoflg8"&&(w.innerHTML=Z),R=$(e),y(I.$$.fragment,e),C=$(e),_=J(e,"P",{"data-svelte-h":!0}),k(_)!=="svelte-1xhhifp"&&(_.innerHTML=L),j=$(e),W=J(e,"TABLE",{"data-svelte-h":!0}),k(W)!=="svelte-7z9rfv"&&(W.innerHTML=oe),Tt=$(e),y(N.$$.fragment,e),Ct=$(e),y(F.$$.fragment,e),jt=$(e),D=J(e,"P",{"data-svelte-h":!0}),k(D)!=="svelte-1f6ncvc"&&(D.textContent=re),vt=$(e),E=J(e,"P",{"data-svelte-h":!0}),k(E)!=="svelte-9wkc2z"&&(E.innerHTML=pe),Jt=$(e),O=J(e,"TABLE",{"data-svelte-h":!0}),k(O)!=="svelte-14pdhch"&&(O.innerHTML=me),Gt=$(e),q=J(e,"P",{"data-svelte-h":!0}),k(q)!=="svelte-me0nfq"&&(q.innerHTML=de),kt=$(e),y(K.$$.fragment,e),_t=$(e),y(tt.$$.fragment,e),Rt=$(e),y(P.$$.fragment,e),Wt=$(e),et=J(e,"P",{"data-svelte-h":!0}),k(et)!=="svelte-1ovl1gx"&&(et.innerHTML=fe),Zt=$(e),y(H.$$.fragment,e),It=$(e),y(lt.$$.fragment,e),xt=$(e),nt=J(e,"P",{"data-svelte-h":!0}),k(nt)!=="svelte-1fhfips"&&(nt.innerHTML=ue),Bt=$(e),y(A.$$.fragment,e),Xt=$(e),y(st.$$.fragment,e),Yt=$(e),y(S.$$.fragment,e),Lt=$(e),it=J(e,"P",{"data-svelte-h":!0}),k(it)!=="svelte-1tde1yj"&&(it.textContent=ce),Nt=$(e),y(at.$$.fragment,e),Pt=$(e),ot=J(e,"TABLE",{"data-svelte-h":!0}),k(ot)!=="svelte-w9j43l"&&(ot.innerHTML=$e),Ht=$(e),rt=J(e,"P",{"data-svelte-h":!0}),k(rt)!=="svelte-19x599i"&&(rt.textContent=he),At=$(e),y(pt.$$.fragment,e),St=$(e),mt=J(e,"P",{"data-svelte-h":!0}),k(mt)!=="svelte-13t6gah"&&(mt.innerHTML=be),Vt=$(e),y(dt.$$.fragment,e),zt=$(e),y(V.$$.fragment,e),Qt=$(e),y(ft.$$.fragment,e),Ft=$(e),ut=J(e,"P",{"data-svelte-h":!0}),k(ut)!=="svelte-pvlxk7"&&(ut.textContent=Me),Dt=$(e),y(ct.$$.fragment,e),Et=$(e),y(z.$$.fragment,e),Ot=$(e),y($t.$$.fragment,e),qt=$(e),y(Q.$$.fragment,e),Kt=$(e),y(ht.$$.fragment,e),te=$(e),wt=J(e,"P",{}),Ut(wt).forEach(p),this.h()},h(){Mt(t,"name","hf:doc:metadata"),Mt(t,"content",Tl)},m(e,f){ne(document.head,t),m(e,o,f),m(e,l,f),m(e,i,f),U(n,e,f),m(e,s,f),m(e,a,f),m(e,d,f),U(h,e,f),m(e,G,f),m(e,w,f),m(e,R,f),U(I,e,f),m(e,C,f),m(e,_,f),m(e,j,f),m(e,W,f),m(e,Tt,f),U(N,e,f),m(e,Ct,f),U(F,e,f),m(e,jt,f),m(e,D,f),m(e,vt,f),m(e,E,f),m(e,Jt,f),m(e,O,f),m(e,Gt,f),m(e,q,f),m(e,kt,f),U(K,e,f),m(e,_t,f),U(tt,e,f),m(e,Rt,f),U(P,e,f),m(e,Wt,f),m(e,et,f),m(e,Zt,f),U(H,e,f),m(e,It,f),U(lt,e,f),m(e,xt,f),m(e,nt,f),m(e,Bt,f),U(A,e,f),m(e,Xt,f),U(st,e,f),m(e,Yt,f),U(S,e,f),m(e,Lt,f),m(e,it,f),m(e,Nt,f),U(at,e,f),m(e,Pt,f),m(e,ot,f),m(e,Ht,f),m(e,rt,f),m(e,At,f),U(pt,e,f),m(e,St,f),m(e,mt,f),m(e,Vt,f),U(dt,e,f),m(e,zt,f),U(V,e,f),m(e,Qt,f),U(ft,e,f),m(e,Ft,f),m(e,ut,f),m(e,Dt,f),U(ct,e,f),m(e,Et,f),U(z,e,f),m(e,Ot,f),U($t,e,f),m(e,qt,f),U(Q,e,f),m(e,Kt,f),U(ht,e,f),m(e,te,f),m(e,wt,f),ee=!0},p(e,[f]){const we={};f&2&&(we.$$scope={dirty:f,ctx:e}),N.$set(we);const ge={};f&2&&(ge.$$scope={dirty:f,ctx:e}),P.$set(ge);const ye={};f&2&&(ye.$$scope={dirty:f,ctx:e}),H.$set(ye);const Ue={};f&2&&(Ue.$$scope={dirty:f,ctx:e}),A.$set(Ue);const Te={};f&2&&(Te.$$scope={dirty:f,ctx:e}),S.$set(Te);const Ce={};f&2&&(Ce.$$scope={dirty:f,ctx:e}),V.$set(Ce);const je={};f&2&&(je.$$scope={dirty:f,ctx:e}),z.$set(je);const ve={};f&2&&(ve.$$scope={dirty:f,ctx:e}),Q.$set(ve)},i(e){ee||(b(n.$$.fragment,e),b(h.$$.fragment,e),b(I.$$.fragment,e),b(N.$$.fragment,e),b(F.$$.fragment,e),b(K.$$.fragment,e),b(tt.$$.fragment,e),b(P.$$.fragment,e),b(H.$$.fragment,e),b(lt.$$.fragment,e),b(A.$$.fragment,e),b(st.$$.fragment,e),b(S.$$.fragment,e),b(at.$$.fragment,e),b(pt.$$.fragment,e),b(dt.$$.fragment,e),b(V.$$.fragment,e),b(ft.$$.fragment,e),b(ct.$$.fragment,e),b(z.$$.fragment,e),b($t.$$.fragment,e),b(Q.$$.fragment,e),b(ht.$$.fragment,e),ee=!0)},o(e){M(n.$$.fragment,e),M(h.$$.fragment,e),M(I.$$.fragment,e),M(N.$$.fragment,e),M(F.$$.fragment,e),M(K.$$.fragment,e),M(tt.$$.fragment,e),M(P.$$.fragment,e),M(H.$$.fragment,e),M(lt.$$.fragment,e),M(A.$$.fragment,e),M(st.$$.fragment,e),M(S.$$.fragment,e),M(at.$$.fragment,e),M(pt.$$.fragment,e),M(dt.$$.fragment,e),M(V.$$.fragment,e),M(ft.$$.fragment,e),M(ct.$$.fragment,e),M(z.$$.fragment,e),M($t.$$.fragment,e),M(Q.$$.fragment,e),M(ht.$$.fragment,e),ee=!1},d(e){e&&(p(o),p(l),p(i),p(s),p(a),p(d),p(G),p(w),p(R),p(C),p(_),p(j),p(W),p(Tt),p(Ct),p(jt),p(D),p(vt),p(E),p(Jt),p(O),p(Gt),p(q),p(kt),p(_t),p(Rt),p(Wt),p(et),p(Zt),p(It),p(xt),p(nt),p(Bt),p(Xt),p(Yt),p(Lt),p(it),p(Nt),p(Pt),p(ot),p(Ht),p(rt),p(At),p(St),p(mt),p(Vt),p(zt),p(Qt),p(Ft),p(ut),p(Dt),p(Et),p(Ot),p(qt),p(Kt),p(te),p(wt)),p(t),T(n,e),T(h,e),T(I,e),T(N,e),T(F,e),T(K,e),T(tt,e),T(P,e),T(H,e),T(lt,e),T(A,e),T(st,e),T(S,e),T(at,e),T(pt,e),T(dt,e),T(V,e),T(ft,e),T(ct,e),T(z,e),T($t,e),T(Q,e),T(ht,e)}}}const Tl='{"title":"Installation Guide","local":"installation-guide","sections":[{"title":"Table of Contents","local":"table-of-contents","sections":[],"depth":2},{"title":"CUDA","local":"cuda","sections":[{"title":"Installation via PyPI","local":"cuda-pip","sections":[],"depth":3},{"title":"Compile from source","local":"cuda-compile","sections":[],"depth":3},{"title":"Preview Wheels from main","local":"cuda-preview","sections":[],"depth":3}],"depth":2},{"title":"Multi-Backend Preview","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 + XPU","local":"intel-cpu--xpu","sections":[],"depth":4},{"title":"Ascend NPU","local":"ascend-npu","sections":[],"depth":4}],"depth":3}],"depth":2}],"depth":1}';function Cl(u){return Xe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Wl extends ie{constructor(t){super(),ae(this,t,Cl,Ul,se,{})}}export{Wl as component};

Xet Storage Details

Size:
45.6 kB
·
Xet hash:
2efd0f8de88db5a3f857fbdbaca3f763657acb3b576cdecee5b71e360a437a7d

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