import{s as ta,o as na,n as ea}from"../chunks/scheduler.25b97de1.js";import{S as oa,i as ra,g as a,s as n,r as l,A as aa,h as s,f as r,c as o,j as h,u as d,x as g,k as _,y as t,a as p,v as m,d as c,t as u,w as f}from"../chunks/index.d9030fc9.js";import{T as sa}from"../chunks/Tip.baa67368.js";import{D as b}from"../chunks/Docstring.e257edda.js";import{C as ia}from"../chunks/CodeBlock.e6cd0d95.js";import{E as la}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as E,E as da}from"../chunks/EditOnGithub.91d95064.js";function ma(ut){let q,B='Learn how to quantize models in the <a href="../quantization">Quantization</a> guide.';return{c(){q=a("p"),q.innerHTML=B},l(z){q=s(z,"P",{"data-svelte-h":!0}),g(q)!=="svelte-1pv1tva"&&(q.innerHTML=B)},m(z,T){p(z,q,T)},p:ea,d(z){z&&r(q)}}}function ca(ut){let q,B="Example:",z,T,A;return T=new ia({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(){q=a("p"),q.textContent=B,z=n(),l(T.$$.fragment)},l(x){q=s(x,"P",{"data-svelte-h":!0}),g(q)!=="svelte-11lpom8"&&(q.textContent=B),z=o(x),d(T.$$.fragment,x)},m(x,M){p(x,q,M),p(x,z,M),m(T,x,M),A=!0},p:ea,i(x){A||(c(T.$$.fragment,x),A=!0)},o(x){u(T.$$.fragment,x),A=!1},d(x){x&&(r(q),r(z)),f(T,x)}}}function ua(ut){let q,B,z,T,A,x,M,fr="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.",nn,_e,pr="Quantization techniques that aren’t supported in Transformers can be added with the <code>HfQuantizer</code> class.",on,V,rn,be,an,P,ve,eo,ft,gr=`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>.`,to,G,$e,no,pt,hr="Safety checker that arguments are correct",sn,qe,ln,H,ye,oo,gt,_r="This is a wrapper class about <code>aqlm</code> parameters.",ro,j,xe,ao,ht,br="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",dn,ze,mn,Q,we,so,_t,vr=`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.`,io,W,Ce,lo,bt,$r="Safety checker that arguments are correct",cn,Te,un,D,ke,mo,vt,qr=`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>.`,co,O,Le,uo,$t,yr="Safety checker that arguments are correct",fn,Ae,pn,C,Me,fo,qt,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>optimum</code> api for gptq quantization relying on auto_gptq backend.`,po,S,Pe,go,yt,zr="Get compatible class with optimum gptq config dict",ho,U,He,_o,xt,wr="Safety checker that arguments are correct",bo,Y,Qe,vo,zt,Cr="Get compatible dict for optimum gptq config",gn,De,hn,y,Ee,$o,wt,Tr=`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>.`,qo,Ct,kr="This replaces <code>load_in_8bit</code> or <code>load_in_4bit</code>therefore both options are mutually exclusive.",yo,Tt,Lr=`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.`,xo,R,Be,zo,kt,Ar="Returns <code>True</code> if the model is quantizable, <code>False</code> otherwise.",wo,Z,Fe,Co,Lt,Mr="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",To,X,Ne,ko,At,Pr=`This method returns the quantization method used for the model. If the model is not quantizable, it returns
<code>None</code>.`,Lo,J,Ie,Ao,Mt,Hr=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,_n,Ve,bn,v,Ge,Mo,Pt,Qr=`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.`,Po,Ht,Dr=`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.`,Ho,K,je,Qo,Qt,Er="adjust max_memory argument for infer_auto_device_map() if extra memory is needed for quantization",Do,ee,We,Eo,Dt,Br=`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>.`,Bo,te,Oe,Fo,Et,Fr=`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.`,No,ne,Se,Io,Bt,Nr=`takes needed components from state_dict and creates quantized param; only applicable if
requires_parameters_quantization == True`,Vo,oe,Ue,Go,Ft,Ir=`Potentially dequantize the model to retrive the original model, with some loss in accuracy / performance.
Note not all quantization schemes support this.`,jo,re,Ye,Wo,Nt,Vr=`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>.`,Oo,ae,Re,So,It,Gr=`Post-process the model post weights loading.
Make sure to override the abstract method <code>_process_model_after_weight_loading</code>.`,Uo,se,Ze,Yo,Vt,jr=`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>.`,Ro,ie,Xe,Zo,Gt,Wr=`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”“`,Xo,le,Je,Jo,jt,Or="Override this method if you want to adjust the <code>missing_keys</code>.",Ko,de,Ke,er,Wt,Sr=`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`,tr,me,et,nr,Ot,Ur=`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.`,vn,tt,$n,k,nt,or,St,Yr="This is wrapper around hqq’s BaseQuantizeConfig.",rr,ce,ot,ar,Ut,Rr="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",sr,ue,rt,ir,Yt,Zr=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,qn,at,yn,N,st,lr,Rt,Xr=`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.`,xn,it,zn,L,lt,dr,Zt,Jr="This is a config class for torchao quantization/sparsity techniques.",mr,fe,cr,pe,dt,ur,Xt,Kr="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",wn,mt,Cn,tn,Tn;return A=new E({props:{title:"Quantization",local:"quantization",headingTag:"h1"}}),V=new sa({props:{$$slots:{default:[ma]},$$scope:{ctx:ut}}}),be=new E({props:{title:"QuantoConfig",local:"transformers.QuantoConfig",headingTag:"h2"}}),ve=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/vr_29969/src/transformers/utils/quantization_config.py#L979"}}),$e=new b({props:{name:"post_init",anchor:"transformers.QuantoConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L1008"}}),qe=new E({props:{title:"AqlmConfig",local:"transformers.AqlmConfig",headingTag:"h2"}}),ye=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/vr_29969/src/transformers/utils/quantization_config.py#L919"}}),xe=new b({props:{name:"post_init",anchor:"transformers.AqlmConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L957"}}),ze=new E({props:{title:"AwqConfig",local:"transformers.AwqConfig",headingTag:"h2"}}),we=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/vr_29969/src/transformers/utils/quantization_config.py#L748"}}),Ce=new b({props:{name:"post_init",anchor:"transformers.AwqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L817"}}),Te=new E({props:{title:"EetqConfig",local:"transformers.EetqConfig",headingTag:"h2"}}),ke=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/vr_29969/src/transformers/utils/quantization_config.py#L1020"}}),Le=new b({props:{name:"post_init",anchor:"transformers.EetqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L1045"}}),Ae=new E({props:{title:"GPTQConfig",local:"transformers.GPTQConfig",headingTag:"h2"}}),Me=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/pr_29969/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/vr_29969/src/transformers/utils/quantization_config.py#L531"}}),Pe=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/vr_29969/src/transformers/utils/quantization_config.py#L733"}}),He=new b({props:{name:"post_init",anchor:"transformers.GPTQConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L645"}}),Qe=new b({props:{name:"to_dict_optimum",anchor:"transformers.GPTQConfig.to_dict_optimum",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L724"}}),De=new E({props:{title:"BitsAndBytesConfig",local:"transformers.BitsAndBytesConfig",headingTag:"h2"}}),Ee=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/vr_29969/src/transformers/utils/quantization_config.py#L295"}}),Be=new b({props:{name:"is_quantizable",anchor:"transformers.BitsAndBytesConfig.is_quantizable",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L466"}}),Fe=new b({props:{name:"post_init",anchor:"transformers.BitsAndBytesConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L429"}}),Ne=new b({props:{name:"quantization_method",anchor:"transformers.BitsAndBytesConfig.quantization_method",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L472"}}),Ie=new b({props:{name:"to_diff_dict",anchor:"transformers.BitsAndBytesConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L503",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>
`}}),Ve=new E({props:{title:"HfQuantizer",local:"transformers.quantizers.HfQuantizer",headingTag:"h2"}}),Ge=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/vr_29969/src/transformers/quantizers/base.py#L28"}}),je=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/vr_29969/src/transformers/quantizers/base.py#L131"}}),We=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/vr_29969/src/transformers/quantizers/base.py#L90"}}),Oe=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/vr_29969/src/transformers/quantizers/base.py#L135"}}),Se=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/vr_29969/src/transformers/quantizers/base.py#L150"}}),Ue=new b({props:{name:"dequantize",anchor:"transformers.quantizers.HfQuantizer.dequantize",parameters:[{name:"model",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/quantizers/base.py#L197"}}),Ye=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/vr_29969/src/transformers/quantizers/base.py#L112"}}),Re=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/vr_29969/src/transformers/quantizers/base.py#L184"}}),Ze=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/vr_29969/src/transformers/quantizers/base.py#L168"}}),Xe=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/vr_29969/src/transformers/quantizers/base.py#L78"}}),Je=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/vr_29969/src/transformers/quantizers/base.py#L102"}}),Ke=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/vr_29969/src/transformers/quantizers/base.py#L66"}}),et=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/vr_29969/src/transformers/quantizers/base.py#L160"}}),tt=new E({props:{title:"HqqConfig",local:"transformers.HqqConfig",headingTag:"h2"}}),nt=new b({props:{name:"class transformers.HqqConfig",anchor:"transformers.HqqConfig",parameters:[{name:"nbits",val:": int = 4"},{name:"group_size",val:": int = 64"},{name:"quant_zero",val:": bool = True"},{name:"quant_scale",val:": bool = False"},{name:"offload_meta",val:": bool = False"},{name:"view_as_float",val:": bool = False"},{name:"axis",val:": int = 0"},{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.quant_zero",description:`<strong>quant_zero</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Quantize the zero-point if set to <code>True</code>.`,name:"quant_zero"},{anchor:"transformers.HqqConfig.quant_scale",description:`<strong>quant_scale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Quantize the scaling if set to <code>True</code>.`,name:"quant_scale"},{anchor:"transformers.HqqConfig.offload_meta",description:`<strong>offload_meta</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Offload the meta-data to the CPU if set to <code>True</code>.`,name:"offload_meta"},{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>int</code>, <em>optional</em>, defaults to 0) &#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/vr_29969/src/transformers/utils/quantization_config.py#L186"}}),ot=new b({props:{name:"post_init",anchor:"transformers.HqqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L256"}}),rt=new b({props:{name:"to_diff_dict",anchor:"transformers.HqqConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L273",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>
`}}),at=new E({props:{title:"FbgemmFp8Config",local:"transformers.FbgemmFp8Config",headingTag:"h2"}}),st=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/vr_29969/src/transformers/utils/quantization_config.py#L1054"}}),it=new E({props:{title:"TorchAoConfig",local:"transformers.TorchAoConfig",headingTag:"h2"}}),lt=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/vr_29969/src/transformers/utils/quantization_config.py#L1085"}}),fe=new la({props:{anchor:"transformers.TorchAoConfig.example",$$slots:{default:[ca]},$$scope:{ctx:ut}}}),dt=new b({props:{name:"post_init",anchor:"transformers.TorchAoConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/utils/quantization_config.py#L1134"}}),mt=new da({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/main_classes/quantization.md"}}),{c(){q=a("meta"),B=n(),z=a("p"),T=n(),l(A.$$.fragment),x=n(),M=a("p"),M.textContent=fr,nn=n(),_e=a("p"),_e.innerHTML=pr,on=n(),l(V.$$.fragment),rn=n(),l(be.$$.fragment),an=n(),P=a("div"),l(ve.$$.fragment),eo=n(),ft=a("p"),ft.innerHTML=gr,to=n(),G=a("div"),l($e.$$.fragment),no=n(),pt=a("p"),pt.textContent=hr,sn=n(),l(qe.$$.fragment),ln=n(),H=a("div"),l(ye.$$.fragment),oo=n(),gt=a("p"),gt.innerHTML=_r,ro=n(),j=a("div"),l(xe.$$.fragment),ao=n(),ht=a("p"),ht.textContent=br,dn=n(),l(ze.$$.fragment),mn=n(),Q=a("div"),l(we.$$.fragment),so=n(),_t=a("p"),_t.innerHTML=vr,io=n(),W=a("div"),l(Ce.$$.fragment),lo=n(),bt=a("p"),bt.textContent=$r,cn=n(),l(Te.$$.fragment),un=n(),D=a("div"),l(ke.$$.fragment),mo=n(),vt=a("p"),vt.innerHTML=qr,co=n(),O=a("div"),l(Le.$$.fragment),uo=n(),$t=a("p"),$t.textContent=yr,fn=n(),l(Ae.$$.fragment),pn=n(),C=a("div"),l(Me.$$.fragment),fo=n(),qt=a("p"),qt.innerHTML=xr,po=n(),S=a("div"),l(Pe.$$.fragment),go=n(),yt=a("p"),yt.textContent=zr,ho=n(),U=a("div"),l(He.$$.fragment),_o=n(),xt=a("p"),xt.textContent=wr,bo=n(),Y=a("div"),l(Qe.$$.fragment),vo=n(),zt=a("p"),zt.textContent=Cr,gn=n(),l(De.$$.fragment),hn=n(),y=a("div"),l(Ee.$$.fragment),$o=n(),wt=a("p"),wt.innerHTML=Tr,qo=n(),Ct=a("p"),Ct.innerHTML=kr,yo=n(),Tt=a("p"),Tt.innerHTML=Lr,xo=n(),R=a("div"),l(Be.$$.fragment),zo=n(),kt=a("p"),kt.innerHTML=Ar,wo=n(),Z=a("div"),l(Fe.$$.fragment),Co=n(),Lt=a("p"),Lt.textContent=Mr,To=n(),X=a("div"),l(Ne.$$.fragment),ko=n(),At=a("p"),At.innerHTML=Pr,Lo=n(),J=a("div"),l(Ie.$$.fragment),Ao=n(),Mt=a("p"),Mt.textContent=Hr,_n=n(),l(Ve.$$.fragment),bn=n(),v=a("div"),l(Ge.$$.fragment),Mo=n(),Pt=a("p"),Pt.textContent=Qr,Po=n(),Ht=a("p"),Ht.innerHTML=Dr,Ho=n(),K=a("div"),l(je.$$.fragment),Qo=n(),Qt=a("p"),Qt.textContent=Er,Do=n(),ee=a("div"),l(We.$$.fragment),Eo=n(),Dt=a("p"),Dt.innerHTML=Br,Bo=n(),te=a("div"),l(Oe.$$.fragment),Fo=n(),Et=a("p"),Et.textContent=Fr,No=n(),ne=a("div"),l(Se.$$.fragment),Io=n(),Bt=a("p"),Bt.textContent=Nr,Vo=n(),oe=a("div"),l(Ue.$$.fragment),Go=n(),Ft=a("p"),Ft.textContent=Ir,jo=n(),re=a("div"),l(Ye.$$.fragment),Wo=n(),Nt=a("p"),Nt.innerHTML=Vr,Oo=n(),ae=a("div"),l(Re.$$.fragment),So=n(),It=a("p"),It.innerHTML=Gr,Uo=n(),se=a("div"),l(Ze.$$.fragment),Yo=n(),Vt=a("p"),Vt.innerHTML=jr,Ro=n(),ie=a("div"),l(Xe.$$.fragment),Zo=n(),Gt=a("p"),Gt.innerHTML=Wr,Xo=n(),le=a("div"),l(Je.$$.fragment),Jo=n(),jt=a("p"),jt.innerHTML=Or,Ko=n(),de=a("div"),l(Ke.$$.fragment),er=n(),Wt=a("p"),Wt.textContent=Sr,tr=n(),me=a("div"),l(et.$$.fragment),nr=n(),Ot=a("p"),Ot.innerHTML=Ur,vn=n(),l(tt.$$.fragment),$n=n(),k=a("div"),l(nt.$$.fragment),or=n(),St=a("p"),St.textContent=Yr,rr=n(),ce=a("div"),l(ot.$$.fragment),ar=n(),Ut=a("p"),Ut.textContent=Rr,sr=n(),ue=a("div"),l(rt.$$.fragment),ir=n(),Yt=a("p"),Yt.textContent=Zr,qn=n(),l(at.$$.fragment),yn=n(),N=a("div"),l(st.$$.fragment),lr=n(),Rt=a("p"),Rt.textContent=Xr,xn=n(),l(it.$$.fragment),zn=n(),L=a("div"),l(lt.$$.fragment),dr=n(),Zt=a("p"),Zt.textContent=Jr,mr=n(),l(fe.$$.fragment),cr=n(),pe=a("div"),l(dt.$$.fragment),ur=n(),Xt=a("p"),Xt.textContent=Kr,wn=n(),l(mt.$$.fragment),Cn=n(),tn=a("p"),this.h()},l(e){const i=aa("svelte-u9bgzb",document.head);q=s(i,"META",{name:!0,content:!0}),i.forEach(r),B=o(e),z=s(e,"P",{}),h(z).forEach(r),T=o(e),d(A.$$.fragment,e),x=o(e),M=s(e,"P",{"data-svelte-h":!0}),g(M)!=="svelte-1hsjm7z"&&(M.textContent=fr),nn=o(e),_e=s(e,"P",{"data-svelte-h":!0}),g(_e)!=="svelte-bnel0f"&&(_e.innerHTML=pr),on=o(e),d(V.$$.fragment,e),rn=o(e),d(be.$$.fragment,e),an=o(e),P=s(e,"DIV",{class:!0});var I=h(P);d(ve.$$.fragment,I),eo=o(I),ft=s(I,"P",{"data-svelte-h":!0}),g(ft)!=="svelte-b8v0f"&&(ft.innerHTML=gr),to=o(I),G=s(I,"DIV",{class:!0});var ct=h(G);d($e.$$.fragment,ct),no=o(ct),pt=s(ct,"P",{"data-svelte-h":!0}),g(pt)!=="svelte-1ozftb6"&&(pt.textContent=hr),ct.forEach(r),I.forEach(r),sn=o(e),d(qe.$$.fragment,e),ln=o(e),H=s(e,"DIV",{class:!0});var Jt=h(H);d(ye.$$.fragment,Jt),oo=o(Jt),gt=s(Jt,"P",{"data-svelte-h":!0}),g(gt)!=="svelte-1s7ccdx"&&(gt.innerHTML=_r),ro=o(Jt),j=s(Jt,"DIV",{class:!0});var kn=h(j);d(xe.$$.fragment,kn),ao=o(kn),ht=s(kn,"P",{"data-svelte-h":!0}),g(ht)!=="svelte-gy26u4"&&(ht.textContent=br),kn.forEach(r),Jt.forEach(r),dn=o(e),d(ze.$$.fragment,e),mn=o(e),Q=s(e,"DIV",{class:!0});var Kt=h(Q);d(we.$$.fragment,Kt),so=o(Kt),_t=s(Kt,"P",{"data-svelte-h":!0}),g(_t)!=="svelte-1i667it"&&(_t.innerHTML=vr),io=o(Kt),W=s(Kt,"DIV",{class:!0});var Ln=h(W);d(Ce.$$.fragment,Ln),lo=o(Ln),bt=s(Ln,"P",{"data-svelte-h":!0}),g(bt)!=="svelte-1ozftb6"&&(bt.textContent=$r),Ln.forEach(r),Kt.forEach(r),cn=o(e),d(Te.$$.fragment,e),un=o(e),D=s(e,"DIV",{class:!0});var en=h(D);d(ke.$$.fragment,en),mo=o(en),vt=s(en,"P",{"data-svelte-h":!0}),g(vt)!=="svelte-438k9a"&&(vt.innerHTML=qr),co=o(en),O=s(en,"DIV",{class:!0});var An=h(O);d(Le.$$.fragment,An),uo=o(An),$t=s(An,"P",{"data-svelte-h":!0}),g($t)!=="svelte-1ozftb6"&&($t.textContent=yr),An.forEach(r),en.forEach(r),fn=o(e),d(Ae.$$.fragment,e),pn=o(e),C=s(e,"DIV",{class:!0});var F=h(C);d(Me.$$.fragment,F),fo=o(F),qt=s(F,"P",{"data-svelte-h":!0}),g(qt)!=="svelte-i3efvr"&&(qt.innerHTML=xr),po=o(F),S=s(F,"DIV",{class:!0});var Mn=h(S);d(Pe.$$.fragment,Mn),go=o(Mn),yt=s(Mn,"P",{"data-svelte-h":!0}),g(yt)!=="svelte-4jdj2l"&&(yt.textContent=zr),Mn.forEach(r),ho=o(F),U=s(F,"DIV",{class:!0});var Pn=h(U);d(He.$$.fragment,Pn),_o=o(Pn),xt=s(Pn,"P",{"data-svelte-h":!0}),g(xt)!=="svelte-1ozftb6"&&(xt.textContent=wr),Pn.forEach(r),bo=o(F),Y=s(F,"DIV",{class:!0});var Hn=h(Y);d(Qe.$$.fragment,Hn),vo=o(Hn),zt=s(Hn,"P",{"data-svelte-h":!0}),g(zt)!=="svelte-pjgtd6"&&(zt.textContent=Cr),Hn.forEach(r),F.forEach(r),gn=o(e),d(De.$$.fragment,e),hn=o(e),y=s(e,"DIV",{class:!0});var w=h(y);d(Ee.$$.fragment,w),$o=o(w),wt=s(w,"P",{"data-svelte-h":!0}),g(wt)!=="svelte-woamwr"&&(wt.innerHTML=Tr),qo=o(w),Ct=s(w,"P",{"data-svelte-h":!0}),g(Ct)!=="svelte-ki5gis"&&(Ct.innerHTML=kr),yo=o(w),Tt=s(w,"P",{"data-svelte-h":!0}),g(Tt)!=="svelte-8qsk2q"&&(Tt.innerHTML=Lr),xo=o(w),R=s(w,"DIV",{class:!0});var Qn=h(R);d(Be.$$.fragment,Qn),zo=o(Qn),kt=s(Qn,"P",{"data-svelte-h":!0}),g(kt)!=="svelte-10tvzyv"&&(kt.innerHTML=Ar),Qn.forEach(r),wo=o(w),Z=s(w,"DIV",{class:!0});var Dn=h(Z);d(Fe.$$.fragment,Dn),Co=o(Dn),Lt=s(Dn,"P",{"data-svelte-h":!0}),g(Lt)!=="svelte-gy26u4"&&(Lt.textContent=Mr),Dn.forEach(r),To=o(w),X=s(w,"DIV",{class:!0});var En=h(X);d(Ne.$$.fragment,En),ko=o(En),At=s(En,"P",{"data-svelte-h":!0}),g(At)!=="svelte-19bn0da"&&(At.innerHTML=Pr),En.forEach(r),Lo=o(w),J=s(w,"DIV",{class:!0});var Bn=h(J);d(Ie.$$.fragment,Bn),Ao=o(Bn),Mt=s(Bn,"P",{"data-svelte-h":!0}),g(Mt)!=="svelte-1p6bdas"&&(Mt.textContent=Hr),Bn.forEach(r),w.forEach(r),_n=o(e),d(Ve.$$.fragment,e),bn=o(e),v=s(e,"DIV",{class:!0});var $=h(v);d(Ge.$$.fragment,$),Mo=o($),Pt=s($,"P",{"data-svelte-h":!0}),g(Pt)!=="svelte-1xvcahi"&&(Pt.textContent=Qr),Po=o($),Ht=s($,"P",{"data-svelte-h":!0}),g(Ht)!=="svelte-twdedh"&&(Ht.innerHTML=Dr),Ho=o($),K=s($,"DIV",{class:!0});var Fn=h(K);d(je.$$.fragment,Fn),Qo=o(Fn),Qt=s(Fn,"P",{"data-svelte-h":!0}),g(Qt)!=="svelte-1d4i4z7"&&(Qt.textContent=Er),Fn.forEach(r),Do=o($),ee=s($,"DIV",{class:!0});var Nn=h(ee);d(We.$$.fragment,Nn),Eo=o(Nn),Dt=s(Nn,"P",{"data-svelte-h":!0}),g(Dt)!=="svelte-4t526i"&&(Dt.innerHTML=Br),Nn.forEach(r),Bo=o($),te=s($,"DIV",{class:!0});var In=h(te);d(Oe.$$.fragment,In),Fo=o(In),Et=s(In,"P",{"data-svelte-h":!0}),g(Et)!=="svelte-1meey31"&&(Et.textContent=Fr),In.forEach(r),No=o($),ne=s($,"DIV",{class:!0});var Vn=h(ne);d(Se.$$.fragment,Vn),Io=o(Vn),Bt=s(Vn,"P",{"data-svelte-h":!0}),g(Bt)!=="svelte-1j1vsi1"&&(Bt.textContent=Nr),Vn.forEach(r),Vo=o($),oe=s($,"DIV",{class:!0});var Gn=h(oe);d(Ue.$$.fragment,Gn),Go=o(Gn),Ft=s(Gn,"P",{"data-svelte-h":!0}),g(Ft)!=="svelte-1qo65te"&&(Ft.textContent=Ir),Gn.forEach(r),jo=o($),re=s($,"DIV",{class:!0});var jn=h(re);d(Ye.$$.fragment,jn),Wo=o(jn),Nt=s(jn,"P",{"data-svelte-h":!0}),g(Nt)!=="svelte-i8h8td"&&(Nt.innerHTML=Vr),jn.forEach(r),Oo=o($),ae=s($,"DIV",{class:!0});var Wn=h(ae);d(Re.$$.fragment,Wn),So=o(Wn),It=s(Wn,"P",{"data-svelte-h":!0}),g(It)!=="svelte-1uznum5"&&(It.innerHTML=Gr),Wn.forEach(r),Uo=o($),se=s($,"DIV",{class:!0});var On=h(se);d(Ze.$$.fragment,On),Yo=o(On),Vt=s(On,"P",{"data-svelte-h":!0}),g(Vt)!=="svelte-mjhdcv"&&(Vt.innerHTML=jr),On.forEach(r),Ro=o($),ie=s($,"DIV",{class:!0});var Sn=h(ie);d(Xe.$$.fragment,Sn),Zo=o(Sn),Gt=s(Sn,"P",{"data-svelte-h":!0}),g(Gt)!=="svelte-1e5epn5"&&(Gt.innerHTML=Wr),Sn.forEach(r),Xo=o($),le=s($,"DIV",{class:!0});var Un=h(le);d(Je.$$.fragment,Un),Jo=o(Un),jt=s(Un,"P",{"data-svelte-h":!0}),g(jt)!=="svelte-13hqoy0"&&(jt.innerHTML=Or),Un.forEach(r),Ko=o($),de=s($,"DIV",{class:!0});var Yn=h(de);d(Ke.$$.fragment,Yn),er=o(Yn),Wt=s(Yn,"P",{"data-svelte-h":!0}),g(Wt)!=="svelte-1kpdm09"&&(Wt.textContent=Sr),Yn.forEach(r),tr=o($),me=s($,"DIV",{class:!0});var Rn=h(me);d(et.$$.fragment,Rn),nr=o(Rn),Ot=s(Rn,"P",{"data-svelte-h":!0}),g(Ot)!=="svelte-1lxocan"&&(Ot.innerHTML=Ur),Rn.forEach(r),$.forEach(r),vn=o(e),d(tt.$$.fragment,e),$n=o(e),k=s(e,"DIV",{class:!0});var ge=h(k);d(nt.$$.fragment,ge),or=o(ge),St=s(ge,"P",{"data-svelte-h":!0}),g(St)!=="svelte-h0fjpw"&&(St.textContent=Yr),rr=o(ge),ce=s(ge,"DIV",{class:!0});var Zn=h(ce);d(ot.$$.fragment,Zn),ar=o(Zn),Ut=s(Zn,"P",{"data-svelte-h":!0}),g(Ut)!=="svelte-gy26u4"&&(Ut.textContent=Rr),Zn.forEach(r),sr=o(ge),ue=s(ge,"DIV",{class:!0});var Xn=h(ue);d(rt.$$.fragment,Xn),ir=o(Xn),Yt=s(Xn,"P",{"data-svelte-h":!0}),g(Yt)!=="svelte-1p6bdas"&&(Yt.textContent=Zr),Xn.forEach(r),ge.forEach(r),qn=o(e),d(at.$$.fragment,e),yn=o(e),N=s(e,"DIV",{class:!0});var Jn=h(N);d(st.$$.fragment,Jn),lr=o(Jn),Rt=s(Jn,"P",{"data-svelte-h":!0}),g(Rt)!=="svelte-1a51md3"&&(Rt.textContent=Xr),Jn.forEach(r),xn=o(e),d(it.$$.fragment,e),zn=o(e),L=s(e,"DIV",{class:!0});var he=h(L);d(lt.$$.fragment,he),dr=o(he),Zt=s(he,"P",{"data-svelte-h":!0}),g(Zt)!=="svelte-1pwo8e0"&&(Zt.textContent=Jr),mr=o(he),d(fe.$$.fragment,he),cr=o(he),pe=s(he,"DIV",{class:!0});var Kn=h(pe);d(dt.$$.fragment,Kn),ur=o(Kn),Xt=s(Kn,"P",{"data-svelte-h":!0}),g(Xt)!=="svelte-gy26u4"&&(Xt.textContent=Kr),Kn.forEach(r),he.forEach(r),wn=o(e),d(mt.$$.fragment,e),Cn=o(e),tn=s(e,"P",{}),h(tn).forEach(r),this.h()},h(){_(q,"name","hf:doc:metadata"),_(q,"content",fa),_(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(P,"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"),_(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(W,"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"),_(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"),_(U,"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"),_(C,"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"),_(Z,"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"),_(y,"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"),_(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"),_(le,"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"),_(me,"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"),_(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"),_(k,"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"),_(pe,"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")},m(e,i){t(document.head,q),p(e,B,i),p(e,z,i),p(e,T,i),m(A,e,i),p(e,x,i),p(e,M,i),p(e,nn,i),p(e,_e,i),p(e,on,i),m(V,e,i),p(e,rn,i),m(be,e,i),p(e,an,i),p(e,P,i),m(ve,P,null),t(P,eo),t(P,ft),t(P,to),t(P,G),m($e,G,null),t(G,no),t(G,pt),p(e,sn,i),m(qe,e,i),p(e,ln,i),p(e,H,i),m(ye,H,null),t(H,oo),t(H,gt),t(H,ro),t(H,j),m(xe,j,null),t(j,ao),t(j,ht),p(e,dn,i),m(ze,e,i),p(e,mn,i),p(e,Q,i),m(we,Q,null),t(Q,so),t(Q,_t),t(Q,io),t(Q,W),m(Ce,W,null),t(W,lo),t(W,bt),p(e,cn,i),m(Te,e,i),p(e,un,i),p(e,D,i),m(ke,D,null),t(D,mo),t(D,vt),t(D,co),t(D,O),m(Le,O,null),t(O,uo),t(O,$t),p(e,fn,i),m(Ae,e,i),p(e,pn,i),p(e,C,i),m(Me,C,null),t(C,fo),t(C,qt),t(C,po),t(C,S),m(Pe,S,null),t(S,go),t(S,yt),t(C,ho),t(C,U),m(He,U,null),t(U,_o),t(U,xt),t(C,bo),t(C,Y),m(Qe,Y,null),t(Y,vo),t(Y,zt),p(e,gn,i),m(De,e,i),p(e,hn,i),p(e,y,i),m(Ee,y,null),t(y,$o),t(y,wt),t(y,qo),t(y,Ct),t(y,yo),t(y,Tt),t(y,xo),t(y,R),m(Be,R,null),t(R,zo),t(R,kt),t(y,wo),t(y,Z),m(Fe,Z,null),t(Z,Co),t(Z,Lt),t(y,To),t(y,X),m(Ne,X,null),t(X,ko),t(X,At),t(y,Lo),t(y,J),m(Ie,J,null),t(J,Ao),t(J,Mt),p(e,_n,i),m(Ve,e,i),p(e,bn,i),p(e,v,i),m(Ge,v,null),t(v,Mo),t(v,Pt),t(v,Po),t(v,Ht),t(v,Ho),t(v,K),m(je,K,null),t(K,Qo),t(K,Qt),t(v,Do),t(v,ee),m(We,ee,null),t(ee,Eo),t(ee,Dt),t(v,Bo),t(v,te),m(Oe,te,null),t(te,Fo),t(te,Et),t(v,No),t(v,ne),m(Se,ne,null),t(ne,Io),t(ne,Bt),t(v,Vo),t(v,oe),m(Ue,oe,null),t(oe,Go),t(oe,Ft),t(v,jo),t(v,re),m(Ye,re,null),t(re,Wo),t(re,Nt),t(v,Oo),t(v,ae),m(Re,ae,null),t(ae,So),t(ae,It),t(v,Uo),t(v,se),m(Ze,se,null),t(se,Yo),t(se,Vt),t(v,Ro),t(v,ie),m(Xe,ie,null),t(ie,Zo),t(ie,Gt),t(v,Xo),t(v,le),m(Je,le,null),t(le,Jo),t(le,jt),t(v,Ko),t(v,de),m(Ke,de,null),t(de,er),t(de,Wt),t(v,tr),t(v,me),m(et,me,null),t(me,nr),t(me,Ot),p(e,vn,i),m(tt,e,i),p(e,$n,i),p(e,k,i),m(nt,k,null),t(k,or),t(k,St),t(k,rr),t(k,ce),m(ot,ce,null),t(ce,ar),t(ce,Ut),t(k,sr),t(k,ue),m(rt,ue,null),t(ue,ir),t(ue,Yt),p(e,qn,i),m(at,e,i),p(e,yn,i),p(e,N,i),m(st,N,null),t(N,lr),t(N,Rt),p(e,xn,i),m(it,e,i),p(e,zn,i),p(e,L,i),m(lt,L,null),t(L,dr),t(L,Zt),t(L,mr),m(fe,L,null),t(L,cr),t(L,pe),m(dt,pe,null),t(pe,ur),t(pe,Xt),p(e,wn,i),m(mt,e,i),p(e,Cn,i),p(e,tn,i),Tn=!0},p(e,[i]){const I={};i&2&&(I.$$scope={dirty:i,ctx:e}),V.$set(I);const ct={};i&2&&(ct.$$scope={dirty:i,ctx:e}),fe.$set(ct)},i(e){Tn||(c(A.$$.fragment,e),c(V.$$.fragment,e),c(be.$$.fragment,e),c(ve.$$.fragment,e),c($e.$$.fragment,e),c(qe.$$.fragment,e),c(ye.$$.fragment,e),c(xe.$$.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(Ae.$$.fragment,e),c(Me.$$.fragment,e),c(Pe.$$.fragment,e),c(He.$$.fragment,e),c(Qe.$$.fragment,e),c(De.$$.fragment,e),c(Ee.$$.fragment,e),c(Be.$$.fragment,e),c(Fe.$$.fragment,e),c(Ne.$$.fragment,e),c(Ie.$$.fragment,e),c(Ve.$$.fragment,e),c(Ge.$$.fragment,e),c(je.$$.fragment,e),c(We.$$.fragment,e),c(Oe.$$.fragment,e),c(Se.$$.fragment,e),c(Ue.$$.fragment,e),c(Ye.$$.fragment,e),c(Re.$$.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(lt.$$.fragment,e),c(fe.$$.fragment,e),c(dt.$$.fragment,e),c(mt.$$.fragment,e),Tn=!0)},o(e){u(A.$$.fragment,e),u(V.$$.fragment,e),u(be.$$.fragment,e),u(ve.$$.fragment,e),u($e.$$.fragment,e),u(qe.$$.fragment,e),u(ye.$$.fragment,e),u(xe.$$.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(Ae.$$.fragment,e),u(Me.$$.fragment,e),u(Pe.$$.fragment,e),u(He.$$.fragment,e),u(Qe.$$.fragment,e),u(De.$$.fragment,e),u(Ee.$$.fragment,e),u(Be.$$.fragment,e),u(Fe.$$.fragment,e),u(Ne.$$.fragment,e),u(Ie.$$.fragment,e),u(Ve.$$.fragment,e),u(Ge.$$.fragment,e),u(je.$$.fragment,e),u(We.$$.fragment,e),u(Oe.$$.fragment,e),u(Se.$$.fragment,e),u(Ue.$$.fragment,e),u(Ye.$$.fragment,e),u(Re.$$.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(lt.$$.fragment,e),u(fe.$$.fragment,e),u(dt.$$.fragment,e),u(mt.$$.fragment,e),Tn=!1},d(e){e&&(r(B),r(z),r(T),r(x),r(M),r(nn),r(_e),r(on),r(rn),r(an),r(P),r(sn),r(ln),r(H),r(dn),r(mn),r(Q),r(cn),r(un),r(D),r(fn),r(pn),r(C),r(gn),r(hn),r(y),r(_n),r(bn),r(v),r(vn),r($n),r(k),r(qn),r(yn),r(N),r(xn),r(zn),r(L),r(wn),r(Cn),r(tn)),r(q),f(A,e),f(V,e),f(be,e),f(ve),f($e),f(qe,e),f(ye),f(xe),f(ze,e),f(we),f(Ce),f(Te,e),f(ke),f(Le),f(Ae,e),f(Me),f(Pe),f(He),f(Qe),f(De,e),f(Ee),f(Be),f(Fe),f(Ne),f(Ie),f(Ve,e),f(Ge),f(je),f(We),f(Oe),f(Se),f(Ue),f(Ye),f(Re),f(Ze),f(Xe),f(Je),f(Ke),f(et),f(tt,e),f(nt),f(ot),f(rt),f(at,e),f(st),f(it,e),f(lt),f(fe),f(dt),f(mt,e)}}}const fa='{"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":"TorchAoConfig","local":"transformers.TorchAoConfig","sections":[],"depth":2}],"depth":1}';function pa(ut){return na(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ya extends oa{constructor(q){super(),ra(this,q,pa,ua,ta,{})}}export{ya as component};
