import{s as Ba,o as Ia,n as Na}from"../chunks/scheduler.25b97de1.js";import{S as Fa,i as Va,g as r,s as n,r as d,A as ja,h as a,f as s,c as o,j as h,u as l,x as f,k as _,y as t,a as g,v as m,d as c,t as u,w as p}from"../chunks/index.d9030fc9.js";import{T as Ga}from"../chunks/Tip.baa67368.js";import{D as b}from"../chunks/Docstring.ffac8efa.js";import{C as Wa}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Oa}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as P,E as Sa}from"../chunks/EditOnGithub.91d95064.js";function Ua(zt){let y,B='Learn how to quantize models in the <a href="../quantization">Quantization</a> guide.';return{c(){y=r("p"),y.innerHTML=B},l(z){y=a(z,"P",{"data-svelte-h":!0}),f(y)!=="svelte-1pv1tva"&&(y.innerHTML=B)},m(z,k){g(z,y,k)},p:Na,d(z){z&&s(y)}}}function Ra(zt){let y,B="Example:",z,k,A;return k=new Wa({props:{code:"cXVhbnRpemF0aW9uX2NvbmZpZyUyMCUzRCUyMFRvcmNoQW9Db25maWcoJTIyaW50NF93ZWlnaHRfb25seSUyMiUyQyUyMGdyb3VwX3NpemUlM0QzMiklMEElMjMlMjBpbnQ0X3dlaWdodF9vbmx5JTIwcXVhbnQlMjBpcyUyMG9ubHklMjB3b3JraW5nJTIwd2l0aCUyMCp0b3JjaC5iZmxvYXQxNiolMjBkdHlwZSUyMHJpZ2h0JTIwbm93JTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBkZXZpY2VfbWFwJTNEJTIyY3VkYSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMjBxdWFudGl6YXRpb25fY29uZmlnJTNEcXVhbnRpemF0aW9uX2NvbmZpZyk=",highlighted:`quantization_config = TorchAoConfig(<span class="hljs-string">&quot;int4_weight_only&quot;</span>, group_size=<span class="hljs-number">32</span>)
<span class="hljs-comment"># int4_weight_only quant is only working with *torch.bfloat16* dtype right now</span>
model = AutoModelForCausalLM.from_pretrained(model_id, device_map=<span class="hljs-string">&quot;cuda&quot;</span>, torch_dtype=torch.bfloat16, quantization_config=quantization_config)`,wrap:!1}}),{c(){y=r("p"),y.textContent=B,z=n(),d(k.$$.fragment)},l(x){y=a(x,"P",{"data-svelte-h":!0}),f(y)!=="svelte-11lpom8"&&(y.textContent=B),z=o(x),l(k.$$.fragment,x)},m(x,Q){g(x,y,Q),g(x,z,Q),m(k,x,Q),A=!0},p:Na,i(x){A||(c(k.$$.fragment,x),A=!0)},o(x){u(k.$$.fragment,x),A=!1},d(x){x&&(s(y),s(z)),p(k,x)}}}function Ya(zt){let y,B,z,k,A,x,Q,Or="Quantization techniques reduce memory and computational costs by representing weights and activations with lower-precision data types like 8-bit integers (int8). This enables loading larger models you normally wouldn’t be able to fit into memory, and speeding up inference. Transformers supports the AWQ and GPTQ quantization algorithms and it supports 8-bit and 4-bit quantization with bitsandbytes.",$n,xe,Sr="Quantization techniques that aren’t supported in Transformers can be added with the <code>HfQuantizer</code> class.",yn,G,qn,ze,xn,H,we,zo,wt,Ur=`This is a wrapper class about all possible attributes and features that you can play with a model that has been
loaded using <code>quanto</code>.`,wo,W,Ce,Co,Ct,Rr="Safety checker that arguments are correct",zn,Te,wn,D,ke,To,Tt,Yr="This is a wrapper class about <code>aqlm</code> parameters.",ko,O,Le,Lo,kt,Zr="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",Cn,Me,Tn,E,Ae,Mo,Lt,Xr=`This is a wrapper class about all possible attributes and features that you can play with a model that has been
loaded using <code>auto-awq</code> library awq quantization relying on auto_awq backend.`,Ao,S,Pe,Po,Mt,Jr="Safety checker that arguments are correct",kn,Qe,Ln,N,He,Qo,At,Kr=`This is a wrapper class about all possible attributes and features that you can play with a model that has been
loaded using <code>eetq</code>.`,Ho,U,De,Do,Pt,ea="Safety checker that arguments are correct",Mn,Ee,An,C,Ne,Eo,Qt,ta=`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.`,No,R,Be,Bo,Ht,na="Get compatible class with optimum gptq config dict",Io,Y,Ie,Fo,Dt,oa="Safety checker that arguments are correct",Vo,Z,Fe,jo,Et,ra="Get compatible dict for optimum gptq config",Pn,Ve,Qn,q,je,Go,Nt,aa=`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>.`,Wo,Bt,sa="This replaces <code>load_in_8bit</code> or <code>load_in_4bit</code>therefore both options are mutually exclusive.",Oo,It,ia=`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.`,So,X,Ge,Uo,Ft,da="Returns <code>True</code> if the model is quantizable, <code>False</code> otherwise.",Ro,J,We,Yo,Vt,la="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",Zo,K,Oe,Xo,jt,ma=`This method returns the quantization method used for the model. If the model is not quantizable, it returns
<code>None</code>.`,Jo,ee,Se,Ko,Gt,ca=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,Hn,Ue,Dn,v,Re,er,Wt,ua=`Abstract class of the HuggingFace quantizer. Supports for now quantizing HF transformers models for inference and/or quantization.
This class is used only for transformers.PreTrainedModel.from_pretrained and cannot be easily used outside the scope of that method
yet.`,tr,Ot,pa=`Attributes
quantization_config (<code>transformers.utils.quantization_config.QuantizationConfigMixin</code>):
The quantization config that defines the quantization parameters of your model that you want to quantize.
modules_to_not_convert (<code>List[str]</code>, <em>optional</em>):
The list of module names to not convert when quantizing the model.
required_packages (<code>List[str]</code>, <em>optional</em>):
The list of required pip packages to install prior to using the quantizer
requires_calibration (<code>bool</code>):
Whether the quantization method requires to calibrate the model before using it.
requires_parameters_quantization (<code>bool</code>):
Whether the quantization method requires to create a new Parameter. For example, for bitsandbytes, it is
required to create a new xxxParameter in order to properly quantize the model.`,nr,te,Ye,or,St,fa="adjust max_memory argument for infer_auto_device_map() if extra memory is needed for quantization",rr,ne,Ze,ar,Ut,ga=`Override this method if you want to adjust the <code>target_dtype</code> variable used in <code>from_pretrained</code>
to compute the device_map in case the device_map is a <code>str</code>. E.g. for bitsandbytes we force-set <code>target_dtype</code>
to <code>torch.int8</code> and for 4-bit we pass a custom enum <code>accelerate.CustomDtype.int4</code>.`,sr,oe,Xe,ir,Rt,ha=`checks if a loaded state_dict component is part of quantized param + some validation; only defined if
requires_parameters_quantization == True for quantization methods that require to create a new parameters
for quantization.`,dr,re,Je,lr,Yt,_a=`takes needed components from state_dict and creates quantized param; only applicable if
requires_parameters_quantization == True`,mr,ae,Ke,cr,Zt,ba=`Potentially dequantize the model to retrive the original model, with some loss in accuracy / performance.
Note not all quantization schemes support this.`,ur,se,et,pr,Xt,va=`returns dtypes for modules that are not quantized - used for the computation of the device_map in case
one passes a str as a device_map. The method will use the <code>modules_to_not_convert</code> that is modified
in <code>_process_model_before_weight_loading</code>.`,fr,ie,tt,gr,Jt,$a=`Post-process the model post weights loading.
Make sure to override the abstract method <code>_process_model_after_weight_loading</code>.`,hr,de,nt,_r,Kt,ya=`Setting model attributes and/or converting model before weights loading. At this point
the model should be initialized on the meta device so you can freely manipulate the skeleton
of the model in order to replace modules in-place. Make sure to override the abstract method <code>_process_model_before_weight_loading</code>.`,br,le,ot,vr,en,qa=`Override this method if you want to pass a override the existing device map with a new
one. E.g. for bitsandbytes, since <code>accelerate</code> is a hard requirement, if no device_map is
passed, the device_map is set to \`“auto”“`,$r,me,rt,yr,tn,xa="Override this method if you want to adjust the <code>update_expected_keys</code>.",qr,ce,at,xr,nn,za="Override this method if you want to adjust the <code>missing_keys</code>.",zr,ue,st,wr,on,wa=`Some quantization methods require to explicitly set the dtype of the model to a
target dtype. You need to override this method in case you want to make sure that behavior is
preserved`,Cr,pe,it,Tr,rn,Ca=`This method is used to potentially check for potential conflicts with arguments that are
passed in <code>from_pretrained</code>. You need to define it for all future quantizers that are integrated with transformers.
If no explicit check are needed, simply return nothing.`,En,dt,Nn,T,lt,kr,an,Ta="This is wrapper around hqq’s BaseQuantizeConfig.",Lr,fe,mt,Mr,sn,ka="Override from_dict, used in AutoQuantizationConfig.from_dict in quantizers/auto.py",Ar,ge,ct,Pr,dn,La="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",Qr,he,ut,Hr,ln,Ma=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,Bn,pt,In,V,ft,Dr,mn,Aa=`This is a wrapper class about all possible attributes and features that you can play with a model that has been
loaded using fbgemm fp8 quantization.`,Fn,gt,Vn,L,ht,Er,cn,Pa=`This is a wrapper class that handles compressed-tensors quantization config options.
It is a wrapper around <code>compressed_tensors.QuantizationConfig</code>`,Nr,_e,_t,Br,un,Qa=`Instantiates a <a href="/docs/transformers/main/en/main_classes/quantization#transformers.CompressedTensorsConfig">CompressedTensorsConfig</a> from a Python dictionary of parameters.
Optionally unwraps any args from the nested quantization_config`,Ir,be,bt,Fr,pn,Ha=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,jn,vt,Gn,M,$t,Vr,fn,Da="This is a config class for torchao quantization/sparsity techniques.",jr,ve,Gr,$e,yt,Wr,gn,Ea="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",Wn,qt,On,vn,Sn;return A=new P({props:{title:"Quantization",local:"quantization",headingTag:"h1"}}),G=new Ga({props:{$$slots:{default:[Ua]},$$scope:{ctx:zt}}}),ze=new P({props:{title:"QuantoConfig",local:"transformers.QuantoConfig",headingTag:"h2"}}),we=new b({props:{name:"class transformers.QuantoConfig",anchor:"transformers.QuantoConfig",parameters:[{name:"weights",val:" = 'int8'"},{name:"activations",val:" = None"},{name:"modules_to_not_convert",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.QuantoConfig.weights",description:`<strong>weights</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;int8&quot;</code>) &#x2014;
The target dtype for the weights after quantization. Supported values are (&#x201C;float8&#x201D;,&#x201C;int8&#x201D;,&#x201C;int4&#x201D;,&#x201C;int2&#x201D;)`,name:"weights"},{anchor:"transformers.QuantoConfig.activations",description:`<strong>activations</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The target dtype for the activations after quantization. Supported values are (None,&#x201C;int8&#x201D;,&#x201C;float8&#x201D;)`,name:"activations"},{anchor:"transformers.QuantoConfig.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>list</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have
some modules left in their original precision (e.g. Whisper encoder, Llava encoder, Mixtral gate layers).`,name:"modules_to_not_convert"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L996"}}),Ce=new b({props:{name:"post_init",anchor:"transformers.QuantoConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1025"}}),Te=new P({props:{title:"AqlmConfig",local:"transformers.AqlmConfig",headingTag:"h2"}}),ke=new b({props:{name:"class transformers.AqlmConfig",anchor:"transformers.AqlmConfig",parameters:[{name:"in_group_size",val:": int = 8"},{name:"out_group_size",val:": int = 1"},{name:"num_codebooks",val:": int = 1"},{name:"nbits_per_codebook",val:": int = 16"},{name:"linear_weights_not_to_quantize",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AqlmConfig.in_group_size",description:`<strong>in_group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The group size along the input dimension.`,name:"in_group_size"},{anchor:"transformers.AqlmConfig.out_group_size",description:`<strong>out_group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The group size along the output dimension. It&#x2019;s recommended to always use 1.`,name:"out_group_size"},{anchor:"transformers.AqlmConfig.num_codebooks",description:`<strong>num_codebooks</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of codebooks for the Additive Quantization procedure.`,name:"num_codebooks"},{anchor:"transformers.AqlmConfig.nbits_per_codebook",description:`<strong>nbits_per_codebook</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of bits encoding a single codebook vector. Codebooks size is 2**nbits_per_codebook.`,name:"nbits_per_codebook"},{anchor:"transformers.AqlmConfig.linear_weights_not_to_quantize",description:`<strong>linear_weights_not_to_quantize</strong> (<code>Optional[List[str]]</code>, <em>optional</em>) &#x2014;
List of full paths of <code>nn.Linear</code> weight parameters that shall not be quantized.`,name:"linear_weights_not_to_quantize"},{anchor:"transformers.AqlmConfig.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/main/src/transformers/utils/quantization_config.py#L936"}}),Le=new b({props:{name:"post_init",anchor:"transformers.AqlmConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L974"}}),Me=new P({props:{title:"AwqConfig",local:"transformers.AwqConfig",headingTag:"h2"}}),Ae=new b({props:{name:"class transformers.AwqConfig",anchor:"transformers.AwqConfig",parameters:[{name:"bits",val:": int = 4"},{name:"group_size",val:": int = 128"},{name:"zero_point",val:": bool = True"},{name:"version",val:": AWQLinearVersion = <AWQLinearVersion.GEMM: 'gemm'>"},{name:"backend",val:": AwqBackendPackingMethod = <AwqBackendPackingMethod.AUTOAWQ: 'autoawq'>"},{name:"do_fuse",val:": Optional = None"},{name:"fuse_max_seq_len",val:": Optional = None"},{name:"modules_to_fuse",val:": Optional = None"},{name:"modules_to_not_convert",val:": Optional = None"},{name:"exllama_config",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AwqConfig.bits",description:`<strong>bits</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of bits to quantize to.`,name:"bits"},{anchor:"transformers.AwqConfig.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.AwqConfig.zero_point",description:`<strong>zero_point</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use zero point quantization.`,name:"zero_point"},{anchor:"transformers.AwqConfig.version",description:`<strong>version</strong> (<code>AWQLinearVersion</code>, <em>optional</em>, defaults to <code>AWQLinearVersion.GEMM</code>) &#x2014;
The version of the quantization algorithm to use. GEMM is better for big batch_size (e.g. &gt;= 8) otherwise,
GEMV is better (e.g. &lt; 8 ). GEMM models are compatible with Exllama kernels.`,name:"version"},{anchor:"transformers.AwqConfig.backend",description:`<strong>backend</strong> (<code>AwqBackendPackingMethod</code>, <em>optional</em>, defaults to <code>AwqBackendPackingMethod.AUTOAWQ</code>) &#x2014;
The quantization backend. Some models might be quantized using <code>llm-awq</code> backend. This is useful for users
that quantize their own models using <code>llm-awq</code> library.`,name:"backend"},{anchor:"transformers.AwqConfig.do_fuse",description:`<strong>do_fuse</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to fuse attention and mlp layers together for faster inference`,name:"do_fuse"},{anchor:"transformers.AwqConfig.fuse_max_seq_len",description:`<strong>fuse_max_seq_len</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The Maximum sequence length to generate when using fusing.`,name:"fuse_max_seq_len"},{anchor:"transformers.AwqConfig.modules_to_fuse",description:`<strong>modules_to_fuse</strong> (<code>dict</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
Overwrite the natively supported fusing scheme with the one specified by the users.`,name:"modules_to_fuse"},{anchor:"transformers.AwqConfig.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>list</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have
some modules left in their original precision (e.g. Whisper encoder, Llava encoder, Mixtral gate layers).
Note you cannot quantize directly with transformers, please refer to <code>AutoAWQ</code> documentation for quantizing HF models.`,name:"modules_to_not_convert"},{anchor:"transformers.AwqConfig.exllama_config",description:`<strong>exllama_config</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
You can specify the version of the exllama kernel through the <code>version</code> key, the maximum sequence
length through the <code>max_input_len</code> key, and the maximum batch size through the <code>max_batch_size</code> key.
Defaults to <code>{&quot;version&quot;: 2, &quot;max_input_len&quot;: 2048, &quot;max_batch_size&quot;: 8}</code> if unset.`,name:"exllama_config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L763"}}),Pe=new b({props:{name:"post_init",anchor:"transformers.AwqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L832"}}),Qe=new P({props:{title:"EetqConfig",local:"transformers.EetqConfig",headingTag:"h2"}}),He=new b({props:{name:"class transformers.EetqConfig",anchor:"transformers.EetqConfig",parameters:[{name:"weights",val:": str = 'int8'"},{name:"modules_to_not_convert",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.EetqConfig.weights",description:`<strong>weights</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;int8&quot;</code>) &#x2014;
The target dtype for the weights. Supported value is only &#x201C;int8&#x201D;`,name:"weights"},{anchor:"transformers.EetqConfig.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>list</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have
some modules left in their original precision.`,name:"modules_to_not_convert"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1037"}}),De=new b({props:{name:"post_init",anchor:"transformers.EetqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1062"}}),Ee=new P({props:{title:"GPTQConfig",local:"transformers.GPTQConfig",headingTag:"h2"}}),Ne=new b({props:{name:"class transformers.GPTQConfig",anchor:"transformers.GPTQConfig",parameters:[{name:"bits",val:": int"},{name:"tokenizer",val:": Any = None"},{name:"dataset",val:": Union = 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:": Optional = None"},{name:"block_name_to_quantize",val:": Optional = None"},{name:"module_name_preceding_first_block",val:": Optional = None"},{name:"batch_size",val:": int = 1"},{name:"pad_token_id",val:": Optional = None"},{name:"use_exllama",val:": Optional = None"},{name:"max_input_length",val:": Optional = None"},{name:"exllama_config",val:": Optional = None"},{name:"cache_block_outputs",val:": bool = True"},{name:"modules_in_block_to_quantize",val:": Optional = None"},{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.</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/main/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;]`,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. If None, we will infer the block name using common patterns (e.g. model.layers)`,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.use_exllama",description:`<strong>use_exllama</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to use exllama backend. Defaults to <code>True</code> if unset. Only works with <code>bits</code> = 4.`,name:"use_exllama"},{anchor:"transformers.GPTQConfig.max_input_length",description:`<strong>max_input_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum input length. This is needed to initialize a buffer that depends on the maximum expected input
length. It is specific to the exllama backend with act-order.`,name:"max_input_length"},{anchor:"transformers.GPTQConfig.exllama_config",description:`<strong>exllama_config</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The exllama config. You can specify the version of the exllama kernel through the <code>version</code> key. Defaults
to <code>{&quot;version&quot;: 1}</code> if unset.`,name:"exllama_config"},{anchor:"transformers.GPTQConfig.cache_block_outputs",description:`<strong>cache_block_outputs</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to cache block outputs to reuse as inputs for the succeeding block.`,name:"cache_block_outputs"},{anchor:"transformers.GPTQConfig.modules_in_block_to_quantize",description:`<strong>modules_in_block_to_quantize</strong> (<code>List[List[str]]</code>, <em>optional</em>) &#x2014;
List of list of module names to quantize in the specified block. This argument is useful to exclude certain linear modules from being quantized.
The block to quantize can be specified by setting <code>block_name_to_quantize</code>. We will quantize each list sequentially. If not set, we will quantize all linear layers.
Example: <code>modules_in_block_to_quantize =[[&quot;self_attn.k_proj&quot;, &quot;self_attn.v_proj&quot;, &quot;self_attn.q_proj&quot;], [&quot;self_attn.o_proj&quot;]]</code>.
In this example, we will first quantize the q,k,v layers simultaneously since they are independent.
Then, we will quantize <code>self_attn.o_proj</code> layer with the q,k,v layers quantized. This way, we will get
better results since it reflects the real input <code>self_attn.o_proj</code> will get when the model is quantized.`,name:"modules_in_block_to_quantize"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L546"}}),Be=new b({props:{name:"from_dict_optimum",anchor:"transformers.GPTQConfig.from_dict_optimum",parameters:[{name:"config_dict",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L748"}}),Ie=new b({props:{name:"post_init",anchor:"transformers.GPTQConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L660"}}),Fe=new b({props:{name:"to_dict_optimum",anchor:"transformers.GPTQConfig.to_dict_optimum",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L739"}}),Ve=new P({props:{title:"BitsAndBytesConfig",local:"transformers.BitsAndBytesConfig",headingTag:"h2"}}),je=new b({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:"bnb_4bit_quant_storage",val:" = None"},{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.0) &#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 type. 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>,  <em>optional</em>, defaults to <code>&quot;fp4&quot;</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.bnb_4bit_quant_storage",description:`<strong>bnb_4bit_quant_storage</strong> (<code>torch.dtype</code> or str, <em>optional</em>, defaults to <code>torch.uint8</code>) &#x2014;
This sets the storage type to pack the quanitzed 4-bit prarams.`,name:"bnb_4bit_quant_storage"},{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/main/src/transformers/utils/quantization_config.py#L310"}}),Ge=new b({props:{name:"is_quantizable",anchor:"transformers.BitsAndBytesConfig.is_quantizable",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L481"}}),We=new b({props:{name:"post_init",anchor:"transformers.BitsAndBytesConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L444"}}),Oe=new b({props:{name:"quantization_method",anchor:"transformers.BitsAndBytesConfig.quantization_method",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L487"}}),Se=new b({props:{name:"to_diff_dict",anchor:"transformers.BitsAndBytesConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L518",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),Ue=new P({props:{title:"HfQuantizer",local:"transformers.quantizers.HfQuantizer",headingTag:"h2"}}),Re=new b({props:{name:"class transformers.quantizers.HfQuantizer",anchor:"transformers.quantizers.HfQuantizer",parameters:[{name:"quantization_config",val:": QuantizationConfigMixin"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L28"}}),Ye=new b({props:{name:"adjust_max_memory",anchor:"transformers.quantizers.HfQuantizer.adjust_max_memory",parameters:[{name:"max_memory",val:": Dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L143"}}),Ze=new b({props:{name:"adjust_target_dtype",anchor:"transformers.quantizers.HfQuantizer.adjust_target_dtype",parameters:[{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.adjust_target_dtype.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>, <em>optional</em>) &#x2014;
The torch_dtype that is used to compute the device_map.`,name:"torch_dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L90"}}),Xe=new b({props:{name:"check_quantized_param",anchor:"transformers.quantizers.HfQuantizer.check_quantized_param",parameters:[{name:"model",val:": PreTrainedModel"},{name:"param_value",val:": torch.Tensor"},{name:"param_name",val:": str"},{name:"state_dict",val:": Dict"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L147"}}),Je=new b({props:{name:"create_quantized_param",anchor:"transformers.quantizers.HfQuantizer.create_quantized_param",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L162"}}),Ke=new b({props:{name:"dequantize",anchor:"transformers.quantizers.HfQuantizer.dequantize",parameters:[{name:"model",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L209"}}),et=new b({props:{name:"get_special_dtypes_update",anchor:"transformers.quantizers.HfQuantizer.get_special_dtypes_update",parameters:[{name:"model",val:""},{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.get_special_dtypes_update.model",description:`<strong>model</strong> (<code>~transformers.PreTrainedModel</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"transformers.quantizers.HfQuantizer.get_special_dtypes_update.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The dtype passed in <code>from_pretrained</code> method.`,name:"torch_dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L124"}}),tt=new b({props:{name:"postprocess_model",anchor:"transformers.quantizers.HfQuantizer.postprocess_model",parameters:[{name:"model",val:": PreTrainedModel"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.postprocess_model.model",description:`<strong>model</strong> (<code>~transformers.PreTrainedModel</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"transformers.quantizers.HfQuantizer.postprocess_model.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The keyword arguments that are passed along <code>_process_model_after_weight_loading</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L196"}}),nt=new b({props:{name:"preprocess_model",anchor:"transformers.quantizers.HfQuantizer.preprocess_model",parameters:[{name:"model",val:": PreTrainedModel"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.preprocess_model.model",description:`<strong>model</strong> (<code>~transformers.PreTrainedModel</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"transformers.quantizers.HfQuantizer.preprocess_model.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The keyword arguments that are passed along <code>_process_model_before_weight_loading</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L180"}}),ot=new b({props:{name:"update_device_map",anchor:"transformers.quantizers.HfQuantizer.update_device_map",parameters:[{name:"device_map",val:": Optional"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.update_device_map.device_map",description:`<strong>device_map</strong> (<code>Union[dict, str]</code>, <em>optional</em>) &#x2014;
The device_map that is passed through the <code>from_pretrained</code> method.`,name:"device_map"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L78"}}),rt=new b({props:{name:"update_expected_keys",anchor:"transformers.quantizers.HfQuantizer.update_expected_keys",parameters:[{name:"model",val:""},{name:"expected_keys",val:": List"},{name:"loaded_keys",val:": List"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.update_expected_keys.expected_keys",description:`<strong>expected_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of the expected keys in the initialized model.`,name:"expected_keys"},{anchor:"transformers.quantizers.HfQuantizer.update_expected_keys.loaded_keys",description:`<strong>loaded_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of the loaded keys in the checkpoint.`,name:"loaded_keys"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L112"}}),at=new b({props:{name:"update_missing_keys",anchor:"transformers.quantizers.HfQuantizer.update_missing_keys",parameters:[{name:"model",val:""},{name:"missing_keys",val:": List"},{name:"prefix",val:": str"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.update_missing_keys.missing_keys",description:`<strong>missing_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of missing keys in the checkpoint compared to the state dict of the model`,name:"missing_keys"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L102"}}),st=new b({props:{name:"update_torch_dtype",anchor:"transformers.quantizers.HfQuantizer.update_torch_dtype",parameters:[{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.update_torch_dtype.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The input dtype that is passed in <code>from_pretrained</code>`,name:"torch_dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L66"}}),it=new b({props:{name:"validate_environment",anchor:"transformers.quantizers.HfQuantizer.validate_environment",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L172"}}),dt=new P({props:{title:"HqqConfig",local:"transformers.HqqConfig",headingTag:"h2"}}),lt=new b({props:{name:"class transformers.HqqConfig",anchor:"transformers.HqqConfig",parameters:[{name:"nbits",val:": int = 4"},{name:"group_size",val:": int = 64"},{name:"view_as_float",val:": bool = False"},{name:"axis",val:": Optional = None"},{name:"dynamic_config",val:": Optional = None"},{name:"skip_modules",val:": List = ['lm_head']"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.HqqConfig.nbits",description:`<strong>nbits</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of bits. Supported values are (8, 4, 3, 2, 1).`,name:"nbits"},{anchor:"transformers.HqqConfig.group_size",description:`<strong>group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Group-size value. Supported values are any value that is divisble by weight.shape[axis]).`,name:"group_size"},{anchor:"transformers.HqqConfig.view_as_float",description:`<strong>view_as_float</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
View the quantized weight as float (used in distributed training) if set to <code>True</code>.`,name:"view_as_float"},{anchor:"transformers.HqqConfig.axis",description:`<strong>axis</strong> (<code>Optional[int]</code>, <em>optional</em>) &#x2014;
Axis along which grouping is performed. Supported values are 0 or 1.`,name:"axis"},{anchor:"transformers.HqqConfig.dynamic_config",description:`<strong>dynamic_config</strong> (dict, <em>optional</em>) &#x2014;
Parameters for dynamic configuration. The key is the name tag of the layer and the value is a quantization config.
If set, each layer specified by its id will use its dedicated quantization configuration.`,name:"dynamic_config"},{anchor:"transformers.HqqConfig.skip_modules",description:`<strong>skip_modules</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&apos;lm_head&apos;]</code>) &#x2014;
List of <code>nn.Linear</code> layers to skip.`,name:"skip_modules"},{anchor:"transformers.HqqConfig.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/main/src/transformers/utils/quantization_config.py#L189"}}),mt=new b({props:{name:"from_dict",anchor:"transformers.HqqConfig.from_dict",parameters:[{name:"config",val:": Dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L263"}}),ct=new b({props:{name:"post_init",anchor:"transformers.HqqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L257"}}),ut=new b({props:{name:"to_diff_dict",anchor:"transformers.HqqConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L288",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),pt=new P({props:{title:"FbgemmFp8Config",local:"transformers.FbgemmFp8Config",headingTag:"h2"}}),ft=new b({props:{name:"class transformers.FbgemmFp8Config",anchor:"transformers.FbgemmFp8Config",parameters:[{name:"activation_scale_ub",val:": float = 1200.0"},{name:"modules_to_not_convert",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FbgemmFp8Config.activation_scale_ub",description:`<strong>activation_scale_ub</strong> (<code>float</code>, <em>optional</em>, defaults to 1200.0) &#x2014;
The activation scale upper bound. This is used when quantizing the input activation.`,name:"activation_scale_ub"},{anchor:"transformers.FbgemmFp8Config.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>list</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have
some modules left in their original precision.`,name:"modules_to_not_convert"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1195"}}),gt=new P({props:{title:"CompressedTensorsConfig",local:"transformers.CompressedTensorsConfig",headingTag:"h2"}}),ht=new b({props:{name:"class transformers.CompressedTensorsConfig",anchor:"transformers.CompressedTensorsConfig",parameters:[{name:"config_groups",val:": Dict = None"},{name:"format",val:": str = 'dense'"},{name:"quantization_status",val:": QuantizationStatus = 'initialized'"},{name:"kv_cache_scheme",val:": Optional = None"},{name:"global_compression_ratio",val:": Optional = None"},{name:"ignore",val:": Optional = None"},{name:"sparsity_config",val:": Dict = None"},{name:"quant_method",val:": str = 'compressed-tensors'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CompressedTensorsConfig.config_groups",description:`<strong>config_groups</strong> (<code>typing.Dict[str, typing.Union[ForwardRef(&apos;QuantizationScheme&apos;), typing.List[str]]]</code>, <em>optional</em>) &#x2014;
dictionary mapping group name to a quantization scheme definition`,name:"config_groups"},{anchor:"transformers.CompressedTensorsConfig.format",description:`<strong>format</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;dense&quot;</code>) &#x2014;
format the model is represented as`,name:"format"},{anchor:"transformers.CompressedTensorsConfig.quantization_status",description:`<strong>quantization_status</strong> (<code>QuantizationStatus</code>, <em>optional</em>, defaults to <code>&quot;initialized&quot;</code>) &#x2014;
status of model in the quantization lifecycle, ie &#x2018;initialized&#x2019;, &#x2018;calibration&#x2019;, &#x2018;frozen&#x2019;`,name:"quantization_status"},{anchor:"transformers.CompressedTensorsConfig.kv_cache_scheme",description:`<strong>kv_cache_scheme</strong> (<code>typing.Union[QuantizationArgs, NoneType]</code>, <em>optional</em>) &#x2014;
specifies quantization of the kv cache. If None, kv cache is not quantized.`,name:"kv_cache_scheme"},{anchor:"transformers.CompressedTensorsConfig.global_compression_ratio",description:`<strong>global_compression_ratio</strong> (<code>typing.Union[float, NoneType]</code>, <em>optional</em>) &#x2014;
0-1 float percentage of model compression`,name:"global_compression_ratio"},{anchor:"transformers.CompressedTensorsConfig.ignore",description:`<strong>ignore</strong> (<code>typing.Union[typing.List[str], NoneType]</code>, <em>optional</em>) &#x2014;
layer names or types to not quantize, supports regex prefixed by &#x2018;re:&#x2019;`,name:"ignore"},{anchor:"transformers.CompressedTensorsConfig.sparsity_config",description:`<strong>sparsity_config</strong> (<code>typing.Dict[str, typing.Any]</code>, <em>optional</em>) &#x2014;
configuration for sparsity compression`,name:"sparsity_config"},{anchor:"transformers.CompressedTensorsConfig.quant_method",description:`<strong>quant_method</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;compressed-tensors&quot;</code>) &#x2014;
do not override, should be compressed-tensors`,name:"quant_method"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1071"}}),_t=new b({props:{name:"from_dict",anchor:"transformers.CompressedTensorsConfig.from_dict",parameters:[{name:"config_dict",val:""},{name:"return_unused_kwargs",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CompressedTensorsConfig.from_dict.config_dict",description:`<strong>config_dict</strong> (<code>Dict[str, Any]</code>) &#x2014;
Dictionary that will be used to instantiate the configuration object.`,name:"config_dict"},{anchor:"transformers.CompressedTensorsConfig.from_dict.return_unused_kwargs",description:`<strong>return_unused_kwargs</strong> (<code>bool</code>,<em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return a list of unused keyword arguments. Used for <code>from_pretrained</code> method in
<code>PreTrainedModel</code>.`,name:"return_unused_kwargs"},{anchor:"transformers.CompressedTensorsConfig.from_dict.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>) &#x2014;
Additional parameters from which to initialize the configuration object.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1134",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The configuration object instantiated from those parameters.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>QuantizationConfigMixin</code></p>
`}}),bt=new b({props:{name:"to_diff_dict",anchor:"transformers.CompressedTensorsConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1173",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),vt=new P({props:{title:"TorchAoConfig",local:"transformers.TorchAoConfig",headingTag:"h2"}}),$t=new b({props:{name:"class transformers.TorchAoConfig",anchor:"transformers.TorchAoConfig",parameters:[{name:"quant_type",val:": str"},{name:"modules_to_not_convert",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TorchAoConfig.quant_type",description:`<strong>quant_type</strong> (<code>str</code>) &#x2014;
The type of quantization we want to use, currently supporting: <code>int4_weight_only</code>, <code>int8_weight_only</code> and <code>int8_dynamic_activation_int8_weight</code>.`,name:"quant_type"},{anchor:"transformers.TorchAoConfig.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>list</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have
some modules left in their original precision.`,name:"modules_to_not_convert"},{anchor:"transformers.TorchAoConfig.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The keyword arguments for the chosen type of quantization, for example, int4_weight_only quantization supports two keyword arguments
<code>group_size</code> and <code>inner_k_tiles</code> currently. More API examples and documentation of arguments can be found in
<a href="https://github.com/pytorch/ao/tree/main/torchao/quantization#other-available-quantization-techniques" rel="nofollow">https://github.com/pytorch/ao/tree/main/torchao/quantization#other-available-quantization-techniques</a>`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1226"}}),ve=new Oa({props:{anchor:"transformers.TorchAoConfig.example",$$slots:{default:[Ra]},$$scope:{ctx:zt}}}),yt=new b({props:{name:"post_init",anchor:"transformers.TorchAoConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1262"}}),qt=new Sa({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/main_classes/quantization.md"}}),{c(){y=r("meta"),B=n(),z=r("p"),k=n(),d(A.$$.fragment),x=n(),Q=r("p"),Q.textContent=Or,$n=n(),xe=r("p"),xe.innerHTML=Sr,yn=n(),d(G.$$.fragment),qn=n(),d(ze.$$.fragment),xn=n(),H=r("div"),d(we.$$.fragment),zo=n(),wt=r("p"),wt.innerHTML=Ur,wo=n(),W=r("div"),d(Ce.$$.fragment),Co=n(),Ct=r("p"),Ct.textContent=Rr,zn=n(),d(Te.$$.fragment),wn=n(),D=r("div"),d(ke.$$.fragment),To=n(),Tt=r("p"),Tt.innerHTML=Yr,ko=n(),O=r("div"),d(Le.$$.fragment),Lo=n(),kt=r("p"),kt.textContent=Zr,Cn=n(),d(Me.$$.fragment),Tn=n(),E=r("div"),d(Ae.$$.fragment),Mo=n(),Lt=r("p"),Lt.innerHTML=Xr,Ao=n(),S=r("div"),d(Pe.$$.fragment),Po=n(),Mt=r("p"),Mt.textContent=Jr,kn=n(),d(Qe.$$.fragment),Ln=n(),N=r("div"),d(He.$$.fragment),Qo=n(),At=r("p"),At.innerHTML=Kr,Ho=n(),U=r("div"),d(De.$$.fragment),Do=n(),Pt=r("p"),Pt.textContent=ea,Mn=n(),d(Ee.$$.fragment),An=n(),C=r("div"),d(Ne.$$.fragment),Eo=n(),Qt=r("p"),Qt.innerHTML=ta,No=n(),R=r("div"),d(Be.$$.fragment),Bo=n(),Ht=r("p"),Ht.textContent=na,Io=n(),Y=r("div"),d(Ie.$$.fragment),Fo=n(),Dt=r("p"),Dt.textContent=oa,Vo=n(),Z=r("div"),d(Fe.$$.fragment),jo=n(),Et=r("p"),Et.textContent=ra,Pn=n(),d(Ve.$$.fragment),Qn=n(),q=r("div"),d(je.$$.fragment),Go=n(),Nt=r("p"),Nt.innerHTML=aa,Wo=n(),Bt=r("p"),Bt.innerHTML=sa,Oo=n(),It=r("p"),It.innerHTML=ia,So=n(),X=r("div"),d(Ge.$$.fragment),Uo=n(),Ft=r("p"),Ft.innerHTML=da,Ro=n(),J=r("div"),d(We.$$.fragment),Yo=n(),Vt=r("p"),Vt.textContent=la,Zo=n(),K=r("div"),d(Oe.$$.fragment),Xo=n(),jt=r("p"),jt.innerHTML=ma,Jo=n(),ee=r("div"),d(Se.$$.fragment),Ko=n(),Gt=r("p"),Gt.textContent=ca,Hn=n(),d(Ue.$$.fragment),Dn=n(),v=r("div"),d(Re.$$.fragment),er=n(),Wt=r("p"),Wt.textContent=ua,tr=n(),Ot=r("p"),Ot.innerHTML=pa,nr=n(),te=r("div"),d(Ye.$$.fragment),or=n(),St=r("p"),St.textContent=fa,rr=n(),ne=r("div"),d(Ze.$$.fragment),ar=n(),Ut=r("p"),Ut.innerHTML=ga,sr=n(),oe=r("div"),d(Xe.$$.fragment),ir=n(),Rt=r("p"),Rt.textContent=ha,dr=n(),re=r("div"),d(Je.$$.fragment),lr=n(),Yt=r("p"),Yt.textContent=_a,mr=n(),ae=r("div"),d(Ke.$$.fragment),cr=n(),Zt=r("p"),Zt.textContent=ba,ur=n(),se=r("div"),d(et.$$.fragment),pr=n(),Xt=r("p"),Xt.innerHTML=va,fr=n(),ie=r("div"),d(tt.$$.fragment),gr=n(),Jt=r("p"),Jt.innerHTML=$a,hr=n(),de=r("div"),d(nt.$$.fragment),_r=n(),Kt=r("p"),Kt.innerHTML=ya,br=n(),le=r("div"),d(ot.$$.fragment),vr=n(),en=r("p"),en.innerHTML=qa,$r=n(),me=r("div"),d(rt.$$.fragment),yr=n(),tn=r("p"),tn.innerHTML=xa,qr=n(),ce=r("div"),d(at.$$.fragment),xr=n(),nn=r("p"),nn.innerHTML=za,zr=n(),ue=r("div"),d(st.$$.fragment),wr=n(),on=r("p"),on.textContent=wa,Cr=n(),pe=r("div"),d(it.$$.fragment),Tr=n(),rn=r("p"),rn.innerHTML=Ca,En=n(),d(dt.$$.fragment),Nn=n(),T=r("div"),d(lt.$$.fragment),kr=n(),an=r("p"),an.textContent=Ta,Lr=n(),fe=r("div"),d(mt.$$.fragment),Mr=n(),sn=r("p"),sn.textContent=ka,Ar=n(),ge=r("div"),d(ct.$$.fragment),Pr=n(),dn=r("p"),dn.textContent=La,Qr=n(),he=r("div"),d(ut.$$.fragment),Hr=n(),ln=r("p"),ln.textContent=Ma,Bn=n(),d(pt.$$.fragment),In=n(),V=r("div"),d(ft.$$.fragment),Dr=n(),mn=r("p"),mn.textContent=Aa,Fn=n(),d(gt.$$.fragment),Vn=n(),L=r("div"),d(ht.$$.fragment),Er=n(),cn=r("p"),cn.innerHTML=Pa,Nr=n(),_e=r("div"),d(_t.$$.fragment),Br=n(),un=r("p"),un.innerHTML=Qa,Ir=n(),be=r("div"),d(bt.$$.fragment),Fr=n(),pn=r("p"),pn.textContent=Ha,jn=n(),d(vt.$$.fragment),Gn=n(),M=r("div"),d($t.$$.fragment),Vr=n(),fn=r("p"),fn.textContent=Da,jr=n(),d(ve.$$.fragment),Gr=n(),$e=r("div"),d(yt.$$.fragment),Wr=n(),gn=r("p"),gn.textContent=Ea,Wn=n(),d(qt.$$.fragment),On=n(),vn=r("p"),this.h()},l(e){const i=ja("svelte-u9bgzb",document.head);y=a(i,"META",{name:!0,content:!0}),i.forEach(s),B=o(e),z=a(e,"P",{}),h(z).forEach(s),k=o(e),l(A.$$.fragment,e),x=o(e),Q=a(e,"P",{"data-svelte-h":!0}),f(Q)!=="svelte-1hsjm7z"&&(Q.textContent=Or),$n=o(e),xe=a(e,"P",{"data-svelte-h":!0}),f(xe)!=="svelte-bnel0f"&&(xe.innerHTML=Sr),yn=o(e),l(G.$$.fragment,e),qn=o(e),l(ze.$$.fragment,e),xn=o(e),H=a(e,"DIV",{class:!0});var j=h(H);l(we.$$.fragment,j),zo=o(j),wt=a(j,"P",{"data-svelte-h":!0}),f(wt)!=="svelte-b8v0f"&&(wt.innerHTML=Ur),wo=o(j),W=a(j,"DIV",{class:!0});var xt=h(W);l(Ce.$$.fragment,xt),Co=o(xt),Ct=a(xt,"P",{"data-svelte-h":!0}),f(Ct)!=="svelte-1ozftb6"&&(Ct.textContent=Rr),xt.forEach(s),j.forEach(s),zn=o(e),l(Te.$$.fragment,e),wn=o(e),D=a(e,"DIV",{class:!0});var hn=h(D);l(ke.$$.fragment,hn),To=o(hn),Tt=a(hn,"P",{"data-svelte-h":!0}),f(Tt)!=="svelte-1s7ccdx"&&(Tt.innerHTML=Yr),ko=o(hn),O=a(hn,"DIV",{class:!0});var Un=h(O);l(Le.$$.fragment,Un),Lo=o(Un),kt=a(Un,"P",{"data-svelte-h":!0}),f(kt)!=="svelte-gy26u4"&&(kt.textContent=Zr),Un.forEach(s),hn.forEach(s),Cn=o(e),l(Me.$$.fragment,e),Tn=o(e),E=a(e,"DIV",{class:!0});var _n=h(E);l(Ae.$$.fragment,_n),Mo=o(_n),Lt=a(_n,"P",{"data-svelte-h":!0}),f(Lt)!=="svelte-1i667it"&&(Lt.innerHTML=Xr),Ao=o(_n),S=a(_n,"DIV",{class:!0});var Rn=h(S);l(Pe.$$.fragment,Rn),Po=o(Rn),Mt=a(Rn,"P",{"data-svelte-h":!0}),f(Mt)!=="svelte-1ozftb6"&&(Mt.textContent=Jr),Rn.forEach(s),_n.forEach(s),kn=o(e),l(Qe.$$.fragment,e),Ln=o(e),N=a(e,"DIV",{class:!0});var bn=h(N);l(He.$$.fragment,bn),Qo=o(bn),At=a(bn,"P",{"data-svelte-h":!0}),f(At)!=="svelte-438k9a"&&(At.innerHTML=Kr),Ho=o(bn),U=a(bn,"DIV",{class:!0});var Yn=h(U);l(De.$$.fragment,Yn),Do=o(Yn),Pt=a(Yn,"P",{"data-svelte-h":!0}),f(Pt)!=="svelte-1ozftb6"&&(Pt.textContent=ea),Yn.forEach(s),bn.forEach(s),Mn=o(e),l(Ee.$$.fragment,e),An=o(e),C=a(e,"DIV",{class:!0});var I=h(C);l(Ne.$$.fragment,I),Eo=o(I),Qt=a(I,"P",{"data-svelte-h":!0}),f(Qt)!=="svelte-i3efvr"&&(Qt.innerHTML=ta),No=o(I),R=a(I,"DIV",{class:!0});var Zn=h(R);l(Be.$$.fragment,Zn),Bo=o(Zn),Ht=a(Zn,"P",{"data-svelte-h":!0}),f(Ht)!=="svelte-4jdj2l"&&(Ht.textContent=na),Zn.forEach(s),Io=o(I),Y=a(I,"DIV",{class:!0});var Xn=h(Y);l(Ie.$$.fragment,Xn),Fo=o(Xn),Dt=a(Xn,"P",{"data-svelte-h":!0}),f(Dt)!=="svelte-1ozftb6"&&(Dt.textContent=oa),Xn.forEach(s),Vo=o(I),Z=a(I,"DIV",{class:!0});var Jn=h(Z);l(Fe.$$.fragment,Jn),jo=o(Jn),Et=a(Jn,"P",{"data-svelte-h":!0}),f(Et)!=="svelte-pjgtd6"&&(Et.textContent=ra),Jn.forEach(s),I.forEach(s),Pn=o(e),l(Ve.$$.fragment,e),Qn=o(e),q=a(e,"DIV",{class:!0});var w=h(q);l(je.$$.fragment,w),Go=o(w),Nt=a(w,"P",{"data-svelte-h":!0}),f(Nt)!=="svelte-woamwr"&&(Nt.innerHTML=aa),Wo=o(w),Bt=a(w,"P",{"data-svelte-h":!0}),f(Bt)!=="svelte-ki5gis"&&(Bt.innerHTML=sa),Oo=o(w),It=a(w,"P",{"data-svelte-h":!0}),f(It)!=="svelte-8qsk2q"&&(It.innerHTML=ia),So=o(w),X=a(w,"DIV",{class:!0});var Kn=h(X);l(Ge.$$.fragment,Kn),Uo=o(Kn),Ft=a(Kn,"P",{"data-svelte-h":!0}),f(Ft)!=="svelte-10tvzyv"&&(Ft.innerHTML=da),Kn.forEach(s),Ro=o(w),J=a(w,"DIV",{class:!0});var eo=h(J);l(We.$$.fragment,eo),Yo=o(eo),Vt=a(eo,"P",{"data-svelte-h":!0}),f(Vt)!=="svelte-gy26u4"&&(Vt.textContent=la),eo.forEach(s),Zo=o(w),K=a(w,"DIV",{class:!0});var to=h(K);l(Oe.$$.fragment,to),Xo=o(to),jt=a(to,"P",{"data-svelte-h":!0}),f(jt)!=="svelte-19bn0da"&&(jt.innerHTML=ma),to.forEach(s),Jo=o(w),ee=a(w,"DIV",{class:!0});var no=h(ee);l(Se.$$.fragment,no),Ko=o(no),Gt=a(no,"P",{"data-svelte-h":!0}),f(Gt)!=="svelte-1p6bdas"&&(Gt.textContent=ca),no.forEach(s),w.forEach(s),Hn=o(e),l(Ue.$$.fragment,e),Dn=o(e),v=a(e,"DIV",{class:!0});var $=h(v);l(Re.$$.fragment,$),er=o($),Wt=a($,"P",{"data-svelte-h":!0}),f(Wt)!=="svelte-1xvcahi"&&(Wt.textContent=ua),tr=o($),Ot=a($,"P",{"data-svelte-h":!0}),f(Ot)!=="svelte-twdedh"&&(Ot.innerHTML=pa),nr=o($),te=a($,"DIV",{class:!0});var oo=h(te);l(Ye.$$.fragment,oo),or=o(oo),St=a(oo,"P",{"data-svelte-h":!0}),f(St)!=="svelte-1d4i4z7"&&(St.textContent=fa),oo.forEach(s),rr=o($),ne=a($,"DIV",{class:!0});var ro=h(ne);l(Ze.$$.fragment,ro),ar=o(ro),Ut=a(ro,"P",{"data-svelte-h":!0}),f(Ut)!=="svelte-4t526i"&&(Ut.innerHTML=ga),ro.forEach(s),sr=o($),oe=a($,"DIV",{class:!0});var ao=h(oe);l(Xe.$$.fragment,ao),ir=o(ao),Rt=a(ao,"P",{"data-svelte-h":!0}),f(Rt)!=="svelte-1meey31"&&(Rt.textContent=ha),ao.forEach(s),dr=o($),re=a($,"DIV",{class:!0});var so=h(re);l(Je.$$.fragment,so),lr=o(so),Yt=a(so,"P",{"data-svelte-h":!0}),f(Yt)!=="svelte-1j1vsi1"&&(Yt.textContent=_a),so.forEach(s),mr=o($),ae=a($,"DIV",{class:!0});var io=h(ae);l(Ke.$$.fragment,io),cr=o(io),Zt=a(io,"P",{"data-svelte-h":!0}),f(Zt)!=="svelte-1qo65te"&&(Zt.textContent=ba),io.forEach(s),ur=o($),se=a($,"DIV",{class:!0});var lo=h(se);l(et.$$.fragment,lo),pr=o(lo),Xt=a(lo,"P",{"data-svelte-h":!0}),f(Xt)!=="svelte-i8h8td"&&(Xt.innerHTML=va),lo.forEach(s),fr=o($),ie=a($,"DIV",{class:!0});var mo=h(ie);l(tt.$$.fragment,mo),gr=o(mo),Jt=a(mo,"P",{"data-svelte-h":!0}),f(Jt)!=="svelte-1uznum5"&&(Jt.innerHTML=$a),mo.forEach(s),hr=o($),de=a($,"DIV",{class:!0});var co=h(de);l(nt.$$.fragment,co),_r=o(co),Kt=a(co,"P",{"data-svelte-h":!0}),f(Kt)!=="svelte-mjhdcv"&&(Kt.innerHTML=ya),co.forEach(s),br=o($),le=a($,"DIV",{class:!0});var uo=h(le);l(ot.$$.fragment,uo),vr=o(uo),en=a(uo,"P",{"data-svelte-h":!0}),f(en)!=="svelte-1e5epn5"&&(en.innerHTML=qa),uo.forEach(s),$r=o($),me=a($,"DIV",{class:!0});var po=h(me);l(rt.$$.fragment,po),yr=o(po),tn=a(po,"P",{"data-svelte-h":!0}),f(tn)!=="svelte-1idnt2e"&&(tn.innerHTML=xa),po.forEach(s),qr=o($),ce=a($,"DIV",{class:!0});var fo=h(ce);l(at.$$.fragment,fo),xr=o(fo),nn=a(fo,"P",{"data-svelte-h":!0}),f(nn)!=="svelte-13hqoy0"&&(nn.innerHTML=za),fo.forEach(s),zr=o($),ue=a($,"DIV",{class:!0});var go=h(ue);l(st.$$.fragment,go),wr=o(go),on=a(go,"P",{"data-svelte-h":!0}),f(on)!=="svelte-1kpdm09"&&(on.textContent=wa),go.forEach(s),Cr=o($),pe=a($,"DIV",{class:!0});var ho=h(pe);l(it.$$.fragment,ho),Tr=o(ho),rn=a(ho,"P",{"data-svelte-h":!0}),f(rn)!=="svelte-1lxocan"&&(rn.innerHTML=Ca),ho.forEach(s),$.forEach(s),En=o(e),l(dt.$$.fragment,e),Nn=o(e),T=a(e,"DIV",{class:!0});var F=h(T);l(lt.$$.fragment,F),kr=o(F),an=a(F,"P",{"data-svelte-h":!0}),f(an)!=="svelte-h0fjpw"&&(an.textContent=Ta),Lr=o(F),fe=a(F,"DIV",{class:!0});var _o=h(fe);l(mt.$$.fragment,_o),Mr=o(_o),sn=a(_o,"P",{"data-svelte-h":!0}),f(sn)!=="svelte-6lcv9o"&&(sn.textContent=ka),_o.forEach(s),Ar=o(F),ge=a(F,"DIV",{class:!0});var bo=h(ge);l(ct.$$.fragment,bo),Pr=o(bo),dn=a(bo,"P",{"data-svelte-h":!0}),f(dn)!=="svelte-gy26u4"&&(dn.textContent=La),bo.forEach(s),Qr=o(F),he=a(F,"DIV",{class:!0});var vo=h(he);l(ut.$$.fragment,vo),Hr=o(vo),ln=a(vo,"P",{"data-svelte-h":!0}),f(ln)!=="svelte-1p6bdas"&&(ln.textContent=Ma),vo.forEach(s),F.forEach(s),Bn=o(e),l(pt.$$.fragment,e),In=o(e),V=a(e,"DIV",{class:!0});var $o=h(V);l(ft.$$.fragment,$o),Dr=o($o),mn=a($o,"P",{"data-svelte-h":!0}),f(mn)!=="svelte-1a51md3"&&(mn.textContent=Aa),$o.forEach(s),Fn=o(e),l(gt.$$.fragment,e),Vn=o(e),L=a(e,"DIV",{class:!0});var ye=h(L);l(ht.$$.fragment,ye),Er=o(ye),cn=a(ye,"P",{"data-svelte-h":!0}),f(cn)!=="svelte-3h2fkj"&&(cn.innerHTML=Pa),Nr=o(ye),_e=a(ye,"DIV",{class:!0});var yo=h(_e);l(_t.$$.fragment,yo),Br=o(yo),un=a(yo,"P",{"data-svelte-h":!0}),f(un)!=="svelte-1sqc0ks"&&(un.innerHTML=Qa),yo.forEach(s),Ir=o(ye),be=a(ye,"DIV",{class:!0});var qo=h(be);l(bt.$$.fragment,qo),Fr=o(qo),pn=a(qo,"P",{"data-svelte-h":!0}),f(pn)!=="svelte-1p6bdas"&&(pn.textContent=Ha),qo.forEach(s),ye.forEach(s),jn=o(e),l(vt.$$.fragment,e),Gn=o(e),M=a(e,"DIV",{class:!0});var qe=h(M);l($t.$$.fragment,qe),Vr=o(qe),fn=a(qe,"P",{"data-svelte-h":!0}),f(fn)!=="svelte-1pwo8e0"&&(fn.textContent=Da),jr=o(qe),l(ve.$$.fragment,qe),Gr=o(qe),$e=a(qe,"DIV",{class:!0});var xo=h($e);l(yt.$$.fragment,xo),Wr=o(xo),gn=a(xo,"P",{"data-svelte-h":!0}),f(gn)!=="svelte-gy26u4"&&(gn.textContent=Ea),xo.forEach(s),qe.forEach(s),Wn=o(e),l(qt.$$.fragment,e),On=o(e),vn=a(e,"P",{}),h(vn).forEach(s),this.h()},h(){_(y,"name","hf:doc:metadata"),_(y,"content",Za),_(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(O,"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"),_(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,i){t(document.head,y),g(e,B,i),g(e,z,i),g(e,k,i),m(A,e,i),g(e,x,i),g(e,Q,i),g(e,$n,i),g(e,xe,i),g(e,yn,i),m(G,e,i),g(e,qn,i),m(ze,e,i),g(e,xn,i),g(e,H,i),m(we,H,null),t(H,zo),t(H,wt),t(H,wo),t(H,W),m(Ce,W,null),t(W,Co),t(W,Ct),g(e,zn,i),m(Te,e,i),g(e,wn,i),g(e,D,i),m(ke,D,null),t(D,To),t(D,Tt),t(D,ko),t(D,O),m(Le,O,null),t(O,Lo),t(O,kt),g(e,Cn,i),m(Me,e,i),g(e,Tn,i),g(e,E,i),m(Ae,E,null),t(E,Mo),t(E,Lt),t(E,Ao),t(E,S),m(Pe,S,null),t(S,Po),t(S,Mt),g(e,kn,i),m(Qe,e,i),g(e,Ln,i),g(e,N,i),m(He,N,null),t(N,Qo),t(N,At),t(N,Ho),t(N,U),m(De,U,null),t(U,Do),t(U,Pt),g(e,Mn,i),m(Ee,e,i),g(e,An,i),g(e,C,i),m(Ne,C,null),t(C,Eo),t(C,Qt),t(C,No),t(C,R),m(Be,R,null),t(R,Bo),t(R,Ht),t(C,Io),t(C,Y),m(Ie,Y,null),t(Y,Fo),t(Y,Dt),t(C,Vo),t(C,Z),m(Fe,Z,null),t(Z,jo),t(Z,Et),g(e,Pn,i),m(Ve,e,i),g(e,Qn,i),g(e,q,i),m(je,q,null),t(q,Go),t(q,Nt),t(q,Wo),t(q,Bt),t(q,Oo),t(q,It),t(q,So),t(q,X),m(Ge,X,null),t(X,Uo),t(X,Ft),t(q,Ro),t(q,J),m(We,J,null),t(J,Yo),t(J,Vt),t(q,Zo),t(q,K),m(Oe,K,null),t(K,Xo),t(K,jt),t(q,Jo),t(q,ee),m(Se,ee,null),t(ee,Ko),t(ee,Gt),g(e,Hn,i),m(Ue,e,i),g(e,Dn,i),g(e,v,i),m(Re,v,null),t(v,er),t(v,Wt),t(v,tr),t(v,Ot),t(v,nr),t(v,te),m(Ye,te,null),t(te,or),t(te,St),t(v,rr),t(v,ne),m(Ze,ne,null),t(ne,ar),t(ne,Ut),t(v,sr),t(v,oe),m(Xe,oe,null),t(oe,ir),t(oe,Rt),t(v,dr),t(v,re),m(Je,re,null),t(re,lr),t(re,Yt),t(v,mr),t(v,ae),m(Ke,ae,null),t(ae,cr),t(ae,Zt),t(v,ur),t(v,se),m(et,se,null),t(se,pr),t(se,Xt),t(v,fr),t(v,ie),m(tt,ie,null),t(ie,gr),t(ie,Jt),t(v,hr),t(v,de),m(nt,de,null),t(de,_r),t(de,Kt),t(v,br),t(v,le),m(ot,le,null),t(le,vr),t(le,en),t(v,$r),t(v,me),m(rt,me,null),t(me,yr),t(me,tn),t(v,qr),t(v,ce),m(at,ce,null),t(ce,xr),t(ce,nn),t(v,zr),t(v,ue),m(st,ue,null),t(ue,wr),t(ue,on),t(v,Cr),t(v,pe),m(it,pe,null),t(pe,Tr),t(pe,rn),g(e,En,i),m(dt,e,i),g(e,Nn,i),g(e,T,i),m(lt,T,null),t(T,kr),t(T,an),t(T,Lr),t(T,fe),m(mt,fe,null),t(fe,Mr),t(fe,sn),t(T,Ar),t(T,ge),m(ct,ge,null),t(ge,Pr),t(ge,dn),t(T,Qr),t(T,he),m(ut,he,null),t(he,Hr),t(he,ln),g(e,Bn,i),m(pt,e,i),g(e,In,i),g(e,V,i),m(ft,V,null),t(V,Dr),t(V,mn),g(e,Fn,i),m(gt,e,i),g(e,Vn,i),g(e,L,i),m(ht,L,null),t(L,Er),t(L,cn),t(L,Nr),t(L,_e),m(_t,_e,null),t(_e,Br),t(_e,un),t(L,Ir),t(L,be),m(bt,be,null),t(be,Fr),t(be,pn),g(e,jn,i),m(vt,e,i),g(e,Gn,i),g(e,M,i),m($t,M,null),t(M,Vr),t(M,fn),t(M,jr),m(ve,M,null),t(M,Gr),t(M,$e),m(yt,$e,null),t($e,Wr),t($e,gn),g(e,Wn,i),m(qt,e,i),g(e,On,i),g(e,vn,i),Sn=!0},p(e,[i]){const j={};i&2&&(j.$$scope={dirty:i,ctx:e}),G.$set(j);const xt={};i&2&&(xt.$$scope={dirty:i,ctx:e}),ve.$set(xt)},i(e){Sn||(c(A.$$.fragment,e),c(G.$$.fragment,e),c(ze.$$.fragment,e),c(we.$$.fragment,e),c(Ce.$$.fragment,e),c(Te.$$.fragment,e),c(ke.$$.fragment,e),c(Le.$$.fragment,e),c(Me.$$.fragment,e),c(Ae.$$.fragment,e),c(Pe.$$.fragment,e),c(Qe.$$.fragment,e),c(He.$$.fragment,e),c(De.$$.fragment,e),c(Ee.$$.fragment,e),c(Ne.$$.fragment,e),c(Be.$$.fragment,e),c(Ie.$$.fragment,e),c(Fe.$$.fragment,e),c(Ve.$$.fragment,e),c(je.$$.fragment,e),c(Ge.$$.fragment,e),c(We.$$.fragment,e),c(Oe.$$.fragment,e),c(Se.$$.fragment,e),c(Ue.$$.fragment,e),c(Re.$$.fragment,e),c(Ye.$$.fragment,e),c(Ze.$$.fragment,e),c(Xe.$$.fragment,e),c(Je.$$.fragment,e),c(Ke.$$.fragment,e),c(et.$$.fragment,e),c(tt.$$.fragment,e),c(nt.$$.fragment,e),c(ot.$$.fragment,e),c(rt.$$.fragment,e),c(at.$$.fragment,e),c(st.$$.fragment,e),c(it.$$.fragment,e),c(dt.$$.fragment,e),c(lt.$$.fragment,e),c(mt.$$.fragment,e),c(ct.$$.fragment,e),c(ut.$$.fragment,e),c(pt.$$.fragment,e),c(ft.$$.fragment,e),c(gt.$$.fragment,e),c(ht.$$.fragment,e),c(_t.$$.fragment,e),c(bt.$$.fragment,e),c(vt.$$.fragment,e),c($t.$$.fragment,e),c(ve.$$.fragment,e),c(yt.$$.fragment,e),c(qt.$$.fragment,e),Sn=!0)},o(e){u(A.$$.fragment,e),u(G.$$.fragment,e),u(ze.$$.fragment,e),u(we.$$.fragment,e),u(Ce.$$.fragment,e),u(Te.$$.fragment,e),u(ke.$$.fragment,e),u(Le.$$.fragment,e),u(Me.$$.fragment,e),u(Ae.$$.fragment,e),u(Pe.$$.fragment,e),u(Qe.$$.fragment,e),u(He.$$.fragment,e),u(De.$$.fragment,e),u(Ee.$$.fragment,e),u(Ne.$$.fragment,e),u(Be.$$.fragment,e),u(Ie.$$.fragment,e),u(Fe.$$.fragment,e),u(Ve.$$.fragment,e),u(je.$$.fragment,e),u(Ge.$$.fragment,e),u(We.$$.fragment,e),u(Oe.$$.fragment,e),u(Se.$$.fragment,e),u(Ue.$$.fragment,e),u(Re.$$.fragment,e),u(Ye.$$.fragment,e),u(Ze.$$.fragment,e),u(Xe.$$.fragment,e),u(Je.$$.fragment,e),u(Ke.$$.fragment,e),u(et.$$.fragment,e),u(tt.$$.fragment,e),u(nt.$$.fragment,e),u(ot.$$.fragment,e),u(rt.$$.fragment,e),u(at.$$.fragment,e),u(st.$$.fragment,e),u(it.$$.fragment,e),u(dt.$$.fragment,e),u(lt.$$.fragment,e),u(mt.$$.fragment,e),u(ct.$$.fragment,e),u(ut.$$.fragment,e),u(pt.$$.fragment,e),u(ft.$$.fragment,e),u(gt.$$.fragment,e),u(ht.$$.fragment,e),u(_t.$$.fragment,e),u(bt.$$.fragment,e),u(vt.$$.fragment,e),u($t.$$.fragment,e),u(ve.$$.fragment,e),u(yt.$$.fragment,e),u(qt.$$.fragment,e),Sn=!1},d(e){e&&(s(B),s(z),s(k),s(x),s(Q),s($n),s(xe),s(yn),s(qn),s(xn),s(H),s(zn),s(wn),s(D),s(Cn),s(Tn),s(E),s(kn),s(Ln),s(N),s(Mn),s(An),s(C),s(Pn),s(Qn),s(q),s(Hn),s(Dn),s(v),s(En),s(Nn),s(T),s(Bn),s(In),s(V),s(Fn),s(Vn),s(L),s(jn),s(Gn),s(M),s(Wn),s(On),s(vn)),s(y),p(A,e),p(G,e),p(ze,e),p(we),p(Ce),p(Te,e),p(ke),p(Le),p(Me,e),p(Ae),p(Pe),p(Qe,e),p(He),p(De),p(Ee,e),p(Ne),p(Be),p(Ie),p(Fe),p(Ve,e),p(je),p(Ge),p(We),p(Oe),p(Se),p(Ue,e),p(Re),p(Ye),p(Ze),p(Xe),p(Je),p(Ke),p(et),p(tt),p(nt),p(ot),p(rt),p(at),p(st),p(it),p(dt,e),p(lt),p(mt),p(ct),p(ut),p(pt,e),p(ft),p(gt,e),p(ht),p(_t),p(bt),p(vt,e),p($t),p(ve),p(yt),p(qt,e)}}}const Za='{"title":"Quantization","local":"quantization","sections":[{"title":"QuantoConfig","local":"transformers.QuantoConfig","sections":[],"depth":2},{"title":"AqlmConfig","local":"transformers.AqlmConfig","sections":[],"depth":2},{"title":"AwqConfig","local":"transformers.AwqConfig","sections":[],"depth":2},{"title":"EetqConfig","local":"transformers.EetqConfig","sections":[],"depth":2},{"title":"GPTQConfig","local":"transformers.GPTQConfig","sections":[],"depth":2},{"title":"BitsAndBytesConfig","local":"transformers.BitsAndBytesConfig","sections":[],"depth":2},{"title":"HfQuantizer","local":"transformers.quantizers.HfQuantizer","sections":[],"depth":2},{"title":"HqqConfig","local":"transformers.HqqConfig","sections":[],"depth":2},{"title":"FbgemmFp8Config","local":"transformers.FbgemmFp8Config","sections":[],"depth":2},{"title":"CompressedTensorsConfig","local":"transformers.CompressedTensorsConfig","sections":[],"depth":2},{"title":"TorchAoConfig","local":"transformers.TorchAoConfig","sections":[],"depth":2}],"depth":1}';function Xa(zt){return Ia(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class as extends Fa{constructor(y){super(),Va(this,y,Xa,Ya,Ba,{})}}export{as as component};
