import{s as Mo,o as Ho,n as Do}from"../chunks/scheduler.9bc65507.js";import{S as Bo,i as Eo,g as r,s as n,r as d,A as Go,h as a,f as s,c as o,j as h,u as l,x as g,k as _,y as t,a as b,v as m,d as c,t as u,w as p}from"../chunks/index.707bf1b6.js";import{T as Io}from"../chunks/Tip.c2ecdbf4.js";import{D as $}from"../chunks/Docstring.17db21ae.js";import{H as Be}from"../chunks/Heading.342b1fa6.js";function No(_t){let y,Z='Learn how to quantize models in the <a href="../quantization">Quantization</a> guide.';return{c(){y=r("p"),y.innerHTML=Z},l(w){y=a(w,"P",{"data-svelte-h":!0}),g(y)!=="svelte-1pv1tva"&&(y.innerHTML=Z)},m(w,Ee){b(w,y,Ee)},p:Do,d(w){w&&s(y)}}}function Vo(_t){let y,Z,w,Ee,ee,bt,te,eo="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.",vt,ne,to="Quantization techniques that aren’t supported in Transformers can be added with the <code>HfQuantizer</code> class.",$t,A,qt,oe,yt,T,re,nn,Ge,no=`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>.`,on,Q,ae,rn,Ie,oo="Safety checker that arguments are correct",zt,se,xt,C,ie,an,Ne,ro="This is a wrapper class about <code>aqlm</code> parameters.",sn,M,de,dn,Ve,ao="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",wt,le,Tt,k,me,ln,Fe,so=`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.`,mn,H,ce,cn,je,io="Safety checker that arguments are correct",Ct,ue,kt,x,pe,un,Oe,lo=`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.`,pn,D,fe,fn,We,mo="Get compatible class with optimum gptq config dict",gn,B,ge,hn,Se,co="Safety checker that arguments are correct",_n,E,he,bn,Ue,uo="Get compatible dict for optimum gptq config",Lt,_e,Pt,q,be,vn,Re,po=`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>.`,$n,Ye,fo="This replaces <code>load_in_8bit</code> or <code>load_in_4bit</code>therefore both options are mutually exclusive.",qn,Je,go=`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.`,yn,G,ve,zn,Ke,ho="Returns <code>True</code> if the model is quantizable, <code>False</code> otherwise.",xn,I,$e,wn,Xe,_o="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",Tn,N,qe,Cn,Ze,bo=`This method returns the quantization method used for the model. If the model is not quantizable, it returns
<code>None</code>.`,kn,V,ye,Ln,et,vo=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,At,ze,Qt,f,xe,Pn,tt,$o=`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.`,An,nt,qo=`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.`,Qn,F,we,Mn,ot,yo="adjust max_memory argument for infer_auto_device_map() if extra memory is needed for quantization",Hn,j,Te,Dn,rt,zo=`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>.`,Bn,O,Ce,En,at,xo=`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.`,Gn,W,ke,In,st,wo=`takes needed components from state_dict and creates quantized param; only applicable if
requires_parameters_quantization == True`,Nn,S,Le,Vn,it,To=`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>.`,Fn,U,Pe,jn,dt,Co=`Post-process the model post weights loading.
Make sure to override the abstract method <code>_process_model_after_weight_loading</code>.`,On,R,Ae,Wn,lt,ko=`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>.`,Sn,Y,Qe,Un,mt,Lo=`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”“`,Rn,J,Me,Yn,ct,Po="Override this method if you want to adjust the <code>missing_keys</code>.",Jn,K,He,Kn,ut,Ao=`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`,Xn,X,De,Zn,pt,Qo=`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.`,Mt,ht,Ht;return ee=new Be({props:{title:"Quantization",local:"quantization",headingTag:"h1"}}),A=new Io({props:{$$slots:{default:[No]},$$scope:{ctx:_t}}}),oe=new Be({props:{title:"QuantoConfig",local:"transformers.QuantoConfig",headingTag:"h2"}}),re=new $({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#L842"}}),ae=new $({props:{name:"post_init",anchor:"transformers.QuantoConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L871"}}),se=new Be({props:{title:"AqlmConfig",local:"transformers.AqlmConfig",headingTag:"h2"}}),ie=new $({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#L782"}}),de=new $({props:{name:"post_init",anchor:"transformers.AqlmConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L820"}}),le=new Be({props:{title:"AwqConfig",local:"transformers.AwqConfig",headingTag:"h2"}}),me=new $({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#L611"}}),ce=new $({props:{name:"post_init",anchor:"transformers.AwqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L680"}}),ue=new Be({props:{title:"GPTQConfig",local:"transformers.GPTQConfig",headingTag:"h2"}}),pe=new $({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;,&#x2018;ptb&#x2019;,&#x2018;ptb-new&#x2019;]`,name:"dataset"},{anchor:"transformers.GPTQConfig.group_size",description:`<strong>group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The group size to use for quantization. Recommended value is 128 and -1 uses per-column quantization.`,name:"group_size"},{anchor:"transformers.GPTQConfig.damp_percent",description:`<strong>damp_percent</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The percent of the average Hessian diagonal to use for dampening. Recommended value is 0.1.`,name:"damp_percent"},{anchor:"transformers.GPTQConfig.desc_act",description:`<strong>desc_act</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to quantize columns in order of decreasing activation size. Setting it to False can significantly
speed up inference but the perplexity may become slightly worse. Also known as act-order.`,name:"desc_act"},{anchor:"transformers.GPTQConfig.sym",description:`<strong>sym</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use symetric quantization.`,name:"sym"},{anchor:"transformers.GPTQConfig.true_sequential",description:`<strong>true_sequential</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to perform sequential quantization even within a single Transformer block. Instead of quantizing
the entire block at once, we perform layer-wise quantization. As a result, each layer undergoes
quantization using inputs that have passed through the previously quantized layers.`,name:"true_sequential"},{anchor:"transformers.GPTQConfig.use_cuda_fp16",description:`<strong>use_cuda_fp16</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use optimized cuda kernel for fp16 model. Need to have model in fp16.`,name:"use_cuda_fp16"},{anchor:"transformers.GPTQConfig.model_seqlen",description:`<strong>model_seqlen</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum sequence length that the model can take.`,name:"model_seqlen"},{anchor:"transformers.GPTQConfig.block_name_to_quantize",description:`<strong>block_name_to_quantize</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The transformers block name to quantize. 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#L399"}}),fe=new $({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#L596"}}),ge=new $({props:{name:"post_init",anchor:"transformers.GPTQConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L513"}}),he=new $({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#L587"}}),_e=new Be({props:{title:"BitsAndBytesConfig",local:"transformers.BitsAndBytesConfig",headingTag:"h2"}}),be=new $({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 time. For example, inputs might be
fp32, but computation can be set to bf16 for speedups.`,name:"bnb_4bit_compute_dtype"},{anchor:"transformers.BitsAndBytesConfig.bnb_4bit_quant_type",description:`<strong>bnb_4bit_quant_type</strong> (<code>str</code>,  <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#L182"}}),ve=new $({props:{name:"is_quantizable",anchor:"transformers.BitsAndBytesConfig.is_quantizable",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L334"}}),$e=new $({props:{name:"post_init",anchor:"transformers.BitsAndBytesConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L303"}}),qe=new $({props:{name:"quantization_method",anchor:"transformers.BitsAndBytesConfig.quantization_method",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L340"}}),ye=new $({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#L371",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>
`}}),ze=new Be({props:{title:"HfQuantizer",local:"transformers.quantizers.HfQuantizer",headingTag:"h2"}}),xe=new $({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"}}),we=new $({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#L131"}}),Te=new $({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"}}),Ce=new $({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#L135"}}),ke=new $({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#L150"}}),Le=new $({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#L112"}}),Pe=new $({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#L184"}}),Ae=new $({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#L168"}}),Qe=new $({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"}}),Me=new $({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"}}),He=new $({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"}}),De=new $({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#L160"}}),{c(){y=r("meta"),Z=n(),w=r("p"),Ee=n(),d(ee.$$.fragment),bt=n(),te=r("p"),te.textContent=eo,vt=n(),ne=r("p"),ne.innerHTML=to,$t=n(),d(A.$$.fragment),qt=n(),d(oe.$$.fragment),yt=n(),T=r("div"),d(re.$$.fragment),nn=n(),Ge=r("p"),Ge.innerHTML=no,on=n(),Q=r("div"),d(ae.$$.fragment),rn=n(),Ie=r("p"),Ie.textContent=oo,zt=n(),d(se.$$.fragment),xt=n(),C=r("div"),d(ie.$$.fragment),an=n(),Ne=r("p"),Ne.innerHTML=ro,sn=n(),M=r("div"),d(de.$$.fragment),dn=n(),Ve=r("p"),Ve.textContent=ao,wt=n(),d(le.$$.fragment),Tt=n(),k=r("div"),d(me.$$.fragment),ln=n(),Fe=r("p"),Fe.innerHTML=so,mn=n(),H=r("div"),d(ce.$$.fragment),cn=n(),je=r("p"),je.textContent=io,Ct=n(),d(ue.$$.fragment),kt=n(),x=r("div"),d(pe.$$.fragment),un=n(),Oe=r("p"),Oe.innerHTML=lo,pn=n(),D=r("div"),d(fe.$$.fragment),fn=n(),We=r("p"),We.textContent=mo,gn=n(),B=r("div"),d(ge.$$.fragment),hn=n(),Se=r("p"),Se.textContent=co,_n=n(),E=r("div"),d(he.$$.fragment),bn=n(),Ue=r("p"),Ue.textContent=uo,Lt=n(),d(_e.$$.fragment),Pt=n(),q=r("div"),d(be.$$.fragment),vn=n(),Re=r("p"),Re.innerHTML=po,$n=n(),Ye=r("p"),Ye.innerHTML=fo,qn=n(),Je=r("p"),Je.innerHTML=go,yn=n(),G=r("div"),d(ve.$$.fragment),zn=n(),Ke=r("p"),Ke.innerHTML=ho,xn=n(),I=r("div"),d($e.$$.fragment),wn=n(),Xe=r("p"),Xe.textContent=_o,Tn=n(),N=r("div"),d(qe.$$.fragment),Cn=n(),Ze=r("p"),Ze.innerHTML=bo,kn=n(),V=r("div"),d(ye.$$.fragment),Ln=n(),et=r("p"),et.textContent=vo,At=n(),d(ze.$$.fragment),Qt=n(),f=r("div"),d(xe.$$.fragment),Pn=n(),tt=r("p"),tt.textContent=$o,An=n(),nt=r("p"),nt.innerHTML=qo,Qn=n(),F=r("div"),d(we.$$.fragment),Mn=n(),ot=r("p"),ot.textContent=yo,Hn=n(),j=r("div"),d(Te.$$.fragment),Dn=n(),rt=r("p"),rt.innerHTML=zo,Bn=n(),O=r("div"),d(Ce.$$.fragment),En=n(),at=r("p"),at.textContent=xo,Gn=n(),W=r("div"),d(ke.$$.fragment),In=n(),st=r("p"),st.textContent=wo,Nn=n(),S=r("div"),d(Le.$$.fragment),Vn=n(),it=r("p"),it.innerHTML=To,Fn=n(),U=r("div"),d(Pe.$$.fragment),jn=n(),dt=r("p"),dt.innerHTML=Co,On=n(),R=r("div"),d(Ae.$$.fragment),Wn=n(),lt=r("p"),lt.innerHTML=ko,Sn=n(),Y=r("div"),d(Qe.$$.fragment),Un=n(),mt=r("p"),mt.innerHTML=Lo,Rn=n(),J=r("div"),d(Me.$$.fragment),Yn=n(),ct=r("p"),ct.innerHTML=Po,Jn=n(),K=r("div"),d(He.$$.fragment),Kn=n(),ut=r("p"),ut.textContent=Ao,Xn=n(),X=r("div"),d(De.$$.fragment),Zn=n(),pt=r("p"),pt.innerHTML=Qo,Mt=n(),ht=r("p"),this.h()},l(e){const i=Go("svelte-u9bgzb",document.head);y=a(i,"META",{name:!0,content:!0}),i.forEach(s),Z=o(e),w=a(e,"P",{}),h(w).forEach(s),Ee=o(e),l(ee.$$.fragment,e),bt=o(e),te=a(e,"P",{"data-svelte-h":!0}),g(te)!=="svelte-1hsjm7z"&&(te.textContent=eo),vt=o(e),ne=a(e,"P",{"data-svelte-h":!0}),g(ne)!=="svelte-bnel0f"&&(ne.innerHTML=to),$t=o(e),l(A.$$.fragment,e),qt=o(e),l(oe.$$.fragment,e),yt=o(e),T=a(e,"DIV",{class:!0});var P=h(T);l(re.$$.fragment,P),nn=o(P),Ge=a(P,"P",{"data-svelte-h":!0}),g(Ge)!=="svelte-b8v0f"&&(Ge.innerHTML=no),on=o(P),Q=a(P,"DIV",{class:!0});var Dt=h(Q);l(ae.$$.fragment,Dt),rn=o(Dt),Ie=a(Dt,"P",{"data-svelte-h":!0}),g(Ie)!=="svelte-1ozftb6"&&(Ie.textContent=oo),Dt.forEach(s),P.forEach(s),zt=o(e),l(se.$$.fragment,e),xt=o(e),C=a(e,"DIV",{class:!0});var ft=h(C);l(ie.$$.fragment,ft),an=o(ft),Ne=a(ft,"P",{"data-svelte-h":!0}),g(Ne)!=="svelte-1s7ccdx"&&(Ne.innerHTML=ro),sn=o(ft),M=a(ft,"DIV",{class:!0});var Bt=h(M);l(de.$$.fragment,Bt),dn=o(Bt),Ve=a(Bt,"P",{"data-svelte-h":!0}),g(Ve)!=="svelte-gy26u4"&&(Ve.textContent=ao),Bt.forEach(s),ft.forEach(s),wt=o(e),l(le.$$.fragment,e),Tt=o(e),k=a(e,"DIV",{class:!0});var gt=h(k);l(me.$$.fragment,gt),ln=o(gt),Fe=a(gt,"P",{"data-svelte-h":!0}),g(Fe)!=="svelte-1i667it"&&(Fe.innerHTML=so),mn=o(gt),H=a(gt,"DIV",{class:!0});var Et=h(H);l(ce.$$.fragment,Et),cn=o(Et),je=a(Et,"P",{"data-svelte-h":!0}),g(je)!=="svelte-1ozftb6"&&(je.textContent=io),Et.forEach(s),gt.forEach(s),Ct=o(e),l(ue.$$.fragment,e),kt=o(e),x=a(e,"DIV",{class:!0});var L=h(x);l(pe.$$.fragment,L),un=o(L),Oe=a(L,"P",{"data-svelte-h":!0}),g(Oe)!=="svelte-i3efvr"&&(Oe.innerHTML=lo),pn=o(L),D=a(L,"DIV",{class:!0});var Gt=h(D);l(fe.$$.fragment,Gt),fn=o(Gt),We=a(Gt,"P",{"data-svelte-h":!0}),g(We)!=="svelte-4jdj2l"&&(We.textContent=mo),Gt.forEach(s),gn=o(L),B=a(L,"DIV",{class:!0});var It=h(B);l(ge.$$.fragment,It),hn=o(It),Se=a(It,"P",{"data-svelte-h":!0}),g(Se)!=="svelte-1ozftb6"&&(Se.textContent=co),It.forEach(s),_n=o(L),E=a(L,"DIV",{class:!0});var Nt=h(E);l(he.$$.fragment,Nt),bn=o(Nt),Ue=a(Nt,"P",{"data-svelte-h":!0}),g(Ue)!=="svelte-pjgtd6"&&(Ue.textContent=uo),Nt.forEach(s),L.forEach(s),Lt=o(e),l(_e.$$.fragment,e),Pt=o(e),q=a(e,"DIV",{class:!0});var z=h(q);l(be.$$.fragment,z),vn=o(z),Re=a(z,"P",{"data-svelte-h":!0}),g(Re)!=="svelte-woamwr"&&(Re.innerHTML=po),$n=o(z),Ye=a(z,"P",{"data-svelte-h":!0}),g(Ye)!=="svelte-ki5gis"&&(Ye.innerHTML=fo),qn=o(z),Je=a(z,"P",{"data-svelte-h":!0}),g(Je)!=="svelte-8qsk2q"&&(Je.innerHTML=go),yn=o(z),G=a(z,"DIV",{class:!0});var Vt=h(G);l(ve.$$.fragment,Vt),zn=o(Vt),Ke=a(Vt,"P",{"data-svelte-h":!0}),g(Ke)!=="svelte-10tvzyv"&&(Ke.innerHTML=ho),Vt.forEach(s),xn=o(z),I=a(z,"DIV",{class:!0});var Ft=h(I);l($e.$$.fragment,Ft),wn=o(Ft),Xe=a(Ft,"P",{"data-svelte-h":!0}),g(Xe)!=="svelte-gy26u4"&&(Xe.textContent=_o),Ft.forEach(s),Tn=o(z),N=a(z,"DIV",{class:!0});var jt=h(N);l(qe.$$.fragment,jt),Cn=o(jt),Ze=a(jt,"P",{"data-svelte-h":!0}),g(Ze)!=="svelte-19bn0da"&&(Ze.innerHTML=bo),jt.forEach(s),kn=o(z),V=a(z,"DIV",{class:!0});var Ot=h(V);l(ye.$$.fragment,Ot),Ln=o(Ot),et=a(Ot,"P",{"data-svelte-h":!0}),g(et)!=="svelte-1p6bdas"&&(et.textContent=vo),Ot.forEach(s),z.forEach(s),At=o(e),l(ze.$$.fragment,e),Qt=o(e),f=a(e,"DIV",{class:!0});var v=h(f);l(xe.$$.fragment,v),Pn=o(v),tt=a(v,"P",{"data-svelte-h":!0}),g(tt)!=="svelte-1xvcahi"&&(tt.textContent=$o),An=o(v),nt=a(v,"P",{"data-svelte-h":!0}),g(nt)!=="svelte-twdedh"&&(nt.innerHTML=qo),Qn=o(v),F=a(v,"DIV",{class:!0});var Wt=h(F);l(we.$$.fragment,Wt),Mn=o(Wt),ot=a(Wt,"P",{"data-svelte-h":!0}),g(ot)!=="svelte-1d4i4z7"&&(ot.textContent=yo),Wt.forEach(s),Hn=o(v),j=a(v,"DIV",{class:!0});var St=h(j);l(Te.$$.fragment,St),Dn=o(St),rt=a(St,"P",{"data-svelte-h":!0}),g(rt)!=="svelte-4t526i"&&(rt.innerHTML=zo),St.forEach(s),Bn=o(v),O=a(v,"DIV",{class:!0});var Ut=h(O);l(Ce.$$.fragment,Ut),En=o(Ut),at=a(Ut,"P",{"data-svelte-h":!0}),g(at)!=="svelte-1meey31"&&(at.textContent=xo),Ut.forEach(s),Gn=o(v),W=a(v,"DIV",{class:!0});var Rt=h(W);l(ke.$$.fragment,Rt),In=o(Rt),st=a(Rt,"P",{"data-svelte-h":!0}),g(st)!=="svelte-1j1vsi1"&&(st.textContent=wo),Rt.forEach(s),Nn=o(v),S=a(v,"DIV",{class:!0});var Yt=h(S);l(Le.$$.fragment,Yt),Vn=o(Yt),it=a(Yt,"P",{"data-svelte-h":!0}),g(it)!=="svelte-i8h8td"&&(it.innerHTML=To),Yt.forEach(s),Fn=o(v),U=a(v,"DIV",{class:!0});var Jt=h(U);l(Pe.$$.fragment,Jt),jn=o(Jt),dt=a(Jt,"P",{"data-svelte-h":!0}),g(dt)!=="svelte-1uznum5"&&(dt.innerHTML=Co),Jt.forEach(s),On=o(v),R=a(v,"DIV",{class:!0});var Kt=h(R);l(Ae.$$.fragment,Kt),Wn=o(Kt),lt=a(Kt,"P",{"data-svelte-h":!0}),g(lt)!=="svelte-mjhdcv"&&(lt.innerHTML=ko),Kt.forEach(s),Sn=o(v),Y=a(v,"DIV",{class:!0});var Xt=h(Y);l(Qe.$$.fragment,Xt),Un=o(Xt),mt=a(Xt,"P",{"data-svelte-h":!0}),g(mt)!=="svelte-1e5epn5"&&(mt.innerHTML=Lo),Xt.forEach(s),Rn=o(v),J=a(v,"DIV",{class:!0});var Zt=h(J);l(Me.$$.fragment,Zt),Yn=o(Zt),ct=a(Zt,"P",{"data-svelte-h":!0}),g(ct)!=="svelte-13hqoy0"&&(ct.innerHTML=Po),Zt.forEach(s),Jn=o(v),K=a(v,"DIV",{class:!0});var en=h(K);l(He.$$.fragment,en),Kn=o(en),ut=a(en,"P",{"data-svelte-h":!0}),g(ut)!=="svelte-1kpdm09"&&(ut.textContent=Ao),en.forEach(s),Xn=o(v),X=a(v,"DIV",{class:!0});var tn=h(X);l(De.$$.fragment,tn),Zn=o(tn),pt=a(tn,"P",{"data-svelte-h":!0}),g(pt)!=="svelte-1lxocan"&&(pt.innerHTML=Qo),tn.forEach(s),v.forEach(s),Mt=o(e),ht=a(e,"P",{}),h(ht).forEach(s),this.h()},h(){_(y,"name","hf:doc:metadata"),_(y,"content",Fo),_(Q,"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"),_(M,"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"),_(H,"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"),_(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(B,"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"),_(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(I,"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"),_(V,"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"),_(F,"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"),_(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(W,"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"),_(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"),_(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"),_(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(f,"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),b(e,Z,i),b(e,w,i),b(e,Ee,i),m(ee,e,i),b(e,bt,i),b(e,te,i),b(e,vt,i),b(e,ne,i),b(e,$t,i),m(A,e,i),b(e,qt,i),m(oe,e,i),b(e,yt,i),b(e,T,i),m(re,T,null),t(T,nn),t(T,Ge),t(T,on),t(T,Q),m(ae,Q,null),t(Q,rn),t(Q,Ie),b(e,zt,i),m(se,e,i),b(e,xt,i),b(e,C,i),m(ie,C,null),t(C,an),t(C,Ne),t(C,sn),t(C,M),m(de,M,null),t(M,dn),t(M,Ve),b(e,wt,i),m(le,e,i),b(e,Tt,i),b(e,k,i),m(me,k,null),t(k,ln),t(k,Fe),t(k,mn),t(k,H),m(ce,H,null),t(H,cn),t(H,je),b(e,Ct,i),m(ue,e,i),b(e,kt,i),b(e,x,i),m(pe,x,null),t(x,un),t(x,Oe),t(x,pn),t(x,D),m(fe,D,null),t(D,fn),t(D,We),t(x,gn),t(x,B),m(ge,B,null),t(B,hn),t(B,Se),t(x,_n),t(x,E),m(he,E,null),t(E,bn),t(E,Ue),b(e,Lt,i),m(_e,e,i),b(e,Pt,i),b(e,q,i),m(be,q,null),t(q,vn),t(q,Re),t(q,$n),t(q,Ye),t(q,qn),t(q,Je),t(q,yn),t(q,G),m(ve,G,null),t(G,zn),t(G,Ke),t(q,xn),t(q,I),m($e,I,null),t(I,wn),t(I,Xe),t(q,Tn),t(q,N),m(qe,N,null),t(N,Cn),t(N,Ze),t(q,kn),t(q,V),m(ye,V,null),t(V,Ln),t(V,et),b(e,At,i),m(ze,e,i),b(e,Qt,i),b(e,f,i),m(xe,f,null),t(f,Pn),t(f,tt),t(f,An),t(f,nt),t(f,Qn),t(f,F),m(we,F,null),t(F,Mn),t(F,ot),t(f,Hn),t(f,j),m(Te,j,null),t(j,Dn),t(j,rt),t(f,Bn),t(f,O),m(Ce,O,null),t(O,En),t(O,at),t(f,Gn),t(f,W),m(ke,W,null),t(W,In),t(W,st),t(f,Nn),t(f,S),m(Le,S,null),t(S,Vn),t(S,it),t(f,Fn),t(f,U),m(Pe,U,null),t(U,jn),t(U,dt),t(f,On),t(f,R),m(Ae,R,null),t(R,Wn),t(R,lt),t(f,Sn),t(f,Y),m(Qe,Y,null),t(Y,Un),t(Y,mt),t(f,Rn),t(f,J),m(Me,J,null),t(J,Yn),t(J,ct),t(f,Jn),t(f,K),m(He,K,null),t(K,Kn),t(K,ut),t(f,Xn),t(f,X),m(De,X,null),t(X,Zn),t(X,pt),b(e,Mt,i),b(e,ht,i),Ht=!0},p(e,[i]){const P={};i&2&&(P.$$scope={dirty:i,ctx:e}),A.$set(P)},i(e){Ht||(c(ee.$$.fragment,e),c(A.$$.fragment,e),c(oe.$$.fragment,e),c(re.$$.fragment,e),c(ae.$$.fragment,e),c(se.$$.fragment,e),c(ie.$$.fragment,e),c(de.$$.fragment,e),c(le.$$.fragment,e),c(me.$$.fragment,e),c(ce.$$.fragment,e),c(ue.$$.fragment,e),c(pe.$$.fragment,e),c(fe.$$.fragment,e),c(ge.$$.fragment,e),c(he.$$.fragment,e),c(_e.$$.fragment,e),c(be.$$.fragment,e),c(ve.$$.fragment,e),c($e.$$.fragment,e),c(qe.$$.fragment,e),c(ye.$$.fragment,e),c(ze.$$.fragment,e),c(xe.$$.fragment,e),c(we.$$.fragment,e),c(Te.$$.fragment,e),c(Ce.$$.fragment,e),c(ke.$$.fragment,e),c(Le.$$.fragment,e),c(Pe.$$.fragment,e),c(Ae.$$.fragment,e),c(Qe.$$.fragment,e),c(Me.$$.fragment,e),c(He.$$.fragment,e),c(De.$$.fragment,e),Ht=!0)},o(e){u(ee.$$.fragment,e),u(A.$$.fragment,e),u(oe.$$.fragment,e),u(re.$$.fragment,e),u(ae.$$.fragment,e),u(se.$$.fragment,e),u(ie.$$.fragment,e),u(de.$$.fragment,e),u(le.$$.fragment,e),u(me.$$.fragment,e),u(ce.$$.fragment,e),u(ue.$$.fragment,e),u(pe.$$.fragment,e),u(fe.$$.fragment,e),u(ge.$$.fragment,e),u(he.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u(ve.$$.fragment,e),u($e.$$.fragment,e),u(qe.$$.fragment,e),u(ye.$$.fragment,e),u(ze.$$.fragment,e),u(xe.$$.fragment,e),u(we.$$.fragment,e),u(Te.$$.fragment,e),u(Ce.$$.fragment,e),u(ke.$$.fragment,e),u(Le.$$.fragment,e),u(Pe.$$.fragment,e),u(Ae.$$.fragment,e),u(Qe.$$.fragment,e),u(Me.$$.fragment,e),u(He.$$.fragment,e),u(De.$$.fragment,e),Ht=!1},d(e){e&&(s(Z),s(w),s(Ee),s(bt),s(te),s(vt),s(ne),s($t),s(qt),s(yt),s(T),s(zt),s(xt),s(C),s(wt),s(Tt),s(k),s(Ct),s(kt),s(x),s(Lt),s(Pt),s(q),s(At),s(Qt),s(f),s(Mt),s(ht)),s(y),p(ee,e),p(A,e),p(oe,e),p(re),p(ae),p(se,e),p(ie),p(de),p(le,e),p(me),p(ce),p(ue,e),p(pe),p(fe),p(ge),p(he),p(_e,e),p(be),p(ve),p($e),p(qe),p(ye),p(ze,e),p(xe),p(we),p(Te),p(Ce),p(ke),p(Le),p(Pe),p(Ae),p(Qe),p(Me),p(He),p(De)}}}const Fo='{"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":"GPTQConfig","local":"transformers.GPTQConfig","sections":[],"depth":2},{"title":"BitsAndBytesConfig","local":"transformers.BitsAndBytesConfig","sections":[],"depth":2},{"title":"HfQuantizer","local":"transformers.quantizers.HfQuantizer","sections":[],"depth":2}],"depth":1}';function jo(_t){return Ho(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yo extends Bo{constructor(y){super(),Eo(this,y,jo,Vo,Mo,{})}}export{Yo as component};
