import{s as vu,o as gu,n as yr}from"../chunks/scheduler.9bc65507.js";import{S as yu,i as _u,g as a,s,u as p,A as wu,h as l,f as t,c as i,j as h,v as m,y as u,k as d,o as r,a as o,w as c,d as f,t as b,x as v,m as $u,n as Mu}from"../chunks/index.78c82d43.js";import{T as ki}from"../chunks/Tip.87d55b76.js";import{D as ro}from"../chunks/Docstring.f3d04bd2.js";import{C as w}from"../chunks/CodeBlock.48618ec2.js";import{I as y}from"../chunks/IconCopyLink.bedaa44d.js";function Tu(k){let g;return{c(){g=$u("GPTQ quantization only works for text model for now. Futhermore, the quantization process can a lot of time depending on one's hardware (175B model = 4 gpu hours using NVIDIA A100). Please check on the hub if there is not a GPTQ quantized version of the model. If not, you can submit a demand on github.")},l(M){g=Mu(M,"GPTQ quantization only works for text model for now. Futhermore, the quantization process can a lot of time depending on one's hardware (175B model = 4 gpu hours using NVIDIA A100). Please check on the hub if there is not a GPTQ quantized version of the model. If not, you can submit a demand on github.")},m(M,_){o(M,g,_)},d(M){M&&t(g)}}}function Cu(k){let g,M="Note that once a model has been loaded in 4-bit it is currently not possible to push the quantized weights on the Hub. Note also that you cannot train 4-bit weights as this is not supported yet. However you can use 4-bit models to train extra parameters, this will be covered in the next section.";return{c(){g=a("p"),g.textContent=M},l(_){g=l(_,"P",{"data-svelte-h":!0}),u(g)!=="svelte-1173kmw"&&(g.textContent=M)},m(_,x){o(_,g,x)},p:yr,d(_){_&&t(g)}}}function ku(k){let g,M=`Note that once a model has been loaded in 8-bit it is currently not possible to push the quantized weights on the Hub except if you use the latest <code>transformers</code> and <code>bitsandbytes</code>. Note also that you cannot train 8-bit weights as this is not supported yet. However you can use 8-bit models to train extra parameters, this will be covered in the next section.
Note also that <code>device_map</code> is optional but setting <code>device_map = &#39;auto&#39;</code> is prefered for inference as it will dispatch efficiently the model on the available ressources.`;return{c(){g=a("p"),g.innerHTML=M},l(_){g=l(_,"P",{"data-svelte-h":!0}),u(g)!=="svelte-17mr1dr"&&(g.innerHTML=M)},m(_,x){o(_,g,x)},p:yr,d(_){_&&t(g)}}}function xu(k){let g,M="Pushing 8bit models on the Hub is strongely encouraged for large models. This will allow the community to benefit from the memory footprint reduction and loading for example large models on a Google Colab.";return{c(){g=a("p"),g.textContent=M},l(_){g=l(_,"P",{"data-svelte-h":!0}),u(g)!=="svelte-1bu8wqo"&&(g.textContent=M)},m(_,x){o(_,g,x)},p:yr,d(_){_&&t(g)}}}function Ju(k){let g,M,_,x,J,se,Ko,Re,xi,ho,_r="Quantize 🤗 Transformers models",Ua,q,ie,Oo,Ie,Ji,uo,wr="<code>AutoGPTQ</code> Integration",ja,Ye,$r="🤗 Transformers has integrated <code>optimum</code> API to perform GPTQ quantization on language models. You can load and quantize your model in 8, 4, 3 or even 2 bits without a big drop of performance and faster inference speed! This is supported by most GPU hardwares.",Aa,Se,Mr="To learn more about the the quantization model, check out:",Na,De,Tr='<li>the <a href="https://arxiv.org/pdf/2210.17323.pdf" rel="nofollow">GPTQ</a> paper</li> <li>the <code>optimum</code> <a href="https://huggingface.co/docs/optimum/llm_quantization/usage_guides/quantization" rel="nofollow">guide</a> on GPTQ quantization</li> <li>the <a href="https://github.com/PanQiWei/AutoGPTQ" rel="nofollow"><code>AutoGPTQ</code></a> library used as the backend</li>',Ea,z,re,ea,Ke,qi,po,Cr="Requirements",Ga,Oe,kr="You need to have the following requirements installed to run the code below:",Ha,et,xr=`<li><p>Install latest <code>AutoGPTQ</code> library
<code>pip install auto-gptq</code></p></li> <li><p>Install latest <code>optimum</code> from source
<code>pip install git+https://github.com/huggingface/optimum.git</code></p></li> <li><p>Install latest <code>transformers</code> from source
<code>pip install git+https://github.com/huggingface/transformers.git</code></p></li> <li><p>Install latest <code>accelerate</code> library
<code>pip install --upgrade accelerate</code></p></li>`,Ba,tt,Jr="Note that GPTQ integration supports for now only text models and you may encounter unexpected behaviour for vision, speech or multi-modal models.",Pa,W,de,ta,nt,zi,mo,qr="Load and quantize a model",Qa,ot,zr="GPTQ is a quantization method that requires weights calibration before using the quantized models. If you want to quantize transformers model from scratch, it might take some time before producing the quantized model (~5 min on a Google colab for <code>facebook/opt-350m</code> model).",Xa,at,Wr="Hence, there are two different scenarios where you want to use GPTQ-quantized models. The first use case would be to load models that has been already quantized by other users that are available on the Hub, the second use case would be to quantize your model from scratch and save it or push it on the Hub so that other users can also use it.",La,Z,he,na,lt,Wi,co,Zr="GPTQ Configuration",Va,st,Ur='In order to load and quantize a model, you need to create a <a href="/docs/transformers/v4.33.3/en/main_classes/quantization#transformers.GPTQConfig">GPTQConfig</a>. You need to pass the number of <code>bits</code>, a <code>dataset</code> in order to calibrate the quantization and the <code>tokenizer</code> of the model in order prepare the dataset.',Fa,it,Ra,rt,jr="Note that you can pass your own dataset as a list of string. However, it is highly recommended to use the dataset from the GPTQ paper.",Ia,dt,Ya,U,ue,oa,ht,Zi,fo,Ar="Quantization",Sa,ut,Nr="You can quantize a model by using <code>from_pretrained</code> and setting the <code>quantization_config</code>.",Da,pt,Ka,mt,Er="Note that you will need a GPU to quantize a model. We will put the model in the cpu and move the modules back and forth to the gpu in order to quantize them.",Oa,ct,Gr="If you want to maximize your gpus usage while using cpu offload, you can set <code>device_map = &quot;auto&quot;</code>.",el,ft,tl,bt,Hr='Note that disk offload is not supported. Furthermore, if you are out of memory because of the dataset, you may have to pass <code>max_memory</code> in <code>from_pretained</code>. Checkout this <a href="https://huggingface.co/docs/accelerate/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">guide</a> to learn more about <code>device_map</code> and <code>max_memory</code>.',nl,pe,ol,j,me,aa,vt,Ui,bo,Br="Push quantized model to 🤗 Hub",al,gt,Pr="You can push the quantized model like any 🤗 model to Hub with <code>push_to_hub</code>. The quantization config will be saved and pushed along the model.",ll,yt,sl,_t,Qr="If you want to save your quantized model on your local machine, you can also do it with <code>save_pretrained</code>:",il,wt,rl,$t,Xr="Note that if you have quantized your model with a <code>device_map</code>, make sure to move the entire model to one of your gpus or the <code>cpu</code> before saving it.",dl,Mt,hl,A,ce,la,Tt,ji,vo,Lr="Load a quantized model from the 🤗 Hub",ul,Ct,Vr=`You can load a quantized model from the Hub by using <code>from_pretrained</code>.
Make sure that the pushed weights are quantized, by checking that the attribute <code>quantization_config</code> is present in the model configuration object.`,pl,kt,ml,xt,Fr="If you want to load a model faster and without allocating more memory than needed, the <code>device_map</code> argument also works with quantized model. Make sure that you have <code>accelerate</code> library installed.",cl,Jt,fl,N,fe,sa,qt,Ai,go,Rr="Exllama kernels for faster inference",bl,zt,Ir='For 4-bit model, you can use the exllama kernels in order to a faster inference speed. It is activated by default. You can change that behavior by passing <code>disable_exllama</code> in <a href="/docs/transformers/v4.33.3/en/main_classes/quantization#transformers.GPTQConfig">GPTQConfig</a>. This will overwrite the quantization config stored in the config. Note that you will only be able to overwrite the attributes related to the kernels. Furthermore, you need to have the entire model on gpus if you want to use exllama kernels.',vl,Wt,gl,Zt,Yr="Note that only 4-bit models are supported for now. Furthermore, it is recommended to deactivate the exllama kernels if you are finetuning a quantized model with peft.",yl,E,be,ia,Ut,Ni,yo,Sr="Fine-tune a quantized model",_l,jt,Dr=`With the official support of adapters in the Hugging Face ecosystem, you can fine-tune models that have been quantized with GPTQ.
Please have a look at <a href="https://github.com/huggingface/peft" rel="nofollow"><code>peft</code></a> library for more details.`,wl,G,ve,ra,At,Ei,_o,Kr="Example demo",$l,Nt,Or='Check out the Google Colab <a href="https://colab.research.google.com/drive/1_TIrmuKOFhuRRiTWN94iLKUFu6ZX4ceb?usp=sharing" rel="nofollow">notebook</a> to learn how to quantize your model with GPTQ and how finetune the quantized model with peft.',Ml,H,ge,da,Et,Gi,wo,ed="GPTQConfig",Tl,C,Gt,Hi,$o,td=`This is a wrapper class about all possible attributes and features that you can play with a model that has been
loaded using <code>optimum</code> api for gptq quantization relying on auto_gptq backend.`,Bi,ye,Ht,Pi,Mo,nd="Safety checker that arguments are correct",Cl,B,_e,ha,Bt,Qi,To,od="<code>bitsandbytes</code> Integration",kl,Pt,ad=`🤗 Transformers is closely integrated with most used modules on <code>bitsandbytes</code>. You can load your model in 8-bit precision with few lines of code.
This is supported by most of the GPU hardwares since the <code>0.37.0</code> release of <code>bitsandbytes</code>.`,xl,Qt,ld='Learn more about the quantization method in the <a href="https://arxiv.org/abs/2208.07339" rel="nofollow">LLM.int8()</a> paper, or the <a href="https://huggingface.co/blog/hf-bitsandbytes-integration" rel="nofollow">blogpost</a> about the collaboration.',Jl,Xt,sd="Since its <code>0.39.0</code> release, you can load any model that supports <code>device_map</code> using 4-bit quantization, leveraging FP4 data type.",ql,Lt,id='If you want to quantize your own pytorch model, check out this <a href="https://huggingface.co/docs/accelerate/main/en/usage_guides/quantization" rel="nofollow">documentation</a> from 🤗 Accelerate library.',zl,Vt,rd="Here are the things you can do using <code>bitsandbytes</code> integration",Wl,P,we,ua,Ft,Xi,Co,dd="General usage",Zl,Rt,hd='You can quantize a model by using the <code>load_in_8bit</code> or <code>load_in_4bit</code> argument when calling the <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method as long as your model supports loading with 🤗 Accelerate and contains <code>torch.nn.Linear</code> layers. This should work for any modality as well.',Ul,It,jl,Yt,ud="By default all other modules (e.g. <code>torch.nn.LayerNorm</code>) will be converted in <code>torch.float16</code>, but if you want to change their <code>dtype</code> you can overwrite the <code>torch_dtype</code> argument:",Al,St,Nl,Q,$e,pa,Dt,Li,ko,pd="FP4 quantization",El,X,Me,ma,Kt,Vi,xo,md="Requirements",Gl,Ot,cd="Make sure that you have installed the requirements below before running any of the code snippets below.",Hl,en,fd=`<li><p>Latest <code>bitsandbytes</code> library
<code>pip install bitsandbytes&gt;=0.39.0</code></p></li> <li><p>Install latest <code>accelerate</code> <code>pip install --upgrade accelerate</code></p></li> <li><p>Install latest <code>transformers</code> <code>pip install --upgrade transformers</code></p></li>`,Bl,L,Te,ca,tn,Fi,Jo,bd="Tips and best practices",Pl,nn,vd='<li><p><strong>Advanced usage:</strong> Refer to <a href="https://colab.research.google.com/drive/1ge2F1QSK8Q7h0hn3YKuBCOAS0bK8E0wf" rel="nofollow">this Google Colab notebook</a> for advanced usage of 4-bit quantization with all the possible options.</p></li> <li><p><strong>Faster inference with <code>batch_size=1</code> :</strong> Since the <code>0.40.0</code> release of bitsandbytes, for <code>batch_size=1</code> you can benefit from fast inference. Check out <a href="https://github.com/TimDettmers/bitsandbytes/releases/tag/0.40.0" rel="nofollow">these release notes</a> and make sure to have a version that is greater than <code>0.40.0</code> to benefit from this feature out of the box.</p></li> <li><p><strong>Training:</strong> According to <a href="https://arxiv.org/abs/2305.14314" rel="nofollow">QLoRA paper</a>, for training 4-bit base models (e.g. using LoRA adapters) one should use <code>bnb_4bit_quant_type=&#39;nf4&#39;</code>.</p></li> <li><p><strong>Inference:</strong> For inference, <code>bnb_4bit_quant_type</code> does not have a huge impact on the performance. However for consistency with the model’s weights, make sure you use the same <code>bnb_4bit_compute_dtype</code> and <code>torch_dtype</code> arguments.</p></li>',Ql,V,Ce,fa,on,Ri,qo,gd="Load a large model in 4bit",Xl,an,yd="By using <code>load_in_4bit=True</code> when calling the <code>.from_pretrained</code> method, you can divide your memory use by 4 (roughly).",Ll,ln,Vl,ke,Fl,F,xe,ba,sn,Ii,zo,_d="Load a large model in 8bit",Rl,rn,wd="You can load a model by roughly halving the memory requirements by using <code>load_in_8bit=True</code> argument when calling <code>.from_pretrained</code> method",Il,dn,Yl,hn,$d='Then, use your model as you would usually use a <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>.',Sl,un,Md="You can check the memory footprint of your model with <code>get_memory_footprint</code> method.",Dl,pn,Kl,mn,Td="With this integration we were able to load large models on smaller devices and run them without any issue.",Ol,Je,es,R,qe,va,cn,Yi,Wo,Cd="Advanced use cases",ts,fn,kd="Here we will cover some advanced use cases you can perform with FP4 quantization",ns,I,ze,ga,bn,Si,Zo,xd="Change the compute dtype",os,vn,Jd="The compute dtype is used to change the dtype that will be used during computation. For example, hidden states could be in <code>float32</code> but computation can be set to bf16 for speedups. By default, the compute dtype is set to <code>float32</code>.",as,gn,ls,Y,We,ya,yn,Di,Uo,qd="Using NF4 (Normal Float 4) data type",ss,_n,zd="You can also use the NF4 data type, which is a new 4bit datatype adapted for weights that have been initialized using a normal distribution. For that run:",is,wn,rs,S,Ze,_a,$n,Ki,jo,Wd="Use nested quantization for more memory efficient inference",ds,Mn,Zd="We also advise users to use the nested quantization technique. This saves more memory at no additional performance - from our empirical observations, this enables fine-tuning llama-13b model on an NVIDIA-T4 16GB with a sequence length of 1024, batch size of 1 and gradient accumulation steps of 4.",hs,Tn,us,D,Ue,wa,Cn,Oi,Ao,Ud="Push quantized models on the 🤗 Hub",ps,kn,jd=`You can push a quantized model on the Hub by naively using <code>push_to_hub</code> method. This will first push the quantization configuration file, then push the quantized model weights.
Make sure to use <code>bitsandbytes&gt;0.37.2</code> (at this time of writing, we tested it on <code>bitsandbytes==0.38.0.post1</code>) to be able to use this feature.`,ms,xn,cs,je,fs,K,Ae,$a,Jn,er,No,Ad="Load a quantized model from the 🤗 Hub",bs,qn,Nd="You can load a quantized model from the Hub by using <code>from_pretrained</code> method. Make sure that the pushed weights are quantized, by checking that the attribute <code>quantization_config</code> is present in the model configuration object.",vs,zn,gs,Wn,Ed=`Note that in this case, you don’t need to specify the arguments <code>load_in_8bit=True</code>, but you need to make sure that <code>bitsandbytes</code> and <code>accelerate</code> are installed.
Note also that <code>device_map</code> is optional but setting <code>device_map = &#39;auto&#39;</code> is prefered for inference as it will dispatch efficiently the model on the available ressources.`,ys,O,Ne,Ma,Zn,tr,Eo,Gd="Advanced use cases",_s,Un,Hd="This section is intended to advanced users, that want to explore what it is possible to do beyond loading and running 8-bit models.",ws,ee,Ee,Ta,jn,nr,Go,Bd="Offload between <code>cpu</code> and <code>gpu</code>",$s,An,Pd="One of the advanced use case of this is being able to load a model and dispatch the weights between <code>CPU</code> and <code>GPU</code>. Note that the weights that will be dispatched on CPU <strong>will not</strong> be converted in 8-bit, thus kept in <code>float32</code>. This feature is intended for users that want to fit a very large model and dispatch the model between GPU and CPU.",Ms,Nn,Qd='First, load a <a href="/docs/transformers/v4.33.3/en/main_classes/quantization#transformers.BitsAndBytesConfig">BitsAndBytesConfig</a> from <code>transformers</code> and set the attribute <code>llm_int8_enable_fp32_cpu_offload</code> to <code>True</code>:',Ts,En,Cs,Gn,Xd="Let’s say you want to load <code>bigscience/bloom-1b7</code> model, and you have just enough GPU RAM to fit the entire model except the <code>lm_head</code>. Therefore write a custom device_map as follows:",ks,Hn,xs,Bn,Ld="And load your model as follows:",Js,Pn,qs,Qn,Vd="And that’s it! Enjoy your model!",zs,te,Ge,Ca,Xn,or,Ho,Fd="Play with <code>llm_int8_threshold</code>",Ws,Ln,Rd=`You can play with the <code>llm_int8_threshold</code> argument to change the threshold of the outliers. An “outlier” is a hidden state value that is greater than a certain threshold.
This corresponds to the outlier threshold for outlier detection as described in <code>LLM.int8()</code> paper. Any hidden states value that is above this threshold will be considered an outlier and the operation on those values will be done in fp16. Values are usually normally distributed, that is, most values are in the range [-3.5, 3.5], but there are some exceptional systematic outliers that are very differently distributed for large models. These outliers are often in the interval [-60, -6] or [6, 60]. Int8 quantization works well for values of magnitude ~5, but beyond that, there is a significant performance penalty. A good default threshold is 6, but a lower threshold might be needed for more unstable models (small models, fine-tuning).
This argument can impact the inference speed of the model. We suggest to play with this parameter to find which one is the best for your use case.`,Zs,Vn,Us,ne,He,ka,Fn,ar,Bo,Id="Skip the conversion of some modules",js,Rn,Yd="Some models has several modules that needs to be not converted in 8-bit to ensure stability. For example Jukebox model has several <code>lm_head</code> modules that should be skipped. Play with <code>llm_int8_skip_modules</code>",As,In,Ns,oe,Be,xa,Yn,lr,Po,Sd="Fine-tune a model that has been loaded in 8-bit",Es,Sn,Dd=`With the official support of adapters in the Hugging Face ecosystem, you can fine-tune models that have been loaded in 8-bit.
This enables fine-tuning large models such as <code>flan-t5-large</code> or <code>facebook/opt-6.7b</code> in a single google Colab. Please have a look at <a href="https://github.com/huggingface/peft" rel="nofollow"><code>peft</code></a> library for more details.`,Gs,Dn,Kd="Note that you don’t need to pass <code>device_map</code> when loading the model for training. It will automatically load your model on your GPU. You can also set the device map to a specific device if needed (e.g. <code>cuda:0</code>, <code>0</code>, <code>torch.device(&#39;cuda:0&#39;)</code>). Please note that <code>device_map=auto</code> should be used for inference only.",Hs,ae,Pe,Ja,Kn,sr,Qo,Od="BitsAndBytesConfig",Bs,$,On,ir,Xo,eh=`This is a wrapper class about all possible attributes and features that you can play with a model that has been
loaded using <code>bitsandbytes</code>.`,rr,Lo,th="This replaces <code>load_in_8bit</code> or <code>load_in_4bit</code>therefore both options are mutually exclusive.",dr,Vo,nh=`Currently only supports <code>LLM.int8()</code>, <code>FP4</code>, and <code>NF4</code> quantization. If more methods are added to <code>bitsandbytes</code>,
then more arguments will be added to this class.`,hr,Qe,eo,ur,Fo,oh="Returns <code>True</code> if the model is quantizable, <code>False</code> otherwise.",pr,Xe,to,mr,Ro,ah="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",cr,Le,no,fr,Io,lh=`This method returns the quantization method used for the model. If the model is not quantizable, it returns
<code>None</code>.`,br,Ve,oo,vr,Yo,sh=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,Ps,le,Fe,qa,ao,gr,So,ih="Quantization with 🤗 <code>optimum</code>",Qs,lo,rh='Please have a look at <a href="https://huggingface.co/docs/optimum/index" rel="nofollow">Optimum documentation</a> to learn more about quantization methods that are supported by <code>optimum</code> and see if these are applicable for your use case.',Xs,za,Ls;return Re=new y({}),Ie=new y({}),Ke=new y({}),nt=new y({}),lt=new y({}),it=new w({props:{code:"bW9kZWxfaWQlMjAlM0QlMjAlMjJmYWNlYm9vayUyRm9wdC0xMjVtJTIyJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBZ3B0cV9jb25maWclMjAlM0QlMjBHUFRRQ29uZmlnKGJpdHMlM0Q0JTJDJTIwZGF0YXNldCUyMCUzRCUyMCUyMmM0JTIyJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyKQ==",highlighted:`model_id = <span class="hljs-string">&quot;facebook/opt-125m&quot;</span>
tokenizer = AutoTokenizer.from_pretrained(model_id)
gptq_config = GPTQConfig(bits=<span class="hljs-number">4</span>, dataset = <span class="hljs-string">&quot;c4&quot;</span>, tokenizer=tokenizer)`}}),dt=new w({props:{code:"ZGF0YXNldCUyMCUzRCUyMCU1QiUyMmF1dG8tZ3B0cSUyMGlzJTIwYW4lMjBlYXN5LXRvLXVzZSUyMG1vZGVsJTIwcXVhbnRpemF0aW9uJTIwbGlicmFyeSUyMHdpdGglMjB1c2VyLWZyaWVuZGx5JTIwYXBpcyUyQyUyMGJhc2VkJTIwb24lMjBHUFRRJTIwYWxnb3JpdGhtLiUyMiU1RCUwQXF1YW50aXphdGlvbiUyMCUzRCUyMEdQVFFDb25maWcoYml0cyUzRDQlMkMlMjBkYXRhc2V0JTIwJTNEJTIwZGF0YXNldCUyQyUyMHRva2VuaXplciUzRHRva2VuaXplcik=",highlighted:`dataset = [<span class="hljs-string">&quot;auto-gptq is an easy-to-use model quantization library with user-friendly apis, based on GPTQ algorithm.&quot;</span>]
quantization = GPTQConfig(bits=<span class="hljs-number">4</span>, dataset = dataset, tokenizer=tokenizer)`}}),ht=new y({}),pt=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBxdWFudGl6YXRpb25fY29uZmlnJTNEZ3B0cV9jb25maWcp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=gptq_config)`}}),ft=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMiUyQyUyMHF1YW50aXphdGlvbl9jb25maWclM0RncHRxX2NvbmZpZyk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(model_id, device_map=<span class="hljs-string">&quot;auto&quot;</span>, quantization_config=gptq_config)`}}),pe=new ki({props:{warning:!0,$$slots:{default:[Tu]},$$scope:{ctx:k}}}),vt=new y({}),yt=new w({props:{code:"cXVhbnRpemVkX21vZGVsLnB1c2hfdG9faHViKCUyMm9wdC0xMjVtLWdwdHElMjIpJTBBdG9rZW5pemVyLnB1c2hfdG9faHViKCUyMm9wdC0xMjVtLWdwdHElMjIp",highlighted:`quantized_model.push_to_hub(<span class="hljs-string">&quot;opt-125m-gptq&quot;</span>)
tokenizer.push_to_hub(<span class="hljs-string">&quot;opt-125m-gptq&quot;</span>)`}}),wt=new w({props:{code:"cXVhbnRpemVkX21vZGVsLnNhdmVfcHJldHJhaW5lZCglMjJvcHQtMTI1bS1ncHRxJTIyKSUwQXRva2VuaXplci5zYXZlX3ByZXRyYWluZWQoJTIyb3B0LTEyNW0tZ3B0cSUyMik=",highlighted:`quantized_model.save_pretrained(<span class="hljs-string">&quot;opt-125m-gptq&quot;</span>)
tokenizer.save_pretrained(<span class="hljs-string">&quot;opt-125m-gptq&quot;</span>)`}}),Mt=new w({props:{code:"cXVhbnRpemVkX21vZGVsLnRvKCUyMmNwdSUyMiklMEFxdWFudGl6ZWRfbW9kZWwuc2F2ZV9wcmV0cmFpbmVkKCUyMm9wdC0xMjVtLWdwdHElMjIp",highlighted:`quantized_model.to(<span class="hljs-string">&quot;cpu&quot;</span>)
quantized_model.save_pretrained(<span class="hljs-string">&quot;opt-125m-gptq&quot;</span>)`}}),Tt=new y({}),kt=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyJTdCeW91cl91c2VybmFtZSU3RCUyRm9wdC0xMjVtLWdwdHElMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;{your_username}/opt-125m-gptq&quot;</span>)`}}),Jt=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyJTdCeW91cl91c2VybmFtZSU3RCUyRm9wdC0xMjVtLWdwdHElMjIlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;{your_username}/opt-125m-gptq&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)`}}),qt=new y({}),Wt=new w({props:{code:"aW1wb3J0JTIwdG9yY2glMEFncHRxX2NvbmZpZyUyMCUzRCUyMEdQVFFDb25maWcoYml0cyUzRDQlMkMlMjBkaXNhYmxlX2V4bGxhbWElM0RGYWxzZSklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjIlN0J5b3VyX3VzZXJuYW1lJTdEJTJGb3B0LTEyNW0tZ3B0cSUyMiUyQyUyMGRldmljZV9tYXAlM0QlMjJhdXRvJTIyJTJDJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUyMCUzRCUyMGdwdHFfY29uZmlnKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
gptq_config = GPTQConfig(bits=<span class="hljs-number">4</span>, disable_exllama=<span class="hljs-literal">False</span>)
model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;{your_username}/opt-125m-gptq&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>, quantization_config = gptq_config)`}}),Ut=new y({}),At=new y({}),Et=new y({}),Gt=new ro({props:{name:"class transformers.GPTQConfig",anchor:"transformers.GPTQConfig",parameters:[{name:"bits",val:": int"},{name:"tokenizer",val:": typing.Any = None"},{name:"dataset",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"group_size",val:": int = 128"},{name:"damp_percent",val:": float = 0.1"},{name:"desc_act",val:": bool = False"},{name:"sym",val:": bool = True"},{name:"true_sequential",val:": bool = True"},{name:"use_cuda_fp16",val:": bool = False"},{name:"model_seqlen",val:": typing.Optional[int] = None"},{name:"block_name_to_quantize",val:": typing.Optional[str] = None"},{name:"module_name_preceding_first_block",val:": typing.Optional[typing.List[str]] = None"},{name:"batch_size",val:": int = 1"},{name:"pad_token_id",val:": typing.Optional[int] = None"},{name:"disable_exllama",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GPTQConfig.bits",description:`<strong>bits</strong> (<code>int</code>) &#x2014;
The number of bits to quantize to, supported numbers are (2, 3, 4, 8).`,name:"bits"},{anchor:"transformers.GPTQConfig.tokenizer",description:`<strong>tokenizer</strong> (<code>str</code> or <code>PreTrainedTokenizerBase</code>, <em>optional</em>) &#x2014;
The tokenizer used to process the dataset. You can pass either:<ul>
<li>A custom tokenizer object.</li>
<li>A string, the <em>model id</em> of a predefined tokenizer hosted inside a model repo on huggingface.co.
Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or namespaced under a
user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>A path to a <em>directory</em> containing vocabulary files required by the tokenizer, for instance saved
using the <a href="/docs/transformers/v4.33.3/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
</ul>`,name:"tokenizer"},{anchor:"transformers.GPTQConfig.dataset",description:`<strong>dataset</strong> (<code>Union[List[str]]</code>, <em>optional</em>) &#x2014;
The dataset used for quantization. You can provide your own dataset in a list of string or just use the
original datasets used in GPTQ paper [&#x2018;wikitext2&#x2019;,&#x2018;c4&#x2019;,&#x2018;c4-new&#x2019;,&#x2018;ptb&#x2019;,&#x2018;ptb-new&#x2019;]`,name:"dataset"},{anchor:"transformers.GPTQConfig.group_size",description:`<strong>group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The group size to use for quantization. Recommended value is 128 and -1 uses per-column quantization.`,name:"group_size"},{anchor:"transformers.GPTQConfig.damp_percent",description:`<strong>damp_percent</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The percent of the average Hessian diagonal to use for dampening. Recommended value is 0.1.`,name:"damp_percent"},{anchor:"transformers.GPTQConfig.desc_act",description:`<strong>desc_act</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to quantize columns in order of decreasing activation size. Setting it to False can significantly
speed up inference but the perplexity may become slightly worse. Also known as act-order.`,name:"desc_act"},{anchor:"transformers.GPTQConfig.sym",description:`<strong>sym</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use symetric quantization.`,name:"sym"},{anchor:"transformers.GPTQConfig.true_sequential",description:`<strong>true_sequential</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to perform sequential quantization even within a single Transformer block. Instead of quantizing
the entire block at once, we perform layer-wise quantization. As a result, each layer undergoes
quantization using inputs that have passed through the previously quantized layers.`,name:"true_sequential"},{anchor:"transformers.GPTQConfig.use_cuda_fp16",description:`<strong>use_cuda_fp16</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use optimized cuda kernel for fp16 model. Need to have model in fp16.`,name:"use_cuda_fp16"},{anchor:"transformers.GPTQConfig.model_seqlen",description:`<strong>model_seqlen</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum sequence length that the model can take.`,name:"model_seqlen"},{anchor:"transformers.GPTQConfig.block_name_to_quantize",description:`<strong>block_name_to_quantize</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The transformers block name to quantize.`,name:"block_name_to_quantize"},{anchor:"transformers.GPTQConfig.module_name_preceding_first_block",description:`<strong>module_name_preceding_first_block</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The layers that are preceding the first Transformer block.`,name:"module_name_preceding_first_block"},{anchor:"transformers.GPTQConfig.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The batch size used when processing the dataset`,name:"batch_size"},{anchor:"transformers.GPTQConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The pad token id. Needed to prepare the dataset when <code>batch_size</code> &gt; 1.`,name:"pad_token_id"},{anchor:"transformers.GPTQConfig.disable_exllama",description:`<strong>disable_exllama</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use exllama backend. Only works with <code>bits</code> = 4.`,name:"disable_exllama"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/utils/quantization_config.py#L303"}}),Ht=new ro({props:{name:"post_init",anchor:"transformers.GPTQConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/utils/quantization_config.py#L394"}}),Bt=new y({}),Ft=new y({}),It=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBJTBBbW9kZWxfOGJpdCUyMCUzRCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm9wdC0zNTBtJTIyJTJDJTIwbG9hZF9pbl84Yml0JTNEVHJ1ZSklMEFtb2RlbF80Yml0JTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGb3B0LTM1MG0lMjIlMkMlMjBsb2FkX2luXzRiaXQlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM

