import{s as Ve,o as Xe,n as Le}from"../chunks/scheduler.44d8fc67.js";import{S as Re,i as He,e as s,s as a,c as d,h as De,a as m,d as t,b as o,f as x,g as c,j as S,k as w,l as r,m as n,n as b,t as _,o as g,p as h}from"../chunks/index.9e7b1f0b.js";import{D as j}from"../chunks/Docstring.98488101.js";import{C as Pe}from"../chunks/CodeBlock.9f39d77a.js";import{E as Ye}from"../chunks/ExampleCodeBlock.86b4ec34.js";import{H as ne,E as Qe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.c7c91191.js";function qe(re){let l,W="Example:",$,u,f;return u=new Pe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjBiaXRzYW5kYnl0ZXMlMjBhcyUyMGJuYiUwQSUwQW1uZyUyMCUzRCUyMGJuYi5vcHRpbS5HbG9iYWxPcHRpbU1hbmFnZXIuZ2V0X2luc3RhbmNlKCklMEElMEFtb2RlbCUyMCUzRCUyME15TW9kZWwoKSUwQW1uZy5yZWdpc3Rlcl9wYXJhbWV0ZXJzKG1vZGVsLnBhcmFtZXRlcnMoKSklMjAlMjMlMjAxLiUyMHJlZ2lzdGVyJTIwcGFyYW1ldGVycyUyMHdoaWxlJTIwc3RpbGwlMjBvbiUyMENQVSUwQSUwQW1vZGVsJTIwJTNEJTIwbW9kZWwuY3VkYSgpJTBBJTIzJTIwdXNlJTIwOC1iaXQlMjBvcHRpbWl6ZXIlMjBzdGF0ZXMlMjBmb3IlMjBhbGwlMjBwYXJhbWV0ZXJzJTBBYWRhbSUyMCUzRCUyMGJuYi5vcHRpbS5BZGFtKG1vZGVsLnBhcmFtZXRlcnMoKSUyQyUyMGxyJTNEMC4wMDElMkMlMjBvcHRpbV9iaXRzJTNEOCklMEElMEElMjMlMjAyLiUyMG92ZXJyaWRlJTNBJTIwdGhlJTIwcGFyYW1ldGVyJTIwbW9kZWwuZmMxLndlaWdodCUyMG5vdyUyMHVzZXMlMjAzMi1iaXQlMjBBZGFtJTBBbW5nLm92ZXJyaWRlX2NvbmZpZyhtb2RlbC5mYzEud2VpZ2h0JTJDJTIwJ29wdGltX2JpdHMnJTJDJTIwMzIp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> bitsandbytes <span class="hljs-keyword">as</span> bnb

mng = bnb.optim.GlobalOptimManager.get_instance()

model = MyModel()
mng.register_parameters(model.parameters()) <span class="hljs-comment"># 1. register parameters while still on CPU</span>

model = model.cuda()
<span class="hljs-comment"># use 8-bit optimizer states for all parameters</span>
adam = bnb.optim.Adam(model.parameters(), lr=<span class="hljs-number">0.001</span>, optim_bits=<span class="hljs-number">8</span>)

<span class="hljs-comment"># 2. override: the parameter model.fc1.weight now uses 32-bit Adam</span>
mng.override_config(model.fc1.weight, <span class="hljs-string">&#x27;optim_bits&#x27;</span>, <span class="hljs-number">32</span>)`,wrap:!1}}),{c(){l=s("p"),l.textContent=W,$=a(),d(u.$$.fragment)},l(p){l=m(p,"P",{"data-svelte-h":!0}),S(l)!=="svelte-11lpom8"&&(l.textContent=W),$=o(p),c(u.$$.fragment,p)},m(p,v){n(p,l,v),n(p,$,v),b(u,p,v),f=!0},p:Le,i(p){f||(_(u.$$.fragment,p),f=!0)},o(p){g(u.$$.fragment,p),f=!1},d(p){p&&(t(l),t($)),h(u,p)}}}function Ke(re){let l,W,$,u,f,p,v,We='<a href="https://hf.co/papers/2110.02861" rel="nofollow">8-bit optimizers</a> reduce the memory footprint of 32-bit optimizers without any performance degradation which means you can train large models with many parameters faster. At the core of 8-bit optimizers is block-wise quantization which enables quantization accuracy, computational efficiency, and stability.',se,U,Ue="bitsandbytes provides 8-bit optimizers through the base <code>Optimizer8bit</code> class, and additionally provides <code>Optimizer2State</code> and <code>Optimizer1State</code> for 2-state (for example, <code>Adam</code>) and 1-state (for example, <code>Adagrad</code>) optimizers respectively. To provide custom optimizer hyperparameters, use the <code>GlobalOptimManager</code> class to configure the optimizer.",me,Z,pe,O,B,we,k,F,Oe,Q,Ze="Base 8-bit optimizer class.",le,I,de,M,N,Me,C,A,Te,q,Be="Base 2-state update optimizer class.",ce,V,be,T,X,Se,G,L,ke,K,Fe="Base 1-state update optimizer class.",_e,R,ge,y,H,Ce,ee,Ie="A global optimizer manager for enabling custom optimizer configs.",Ge,z,D,Je,te,Ne="Override initial optimizer config with specific hyperparameters.",Ee,ie,Ae=`The key-values of the optimizer config for the input parameters are overridden
This can be both, optimizer parameters like <code>betas</code> or <code>lr</code>, or it can be
8-bit specific parameters like <code>optim_bits</code> or <code>percentile_clipping</code>.`,je,J,he,P,ue,oe,fe;return f=new ne({props:{title:"Overview",local:"overview",headingTag:"h1"}}),Z=new ne({props:{title:"Optimizer8bit",local:"bitsandbytes.optim.optimizer.Optimizer8bit",headingTag:"h2"}}),B=new j({props:{name:"class bitsandbytes.optim.optimizer.Optimizer8bit",anchor:"bitsandbytes.optim.optimizer.Optimizer8bit",parameters:[{name:"params",val:""},{name:"defaults",val:""},{name:"optim_bits",val:" = 32"},{name:"is_paged",val:" = False"}],source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/v0.48.0/bitsandbytes/optim/optimizer.py#L113"}}),F=new j({props:{name:"__init__",anchor:"bitsandbytes.optim.optimizer.Optimizer8bit.__init__",parameters:[{name:"params",val:""},{name:"defaults",val:""},{name:"optim_bits",val:" = 32"},{name:"is_paged",val:" = False"}],parametersDescription:[{anchor:"bitsandbytes.optim.optimizer.Optimizer8bit.__init__.params",description:`<strong>params</strong> (<code>torch.Tensor</code>) &#x2014;
The input parameters to optimize.`,name:"params"},{anchor:"bitsandbytes.optim.optimizer.Optimizer8bit.__init__.optim_bits",description:`<strong>optim_bits</strong> (<code>int</code>, defaults to 32) &#x2014;
The number of bits of the optimizer state.`,name:"optim_bits"},{anchor:"bitsandbytes.optim.optimizer.Optimizer8bit.__init__.is_paged",description:`<strong>is_paged</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether the optimizer is a paged optimizer or not.`,name:"is_paged"}],source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/v0.48.0/bitsandbytes/optim/optimizer.py#L114"}}),I=new ne({props:{title:"Optimizer2State",local:"bitsandbytes.optim.optimizer.Optimizer2State",headingTag:"h2"}}),N=new j({props:{name:"class bitsandbytes.optim.optimizer.Optimizer2State",anchor:"bitsandbytes.optim.optimizer.Optimizer2State",parameters:[{name:"optimizer_name",val:""},{name:"params",val:""},{name:"lr",val:" = 0.001"},{name:"betas",val:" = (0.9, 0.999)"},{name:"eps",val:" = 1e-08"},{name:"weight_decay",val:" = 0.0"},{name:"optim_bits",val:" = 32"},{name:"args",val:" = None"},{name:"min_8bit_size",val:" = 4096"},{name:"percentile_clipping",val:" = 100"},{name:"block_wise",val:" = True"},{name:"max_unorm",val:" = 0.0"},{name:"skip_zeros",val:" = False"},{name:"is_paged",val:" = False"},{name:"alpha",val:" = 0.0"},{name:"t_alpha",val:": typing.Optional[int] = None"},{name:"t_beta3",val:": typing.Optional[int] = None"}],source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/v0.48.0/bitsandbytes/optim/optimizer.py#L347"}}),A=new j({props:{name:"__init__",anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__",parameters:[{name:"optimizer_name",val:""},{name:"params",val:""},{name:"lr",val:" = 0.001"},{name:"betas",val:" = (0.9, 0.999)"},{name:"eps",val:" = 1e-08"},{name:"weight_decay",val:" = 0.0"},{name:"optim_bits",val:" = 32"},{name:"args",val:" = None"},{name:"min_8bit_size",val:" = 4096"},{name:"percentile_clipping",val:" = 100"},{name:"block_wise",val:" = True"},{name:"max_unorm",val:" = 0.0"},{name:"skip_zeros",val:" = False"},{name:"is_paged",val:" = False"},{name:"alpha",val:" = 0.0"},{name:"t_alpha",val:": typing.Optional[int] = None"},{name:"t_beta3",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.optimizer_name",description:`<strong>optimizer_name</strong> (<code>str</code>) &#x2014;
The name of the optimizer.`,name:"optimizer_name"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.params",description:`<strong>params</strong> (<code>torch.Tensor</code>) &#x2014;
The input parameters to optimize.`,name:"params"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.lr",description:`<strong>lr</strong> (<code>float</code>, defaults to 1e-3) &#x2014;
The learning rate.`,name:"lr"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.betas",description:`<strong>betas</strong> (<code>tuple</code>, defaults to (0.9, 0.999)) &#x2014;
The beta values for the optimizer.`,name:"betas"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.eps",description:`<strong>eps</strong> (<code>float</code>, defaults to 1e-8) &#x2014;
The epsilon value for the optimizer.`,name:"eps"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.weight_decay",description:`<strong>weight_decay</strong> (<code>float</code>, defaults to 0.0) &#x2014;
The weight decay value for the optimizer.`,name:"weight_decay"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.optim_bits",description:`<strong>optim_bits</strong> (<code>int</code>, defaults to 32) &#x2014;
The number of bits of the optimizer state.`,name:"optim_bits"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.args",description:`<strong>args</strong> (<code>object</code>, defaults to <code>None</code>) &#x2014;
An object with additional arguments.`,name:"args"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.min_8bit_size",description:`<strong>min_8bit_size</strong> (<code>int</code>, defaults to 4096) &#x2014;
The minimum number of elements of the parameter tensors for 8-bit optimization.`,name:"min_8bit_size"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.percentile_clipping",description:`<strong>percentile_clipping</strong> (<code>int</code>, defaults to 100) &#x2014;
Adapts clipping threshold automatically by tracking the last 100 gradient norms and clipping the gradient at a certain percentile to improve stability.`,name:"percentile_clipping"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.block_wise",description:`<strong>block_wise</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to independently quantize each block of tensors to reduce outlier effects and improve stability.`,name:"block_wise"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.max_unorm",description:`<strong>max_unorm</strong> (<code>float</code>, defaults to 0.0) &#x2014;
The maximum value to normalize each block with.`,name:"max_unorm"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.skip_zeros",description:`<strong>skip_zeros</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to skip zero values for sparse gradients and models to ensure correct updates.`,name:"skip_zeros"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.is_paged",description:`<strong>is_paged</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether the optimizer is a paged optimizer or not.`,name:"is_paged"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.alpha",description:`<strong>alpha</strong> (<code>float</code>, defaults to 0.0) &#x2014;
The alpha value for the AdEMAMix optimizer.`,name:"alpha"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.t_alpha",description:`<strong>t_alpha</strong> (<code>Optional[int]</code>, defaults to <code>None</code>) &#x2014;
Number of iterations for alpha scheduling with AdEMAMix.`,name:"t_alpha"},{anchor:"bitsandbytes.optim.optimizer.Optimizer2State.__init__.t_beta3",description:`<strong>t_beta3</strong> (<code>Optional[int]</code>, defaults to <code>None</code>) &#x2014;
Number of iterations for beta scheduling with AdEMAMix.`,name:"t_beta3"}],source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/v0.48.0/bitsandbytes/optim/optimizer.py#L348"}}),V=new ne({props:{title:"Optimizer1State",local:"bitsandbytes.optim.optimizer.Optimizer1State",headingTag:"h2"}}),X=new j({props:{name:"class bitsandbytes.optim.optimizer.Optimizer1State",anchor:"bitsandbytes.optim.optimizer.Optimizer1State",parameters:[{name:"optimizer_name",val:""},{name:"params",val:""},{name:"lr",val:" = 0.001"},{name:"betas",val:" = (0.9, 0.0)"},{name:"eps",val:" = 1e-08"},{name:"weight_decay",val:" = 0.0"},{name:"optim_bits",val:" = 32"},{name:"args",val:" = None"},{name:"min_8bit_size",val:" = 4096"},{name:"percentile_clipping",val:" = 100"},{name:"block_wise",val:" = True"},{name:"max_unorm",val:" = 0.0"},{name:"skip_zeros",val:" = False"},{name:"is_paged",val:" = False"}],source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/v0.48.0/bitsandbytes/optim/optimizer.py#L591"}}),L=new j({props:{name:"__init__",anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__",parameters:[{name:"optimizer_name",val:""},{name:"params",val:""},{name:"lr",val:" = 0.001"},{name:"betas",val:" = (0.9, 0.0)"},{name:"eps",val:" = 1e-08"},{name:"weight_decay",val:" = 0.0"},{name:"optim_bits",val:" = 32"},{name:"args",val:" = None"},{name:"min_8bit_size",val:" = 4096"},{name:"percentile_clipping",val:" = 100"},{name:"block_wise",val:" = True"},{name:"max_unorm",val:" = 0.0"},{name:"skip_zeros",val:" = False"},{name:"is_paged",val:" = False"}],parametersDescription:[{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.optimizer_name",description:`<strong>optimizer_name</strong> (<code>str</code>) &#x2014;
The name of the optimizer.`,name:"optimizer_name"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.params",description:`<strong>params</strong> (<code>torch.Tensor</code>) &#x2014;
The input parameters to optimize.`,name:"params"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.lr",description:`<strong>lr</strong> (<code>float</code>, defaults to 1e-3) &#x2014;
The learning rate.`,name:"lr"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.betas",description:`<strong>betas</strong> (<code>tuple</code>, defaults to (0.9, 0.0)) &#x2014;
The beta values for the optimizer.`,name:"betas"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.eps",description:`<strong>eps</strong> (<code>float</code>, defaults to 1e-8) &#x2014;
The epsilon value for the optimizer.`,name:"eps"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.weight_decay",description:`<strong>weight_decay</strong> (<code>float</code>, defaults to 0.0) &#x2014;
The weight decay value for the optimizer.`,name:"weight_decay"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.optim_bits",description:`<strong>optim_bits</strong> (<code>int</code>, defaults to 32) &#x2014;
The number of bits of the optimizer state.`,name:"optim_bits"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.args",description:`<strong>args</strong> (<code>object</code>, defaults to <code>None</code>) &#x2014;
An object with additional arguments.`,name:"args"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.min_8bit_size",description:`<strong>min_8bit_size</strong> (<code>int</code>, defaults to 4096) &#x2014;
The minimum number of elements of the parameter tensors for 8-bit optimization.`,name:"min_8bit_size"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.percentile_clipping",description:`<strong>percentile_clipping</strong> (<code>int</code>, defaults to 100) &#x2014;
Adapts clipping threshold automatically by tracking the last 100 gradient norms and clipping the gradient at a certain percentile to improve stability.`,name:"percentile_clipping"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.block_wise",description:`<strong>block_wise</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to independently quantize each block of tensors to reduce outlier effects and improve stability.`,name:"block_wise"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.max_unorm",description:`<strong>max_unorm</strong> (<code>float</code>, defaults to 0.0) &#x2014;
The maximum value to normalize each block with.`,name:"max_unorm"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.skip_zeros",description:`<strong>skip_zeros</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to skip zero values for sparse gradients and models to ensure correct updates.`,name:"skip_zeros"},{anchor:"bitsandbytes.optim.optimizer.Optimizer1State.__init__.is_paged",description:`<strong>is_paged</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether the optimizer is a paged optimizer or not.`,name:"is_paged"}],source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/v0.48.0/bitsandbytes/optim/optimizer.py#L592"}}),R=new ne({props:{title:"Utilities",local:"bitsandbytes.optim.GlobalOptimManager",headingTag:"h2"}}),H=new j({props:{name:"class bitsandbytes.optim.GlobalOptimManager",anchor:"bitsandbytes.optim.GlobalOptimManager",parameters:[],source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/v0.48.0/bitsandbytes/optim/optimizer.py#L22"}}),D=new j({props:{name:"override_config",anchor:"bitsandbytes.optim.GlobalOptimManager.override_config",parameters:[{name:"parameters",val:""},{name:"key",val:" = None"},{name:"value",val:" = None"},{name:"key_value_dict",val:" = None"}],parametersDescription:[{anchor:"bitsandbytes.optim.GlobalOptimManager.override_config.parameters",description:`<strong>parameters</strong> (<code>torch.Tensor</code> or <code>list(torch.Tensors)</code>) &#x2014;
The input parameters.`,name:"parameters"},{anchor:"bitsandbytes.optim.GlobalOptimManager.override_config.key",description:`<strong>key</strong> (<code>str</code>) &#x2014;
The hyperparameter to override.`,name:"key"},{anchor:"bitsandbytes.optim.GlobalOptimManager.override_config.value",description:`<strong>value</strong> &#x2014;
The hyperparameter value.`,name:"value"},{anchor:"bitsandbytes.optim.GlobalOptimManager.override_config.key_value_dict",description:`<strong>key_value_dict</strong> (<code>dict</code>) &#x2014;
A dictionary with multiple key-values to override.`,name:"key_value_dict"}],source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/v0.48.0/bitsandbytes/optim/optimizer.py#L56"}}),J=new Ye({props:{anchor:"bitsandbytes.optim.GlobalOptimManager.override_config.example",$$slots:{default:[qe]},$$scope:{ctx:re}}}),P=new Qe({props:{source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/main/docs/source/reference/optim/optim_overview.mdx"}}),{c(){l=s("meta"),W=a(),$=s("p"),u=a(),d(f.$$.fragment),p=a(),v=s("p"),v.innerHTML=We,se=a(),U=s("p"),U.innerHTML=Ue,me=a(),d(Z.$$.fragment),pe=a(),O=s("div"),d(B.$$.fragment),we=a(),k=s("div"),d(F.$$.fragment),Oe=a(),Q=s("p"),Q.textContent=Ze,le=a(),d(I.$$.fragment),de=a(),M=s("div"),d(N.$$.fragment),Me=a(),C=s("div"),d(A.$$.fragment),Te=a(),q=s("p"),q.textContent=Be,ce=a(),d(V.$$.fragment),be=a(),T=s("div"),d(X.$$.fragment),Se=a(),G=s("div"),d(L.$$.fragment),ke=a(),K=s("p"),K.textContent=Fe,_e=a(),d(R.$$.fragment),ge=a(),y=s("div"),d(H.$$.fragment),Ce=a(),ee=s("p"),ee.textContent=Ie,Ge=a(),z=s("div"),d(D.$$.fragment),Je=a(),te=s("p"),te.textContent=Ne,Ee=a(),ie=s("p"),ie.innerHTML=Ae,je=a(),d(J.$$.fragment),he=a(),d(P.$$.fragment),ue=a(),oe=s("p"),this.h()},l(e){const i=De("svelte-u9bgzb",document.head);l=m(i,"META",{name:!0,content:!0}),i.forEach(t),W=o(e),$=m(e,"P",{}),x($).forEach(t),u=o(e),c(f.$$.fragment,e),p=o(e),v=m(e,"P",{"data-svelte-h":!0}),S(v)!=="svelte-blrrs1"&&(v.innerHTML=We),se=o(e),U=m(e,"P",{"data-svelte-h":!0}),S(U)!=="svelte-176x1ux"&&(U.innerHTML=Ue),me=o(e),c(Z.$$.fragment,e),pe=o(e),O=m(e,"DIV",{class:!0});var Y=x(O);c(B.$$.fragment,Y),we=o(Y),k=m(Y,"DIV",{class:!0});var ze=x(k);c(F.$$.fragment,ze),Oe=o(ze),Q=m(ze,"P",{"data-svelte-h":!0}),S(Q)!=="svelte-183isl2"&&(Q.textContent=Ze),ze.forEach(t),Y.forEach(t),le=o(e),c(I.$$.fragment,e),de=o(e),M=m(e,"DIV",{class:!0});var ve=x(M);c(N.$$.fragment,ve),Me=o(ve),C=m(ve,"DIV",{class:!0});var ye=x(C);c(A.$$.fragment,ye),Te=o(ye),q=m(ye,"P",{"data-svelte-h":!0}),S(q)!=="svelte-cu1pwl"&&(q.textContent=Be),ye.forEach(t),ve.forEach(t),ce=o(e),c(V.$$.fragment,e),be=o(e),T=m(e,"DIV",{class:!0});var $e=x(T);c(X.$$.fragment,$e),Se=o($e),G=m($e,"DIV",{class:!0});var xe=x(G);c(L.$$.fragment,xe),ke=o(xe),K=m(xe,"P",{"data-svelte-h":!0}),S(K)!=="svelte-6q4esm"&&(K.textContent=Fe),xe.forEach(t),$e.forEach(t),_e=o(e),c(R.$$.fragment,e),ge=o(e),y=m(e,"DIV",{class:!0});var ae=x(y);c(H.$$.fragment,ae),Ce=o(ae),ee=m(ae,"P",{"data-svelte-h":!0}),S(ee)!=="svelte-16hgmyw"&&(ee.textContent=Ie),Ge=o(ae),z=m(ae,"DIV",{class:!0});var E=x(z);c(D.$$.fragment,E),Je=o(E),te=m(E,"P",{"data-svelte-h":!0}),S(te)!=="svelte-1jb6me3"&&(te.textContent=Ne),Ee=o(E),ie=m(E,"P",{"data-svelte-h":!0}),S(ie)!=="svelte-nnr78r"&&(ie.innerHTML=Ae),je=o(E),c(J.$$.fragment,E),E.forEach(t),ae.forEach(t),he=o(e),c(P.$$.fragment,e),ue=o(e),oe=m(e,"P",{}),x(oe).forEach(t),this.h()},h(){w(l,"name","hf:doc:metadata"),w(l,"content",et),w(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,i){r(document.head,l),n(e,W,i),n(e,$,i),n(e,u,i),b(f,e,i),n(e,p,i),n(e,v,i),n(e,se,i),n(e,U,i),n(e,me,i),b(Z,e,i),n(e,pe,i),n(e,O,i),b(B,O,null),r(O,we),r(O,k),b(F,k,null),r(k,Oe),r(k,Q),n(e,le,i),b(I,e,i),n(e,de,i),n(e,M,i),b(N,M,null),r(M,Me),r(M,C),b(A,C,null),r(C,Te),r(C,q),n(e,ce,i),b(V,e,i),n(e,be,i),n(e,T,i),b(X,T,null),r(T,Se),r(T,G),b(L,G,null),r(G,ke),r(G,K),n(e,_e,i),b(R,e,i),n(e,ge,i),n(e,y,i),b(H,y,null),r(y,Ce),r(y,ee),r(y,Ge),r(y,z),b(D,z,null),r(z,Je),r(z,te),r(z,Ee),r(z,ie),r(z,je),b(J,z,null),n(e,he,i),b(P,e,i),n(e,ue,i),n(e,oe,i),fe=!0},p(e,[i]){const Y={};i&2&&(Y.$$scope={dirty:i,ctx:e}),J.$set(Y)},i(e){fe||(_(f.$$.fragment,e),_(Z.$$.fragment,e),_(B.$$.fragment,e),_(F.$$.fragment,e),_(I.$$.fragment,e),_(N.$$.fragment,e),_(A.$$.fragment,e),_(V.$$.fragment,e),_(X.$$.fragment,e),_(L.$$.fragment,e),_(R.$$.fragment,e),_(H.$$.fragment,e),_(D.$$.fragment,e),_(J.$$.fragment,e),_(P.$$.fragment,e),fe=!0)},o(e){g(f.$$.fragment,e),g(Z.$$.fragment,e),g(B.$$.fragment,e),g(F.$$.fragment,e),g(I.$$.fragment,e),g(N.$$.fragment,e),g(A.$$.fragment,e),g(V.$$.fragment,e),g(X.$$.fragment,e),g(L.$$.fragment,e),g(R.$$.fragment,e),g(H.$$.fragment,e),g(D.$$.fragment,e),g(J.$$.fragment,e),g(P.$$.fragment,e),fe=!1},d(e){e&&(t(W),t($),t(u),t(p),t(v),t(se),t(U),t(me),t(pe),t(O),t(le),t(de),t(M),t(ce),t(be),t(T),t(_e),t(ge),t(y),t(he),t(ue),t(oe)),t(l),h(f,e),h(Z,e),h(B),h(F),h(I,e),h(N),h(A),h(V,e),h(X),h(L),h(R,e),h(H),h(D),h(J),h(P,e)}}}const et='{"title":"Overview","local":"overview","sections":[{"title":"Optimizer8bit","local":"bitsandbytes.optim.optimizer.Optimizer8bit","sections":[],"depth":2},{"title":"Optimizer2State","local":"bitsandbytes.optim.optimizer.Optimizer2State","sections":[],"depth":2},{"title":"Optimizer1State","local":"bitsandbytes.optim.optimizer.Optimizer1State","sections":[],"depth":2},{"title":"Utilities","local":"bitsandbytes.optim.GlobalOptimManager","sections":[],"depth":2}],"depth":1}';function tt(re){return Xe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mt extends Re{constructor(l){super(),He(this,l,tt,Ke,Ve,{})}}export{mt as component};
