import{s as Xe,o as Re,n as He}from"../chunks/scheduler.8a2cc2fa.js";import{S as De,i as Pe,e as s,s as a,c as d,h as Ye,a as m,d as t,b as n,f as x,g as c,j as S,k as w,l as r,m as o,n as b,t as _,o as g,p as h}from"../chunks/index.7079e750.js";import{C as Qe,H as re,E as qe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.53f94051.js";import{D as j}from"../chunks/Docstring.36694462.js";import{C as Ke}from"../chunks/CodeBlock.25f1813b.js";import{E as et}from"../chunks/ExampleCodeBlock.17823afd.js";function tt(se){let l,W="Example:",$,f,u;return f=new Ke({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(f.$$.fragment)},l(p){l=m(p,"P",{"data-svelte-h":!0}),S(l)!=="svelte-11lpom8"&&(l.textContent=W),$=n(p),c(f.$$.fragment,p)},m(p,y){o(p,l,y),o(p,$,y),b(f,p,y),u=!0},p:He,i(p){u||(_(f.$$.fragment,p),u=!0)},o(p){g(f.$$.fragment,p),u=!1},d(p){p&&(t(l),t($)),h(f,p)}}}function it(se){let l,W,$,f,u,p,y,me,U,Ze='<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.',pe,Z,Be="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.",le,B,de,O,F,Me,k,I,Te,q,Fe="Base 8-bit optimizer class.",ce,N,be,M,L,Se,C,A,ke,K,Ie="Base 2-state update optimizer class.",_e,V,ge,T,X,Ce,G,R,Ge,ee,Ne="Base 1-state update optimizer class.",he,H,fe,v,D,Je,te,Le="A global optimizer manager for enabling custom optimizer configs.",Ee,z,P,je,ie,Ae="Override initial optimizer config with specific hyperparameters.",We,ae,Ve=`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>.`,Ue,J,ue,Y,ze,oe,ye;return u=new Qe({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),y=new re({props:{title:"Overview",local:"overview",headingTag:"h1"}}),B=new re({props:{title:"Optimizer8bit",local:"bitsandbytes.optim.optimizer.Optimizer8bit",headingTag:"h2"}}),F=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/main/bitsandbytes/optim/optimizer.py#L113"}}),I=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/main/bitsandbytes/optim/optimizer.py#L114"}}),N=new re({props:{title:"Optimizer2State",local:"bitsandbytes.optim.optimizer.Optimizer2State",headingTag:"h2"}}),L=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/main/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/main/bitsandbytes/optim/optimizer.py#L348"}}),V=new re({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/main/bitsandbytes/optim/optimizer.py#L591"}}),R=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/main/bitsandbytes/optim/optimizer.py#L592"}}),H=new re({props:{title:"Utilities",local:"bitsandbytes.optim.GlobalOptimManager",headingTag:"h2"}}),D=new j({props:{name:"class bitsandbytes.optim.GlobalOptimManager",anchor:"bitsandbytes.optim.GlobalOptimManager",parameters:[],source:"https://github.com/bitsandbytes-foundation/bitsandbytes/blob/main/bitsandbytes/optim/optimizer.py#L22"}}),P=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/main/bitsandbytes/optim/optimizer.py#L56"}}),J=new et({props:{anchor:"bitsandbytes.optim.GlobalOptimManager.override_config.example",$$slots:{default:[tt]},$$scope:{ctx:se}}}),Y=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"),f=a(),d(u.$$.fragment),p=a(),d(y.$$.fragment),me=a(),U=s("p"),U.innerHTML=Ze,pe=a(),Z=s("p"),Z.innerHTML=Be,le=a(),d(B.$$.fragment),de=a(),O=s("div"),d(F.$$.fragment),Me=a(),k=s("div"),d(I.$$.fragment),Te=a(),q=s("p"),q.textContent=Fe,ce=a(),d(N.$$.fragment),be=a(),M=s("div"),d(L.$$.fragment),Se=a(),C=s("div"),d(A.$$.fragment),ke=a(),K=s("p"),K.textContent=Ie,_e=a(),d(V.$$.fragment),ge=a(),T=s("div"),d(X.$$.fragment),Ce=a(),G=s("div"),d(R.$$.fragment),Ge=a(),ee=s("p"),ee.textContent=Ne,he=a(),d(H.$$.fragment),fe=a(),v=s("div"),d(D.$$.fragment),Je=a(),te=s("p"),te.textContent=Le,Ee=a(),z=s("div"),d(P.$$.fragment),je=a(),ie=s("p"),ie.textContent=Ae,We=a(),ae=s("p"),ae.innerHTML=Ve,Ue=a(),d(J.$$.fragment),ue=a(),d(Y.$$.fragment),ze=a(),oe=s("p"),this.h()},l(e){const i=Ye("svelte-u9bgzb",document.head);l=m(i,"META",{name:!0,content:!0}),i.forEach(t),W=n(e),$=m(e,"P",{}),x($).forEach(t),f=n(e),c(u.$$.fragment,e),p=n(e),c(y.$$.fragment,e),me=n(e),U=m(e,"P",{"data-svelte-h":!0}),S(U)!=="svelte-blrrs1"&&(U.innerHTML=Ze),pe=n(e),Z=m(e,"P",{"data-svelte-h":!0}),S(Z)!=="svelte-176x1ux"&&(Z.innerHTML=Be),le=n(e),c(B.$$.fragment,e),de=n(e),O=m(e,"DIV",{class:!0});var Q=x(O);c(F.$$.fragment,Q),Me=n(Q),k=m(Q,"DIV",{class:!0});var ve=x(k);c(I.$$.fragment,ve),Te=n(ve),q=m(ve,"P",{"data-svelte-h":!0}),S(q)!=="svelte-183isl2"&&(q.textContent=Fe),ve.forEach(t),Q.forEach(t),ce=n(e),c(N.$$.fragment,e),be=n(e),M=m(e,"DIV",{class:!0});var $e=x(M);c(L.$$.fragment,$e),Se=n($e),C=m($e,"DIV",{class:!0});var xe=x(C);c(A.$$.fragment,xe),ke=n(xe),K=m(xe,"P",{"data-svelte-h":!0}),S(K)!=="svelte-cu1pwl"&&(K.textContent=Ie),xe.forEach(t),$e.forEach(t),_e=n(e),c(V.$$.fragment,e),ge=n(e),T=m(e,"DIV",{class:!0});var we=x(T);c(X.$$.fragment,we),Ce=n(we),G=m(we,"DIV",{class:!0});var Oe=x(G);c(R.$$.fragment,Oe),Ge=n(Oe),ee=m(Oe,"P",{"data-svelte-h":!0}),S(ee)!=="svelte-6q4esm"&&(ee.textContent=Ne),Oe.forEach(t),we.forEach(t),he=n(e),c(H.$$.fragment,e),fe=n(e),v=m(e,"DIV",{class:!0});var ne=x(v);c(D.$$.fragment,ne),Je=n(ne),te=m(ne,"P",{"data-svelte-h":!0}),S(te)!=="svelte-16hgmyw"&&(te.textContent=Le),Ee=n(ne),z=m(ne,"DIV",{class:!0});var E=x(z);c(P.$$.fragment,E),je=n(E),ie=m(E,"P",{"data-svelte-h":!0}),S(ie)!=="svelte-1jb6me3"&&(ie.textContent=Ae),We=n(E),ae=m(E,"P",{"data-svelte-h":!0}),S(ae)!=="svelte-nnr78r"&&(ae.innerHTML=Ve),Ue=n(E),c(J.$$.fragment,E),E.forEach(t),ne.forEach(t),ue=n(e),c(Y.$$.fragment,e),ze=n(e),oe=m(e,"P",{}),x(oe).forEach(t),this.h()},h(){w(l,"name","hf:doc:metadata"),w(l,"content",at),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(v,"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),o(e,W,i),o(e,$,i),o(e,f,i),b(u,e,i),o(e,p,i),b(y,e,i),o(e,me,i),o(e,U,i),o(e,pe,i),o(e,Z,i),o(e,le,i),b(B,e,i),o(e,de,i),o(e,O,i),b(F,O,null),r(O,Me),r(O,k),b(I,k,null),r(k,Te),r(k,q),o(e,ce,i),b(N,e,i),o(e,be,i),o(e,M,i),b(L,M,null),r(M,Se),r(M,C),b(A,C,null),r(C,ke),r(C,K),o(e,_e,i),b(V,e,i),o(e,ge,i),o(e,T,i),b(X,T,null),r(T,Ce),r(T,G),b(R,G,null),r(G,Ge),r(G,ee),o(e,he,i),b(H,e,i),o(e,fe,i),o(e,v,i),b(D,v,null),r(v,Je),r(v,te),r(v,Ee),r(v,z),b(P,z,null),r(z,je),r(z,ie),r(z,We),r(z,ae),r(z,Ue),b(J,z,null),o(e,ue,i),b(Y,e,i),o(e,ze,i),o(e,oe,i),ye=!0},p(e,[i]){const Q={};i&2&&(Q.$$scope={dirty:i,ctx:e}),J.$set(Q)},i(e){ye||(_(u.$$.fragment,e),_(y.$$.fragment,e),_(B.$$.fragment,e),_(F.$$.fragment,e),_(I.$$.fragment,e),_(N.$$.fragment,e),_(L.$$.fragment,e),_(A.$$.fragment,e),_(V.$$.fragment,e),_(X.$$.fragment,e),_(R.$$.fragment,e),_(H.$$.fragment,e),_(D.$$.fragment,e),_(P.$$.fragment,e),_(J.$$.fragment,e),_(Y.$$.fragment,e),ye=!0)},o(e){g(u.$$.fragment,e),g(y.$$.fragment,e),g(B.$$.fragment,e),g(F.$$.fragment,e),g(I.$$.fragment,e),g(N.$$.fragment,e),g(L.$$.fragment,e),g(A.$$.fragment,e),g(V.$$.fragment,e),g(X.$$.fragment,e),g(R.$$.fragment,e),g(H.$$.fragment,e),g(D.$$.fragment,e),g(P.$$.fragment,e),g(J.$$.fragment,e),g(Y.$$.fragment,e),ye=!1},d(e){e&&(t(W),t($),t(f),t(p),t(me),t(U),t(pe),t(Z),t(le),t(de),t(O),t(ce),t(be),t(M),t(_e),t(ge),t(T),t(he),t(fe),t(v),t(ue),t(ze),t(oe)),t(l),h(u,e),h(y,e),h(B,e),h(F),h(I),h(N,e),h(L),h(A),h(V,e),h(X),h(R),h(H,e),h(D),h(P),h(J),h(Y,e)}}}const at='{"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 nt(se){return Re(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class dt extends De{constructor(l){super(),Pe(this,l,nt,it,Xe,{})}}export{dt as component};