model_8bit = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/opt-350m&quot;</span>, load_in_8bit=<span class="hljs-literal">True</span>)
model_4bit = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/opt-350m&quot;</span>, load_in_4bit=<span class="hljs-literal">True</span>)`}}),St=new w({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0lMEElMEFtb2RlbF84Yml0JTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGb3B0LTM1MG0lMjIlMkMlMjBsb2FkX2luXzhiaXQlM0RUcnVlJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDMyKSUwQW1vZGVsXzhiaXQubW9kZWwuZGVjb2Rlci5sYXllcnMlNUItMSU1RC5maW5hbF9sYXllcl9ub3JtLndlaWdodC5kdHlwZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model_8bit = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/opt-350m&quot;</span>, load_in_8bit=<span class="hljs-literal">True</span>, torch_dtype=torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>model_8bit.model.decoder.layers[-<span class="hljs-number">1</span>].final_layer_norm.weight.dtype
torch.float32`}}),Dt=new y({}),Kt=new y({}),tn=new y({}),on=new y({}),ln=new w({props:{code:"JTIzJTIwcGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMGFjY2VsZXJhdGUlMjBiaXRzYW5kYnl0ZXMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0lMkMlMjBBdXRvVG9rZW5pemVyJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJiaWdzY2llbmNlJTJGYmxvb20tMWI3JTIyJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMiUyQyUyMGxvYWRfaW5fNGJpdCUzRFRydWUp",highlighted:`<span class="hljs-comment"># pip install transformers accelerate bitsandbytes</span>
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer

model_id = <span class="hljs-string">&quot;bigscience/bloom-1b7&quot;</span>

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map=<span class="hljs-string">&quot;auto&quot;</span>, load_in_4bit=<span class="hljs-literal">True</span>)`}}),ke=new ki({props:{warning:!0,$$slots:{default:[Cu]},$$scope:{ctx:k}}}),sn=new y({}),dn=new w({props:{code:"JTIzJTIwcGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMGFjY2VsZXJhdGUlMjBiaXRzYW5kYnl0ZXMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0lMkMlMjBBdXRvVG9rZW5pemVyJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJiaWdzY2llbmNlJTJGYmxvb20tMWI3JTIyJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMiUyQyUyMGxvYWRfaW5fOGJpdCUzRFRydWUp",highlighted:`<span class="hljs-comment"># pip install transformers accelerate bitsandbytes</span>
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer

model_id = <span class="hljs-string">&quot;bigscience/bloom-1b7&quot;</span>

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map=<span class="hljs-string">&quot;auto&quot;</span>, load_in_8bit=<span class="hljs-literal">True</span>)`}}),pn=new w({props:{code:"cHJpbnQobW9kZWwuZ2V0X21lbW9yeV9mb290cHJpbnQoKSk=",highlighted:'<span class="hljs-built_in">print</span>(model.get_memory_footprint())'}}),Je=new ki({props:{warning:!0,$$slots:{default:[ku]},$$scope:{ctx:k}}}),cn=new y({}),bn=new y({}),gn=new w({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQml0c0FuZEJ5dGVzQ29uZmlnJTBBJTBBcXVhbnRpemF0aW9uX2NvbmZpZyUyMCUzRCUyMEJpdHNBbmRCeXRlc0NvbmZpZyhsb2FkX2luXzRiaXQlM0RUcnVlJTJDJTIwYm5iXzRiaXRfY29tcHV0ZV9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BitsAndBytesConfig

quantization_config = BitsAndBytesConfig(load_in_4bit=<span class="hljs-literal">True</span>, bnb_4bit_compute_dtype=torch.bfloat16)`}}),yn=new y({}),wn=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJpdHNBbmRCeXRlc0NvbmZpZyUwQSUwQW5mNF9jb25maWclMjAlM0QlMjBCaXRzQW5kQnl0ZXNDb25maWcoJTBBJTIwJTIwJTIwJTIwbG9hZF9pbl80Yml0JTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMGJuYl80Yml0X3F1YW50X3R5cGUlM0QlMjJuZjQlMjIlMkMlMEEpJTBBJTBBbW9kZWxfbmY0JTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkJTJDJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzRG5mNF9jb25maWcp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BitsAndBytesConfig

nf4_config = BitsAndBytesConfig(
    load_in_4bit=<span class="hljs-literal">True</span>,
    bnb_4bit_quant_type=<span class="hljs-string">&quot;nf4&quot;</span>,
)

model_nf4 = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=nf4_config)`}}),$n=new y({}),Tn=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJpdHNBbmRCeXRlc0NvbmZpZyUwQSUwQWRvdWJsZV9xdWFudF9jb25maWclMjAlM0QlMjBCaXRzQW5kQnl0ZXNDb25maWcoJTBBJTIwJTIwJTIwJTIwbG9hZF9pbl80Yml0JTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMGJuYl80Yml0X3VzZV9kb3VibGVfcXVhbnQlM0RUcnVlJTJDJTBBKSUwQSUwQW1vZGVsX2RvdWJsZV9xdWFudCUyMCUzRCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHF1YW50aXphdGlvbl9jb25maWclM0Rkb3VibGVfcXVhbnRfY29uZmlnKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BitsAndBytesConfig

double_quant_config = BitsAndBytesConfig(
    load_in_4bit=<span class="hljs-literal">True</span>,
    bnb_4bit_use_double_quant=<span class="hljs-literal">True</span>,
)

model_double_quant = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=double_quant_config)`}}),Cn=new y({}),xn=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZibG9vbS01NjBtJTIyJTJDJTIwZGV2aWNlX21hcCUzRCUyMmF1dG8lMjIlMkMlMjBsb2FkX2luXzhiaXQlM0RUcnVlKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZibG9vbS01NjBtJTIyKSUwQSUwQW1vZGVsLnB1c2hfdG9faHViKCUyMmJsb29tLTU2MG0tOGJpdCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>, load_in_8bit=<span class="hljs-literal">True</span>)
tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)

model.push_to_hub(<span class="hljs-string">&quot;bloom-560m-8bit&quot;</span>)`}}),je=new ki({props:{warning:!0,$$slots:{default:[xu]},$$scope:{ctx:k}}}),Jn=new y({}),zn=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMiU3QnlvdXJfdXNlcm5hbWUlN0QlMkZibG9vbS01NjBtLThiaXQlMjIlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;{your_username}/bloom-560m-8bit&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)`}}),Zn=new y({}),jn=new y({}),En=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUyQyUyMEJpdHNBbmRCeXRlc0NvbmZpZyUwQSUwQXF1YW50aXphdGlvbl9jb25maWclMjAlM0QlMjBCaXRzQW5kQnl0ZXNDb25maWcobGxtX2ludDhfZW5hYmxlX2ZwMzJfY3B1X29mZmxvYWQlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig

quantization_config = BitsAndBytesConfig(llm_int8_enable_fp32_cpu_offload=<span class="hljs-literal">True</span>)`}}),Hn=new w({props:{code:"ZGV2aWNlX21hcCUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMnRyYW5zZm9ybWVyLndvcmRfZW1iZWRkaW5ncyUyMiUzQSUyMDAlMkMlMEElMjAlMjAlMjAlMjAlMjJ0cmFuc2Zvcm1lci53b3JkX2VtYmVkZGluZ3NfbGF5ZXJub3JtJTIyJTNBJTIwMCUyQyUwQSUyMCUyMCUyMCUyMCUyMmxtX2hlYWQlMjIlM0ElMjAlMjJjcHUlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJ0cmFuc2Zvcm1lci5oJTIyJTNBJTIwMCUyQyUwQSUyMCUyMCUyMCUyMCUyMnRyYW5zZm9ybWVyLmxuX2YlMjIlM0ElMjAwJTJDJTBBJTdE",highlighted:`device_map = {
    <span class="hljs-string">&quot;transformer.word_embeddings&quot;</span>: <span class="hljs-number">0</span>,
    <span class="hljs-string">&quot;transformer.word_embeddings_layernorm&quot;</span>: <span class="hljs-number">0</span>,
    <span class="hljs-string">&quot;lm_head&quot;</span>: <span class="hljs-string">&quot;cpu&quot;</span>,
    <span class="hljs-string">&quot;transformer.h&quot;</span>: <span class="hljs-number">0</span>,
    <span class="hljs-string">&quot;transformer.ln_f&quot;</span>: <span class="hljs-number">0</span>,
}`}}),Pn=new w({props:{code:"bW9kZWxfOGJpdCUyMCUzRCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJiaWdzY2llbmNlJTJGYmxvb20tMWI3JTIyJTJDJTBBJTIwJTIwJTIwJTIwZGV2aWNlX21hcCUzRGRldmljZV9tYXAlMkMlMEElMjAlMjAlMjAlMjBxdWFudGl6YXRpb25fY29uZmlnJTNEcXVhbnRpemF0aW9uX2NvbmZpZyUyQyUwQSk=",highlighted:`model_8bit = AutoModelForCausalLM.from_pretrained(
    <span class="hljs-string">&quot;bigscience/bloom-1b7&quot;</span>,
    device_map=device_map,
    quantization_config=quantization_config,
)`}}),Xn=new y({}),Vn=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUyQyUyMEJpdHNBbmRCeXRlc0NvbmZpZyUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyYmlnc2NpZW5jZSUyRmJsb29tLTFiNyUyMiUwQSUwQXF1YW50aXphdGlvbl9jb25maWclMjAlM0QlMjBCaXRzQW5kQnl0ZXNDb25maWcoJTBBJTIwJTIwJTIwJTIwbGxtX2ludDhfdGhyZXNob2xkJTNEMTAlMkMlMEEpJTBBJTBBbW9kZWxfOGJpdCUyMCUzRCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUyQyUwQSUyMCUyMCUyMCUyMGRldmljZV9tYXAlM0RkZXZpY2VfbWFwJTJDJTBBJTIwJTIwJTIwJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzRHF1YW50aXphdGlvbl9jb25maWclMkMlMEEpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig

model_id = <span class="hljs-string">&quot;bigscience/bloom-1b7&quot;</span>

quantization_config = BitsAndBytesConfig(
    llm_int8_threshold=<span class="hljs-number">10</span>,
)

model_8bit = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map=device_map,
    quantization_config=quantization_config,
)
tokenizer = AutoTokenizer.from_pretrained(model_id)`}}),Fn=new y({}),In=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUyQyUyMEJpdHNBbmRCeXRlc0NvbmZpZyUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyYmlnc2NpZW5jZSUyRmJsb29tLTFiNyUyMiUwQSUwQXF1YW50aXphdGlvbl9jb25maWclMjAlM0QlMjBCaXRzQW5kQnl0ZXNDb25maWcoJTBBJTIwJTIwJTIwJTIwbGxtX2ludDhfc2tpcF9tb2R1bGVzJTNEJTVCJTIybG1faGVhZCUyMiU1RCUyQyUwQSklMEElMEFtb2RlbF84Yml0JTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2lkJTJDJTBBJTIwJTIwJTIwJTIwZGV2aWNlX21hcCUzRGRldmljZV9tYXAlMkMlMEElMjAlMjAlMjAlMjBxdWFudGl6YXRpb25fY29uZmlnJTNEcXVhbnRpemF0aW9uX2NvbmZpZyUyQyUwQSklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig

model_id = <span class="hljs-string">&quot;bigscience/bloom-1b7&quot;</span>

quantization_config = BitsAndBytesConfig(
    llm_int8_skip_modules=[<span class="hljs-string">&quot;lm_head&quot;</span>],
)

model_8bit = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map=device_map,
    quantization_config=quantization_config,
)
tokenizer = AutoTokenizer.from_pretrained(model_id)`}}),Yn=new y({}),Kn=new y({}),On=new ro({props:{name:"class transformers.BitsAndBytesConfig",anchor:"transformers.BitsAndBytesConfig",parameters:[{name:"load_in_8bit",val:" = False"},{name:"load_in_4bit",val:" = False"},{name:"llm_int8_threshold",val:" = 6.0"},{name:"llm_int8_skip_modules",val:" = None"},{name:"llm_int8_enable_fp32_cpu_offload",val:" = False"},{name:"llm_int8_has_fp16_weight",val:" = False"},{name:"bnb_4bit_compute_dtype",val:" = None"},{name:"bnb_4bit_quant_type",val:" = 'fp4'"},{name:"bnb_4bit_use_double_quant",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BitsAndBytesConfig.load_in_8bit",description:`<strong>load_in_8bit</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used to enable 8-bit quantization with LLM.int8().`,name:"load_in_8bit"},{anchor:"transformers.BitsAndBytesConfig.load_in_4bit",description:`<strong>load_in_4bit</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used to enable 4-bit quantization by replacing the Linear layers with FP4/NF4 layers from
<code>bitsandbytes</code>.`,name:"load_in_4bit"},{anchor:"transformers.BitsAndBytesConfig.llm_int8_threshold",description:`<strong>llm_int8_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 6) &#x2014;
This corresponds to the outlier threshold for outlier detection as described in <code>LLM.int8() : 8-bit Matrix Multiplication for Transformers at Scale</code> paper: <a href="https://arxiv.org/abs/2208.07339" rel="nofollow">https://arxiv.org/abs/2208.07339</a> Any hidden states value
that is above this threshold will be considered an outlier and the operation on those values will be done
in fp16. Values are usually normally distributed, that is, most values are in the range [-3.5, 3.5], but
there are some exceptional systematic outliers that are very differently distributed for large models.
These outliers are often in the interval [-60, -6] or [6, 60]. Int8 quantization works well for values of
magnitude ~5, but beyond that, there is a significant performance penalty. A good default threshold is 6,
but a lower threshold might be needed for more unstable models (small models, fine-tuning).`,name:"llm_int8_threshold"},{anchor:"transformers.BitsAndBytesConfig.llm_int8_skip_modules",description:`<strong>llm_int8_skip_modules</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
An explicit list of the modules that we do not want to convert in 8-bit. This is useful for models such as
Jukebox that has several heads in different places and not necessarily at the last position. For example
for <code>CausalLM</code> models, the last <code>lm_head</code> is kept in its original <code>dtype</code>.`,name:"llm_int8_skip_modules"},{anchor:"transformers.BitsAndBytesConfig.llm_int8_enable_fp32_cpu_offload",description:`<strong>llm_int8_enable_fp32_cpu_offload</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used for advanced use cases and users that are aware of this feature. If you want to split
your model in different parts and run some parts in int8 on GPU and some parts in fp32 on CPU, you can use
this flag. This is useful for offloading large models such as <code>google/flan-t5-xxl</code>. Note that the int8
operations will not be run on CPU.`,name:"llm_int8_enable_fp32_cpu_offload"},{anchor:"transformers.BitsAndBytesConfig.llm_int8_has_fp16_weight",description:`<strong>llm_int8_has_fp16_weight</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag runs LLM.int8() with 16-bit main weights. This is useful for fine-tuning as the weights do not
have to be converted back and forth for the backward pass.`,name:"llm_int8_has_fp16_weight"},{anchor:"transformers.BitsAndBytesConfig.bnb_4bit_compute_dtype",description:`<strong>bnb_4bit_compute_dtype</strong> (<code>torch.dtype</code> or str, <em>optional</em>, defaults to <code>torch.float32</code>) &#x2014;
This sets the computational type which might be different than the input time. For example, inputs might be
fp32, but computation can be set to bf16 for speedups.`,name:"bnb_4bit_compute_dtype"},{anchor:"transformers.BitsAndBytesConfig.bnb_4bit_quant_type",description:`<strong>bnb_4bit_quant_type</strong> (<code>str</code>, {fp4, nf4}, defaults to <code>fp4</code>) &#x2014;
This sets the quantization data type in the bnb.nn.Linear4Bit layers. Options are FP4 and NF4 data types
which are specified by <code>fp4</code> or <code>nf4</code>.`,name:"bnb_4bit_quant_type"},{anchor:"transformers.BitsAndBytesConfig.bnb_4bit_use_double_quant",description:`<strong>bnb_4bit_use_double_quant</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used for nested quantization where the quantization constants from the first quantization are
quantized again.`,name:"bnb_4bit_use_double_quant"},{anchor:"transformers.BitsAndBytesConfig.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional parameters from which to initialize the configuration object.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/utils/quantization_config.py#L130"}}),eo=new ro({props:{name:"is_quantizable",anchor:"transformers.BitsAndBytesConfig.is_quantizable",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/utils/quantization_config.py#L245"}}),to=new ro({props:{name:"post_init",anchor:"transformers.BitsAndBytesConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/utils/quantization_config.py#L214"}}),no=new ro({props:{name:"quantization_method",anchor:"transformers.BitsAndBytesConfig.quantization_method",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/utils/quantization_config.py#L251"}}),oo=new ro({props:{name:"to_diff_dict",anchor:"transformers.BitsAndBytesConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/utils/quantization_config.py#L279",returnDescription:`
<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`
<p><code>Dict[str, Any]</code></p>
`}}),ao=new y({}),{c(){g=a("meta"),M=s(),_=a("p"),x=s(),J=a("h1"),se=a("a"),Ko=a("span"),p(Re.$$.fragment),xi=s(),ho=a("span"),ho.textContent=_r,Ua=s(),q=a("h2"),ie=a("a"),Oo=a("span"),p(Ie.$$.fragment),Ji=s(),uo=a("span"),uo.innerHTML=wr,ja=s(),Ye=a("p"),Ye.innerHTML=$r,Aa=s(),Se=a("p"),Se.textContent=Mr,Na=s(),De=a("ul"),De.innerHTML=Tr,Ea=s(),z=a("h3"),re=a("a"),ea=a("span"),p(Ke.$$.fragment),qi=s(),po=a("span"),po.textContent=Cr,Ga=s(),Oe=a("p"),Oe.textContent=kr,Ha=s(),et=a("ul"),et.innerHTML=xr,Ba=s(),tt=a("p"),tt.textContent=Jr,Pa=s(),W=a("h3"),de=a("a"),ta=a("span"),p(nt.$$.fragment),zi=s(),mo=a("span"),mo.textContent=qr,Qa=s(),ot=a("p"),ot.innerHTML=zr,Xa=s(),at=a("p"),at.textContent=Wr,La=s(),Z=a("h4"),he=a("a"),na=a("span"),p(lt.$$.fragment),Wi=s(),co=a("span"),co.textContent=Zr,Va=s(),st=a("p"),st.innerHTML=Ur,Fa=s(),p(it.$$.fragment),Ra=s(),rt=a("p"),rt.textContent=jr,Ia=s(),p(dt.$$.fragment),Ya=s(),U=a("h4"),ue=a("a"),oa=a("span"),p(ht.$$.fragment),Zi=s(),fo=a("span"),fo.textContent=Ar,Sa=s(),ut=a("p"),ut.innerHTML=Nr,Da=s(),p(pt.$$.fragment),Ka=s(),mt=a("p"),mt.textContent=Er,Oa=s(),ct=a("p"),ct.innerHTML=Gr,el=s(),p(ft.$$.fragment),tl=s(),bt=a("p"),bt.innerHTML=Hr,nl=s(),p(pe.$$.fragment),ol=s(),j=a("h3"),me=a("a"),aa=a("span"),p(vt.$$.fragment),Ui=s(),bo=a("span"),bo.textContent=Br,al=s(),gt=a("p"),gt.innerHTML=Pr,ll=s(),p(yt.$$.fragment),sl=s(),_t=a("p"),_t.innerHTML=Qr,il=s(),p(wt.$$.fragment),rl=s(),$t=a("p"),$t.innerHTML=Xr,dl=s(),p(Mt.$$.fragment),hl=s(),A=a("h3"),ce=a("a"),la=a("span"),p(Tt.$$.fragment),ji=s(),vo=a("span"),vo.textContent=Lr,ul=s(),Ct=a("p"),Ct.innerHTML=Vr,pl=s(),p(kt.$$.fragment),ml=s(),xt=a("p"),xt.innerHTML=Fr,cl=s(),p(Jt.$$.fragment),fl=s(),N=a("h3"),fe=a("a"),sa=a("span"),p(qt.$$.fragment),Ai=s(),go=a("span"),go.textContent=Rr,bl=s(),zt=a("p"),zt.innerHTML=Ir,vl=s(),p(Wt.$$.fragment),gl=s(),Zt=a("p"),Zt.textContent=Yr,yl=s(),E=a("h4"),be=a("a"),ia=a("span"),p(Ut.$$.fragment),Ni=s(),yo=a("span"),yo.textContent=Sr,_l=s(),jt=a("p"),jt.innerHTML=Dr,wl=s(),G=a("h3"),ve=a("a"),ra=a("span"),p(At.$$.fragment),Ei=s(),_o=a("span"),_o.textContent=Kr,$l=s(),Nt=a("p"),Nt.innerHTML=Or,Ml=s(),H=a("h3"),ge=a("a"),da=a("span"),p(Et.$$.fragment),Gi=s(),wo=a("span"),wo.textContent=ed,Tl=s(),C=a("div"),p(Gt.$$.fragment),Hi=s(),$o=a("p"),$o.innerHTML=td,Bi=s(),ye=a("div"),p(Ht.$$.fragment),Pi=s(),Mo=a("p"),Mo.textContent=nd,Cl=s(),B=a("h2"),_e=a("a"),ha=a("span"),p(Bt.$$.fragment),Qi=s(),To=a("span"),To.innerHTML=od,kl=s(),Pt=a("p"),Pt.innerHTML=ad,xl=s(),Qt=a("p"),Qt.innerHTML=ld,Jl=s(),Xt=a("p"),Xt.innerHTML=sd,ql=s(),Lt=a("p"),Lt.innerHTML=id,zl=s(),Vt=a("p"),Vt.innerHTML=rd,Wl=s(),P=a("h3"),we=a("a"),ua=a("span"),p(Ft.$$.fragment),Xi=s(),Co=a("span"),Co.textContent=dd,Zl=s(),Rt=a("p"),Rt.innerHTML=hd,Ul=s(),p(It.$$.fragment),jl=s(),Yt=a("p"),Yt.innerHTML=ud,Al=s(),p(St.$$.fragment),Nl=s(),Q=a("h3"),$e=a("a"),pa=a("span"),p(Dt.$$.fragment),Li=s(),ko=a("span"),ko.textContent=pd,El=s(),X=a("h4"),Me=a("a"),ma=a("span"),p(Kt.$$.fragment),Vi=s(),xo=a("span"),xo.textContent=md,Gl=s(),Ot=a("p"),Ot.textContent=cd,Hl=s(),en=a("ul"),en.innerHTML=fd,Bl=s(),L=a("h4"),Te=a("a"),ca=a("span"),p(tn.$$.fragment),Fi=s(),Jo=a("span"),Jo.textContent=bd,Pl=s(),nn=a("ul"),nn.innerHTML=vd,Ql=s(),V=a("h4"),Ce=a("a"),fa=a("span"),p(on.$$.fragment),Ri=s(),qo=a("span"),qo.textContent=gd,Xl=s(),an=a("p"),an.innerHTML=yd,Ll=s(),p(ln.$$.fragment),Vl=s(),p(ke.$$.fragment),Fl=s(),F=a("h3"),xe=a("a"),ba=a("span"),p(sn.$$.fragment),Ii=s(),zo=a("span"),zo.textContent=_d,Rl=s(),rn=a("p"),rn.innerHTML=wd,Il=s(),p(dn.$$.fragment),Yl=s(),hn=a("p"),hn.innerHTML=$d,Sl=s(),un=a("p"),un.innerHTML=Md,Dl=s(),p(pn.$$.fragment),Kl=s(),mn=a("p"),mn.textContent=Td,Ol=s(),p(Je.$$.fragment),es=s(),R=a("h4"),qe=a("a"),va=a("span"),p(cn.$$.fragment),Yi=s(),Wo=a("span"),Wo.textContent=Cd,ts=s(),fn=a("p"),fn.textContent=kd,ns=s(),I=a("h5"),ze=a("a"),ga=a("span"),p(bn.$$.fragment),Si=s(),Zo=a("span"),Zo.textContent=xd,os=s(),vn=a("p"),vn.innerHTML=Jd,as=s(),p(gn.$$.fragment),ls=s(),Y=a("h5"),We=a("a"),ya=a("span"),p(yn.$$.fragment),Di=s(),Uo=a("span"),Uo.textContent=qd,ss=s(),_n=a("p"),_n.textContent=zd,is=s(),p(wn.$$.fragment),rs=s(),S=a("h5"),Ze=a("a"),_a=a("span"),p($n.$$.fragment),Ki=s(),jo=a("span"),jo.textContent=Wd,ds=s(),Mn=a("p"),Mn.textContent=Zd,hs=s(),p(Tn.$$.fragment),us=s(),D=a("h3"),Ue=a("a"),wa=a("span"),p(Cn.$$.fragment),Oi=s(),Ao=a("span"),Ao.textContent=Ud,ps=s(),kn=a("p"),kn.innerHTML=jd,ms=s(),p(xn.$$.fragment),cs=s(),p(je.$$.fragment),fs=s(),K=a("h3"),Ae=a("a"),$a=a("span"),p(Jn.$$.fragment),er=s(),No=a("span"),No.textContent=Ad,bs=s(),qn=a("p"),qn.innerHTML=Nd,vs=s(),p(zn.$$.fragment),gs=s(),Wn=a("p"),Wn.innerHTML=Ed,ys=s(),O=a("h3"),Ne=a("a"),Ma=a("span"),p(Zn.$$.fragment),tr=s(),Eo=a("span"),Eo.textContent=Gd,_s=s(),Un=a("p"),Un.textContent=Hd,ws=s(),ee=a("h4"),Ee=a("a"),Ta=a("span"),p(jn.$$.fragment),nr=s(),Go=a("span"),Go.innerHTML=Bd,$s=s(),An=a("p"),An.innerHTML=Pd,Ms=s(),Nn=a("p"),Nn.innerHTML=Qd,Ts=s(),p(En.$$.fragment),Cs=s(),Gn=a("p"),Gn.innerHTML=Xd,ks=s(),p(Hn.$$.fragment),xs=s(),Bn=a("p"),Bn.textContent=Ld,Js=s(),p(Pn.$$.fragment),qs=s(),Qn=a("p"),Qn.textContent=Vd,zs=s(),te=a("h4"),Ge=a("a"),Ca=a("span"),p(Xn.$$.fragment),or=s(),Ho=a("span"),Ho.innerHTML=Fd,Ws=s(),Ln=a("p"),Ln.innerHTML=Rd,Zs=s(),p(Vn.$$.fragment),Us=s(),ne=a("h4"),He=a("a"),ka=a("span"),p(Fn.$$.fragment),ar=s(),Bo=a("span"),Bo.textContent=Id,js=s(),Rn=a("p"),Rn.innerHTML=Yd,As=s(),p(In.$$.fragment),Ns=s(),oe=a("h4"),Be=a("a"),xa=a("span"),p(Yn.$$.fragment),lr=s(),Po=a("span"),Po.textContent=Sd,Es=s(),Sn=a("p"),Sn.innerHTML=Dd,Gs=s(),Dn=a("p"),Dn.innerHTML=Kd,Hs=s(),ae=a("h3"),Pe=a("a"),Ja=a("span"),p(Kn.$$.fragment),sr=s(),Qo=a("span"),Qo.textContent=Od,Bs=s(),$=a("div"),p(On.$$.fragment),ir=s(),Xo=a("p"),Xo.innerHTML=eh,rr=s(),Lo=a("p"),Lo.innerHTML=th,dr=s(),Vo=a("p"),Vo.innerHTML=nh,hr=s(),Qe=a("div"),p(eo.$$.fragment),ur=s(),Fo=a("p"),Fo.innerHTML=oh,pr=s(),Xe=a("div"),p(to.$$.fragment),mr=s(),Ro=a("p"),Ro.textContent=ah,cr=s(),Le=a("div"),p(no.$$.fragment),fr=s(),Io=a("p"),Io.innerHTML=lh,br=s(),Ve=a("div"),p(oo.$$.fragment),vr=s(),Yo=a("p"),Yo.textContent=sh,Ps=s(),le=a("h2"),Fe=a("a"),qa=a("span"),p(ao.$$.fragment),gr=s(),So=a("span"),So.innerHTML=ih,Qs=s(),lo=a("p"),lo.innerHTML=rh,Xs=s(),za=a("p"),this.h()},l(e){const n=wu("svelte-1phssyn",document.head);g=l(n,"META",{name:!0,content:!0}),n.forEach(t),M=i(e),_=l(e,"P",{}),h(_).forEach(t),x=i(e),J=l(e,"H1",{class:!0});var so=h(J);se=l(so,"A",{id:!0,class:!0,href:!0});var Wa=h(se);Ko=l(Wa,"SPAN",{});var Za=h(Ko);m(Re.$$.fragment,Za),Za.forEach(t),Wa.forEach(t),xi=i(so),ho=l(so,"SPAN",{"data-svelte-h":!0}),u(ho)!=="svelte-1ah0d8n"&&(ho.textContent=_r),so.forEach(t),Ua=i(e),q=l(e,"H2",{class:!0});var io=h(q);ie=l(io,"A",{id:!0,class:!0,href:!0});var dh=h(ie);Oo=l(dh,"SPAN",{});var hh=h(Oo);m(Ie.$$.fragment,hh),hh.forEach(t),dh.forEach(t),Ji=i(io),uo=l(io,"SPAN",{"data-svelte-h":!0}),u(uo)!=="svelte-1fmuneh"&&(uo.innerHTML=wr),io.forEach(t),ja=i(e),Ye=l(e,"P",{"data-svelte-h":!0}),u(Ye)!=="svelte-wivdz5"&&(Ye.innerHTML=$r),Aa=i(e),Se=l(e,"P",{"data-svelte-h":!0}),u(Se)!=="svelte-v9vpl3"&&(Se.textContent=Mr),Na=i(e),De=l(e,"UL",{"data-svelte-h":!0}),u(De)!=="svelte-1hsfxwl"&&(De.innerHTML=Tr),Ea=i(e),z=l(e,"H3",{class:!0});var Vs=h(z);re=l(Vs,"A",{id:!0,class:!0,href:!0});var uh=h(re);ea=l(uh,"SPAN",{});var ph=h(ea);m(Ke.$$.fragment,ph),ph.forEach(t),uh.forEach(t),qi=i(Vs),po=l(Vs,"SPAN",{"data-svelte-h":!0}),u(po)!=="svelte-ypjn7h"&&(po.textContent=Cr),Vs.forEach(t),Ga=i(e),Oe=l(e,"P",{"data-svelte-h":!0}),u(Oe)!=="svelte-1nlfwux"&&(Oe.textContent=kr),Ha=i(e),et=l(e,"UL",{"data-svelte-h":!0}),u(et)!=="svelte-1q0tak7"&&(et.innerHTML=xr),Ba=i(e),tt=l(e,"P",{"data-svelte-h":!0}),u(tt)!=="svelte-i9jsug"&&(tt.textContent=Jr),Pa=i(e),W=l(e,"H3",{class:!0});var Fs=h(W);de=l(Fs,"A",{id:!0,class:!0,href:!0});var mh=h(de);ta=l(mh,"SPAN",{});var ch=h(ta);m(nt.$$.fragment,ch),ch.forEach(t),mh.forEach(t),zi=i(Fs),mo=l(Fs,"SPAN",{"data-svelte-h":!0}),u(mo)!=="svelte-o2a4fl"&&(mo.textContent=qr),Fs.forEach(t),Qa=i(e),ot=l(e,"P",{"data-svelte-h":!0}),u(ot)!=="svelte-19mmsrx"&&(ot.innerHTML=zr),Xa=i(e),at=l(e,"P",{"data-svelte-h":!0}),u(at)!=="svelte-1l3vx9e"&&(at.textContent=Wr),La=i(e),Z=l(e,"H4",{class:!0});var Rs=h(Z);he=l(Rs,"A",{id:!0,class:!0,href:!0});var fh=h(he);na=l(fh,"SPAN",{});var bh=h(na);m(lt.$$.fragment,bh),bh.forEach(t),fh.forEach(t),Wi=i(Rs),co=l(Rs,"SPAN",{"data-svelte-h":!0}),u(co)!=="svelte-1rmq0vv"&&(co.textContent=Zr),Rs.forEach(t),Va=i(e),st=l(e,"P",{"data-svelte-h":!0}),u(st)!=="svelte-17tsjml"&&(st.innerHTML=Ur),Fa=i(e),m(it.$$.fragment,e),Ra=i(e),rt=l(e,"P",{"data-svelte-h":!0}),u(rt)!=="svelte-qilh1w"&&(rt.textContent=jr),Ia=i(e),m(dt.$$.fragment,e),Ya=i(e),U=l(e,"H4",{class:!0});var Is=h(U);ue=l(Is,"A",{id:!0,class:!0,href:!0});var vh=h(ue);oa=l(vh,"SPAN",{});var gh=h(oa);m(ht.$$.fragment,gh),gh.forEach(t),vh.forEach(t),Zi=i(Is),fo=l(Is,"SPAN",{"data-svelte-h":!0}),u(fo)!=="svelte-9x6jxy"&&(fo.textContent=Ar),Is.forEach(t),Sa=i(e),ut=l(e,"P",{"data-svelte-h":!0}),u(ut)!=="svelte-kas648"&&(ut.innerHTML=Nr),Da=i(e),m(pt.$$.fragment,e),Ka=i(e),mt=l(e,"P",{"data-svelte-h":!0}),u(mt)!=="svelte-h9bd62"&&(mt.textContent=Er),Oa=i(e),ct=l(e,"P",{"data-svelte-h":!0}),u(ct)!=="svelte-1kt63mp"&&(ct.innerHTML=Gr),el=i(e),m(ft.$$.fragment,e),tl=i(e),bt=l(e,"P",{"data-svelte-h":!0}),u(bt)!=="svelte-p700d6"&&(bt.innerHTML=Hr),nl=i(e),m(pe.$$.fragment,e),ol=i(e),j=l(e,"H3",{class:!0});var Ys=h(j);me=l(Ys,"A",{id:!0,class:!0,href:!0});var yh=h(me);aa=l(yh,"SPAN",{});var _h=h(aa);m(vt.$$.fragment,_h),_h.forEach(t),yh.forEach(t),Ui=i(Ys),bo=l(Ys,"SPAN",{"data-svelte-h":!0}),u(bo)!=="svelte-hvmxb4"&&(bo.textContent=Br),Ys.forEach(t),al=i(e),gt=l(e,"P",{"data-svelte-h":!0}),u(gt)!=="svelte-l0e993"&&(gt.innerHTML=Pr),ll=i(e),m(yt.$$.fragment,e),sl=i(e),_t=l(e,"P",{"data-svelte-h":!0}),u(_t)!=="svelte-1cc82wc"&&(_t.innerHTML=Qr),il=i(e),m(wt.$$.fragment,e),rl=i(e),$t=l(e,"P",{"data-svelte-h":!0}),u($t)!=="svelte-14meqc0"&&($t.innerHTML=Xr),dl=i(e),m(Mt.$$.fragment,e),hl=i(e),A=l(e,"H3",{class:!0});var Ss=h(A);ce=l(Ss,"A",{id:!0,class:!0,href:!0});var wh=h(ce);la=l(wh,"SPAN",{});var $h=h(la);m(Tt.$$.fragment,$h),$h.forEach(t),wh.forEach(t),ji=i(Ss),vo=l(Ss,"SPAN",{"data-svelte-h":!0}),u(vo)!=="svelte-126t2v3"&&(vo.textContent=Lr),Ss.forEach(t),ul=i(e),Ct=l(e,"P",{"data-svelte-h":!0}),u(Ct)!=="svelte-gsus0a"&&(Ct.innerHTML=Vr),pl=i(e),m(kt.$$.fragment,e),ml=i(e),xt=l(e,"P",{"data-svelte-h":!0}),u(xt)!=="svelte-1xfcpge"&&(xt.innerHTML=Fr),cl=i(e),m(Jt.$$.fragment,e),fl=i(e),N=l(e,"H3",{class:!0});var Ds=h(N);fe=l(Ds,"A",{id:!0,class:!0,href:!0});var Mh=h(fe);sa=l(Mh,"SPAN",{});var Th=h(sa);m(qt.$$.fragment,Th),Th.forEach(t),Mh.forEach(t),Ai=i(Ds),go=l(Ds,"SPAN",{"data-svelte-h":!0}),u(go)!=="svelte-1c7obi4"&&(go.textContent=Rr),Ds.forEach(t),bl=i(e),zt=l(e,"P",{"data-svelte-h":!0}),u(zt)!=="svelte-w81jq4"&&(zt.innerHTML=Ir),vl=i(e),m(Wt.$$.fragment,e),gl=i(e),Zt=l(e,"P",{"data-svelte-h":!0}),u(Zt)!=="svelte-15fps22"&&(Zt.textContent=Yr),yl=i(e),E=l(e,"H4",{class:!0});var Ks=h(E);be=l(Ks,"A",{id:!0,class:!0,href:!0});var Ch=h(be);ia=l(Ch,"SPAN",{});var kh=h(ia);m(Ut.$$.fragment,kh),kh.forEach(t),Ch.forEach(t),Ni=i(Ks),yo=l(Ks,"SPAN",{"data-svelte-h":!0}),u(yo)!=="svelte-119debz"&&(yo.textContent=Sr),Ks.forEach(t),_l=i(e),jt=l(e,"P",{"data-svelte-h":!0}),u(jt)!=="svelte-1rghhrt"&&(jt.innerHTML=Dr),wl=i(e),G=l(e,"H3",{class:!0});var Os=h(G);ve=l(Os,"A",{id:!0,class:!0,href:!0});var xh=h(ve);ra=l(xh,"SPAN",{});var Jh=h(ra);m(At.$$.fragment,Jh),Jh.forEach(t),xh.forEach(t),Ei=i(Os),_o=l(Os,"SPAN",{"data-svelte-h":!0}),u(_o)!=="svelte-r41rji"&&(_o.textContent=Kr),Os.forEach(t),$l=i(e),Nt=l(e,"P",{"data-svelte-h":!0}),u(Nt)!=="svelte-178d21p"&&(Nt.innerHTML=Or),Ml=i(e),H=l(e,"H3",{class:!0});var ei=h(H);ge=l(ei,"A",{id:!0,class:!0,href:!0});var qh=h(ge);da=l(qh,"SPAN",{});var zh=h(da);m(Et.$$.fragment,zh),zh.forEach(t),qh.forEach(t),Gi=i(ei),wo=l(ei,"SPAN",{"data-svelte-h":!0}),u(wo)!=="svelte-1twn1jv"&&(wo.textContent=ed),ei.forEach(t),Tl=i(e),C=l(e,"DIV",{class:!0});var Do=h(C);m(Gt.$$.fragment,Do),Hi=i(Do),$o=l(Do,"P",{"data-svelte-h":!0}),u($o)!=="svelte-i3efvr"&&($o.innerHTML=td),Bi=i(Do),ye=l(Do,"DIV",{class:!0});var ti=h(ye);m(Ht.$$.fragment,ti),Pi=i(ti),Mo=l(ti,"P",{"data-svelte-h":!0}),u(Mo)!=="svelte-1ozftb6"&&(Mo.textContent=nd),ti.forEach(t),Do.forEach(t),Cl=i(e),B=l(e,"H2",{class:!0});var ni=h(B);_e=l(ni,"A",{id:!0,class:!0,href:!0});var Wh=h(_e);ha=l(Wh,"SPAN",{});var Zh=h(ha);m(Bt.$$.fragment,Zh),Zh.forEach(t),Wh.forEach(t),Qi=i(ni),To=l(ni,"SPAN",{"data-svelte-h":!0}),u(To)!=="svelte-36ow3c"&&(To.innerHTML=od),ni.forEach(t),kl=i(e),Pt=l(e,"P",{"data-svelte-h":!0}),u(Pt)!=="svelte-1w3k2k7"&&(Pt.innerHTML=ad),xl=i(e),Qt=l(e,"P",{"data-svelte-h":!0}),u(Qt)!=="svelte-18yxc3j"&&(Qt.innerHTML=ld),Jl=i(e),Xt=l(e,"P",{"data-svelte-h":!0}),u(Xt)!=="svelte-7usn7e"&&(Xt.innerHTML=sd),ql=i(e),Lt=l(e,"P",{"data-svelte-h":!0}),u(Lt)!=="svelte-181g9sa"&&(Lt.innerHTML=id),zl=i(e),Vt=l(e,"P",{"data-svelte-h":!0}),u(Vt)!=="svelte-1mf5lu3"&&(Vt.innerHTML=rd),Wl=i(e),P=l(e,"H3",{class:!0});var oi=h(P);we=l(oi,"A",{id:!0,class:!0,href:!0});var Uh=h(we);ua=l(Uh,"SPAN",{});var jh=h(ua);m(Ft.$$.fragment,jh),jh.forEach(t),Uh.forEach(t),Xi=i(oi),Co=l(oi,"SPAN",{"data-svelte-h":!0}),u(Co)!=="svelte-d8us6k"&&(Co.textContent=dd),oi.forEach(t),Zl=i(e),Rt=l(e,"P",{"data-svelte-h":!0}),u(Rt)!=="svelte-1vz0c2s"&&(Rt.innerHTML=hd),Ul=i(e),m(It.$$.fragment,e),jl=i(e),Yt=l(e,"P",{"data-svelte-h":!0}),u(Yt)!=="svelte-bhhave"&&(Yt.innerHTML=ud),Al=i(e),m(St.$$.fragment,e),Nl=i(e),Q=l(e,"H3",{class:!0});var ai=h(Q);$e=l(ai,"A",{id:!0,class:!0,href:!0});var Ah=h($e);pa=l(Ah,"SPAN",{});var Nh=h(pa);m(Dt.$$.fragment,Nh),Nh.forEach(t),Ah.forEach(t),Li=i(ai),ko=l(ai,"SPAN",{"data-svelte-h":!0}),u(ko)!=="svelte-1nm95jm"&&(ko.textContent=pd),ai.forEach(t),El=i(e),X=l(e,"H4",{class:!0});var li=h(X);Me=l(li,"A",{id:!0,class:!0,href:!0});var Eh=h(Me);ma=l(Eh,"SPAN",{});var Gh=h(ma);m(Kt.$$.fragment,Gh),Gh.forEach(t),Eh.forEach(t),Vi=i(li),xo=l(li,"SPAN",{"data-svelte-h":!0}),u(xo)!=="svelte-ypjn7h"&&(xo.textContent=md),li.forEach(t),Gl=i(e),Ot=l(e,"P",{"data-svelte-h":!0}),u(Ot)!=="svelte-1opqihr"&&(Ot.textContent=cd),Hl=i(e),en=l(e,"UL",{"data-svelte-h":!0}),u(en)!=="svelte-18dpv7h"&&(en.innerHTML=fd),Bl=i(e),L=l(e,"H4",{class:!0});var si=h(L);Te=l(si,"A",{id:!0,class:!0,href:!0});var Hh=h(Te);ca=l(Hh,"SPAN",{});var Bh=h(ca);m(tn.$$.fragment,Bh),Bh.forEach(t),Hh.forEach(t),Fi=i(si),Jo=l(si,"SPAN",{"data-svelte-h":!0}),u(Jo)!=="svelte-1rcm4pq"&&(Jo.textContent=bd),si.forEach(t),Pl=i(e),nn=l(e,"UL",{"data-svelte-h":!0}),u(nn)!=="svelte-un6hvz"&&(nn.innerHTML=vd),Ql=i(e),V=l(e,"H4",{class:!0});var ii=h(V);Ce=l(ii,"A",{id:!0,class:!0,href:!0});var Ph=h(Ce);fa=l(Ph,"SPAN",{});var Qh=h(fa);m(on.$$.fragment,Qh),Qh.forEach(t),Ph.forEach(t),Ri=i(ii),qo=l(ii,"SPAN",{"data-svelte-h":!0}),u(qo)!=="svelte-qkd7jc"&&(qo.textContent=gd),ii.forEach(t),Xl=i(e),an=l(e,"P",{"data-svelte-h":!0}),u(an)!=="svelte-raw4uk"&&(an.innerHTML=yd),Ll=i(e),m(ln.$$.fragment,e),Vl=i(e),m(ke.$$.fragment,e),Fl=i(e),F=l(e,"H3",{class:!0});var ri=h(F);xe=l(ri,"A",{id:!0,class:!0,href:!0});var Xh=h(xe);ba=l(Xh,"SPAN",{});var Lh=h(ba);m(sn.$$.fragment,Lh),Lh.forEach(t),Xh.forEach(t),Ii=i(ri),zo=l(ri,"SPAN",{"data-svelte-h":!0}),u(zo)!=="svelte-6rdz9o"&&(zo.textContent=_d),ri.forEach(t),Rl=i(e),rn=l(e,"P",{"data-svelte-h":!0}),u(rn)!=="svelte-z16dbi"&&(rn.innerHTML=wd),Il=i(e),m(dn.$$.fragment,e),Yl=i(e),hn=l(e,"P",{"data-svelte-h":!0}),u(hn)!=="svelte-1b4lgo7"&&(hn.innerHTML=$d),Sl=i(e),un=l(e,"P",{"data-svelte-h":!0}),u(un)!=="svelte-1mgfmur"&&(un.innerHTML=Md),Dl=i(e),m(pn.$$.fragment,e),Kl=i(e),mn=l(e,"P",{"data-svelte-h":!0}),u(mn)!=="svelte-1h0pju"&&(mn.textContent=Td),Ol=i(e),m(Je.$$.fragment,e),es=i(e),R=l(e,"H4",{class:!0});var di=h(R);qe=l(di,"A",{id:!0,class:!0,href:!0});var Vh=h(qe);va=l(Vh,"SPAN",{});var Fh=h(va);m(cn.$$.fragment,Fh),Fh.forEach(t),Vh.forEach(t),Yi=i(di),Wo=l(di,"SPAN",{"data-svelte-h":!0}),u(Wo)!=="svelte-yjwkmt"&&(Wo.textContent=Cd),di.forEach(t),ts=i(e),fn=l(e,"P",{"data-svelte-h":!0}),u(fn)!=="svelte-11st5ue"&&(fn.textContent=kd),ns=i(e),I=l(e,"H5",{class:!0});var hi=h(I);ze=l(hi,"A",{id:!0,class:!0,href:!0});var Rh=h(ze);ga=l(Rh,"SPAN",{});var Ih=h(ga);m(bn.$$.fragment,Ih),Ih.forEach(t),Rh.forEach(t),Si=i(hi),Zo=l(hi,"SPAN",{"data-svelte-h":!0}),u(Zo)!=="svelte-10ttfyf"&&(Zo.textContent=xd),hi.forEach(t),os=i(e),vn=l(e,"P",{"data-svelte-h":!0}),u(vn)!=="svelte-1qt7jnk"&&(vn.innerHTML=Jd),as=i(e),m(gn.$$.fragment,e),ls=i(e),Y=l(e,"H5",{class:!0});var ui=h(Y);We=l(ui,"A",{id:!0,class:!0,href:!0});var Yh=h(We);ya=l(Yh,"SPAN",{});var Sh=h(ya);m(yn.$$.fragment,Sh),Sh.forEach(t),Yh.forEach(t),Di=i(ui),Uo=l(ui,"SPAN",{"data-svelte-h":!0}),u(Uo)!=="svelte-1lkwlvb"&&(Uo.textContent=qd),ui.forEach(t),ss=i(e),_n=l(e,"P",{"data-svelte-h":!0}),u(_n)!=="svelte-ctju2y"&&(_n.textContent=zd),is=i(e),m(wn.$$.fragment,e),rs=i(e),S=l(e,"H5",{class:!0});var pi=h(S);Ze=l(pi,"A",{id:!0,class:!0,href:!0});var Dh=h(Ze);_a=l(Dh,"SPAN",{});var Kh=h(_a);m($n.$$.fragment,Kh),Kh.forEach(t),Dh.forEach(t),Ki=i(pi),jo=l(pi,"SPAN",{"data-svelte-h":!0}),u(jo)!=="svelte-mrih1r"&&(jo.textContent=Wd),pi.forEach(t),ds=i(e),Mn=l(e,"P",{"data-svelte-h":!0}),u(Mn)!=="svelte-8sil41"&&(Mn.textContent=Zd),hs=i(e),m(Tn.$$.fragment,e),us=i(e),D=l(e,"H3",{class:!0});var mi=h(D);Ue=l(mi,"A",{id:!0,class:!0,href:!0});var Oh=h(Ue);wa=l(Oh,"SPAN",{});var eu=h(wa);m(Cn.$$.fragment,eu),eu.forEach(t),Oh.forEach(t),Oi=i(mi),Ao=l(mi,"SPAN",{"data-svelte-h":!0}),u(Ao)!=="svelte-1unku24"&&(Ao.textContent=Ud),mi.forEach(t),ps=i(e),kn=l(e,"P",{"data-svelte-h":!0}),u(kn)!=="svelte-12ibgkx"&&(kn.innerHTML=jd),ms=i(e),m(xn.$$.fragment,e),cs=i(e),m(je.$$.fragment,e),fs=i(e),K=l(e,"H3",{class:!0});var ci=h(K);Ae=l(ci,"A",{id:!0,class:!0,href:!0});var tu=h(Ae);$a=l(tu,"SPAN",{});var nu=h($a);m(Jn.$$.fragment,nu),nu.forEach(t),tu.forEach(t),er=i(ci),No=l(ci,"SPAN",{"data-svelte-h":!0}),u(No)!=="svelte-126t2v3"&&(No.textContent=Ad),ci.forEach(t),bs=i(e),qn=l(e,"P",{"data-svelte-h":!0}),u(qn)!=="svelte-11o118p"&&(qn.innerHTML=Nd),vs=i(e),m(zn.$$.fragment,e),gs=i(e),Wn=l(e,"P",{"data-svelte-h":!0}),u(Wn)!=="svelte-1a6lfeb"&&(Wn.innerHTML=Ed),ys=i(e),O=l(e,"H3",{class:!0});var fi=h(O);Ne=l(fi,"A",{id:!0,class:!0,href:!0});var ou=h(Ne);Ma=l(ou,"SPAN",{});var au=h(Ma);m(Zn.$$.fragment,au),au.forEach(t),ou.forEach(t),tr=i(fi),Eo=l(fi,"SPAN",{"data-svelte-h":!0}),u(Eo)!=="svelte-yjwkmt"&&(Eo.textContent=Gd),fi.forEach(t),_s=i(e),Un=l(e,"P",{"data-svelte-h":!0}),u(Un)!=="svelte-bf8u41"&&(Un.textContent=Hd),ws=i(e),ee=l(e,"H4",{class:!0});var bi=h(ee);Ee=l(bi,"A",{id:!0,class:!0,href:!0});var lu=h(Ee);Ta=l(lu,"SPAN",{});var su=h(Ta);m(jn.$$.fragment,su),su.forEach(t),lu.forEach(t),nr=i(bi),Go=l(bi,"SPAN",{"data-svelte-h":!0}),u(Go)!=="svelte-18mfrxb"&&(Go.innerHTML=Bd),bi.forEach(t),$s=i(e),An=l(e,"P",{"data-svelte-h":!0}),u(An)!=="svelte-9xq6i6"&&(An.innerHTML=Pd),Ms=i(e),Nn=l(e,"P",{"data-svelte-h":!0}),u(Nn)!=="svelte-1uovqrn"&&(Nn.innerHTML=Qd),Ts=i(e),m(En.$$.fragment,e),Cs=i(e),Gn=l(e,"P",{"data-svelte-h":!0}),u(Gn)!=="svelte-fbn7z"&&(Gn.innerHTML=Xd),ks=i(e),m(Hn.$$.fragment,e),xs=i(e),Bn=l(e,"P",{"data-svelte-h":!0}),u(Bn)!=="svelte-1pv013b"&&(Bn.textContent=Ld),Js=i(e),m(Pn.$$.fragment,e),qs=i(e),Qn=l(e,"P",{"data-svelte-h":!0}),u(Qn)!=="svelte-nsev1w"&&(Qn.textContent=Vd),zs=i(e),te=l(e,"H4",{class:!0});var vi=h(te);Ge=l(vi,"A",{id:!0,class:!0,href:!0});var iu=h(Ge);Ca=l(iu,"SPAN",{});var ru=h(Ca);m(Xn.$$.fragment,ru),ru.forEach(t),iu.forEach(t),or=i(vi),Ho=l(vi,"SPAN",{"data-svelte-h":!0}),u(Ho)!=="svelte-1ij3psd"&&(Ho.innerHTML=Fd),vi.forEach(t),Ws=i(e),Ln=l(e,"P",{"data-svelte-h":!0}),u(Ln)!=="svelte-2188jb"&&(Ln.innerHTML=Rd),Zs=i(e),m(Vn.$$.fragment,e),Us=i(e),ne=l(e,"H4",{class:!0});var gi=h(ne);He=l(gi,"A",{id:!0,class:!0,href:!0});var du=h(He);ka=l(du,"SPAN",{});var hu=h(ka);m(Fn.$$.fragment,hu),hu.forEach(t),du.forEach(t),ar=i(gi),Bo=l(gi,"SPAN",{"data-svelte-h":!0}),u(Bo)!=="svelte-ak9605"&&(Bo.textContent=Id),gi.forEach(t),js=i(e),Rn=l(e,"P",{"data-svelte-h":!0}),u(Rn)!=="svelte-1k96tv8"&&(Rn.innerHTML=Yd),As=i(e),m(In.$$.fragment,e),Ns=i(e),oe=l(e,"H4",{class:!0});var yi=h(oe);Be=l(yi,"A",{id:!0,class:!0,href:!0});var uu=h(Be);xa=l(uu,"SPAN",{});var pu=h(xa);m(Yn.$$.fragment,pu),pu.forEach(t),uu.forEach(t),lr=i(yi),Po=l(yi,"SPAN",{"data-svelte-h":!0}),u(Po)!=="svelte-1b0ivcj"&&(Po.textContent=Sd),yi.forEach(t),Es=i(e),Sn=l(e,"P",{"data-svelte-h":!0}),u(Sn)!=="svelte-11ahrdq"&&(Sn.innerHTML=Dd),Gs=i(e),Dn=l(e,"P",{"data-svelte-h":!0}),u(Dn)!=="svelte-1acgju7"&&(Dn.innerHTML=Kd),Hs=i(e),ae=l(e,"H3",{class:!0});var _i=h(ae);Pe=l(_i,"A",{id:!0,class:!0,href:!0});var mu=h(Pe);Ja=l(mu,"SPAN",{});var cu=h(Ja);m(Kn.$$.fragment,cu),cu.forEach(t),mu.forEach(t),sr=i(_i),Qo=l(_i,"SPAN",{"data-svelte-h":!0}),u(Qo)!=="svelte-43l4qz"&&(Qo.textContent=Od),_i.forEach(t),Bs=i(e),$=l(e,"DIV",{class:!0});var T=h($);m(On.$$.fragment,T),ir=i(T),Xo=l(T,"P",{"data-svelte-h":!0}),u(Xo)!=="svelte-woamwr"&&(Xo.innerHTML=eh),rr=i(T),Lo=l(T,"P",{"data-svelte-h":!0}),u(Lo)!=="svelte-ki5gis"&&(Lo.innerHTML=th),dr=i(T),Vo=l(T,"P",{"data-svelte-h":!0}),u(Vo)!=="svelte-8qsk2q"&&(Vo.innerHTML=nh),hr=i(T),Qe=l(T,"DIV",{class:!0});var wi=h(Qe);m(eo.$$.fragment,wi),ur=i(wi),Fo=l(wi,"P",{"data-svelte-h":!0}),u(Fo)!=="svelte-10tvzyv"&&(Fo.innerHTML=oh),wi.forEach(t),pr=i(T),Xe=l(T,"DIV",{class:!0});var $i=h(Xe);m(to.$$.fragment,$i),mr=i($i),Ro=l($i,"P",{"data-svelte-h":!0}),u(Ro)!=="svelte-gy26u4"&&(Ro.textContent=ah),$i.forEach(t),cr=i(T),Le=l(T,"DIV",{class:!0});var Mi=h(Le);m(no.$$.fragment,Mi),fr=i(Mi),Io=l(Mi,"P",{"data-svelte-h":!0}),u(Io)!=="svelte-19bn0da"&&(Io.innerHTML=lh),Mi.forEach(t),br=i(T),Ve=l(T,"DIV",{class:!0});var Ti=h(Ve);m(oo.$$.fragment,Ti),vr=i(Ti),Yo=l(Ti,"P",{"data-svelte-h":!0}),u(Yo)!=="svelte-1p6bdas"&&(Yo.textContent=sh),Ti.forEach(t),T.forEach(t),Ps=i(e),le=l(e,"H2",{class:!0});var Ci=h(le);Fe=l(Ci,"A",{id:!0,class:!0,href:!0});var fu=h(Fe);qa=l(fu,"SPAN",{});var bu=h(qa);m(ao.$$.fragment,bu),bu.forEach(t),fu.forEach(t),gr=i(Ci),So=l(Ci,"SPAN",{"data-svelte-h":!0}),u(So)!=="svelte-1ly08ln"&&(So.innerHTML=ih),Ci.forEach(t),Qs=i(e),lo=l(e,"P",{"data-svelte-h":!0}),u(lo)!=="svelte-pdn3hl"&&(lo.innerHTML=rh),Xs=i(e),za=l(e,"P",{}),h(za).forEach(t),this.h()},h(){d(g,"name","hf:doc:metadata"),d(g,"content",JSON.stringify(qu)),d(se,"id","quantize-transformers-models"),d(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(se,"href","#quantize-transformers-models"),d(J,"class","relative group"),d(ie,"id","autogptq-integration"),d(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ie,"href","#autogptq-integration"),d(q,"class","relative group"),d(re,"id","requirements"),d(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(re,"href","#requirements"),d(z,"class","relative group"),d(de,"id","load-and-quantize-a-model"),d(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(de,"href","#load-and-quantize-a-model"),d(W,"class","relative group"),d(he,"id","gptq-configuration"),d(he,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(he,"href","#gptq-configuration"),d(Z,"class","relative group"),d(ue,"id","quantization"),d(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ue,"href","#quantization"),d(U,"class","relative group"),d(me,"id","push-quantized-model-to-hub"),d(me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(me,"href","#push-quantized-model-to-hub"),d(j,"class","relative group"),d(ce,"id","load-a-quantized-model-from-the-hub"),d(ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ce,"href","#load-a-quantized-model-from-the-hub"),d(A,"class","relative group"),d(fe,"id","exllama-kernels-for-faster-inference"),d(fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(fe,"href","#exllama-kernels-for-faster-inference"),d(N,"class","relative group"),d(be,"id","finetune-a-quantized-model"),d(be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(be,"href","#finetune-a-quantized-model"),d(E,"class","relative group"),d(ve,"id","example-demo"),d(ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ve,"href","#example-demo"),d(G,"class","relative group"),d(ge,"id","transformers.GPTQConfig"),d(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ge,"href","#transformers.GPTQConfig"),d(H,"class","relative group"),d(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_e,"id","bitsandbytes-integration"),d(_e,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(_e,"href","#bitsandbytes-integration"),d(B,"class","relative group"),d(we,"id","general-usage"),d(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(we,"href","#general-usage"),d(P,"class","relative group"),d($e,"id","fp4-quantization"),d($e,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d($e,"href","#fp4-quantization"),d(Q,"class","relative group"),d(Me,"id","requirements"),d(Me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Me,"href","#requirements"),d(X,"class","relative group"),d(Te,"id","tips-and-best-practices"),d(Te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Te,"href","#tips-and-best-practices"),d(L,"class","relative group"),d(Ce,"id","load-a-large-model-in-4bit"),d(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ce,"href","#load-a-large-model-in-4bit"),d(V,"class","relative group"),d(xe,"id","load-a-large-model-in-8bit"),d(xe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(xe,"href","#load-a-large-model-in-8bit"),d(F,"class","relative group"),d(qe,"id","advanced-use-cases"),d(qe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(qe,"href","#advanced-use-cases"),d(R,"class","relative group"),d(ze,"id","change-the-compute-dtype"),d(ze,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ze,"href","#change-the-compute-dtype"),d(I,"class","relative group"),d(We,"id","using-nf4-normal-float-4-data-type"),d(We,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(We,"href","#using-nf4-normal-float-4-data-type"),d(Y,"class","relative group"),d(Ze,"id","use-nested-quantization-for-more-memory-efficient-inference"),d(Ze,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ze,"href","#use-nested-quantization-for-more-memory-efficient-inference"),d(S,"class","relative group"),d(Ue,"id","push-quantized-models-on-the-hub"),d(Ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ue,"href","#push-quantized-models-on-the-hub"),d(D,"class","relative group"),d(Ae,"id","load-a-quantized-model-from-the-hub"),d(Ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ae,"href","#load-a-quantized-model-from-the-hub"),d(K,"class","relative group"),d(Ne,"id","advanced-use-cases"),d(Ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ne,"href","#advanced-use-cases"),d(O,"class","relative group"),d(Ee,"id","offload-between-cpu-and-gpu"),d(Ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ee,"href","#offload-between-cpu-and-gpu"),d(ee,"class","relative group"),d(Ge,"id","play-with-llmint8threshold"),d(Ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ge,"href","#play-with-llmint8threshold"),d(te,"class","relative group"),d(He,"id","skip-the-conversion-of-some-modules"),d(He,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(He,"href","#skip-the-conversion-of-some-modules"),d(ne,"class","relative group"),d(Be,"id","finetune-a-model-that-has-been-loaded-in-8bit"),d(Be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Be,"href","#finetune-a-model-that-has-been-loaded-in-8bit"),d(oe,"class","relative group"),d(Pe,"id","transformers.BitsAndBytesConfig"),d(Pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Pe,"href","#transformers.BitsAndBytesConfig"),d(ae,"class","relative group"),d(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Fe,"id","quantization-with-optimum"),d(Fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Fe,"href","#quantization-with-optimum"),d(le,"class","relative group")},m(e,n){r(document.head,g),o(e,M,n),o(e,_,n),o(e,x,n),o(e,J,n),r(J,se),r(se,Ko),c(Re,Ko,null),r(J,xi),r(J,ho),o(e,Ua,n),o(e,q,n),r(q,ie),r(ie,Oo),c(Ie,Oo,null),r(q,Ji),r(q,uo),o(e,ja,n),o(e,Ye,n),o(e,Aa,n),o(e,Se,n),o(e,Na,n),o(e,De,n),o(e,Ea,n),o(e,z,n),r(z,re),r(re,ea),c(Ke,ea,null),r(z,qi),r(z,po),o(e,Ga,n),o(e,Oe,n),o(e,Ha,n),o(e,et,n),o(e,Ba,n),o(e,tt,n),o(e,Pa,n),o(e,W,n),r(W,de),r(de,ta),c(nt,ta,null),r(W,zi),r(W,mo),o(e,Qa,n),o(e,ot,n),o(e,Xa,n),o(e,at,n),o(e,La,n),o(e,Z,n),r(Z,he),r(he,na),c(lt,na,null),r(Z,Wi),r(Z,co),o(e,Va,n),o(e,st,n),o(e,Fa,n),c(it,e,n),o(e,Ra,n),o(e,rt,n),o(e,Ia,n),c(dt,e,n),o(e,Ya,n),o(e,U,n),r(U,ue),r(ue,oa),c(ht,oa,null),r(U,Zi),r(U,fo),o(e,Sa,n),o(e,ut,n),o(e,Da,n),c(pt,e,n),o(e,Ka,n),o(e,mt,n),o(e,Oa,n),o(e,ct,n),o(e,el,n),c(ft,e,n),o(e,tl,n),o(e,bt,n),o(e,nl,n),c(pe,e,n),o(e,ol,n),o(e,j,n),r(j,me),r(me,aa),c(vt,aa,null),r(j,Ui),r(j,bo),o(e,al,n),o(e,gt,n),o(e,ll,n),c(yt,e,n),o(e,sl,n),o(e,_t,n),o(e,il,n),c(wt,e,n),o(e,rl,n),o(e,$t,n),o(e,dl,n),c(Mt,e,n),o(e,hl,n),o(e,A,n),r(A,ce),r(ce,la),c(Tt,la,null),r(A,ji),r(A,vo),o(e,ul,n),o(e,Ct,n),o(e,pl,n),c(kt,e,n),o(e,ml,n),o(e,xt,n),o(e,cl,n),c(Jt,e,n),o(e,fl,n),o(e,N,n),r(N,fe),r(fe,sa),c(qt,sa,null),r(N,Ai),r(N,go),o(e,bl,n),o(e,zt,n),o(e,vl,n),c(Wt,e,n),o(e,gl,n),o(e,Zt,n),o(e,yl,n),o(e,E,n),r(E,be),r(be,ia),c(Ut,ia,null),r(E,Ni),r(E,yo),o(e,_l,n),o(e,jt,n),o(e,wl,n),o(e,G,n),r(G,ve),r(ve,ra),c(At,ra,null),r(G,Ei),r(G,_o),o(e,$l,n),o(e,Nt,n),o(e,Ml,n),o(e,H,n),r(H,ge),r(ge,da),c(Et,da,null),r(H,Gi),r(H,wo),o(e,Tl,n),o(e,C,n),c(Gt,C,null),r(C,Hi),r(C,$o),r(C,Bi),r(C,ye),c(Ht,ye,null),r(ye,Pi),r(ye,Mo),o(e,Cl,n),o(e,B,n),r(B,_e),r(_e,ha),c(Bt,ha,null),r(B,Qi),r(B,To),o(e,kl,n),o(e,Pt,n),o(e,xl,n),o(e,Qt,n),o(e,Jl,n),o(e,Xt,n),o(e,ql,n),o(e,Lt,n),o(e,zl,n),o(e,Vt,n),o(e,Wl,n),o(e,P,n),r(P,we),r(we,ua),c(Ft,ua,null),r(P,Xi),r(P,Co),o(e,Zl,n),o(e,Rt,n),o(e,Ul,n),c(It,e,n),o(e,jl,n),o(e,Yt,n),o(e,Al,n),c(St,e,n),o(e,Nl,n),o(e,Q,n),r(Q,$e),r($e,pa),c(Dt,pa,null),r(Q,Li),r(Q,ko),o(e,El,n),o(e,X,n),r(X,Me),r(Me,ma),c(Kt,ma,null),r(X,Vi),r(X,xo),o(e,Gl,n),o(e,Ot,n),o(e,Hl,n),o(e,en,n),o(e,Bl,n),o(e,L,n),r(L,Te),r(Te,ca),c(tn,ca,null),r(L,Fi),r(L,Jo),o(e,Pl,n),o(e,nn,n),o(e,Ql,n),o(e,V,n),r(V,Ce),r(Ce,fa),c(on,fa,null),r(V,Ri),r(V,qo),o(e,Xl,n),o(e,an,n),o(e,Ll,n),c(ln,e,n),o(e,Vl,n),c(ke,e,n),o(e,Fl,n),o(e,F,n),r(F,xe),r(xe,ba),c(sn,ba,null),r(F,Ii),r(F,zo),o(e,Rl,n),o(e,rn,n),o(e,Il,n),c(dn,e,n),o(e,Yl,n),o(e,hn,n),o(e,Sl,n),o(e,un,n),o(e,Dl,n),c(pn,e,n),o(e,Kl,n),o(e,mn,n),o(e,Ol,n),c(Je,e,n),o(e,es,n),o(e,R,n),r(R,qe),r(qe,va),c(cn,va,null),r(R,Yi),r(R,Wo),o(e,ts,n),o(e,fn,n),o(e,ns,n),o(e,I,n),r(I,ze),r(ze,ga),c(bn,ga,null),r(I,Si),r(I,Zo),o(e,os,n),o(e,vn,n),o(e,as,n),c(gn,e,n),o(e,ls,n),o(e,Y,n),r(Y,We),r(We,ya),c(yn,ya,null),r(Y,Di),r(Y,Uo),o(e,ss,n),o(e,_n,n),o(e,is,n),c(wn,e,n),o(e,rs,n),o(e,S,n),r(S,Ze),r(Ze,_a),c($n,_a,null),r(S,Ki),r(S,jo),o(e,ds,n),o(e,Mn,n),o(e,hs,n),c(Tn,e,n),o(e,us,n),o(e,D,n),r(D,Ue),r(Ue,wa),c(Cn,wa,null),r(D,Oi),r(D,Ao),o(e,ps,n),o(e,kn,n),o(e,ms,n),c(xn,e,n),o(e,cs,n),c(je,e,n),o(e,fs,n),o(e,K,n),r(K,Ae),r(Ae,$a),c(Jn,$a,null),r(K,er),r(K,No),o(e,bs,n),o(e,qn,n),o(e,vs,n),c(zn,e,n),o(e,gs,n),o(e,Wn,n),o(e,ys,n),o(e,O,n),r(O,Ne),r(Ne,Ma),c(Zn,Ma,null),r(O,tr),r(O,Eo),o(e,_s,n),o(e,Un,n),o(e,ws,n),o(e,ee,n),r(ee,Ee),r(Ee,Ta),c(jn,Ta,null),r(ee,nr),r(ee,Go),o(e,$s,n),o(e,An,n),o(e,Ms,n),o(e,Nn,n),o(e,Ts,n),c(En,e,n),o(e,Cs,n),o(e,Gn,n),o(e,ks,n),c(Hn,e,n),o(e,xs,n),o(e,Bn,n),o(e,Js,n),c(Pn,e,n),o(e,qs,n),o(e,Qn,n),o(e,zs,n),o(e,te,n),r(te,Ge),r(Ge,Ca),c(Xn,Ca,null),r(te,or),r(te,Ho),o(e,Ws,n),o(e,Ln,n),o(e,Zs,n),c(Vn,e,n),o(e,Us,n),o(e,ne,n),r(ne,He),r(He,ka),c(Fn,ka,null),r(ne,ar),r(ne,Bo),o(e,js,n),o(e,Rn,n),o(e,As,n),c(In,e,n),o(e,Ns,n),o(e,oe,n),r(oe,Be),r(Be,xa),c(Yn,xa,null),r(oe,lr),r(oe,Po),o(e,Es,n),o(e,Sn,n),o(e,Gs,n),o(e,Dn,n),o(e,Hs,n),o(e,ae,n),r(ae,Pe),r(Pe,Ja),c(Kn,Ja,null),r(ae,sr),r(ae,Qo),o(e,Bs,n),o(e,$,n),c(On,$,null),r($,ir),r($,Xo),r($,rr),r($,Lo),r($,dr),r($,Vo),r($,hr),r($,Qe),c(eo,Qe,null),r(Qe,ur),r(Qe,Fo),r($,pr),r($,Xe),c(to,Xe,null),r(Xe,mr),r(Xe,Ro),r($,cr),r($,Le),c(no,Le,null),r(Le,fr),r(Le,Io),r($,br),r($,Ve),c(oo,Ve,null),r(Ve,vr),r(Ve,Yo),o(e,Ps,n),o(e,le,n),r(le,Fe),r(Fe,qa),c(ao,qa,null),r(le,gr),r(le,So),o(e,Qs,n),o(e,lo,n),o(e,Xs,n),o(e,za,n),Ls=!0},p(e,[n]){const so={};n&2&&(so.$$scope={dirty:n,ctx:e}),pe.$set(so);const Wa={};n&2&&(Wa.$$scope={dirty:n,ctx:e}),ke.$set(Wa);const Za={};n&2&&(Za.$$scope={dirty:n,ctx:e}),Je.$set(Za);const io={};n&2&&(io.$$scope={dirty:n,ctx:e}),je.$set(io)},i(e){Ls||(f(Re.$$.fragment,e),f(Ie.$$.fragment,e),f(Ke.$$.fragment,e),f(nt.$$.fragment,e),f(lt.$$.fragment,e),f(it.$$.fragment,e),f(dt.$$.fragment,e),f(ht.$$.fragment,e),f(pt.$$.fragment,e),f(ft.$$.fragment,e),f(pe.$$.fragment,e),f(vt.$$.fragment,e),f(yt.$$.fragment,e),f(wt.$$.fragment,e),f(Mt.$$.fragment,e),f(Tt.$$.fragment,e),f(kt.$$.fragment,e),f(Jt.$$.fragment,e),f(qt.$$.fragment,e),f(Wt.$$.fragment,e),f(Ut.$$.fragment,e),f(At.$$.fragment,e),f(Et.$$.fragment,e),f(Gt.$$.fragment,e),f(Ht.$$.fragment,e),f(Bt.$$.fragment,e),f(Ft.$$.fragment,e),f(It.$$.fragment,e),f(St.$$.fragment,e),f(Dt.$$.fragment,e),f(Kt.$$.fragment,e),f(tn.$$.fragment,e),f(on.$$.fragment,e),f(ln.$$.fragment,e),f(ke.$$.fragment,e),f(sn.$$.fragment,e),f(dn.$$.fragment,e),f(pn.$$.fragment,e),f(Je.$$.fragment,e),f(cn.$$.fragment,e),f(bn.$$.fragment,e),f(gn.$$.fragment,e),f(yn.$$.fragment,e),f(wn.$$.fragment,e),f($n.$$.fragment,e),f(Tn.$$.fragment,e),f(Cn.$$.fragment,e),f(xn.$$.fragment,e),f(je.$$.fragment,e),f(Jn.$$.fragment,e),f(zn.$$.fragment,e),f(Zn.$$.fragment,e),f(jn.$$.fragment,e),f(En.$$.fragment,e),f(Hn.$$.fragment,e),f(Pn.$$.fragment,e),f(Xn.$$.fragment,e),f(Vn.$$.fragment,e),f(Fn.$$.fragment,e),f(In.$$.fragment,e),f(Yn.$$.fragment,e),f(Kn.$$.fragment,e),f(On.$$.fragment,e),f(eo.$$.fragment,e),f(to.$$.fragment,e),f(no.$$.fragment,e),f(oo.$$.fragment,e),f(ao.$$.fragment,e),Ls=!0)},o(e){b(Re.$$.fragment,e),b(Ie.$$.fragment,e),b(Ke.$$.fragment,e),b(nt.$$.fragment,e),b(lt.$$.fragment,e),b(it.$$.fragment,e),b(dt.$$.fragment,e),b(ht.$$.fragment,e),b(pt.$$.fragment,e),b(ft.$$.fragment,e),b(pe.$$.fragment,e),b(vt.$$.fragment,e),b(yt.$$.fragment,e),b(wt.$$.fragment,e),b(Mt.$$.fragment,e),b(Tt.$$.fragment,e),b(kt.$$.fragment,e),b(Jt.$$.fragment,e),b(qt.$$.fragment,e),b(Wt.$$.fragment,e),b(Ut.$$.fragment,e),b(At.$$.fragment,e),b(Et.$$.fragment,e),b(Gt.$$.fragment,e),b(Ht.$$.fragment,e),b(Bt.$$.fragment,e),b(Ft.$$.fragment,e),b(It.$$.fragment,e),b(St.$$.fragment,e),b(Dt.$$.fragment,e),b(Kt.$$.fragment,e),b(tn.$$.fragment,e),b(on.$$.fragment,e),b(ln.$$.fragment,e),b(ke.$$.fragment,e),b(sn.$$.fragment,e),b(dn.$$.fragment,e),b(pn.$$.fragment,e),b(Je.$$.fragment,e),b(cn.$$.fragment,e),b(bn.$$.fragment,e),b(gn.$$.fragment,e),b(yn.$$.fragment,e),b(wn.$$.fragment,e),b($n.$$.fragment,e),b(Tn.$$.fragment,e),b(Cn.$$.fragment,e),b(xn.$$.fragment,e),b(je.$$.fragment,e),b(Jn.$$.fragment,e),b(zn.$$.fragment,e),b(Zn.$$.fragment,e),b(jn.$$.fragment,e),b(En.$$.fragment,e),b(Hn.$$.fragment,e),b(Pn.$$.fragment,e),b(Xn.$$.fragment,e),b(Vn.$$.fragment,e),b(Fn.$$.fragment,e),b(In.$$.fragment,e),b(Yn.$$.fragment,e),b(Kn.$$.fragment,e),b(On.$$.fragment,e),b(eo.$$.fragment,e),b(to.$$.fragment,e),b(no.$$.fragment,e),b(oo.$$.fragment,e),b(ao.$$.fragment,e),Ls=!1},d(e){e&&(t(M),t(_),t(x),t(J),t(Ua),t(q),t(ja),t(Ye),t(Aa),t(Se),t(Na),t(De),t(Ea),t(z),t(Ga),t(Oe),t(Ha),t(et),t(Ba),t(tt),t(Pa),t(W),t(Qa),t(ot),t(Xa),t(at),t(La),t(Z),t(Va),t(st),t(Fa),t(Ra),t(rt),t(Ia),t(Ya),t(U),t(Sa),t(ut),t(Da),t(Ka),t(mt),t(Oa),t(ct),t(el),t(tl),t(bt),t(nl),t(ol),t(j),t(al),t(gt),t(ll),t(sl),t(_t),t(il),t(rl),t($t),t(dl),t(hl),t(A),t(ul),t(Ct),t(pl),t(ml),t(xt),t(cl),t(fl),t(N),t(bl),t(zt),t(vl),t(gl),t(Zt),t(yl),t(E),t(_l),t(jt),t(wl),t(G),t($l),t(Nt),t(Ml),t(H),t(Tl),t(C),t(Cl),t(B),t(kl),t(Pt),t(xl),t(Qt),t(Jl),t(Xt),t(ql),t(Lt),t(zl),t(Vt),t(Wl),t(P),t(Zl),t(Rt),t(Ul),t(jl),t(Yt),t(Al),t(Nl),t(Q),t(El),t(X),t(Gl),t(Ot),t(Hl),t(en),t(Bl),t(L),t(Pl),t(nn),t(Ql),t(V),t(Xl),t(an),t(Ll),t(Vl),t(Fl),t(F),t(Rl),t(rn),t(Il),t(Yl),t(hn),t(Sl),t(un),t(Dl),t(Kl),t(mn),t(Ol),t(es),t(R),t(ts),t(fn),t(ns),t(I),t(os),t(vn),t(as),t(ls),t(Y),t(ss),t(_n),t(is),t(rs),t(S),t(ds),t(Mn),t(hs),t(us),t(D),t(ps),t(kn),t(ms),t(cs),t(fs),t(K),t(bs),t(qn),t(vs),t(gs),t(Wn),t(ys),t(O),t(_s),t(Un),t(ws),t(ee),t($s),t(An),t(Ms),t(Nn),t(Ts),t(Cs),t(Gn),t(ks),t(xs),t(Bn),t(Js),t(qs),t(Qn),t(zs),t(te),t(Ws),t(Ln),t(Zs),t(Us),t(ne),t(js),t(Rn),t(As),t(Ns),t(oe),t(Es),t(Sn),t(Gs),t(Dn),t(Hs),t(ae),t(Bs),t($),t(Ps),t(le),t(Qs),t(lo),t(Xs),t(za)),t(g),v(Re),v(Ie),v(Ke),v(nt),v(lt),v(it,e),v(dt,e),v(ht),v(pt,e),v(ft,e),v(pe,e),v(vt),v(yt,e),v(wt,e),v(Mt,e),v(Tt),v(kt,e),v(Jt,e),v(qt),v(Wt,e),v(Ut),v(At),v(Et),v(Gt),v(Ht),v(Bt),v(Ft),v(It,e),v(St,e),v(Dt),v(Kt),v(tn),v(on),v(ln,e),v(ke,e),v(sn),v(dn,e),v(pn,e),v(Je,e),v(cn),v(bn),v(gn,e),v(yn),v(wn,e),v($n),v(Tn,e),v(Cn),v(xn,e),v(je,e),v(Jn),v(zn,e),v(Zn),v(jn),v(En,e),v(Hn,e),v(Pn,e),v(Xn),v(Vn,e),v(Fn),v(In,e),v(Yn),v(Kn),v(On),v(eo),v(to),v(no),v(oo),v(ao)}}}const qu={local:"quantize-transformers-models",sections:[{local:"autogptq-integration",sections:[{local:"requirements",title:"Requirements"},{local:"load-and-quantize-a-model",sections:[{local:"gptq-configuration",title:"GPTQ Configuration"},{local:"quantization",title:"Quantization"}],title:"Load and quantize a model"},{local:"push-quantized-model-to-hub",title:"Push quantized model to 🤗 Hub"},{local:"load-a-quantized-model-from-the-hub",title:"Load a quantized model from the 🤗 Hub"},{local:"exllama-kernels-for-faster-inference",sections:[{local:"finetune-a-quantized-model",title:"Fine-tune a quantized model "}],title:"Exllama kernels for faster inference"},{local:"example-demo",title:"Example demo"},{local:"transformers.GPTQConfig",title:"GPTQConfig"}],title:"`AutoGPTQ` Integration"},{local:"bitsandbytes-integration",sections:[{local:"general-usage",title:"General usage"},{local:"fp4-quantization",sections:[{local:"requirements",title:"Requirements"},{local:"tips-and-best-practices",title:"Tips and best practices"},{local:"load-a-large-model-in-4bit",title:"Load a large model in 4bit"}],title:"FP4 quantization "},{local:"load-a-large-model-in-8bit",sections:[{local:"advanced-use-cases",sections:[{local:"change-the-compute-dtype",title:"Change the compute dtype"},{local:"using-nf4-normal-float-4-data-type",title:"Using NF4 (Normal Float 4) data type "},{local:"use-nested-quantization-for-more-memory-efficient-inference",title:"Use nested quantization for more memory efficient inference"}],title:"Advanced use cases"}],title:"Load a large model in 8bit"},{local:"push-quantized-models-on-the-hub",title:"Push quantized models on the 🤗 Hub"},{local:"load-a-quantized-model-from-the-hub",title:"Load a quantized model from the 🤗 Hub"},{local:"advanced-use-cases",sections:[{local:"offload-between-cpu-and-gpu",title:"Offload between `cpu` and `gpu`"},{local:"play-with-llmint8threshold",title:"Play with `llm_int8_threshold`"},{local:"skip-the-conversion-of-some-modules",title:"Skip the conversion of some modules"},{local:"finetune-a-model-that-has-been-loaded-in-8bit",title:"Fine-tune a model that has been loaded in 8-bit"}],title:"Advanced use cases"},{local:"transformers.BitsAndBytesConfig",title:"BitsAndBytesConfig"}],title:"`bitsandbytes` Integration"},{local:"quantization-with-optimum",title:"Quantization with 🤗 `optimum` "}],title:"Quantize 🤗 Transformers models"};function zu(k){return gu(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Eu extends yu{constructor(g){super(),_u(this,g,zu,Ju,vu,{})}}export{Eu as component};
