import{s as Da,o as Ea,n as Qa}from"../chunks/scheduler.bdbef820.js";import{S as Na,i as Ba,g as r,s as n,r as d,A as Fa,h as a,f as s,c as o,j as h,u as l,x as p,k as _,y as t,a as g,v as m,d as c,t as f,w as u}from"../chunks/index.33f81d56.js";import{T as Ia}from"../chunks/Tip.34194030.js";import{D as b}from"../chunks/Docstring.64554317.js";import{C as Va}from"../chunks/CodeBlock.362b34a4.js";import{E as Ga}from"../chunks/ExampleCodeBlock.4f2252c6.js";import{H as P,E as ja}from"../chunks/EditOnGithub.a9246e21.js";function Wa(xt){let y,B='모델을 양자화하는 방법은 이 <a href="../quantization">양자화</a> 가이드를 통해 배울 수 있습니다.';return{c(){y=r("p"),y.innerHTML=B},l(z){y=a(z,"P",{"data-svelte-h":!0}),p(y)!=="svelte-15225cr"&&(y.innerHTML=B)},m(z,k){g(z,y,k)},p:Qa,d(z){z&&s(y)}}}function Oa(xt){let y,B="Example:",z,k,M;return k=new Va({props:{code:"cXVhbnRpemF0aW9uX2NvbmZpZyUyMCUzRCUyMFRvcmNoQW9Db25maWcoJTIyaW50NF93ZWlnaHRfb25seSUyMiUyQyUyMGdyb3VwX3NpemUlM0QzMiklMEElMjMlMjBpbnQ0X3dlaWdodF9vbmx5JTIwcXVhbnQlMjBpcyUyMG9ubHklMjB3b3JraW5nJTIwd2l0aCUyMCp0b3JjaC5iZmxvYXQxNiolMjBkdHlwZSUyMHJpZ2h0JTIwbm93JTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBkZXZpY2VfbWFwJTNEJTIyY3VkYSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMjBxdWFudGl6YXRpb25fY29uZmlnJTNEcXVhbnRpemF0aW9uX2NvbmZpZyk=",highlighted:`quantization_config = TorchAoConfig(<span class="hljs-string">&quot;int4_weight_only&quot;</span>, group_size=<span class="hljs-number">32</span>)
<span class="hljs-comment"># int4_weight_only quant is only working with *torch.bfloat16* dtype right now</span>
model = AutoModelForCausalLM.from_pretrained(model_id, device_map=<span class="hljs-string">&quot;cuda&quot;</span>, torch_dtype=torch.bfloat16, quantization_config=quantization_config)`,wrap:!1}}),{c(){y=r("p"),y.textContent=B,z=n(),d(k.$$.fragment)},l(x){y=a(x,"P",{"data-svelte-h":!0}),p(y)!=="svelte-11lpom8"&&(y.textContent=B),z=o(x),l(k.$$.fragment,x)},m(x,H){g(x,y,H),g(x,z,H),m(k,x,H),M=!0},p:Qa,i(x){M||(c(k.$$.fragment,x),M=!0)},o(x){f(k.$$.fragment,x),M=!1},d(x){x&&(s(y),s(z)),u(k,x)}}}function Sa(xt){let y,B,z,k,M,x,H,jr=`양자화 기법은 가중치와 활성화를 8비트 정수(int8)와 같은 더 낮은 정밀도의 데이터 타입으로 표현함으로써 메모리와 계산 비용을 줄입니다. 이를 통해 일반적으로는 메모리에 올릴 수 없는 더 큰 모델을 로드할 수 있고, 추론 속도를 높일 수 있습니다. Transformers는 AWQ와 GPTQ 양자화 알고리즘을 지원하며, bitsandbytes를 통해 8비트와 4비트 양자화를 지원합니다.
Transformers에서 지원되지 않는 양자화 기법들은 <code>HfQuantizer</code> 클래스를 통해 추가될 수 있습니다.`,vn,j,$n,xe,yn,Q,ze,qo,zt,Wr=`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>.`,xo,W,Ce,zo,Ct,Or="Safety checker that arguments are correct",qn,we,xn,D,Te,Co,wt,Sr="This is a wrapper class about <code>aqlm</code> parameters.",wo,O,ke,To,Tt,Ur="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",zn,Le,Cn,E,Ae,ko,kt,Rr=`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.`,Lo,S,Me,Ao,Lt,Yr="Safety checker that arguments are correct",wn,Pe,Tn,N,He,Mo,At,Zr=`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>.`,Po,U,Qe,Ho,Mt,Xr="Safety checker that arguments are correct",kn,De,Ln,w,Ee,Qo,Pt,Jr=`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.`,Do,R,Ne,Eo,Ht,Kr="Get compatible class with optimum gptq config dict",No,Y,Be,Bo,Qt,ea="Safety checker that arguments are correct",Fo,Z,Fe,Io,Dt,ta="Get compatible dict for optimum gptq config",An,Ie,Mn,q,Ve,Vo,Et,na=`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>.`,Go,Nt,oa="This replaces <code>load_in_8bit</code> or <code>load_in_4bit</code>therefore both options are mutually exclusive.",jo,Bt,ra=`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.`,Wo,X,Ge,Oo,Ft,aa="Returns <code>True</code> if the model is quantizable, <code>False</code> otherwise.",So,J,je,Uo,It,sa="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",Ro,K,We,Yo,Vt,ia=`This method returns the quantization method used for the model. If the model is not quantizable, it returns
<code>None</code>.`,Zo,ee,Oe,Xo,Gt,da=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,Pn,Se,Hn,v,Ue,Jo,jt,la=`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.`,Ko,Wt,ma=`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.`,er,te,Re,tr,Ot,ca="adjust max_memory argument for infer_auto_device_map() if extra memory is needed for quantization",nr,ne,Ye,or,St,fa=`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>.`,rr,oe,Ze,ar,Ut,ua=`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.`,sr,re,Xe,ir,Rt,pa=`takes needed components from state_dict and creates quantized param; only applicable if
requires_parameters_quantization == True`,dr,ae,Je,lr,Yt,ga=`Potentially dequantize the model to retrive the original model, with some loss in accuracy / performance.
Note not all quantization schemes support this.`,mr,se,Ke,cr,Zt,ha=`returns dtypes for modules that are not quantized - used for the computation of the device_map in case
one passes a str as a device_map. The method will use the <code>modules_to_not_convert</code> that is modified
in <code>_process_model_before_weight_loading</code>.`,fr,ie,et,ur,Xt,_a=`Post-process the model post weights loading.
Make sure to override the abstract method <code>_process_model_after_weight_loading</code>.`,pr,de,tt,gr,Jt,ba=`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>.`,hr,le,nt,_r,Kt,va=`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”“`,br,me,ot,vr,en,$a="Override this method if you want to adjust the <code>update_expected_keys</code>.",$r,ce,rt,yr,tn,ya="Override this method if you want to adjust the <code>missing_keys</code>.",qr,fe,at,xr,nn,qa=`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`,zr,ue,st,Cr,on,xa=`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.`,Qn,it,Dn,T,dt,wr,rn,za="This is wrapper around hqq’s BaseQuantizeConfig.",Tr,pe,lt,kr,an,Ca="Override from_dict, used in AutoQuantizationConfig.from_dict in quantizers/auto.py",Lr,ge,mt,Ar,sn,wa="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",Mr,he,ct,Pr,dn,Ta=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,En,ft,Nn,V,ut,Hr,ln,ka=`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.`,Bn,pt,Fn,L,gt,Qr,mn,La=`This is a wrapper class that handles compressed-tensors quantization config options.
It is a wrapper around <code>compressed_tensors.QuantizationConfig</code>`,Dr,_e,ht,Er,cn,Aa=`Instantiates a <a href="/docs/transformers/main/ko/main_classes/quantization#transformers.CompressedTensorsConfig">CompressedTensorsConfig</a> from a Python dictionary of parameters.
Optionally unwraps any args from the nested quantization_config`,Nr,be,_t,Br,fn,Ma=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,In,bt,Vn,A,vt,Fr,un,Pa="This is a config class for torchao quantization/sparsity techniques.",Ir,ve,Vr,$e,$t,Gr,pn,Ha="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",Gn,yt,jn,bn,Wn;return M=new P({props:{title:"양자화",local:"quantization",headingTag:"h1"}}),j=new Ia({props:{$$slots:{default:[Wa]},$$scope:{ctx:xt}}}),xe=new P({props:{title:"QuantoConfig",local:"transformers.QuantoConfig ][ transformers.QuantoConfig",headingTag:"h2"}}),ze=new b({props:{name:"class transformers.QuantoConfig",anchor:"transformers.QuantoConfig",parameters:[{name:"weights",val:" = 'int8'"},{name:"activations",val:" = None"},{name:"modules_to_not_convert",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.QuantoConfig.weights",description:`<strong>weights</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;int8&quot;</code>) &#x2014;
The target dtype for the weights after quantization. Supported values are (&#x201C;float8&#x201D;,&#x201C;int8&#x201D;,&#x201C;int4&#x201D;,&#x201C;int2&#x201D;)`,name:"weights"},{anchor:"transformers.QuantoConfig.activations",description:`<strong>activations</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The target dtype for the activations after quantization. Supported values are (None,&#x201C;int8&#x201D;,&#x201C;float8&#x201D;)`,name:"activations"},{anchor:"transformers.QuantoConfig.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>list</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have
some modules left in their original precision (e.g. Whisper encoder, Llava encoder, Mixtral gate layers).`,name:"modules_to_not_convert"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L997"}}),Ce=new b({props:{name:"post_init",anchor:"transformers.QuantoConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1026"}}),we=new P({props:{title:"AqlmConfig",local:"transformers.AqlmConfig ][ transformers.AqlmConfig",headingTag:"h2"}}),Te=new b({props:{name:"class transformers.AqlmConfig",anchor:"transformers.AqlmConfig",parameters:[{name:"in_group_size",val:": int = 8"},{name:"out_group_size",val:": int = 1"},{name:"num_codebooks",val:": int = 1"},{name:"nbits_per_codebook",val:": int = 16"},{name:"linear_weights_not_to_quantize",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AqlmConfig.in_group_size",description:`<strong>in_group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The group size along the input dimension.`,name:"in_group_size"},{anchor:"transformers.AqlmConfig.out_group_size",description:`<strong>out_group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The group size along the output dimension. It&#x2019;s recommended to always use 1.`,name:"out_group_size"},{anchor:"transformers.AqlmConfig.num_codebooks",description:`<strong>num_codebooks</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of codebooks for the Additive Quantization procedure.`,name:"num_codebooks"},{anchor:"transformers.AqlmConfig.nbits_per_codebook",description:`<strong>nbits_per_codebook</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of bits encoding a single codebook vector. Codebooks size is 2**nbits_per_codebook.`,name:"nbits_per_codebook"},{anchor:"transformers.AqlmConfig.linear_weights_not_to_quantize",description:`<strong>linear_weights_not_to_quantize</strong> (<code>Optional[List[str]]</code>, <em>optional</em>) &#x2014;
List of full paths of <code>nn.Linear</code> weight parameters that shall not be quantized.`,name:"linear_weights_not_to_quantize"},{anchor:"transformers.AqlmConfig.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional parameters from which to initialize the configuration object.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L937"}}),ke=new b({props:{name:"post_init",anchor:"transformers.AqlmConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L975"}}),Le=new P({props:{title:"AwqConfig",local:"transformers.AwqConfig ][ transformers.AwqConfig",headingTag:"h2"}}),Ae=new b({props:{name:"class transformers.AwqConfig",anchor:"transformers.AwqConfig",parameters:[{name:"bits",val:": int = 4"},{name:"group_size",val:": int = 128"},{name:"zero_point",val:": bool = True"},{name:"version",val:": AWQLinearVersion = <AWQLinearVersion.GEMM: 'gemm'>"},{name:"backend",val:": AwqBackendPackingMethod = <AwqBackendPackingMethod.AUTOAWQ: 'autoawq'>"},{name:"do_fuse",val:": Optional = None"},{name:"fuse_max_seq_len",val:": Optional = None"},{name:"modules_to_fuse",val:": Optional = None"},{name:"modules_to_not_convert",val:": Optional = None"},{name:"exllama_config",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AwqConfig.bits",description:`<strong>bits</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of bits to quantize to.`,name:"bits"},{anchor:"transformers.AwqConfig.group_size",description:`<strong>group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The group size to use for quantization. Recommended value is 128 and -1 uses per-column quantization.`,name:"group_size"},{anchor:"transformers.AwqConfig.zero_point",description:`<strong>zero_point</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use zero point quantization.`,name:"zero_point"},{anchor:"transformers.AwqConfig.version",description:`<strong>version</strong> (<code>AWQLinearVersion</code>, <em>optional</em>, defaults to <code>AWQLinearVersion.GEMM</code>) &#x2014;
The version of the quantization algorithm to use. GEMM is better for big batch_size (e.g. &gt;= 8) otherwise,
GEMV is better (e.g. &lt; 8 ). GEMM models are compatible with Exllama kernels.`,name:"version"},{anchor:"transformers.AwqConfig.backend",description:`<strong>backend</strong> (<code>AwqBackendPackingMethod</code>, <em>optional</em>, defaults to <code>AwqBackendPackingMethod.AUTOAWQ</code>) &#x2014;
The quantization backend. Some models might be quantized using <code>llm-awq</code> backend. This is useful for users
that quantize their own models using <code>llm-awq</code> library.`,name:"backend"},{anchor:"transformers.AwqConfig.do_fuse",description:`<strong>do_fuse</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to fuse attention and mlp layers together for faster inference`,name:"do_fuse"},{anchor:"transformers.AwqConfig.fuse_max_seq_len",description:`<strong>fuse_max_seq_len</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The Maximum sequence length to generate when using fusing.`,name:"fuse_max_seq_len"},{anchor:"transformers.AwqConfig.modules_to_fuse",description:`<strong>modules_to_fuse</strong> (<code>dict</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
Overwrite the natively supported fusing scheme with the one specified by the users.`,name:"modules_to_fuse"},{anchor:"transformers.AwqConfig.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>list</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have
some modules left in their original precision (e.g. Whisper encoder, Llava encoder, Mixtral gate layers).
Note you cannot quantize directly with transformers, please refer to <code>AutoAWQ</code> documentation for quantizing HF models.`,name:"modules_to_not_convert"},{anchor:"transformers.AwqConfig.exllama_config",description:`<strong>exllama_config</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
You can specify the version of the exllama kernel through the <code>version</code> key, the maximum sequence
length through the <code>max_input_len</code> key, and the maximum batch size through the <code>max_batch_size</code> key.
Defaults to <code>{&quot;version&quot;: 2, &quot;max_input_len&quot;: 2048, &quot;max_batch_size&quot;: 8}</code> if unset.`,name:"exllama_config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L764"}}),Me=new b({props:{name:"post_init",anchor:"transformers.AwqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L833"}}),Pe=new P({props:{title:"EetqConfig",local:"transformers.EetqConfig ][ transformers.EetqConfig",headingTag:"h2"}}),He=new b({props:{name:"class transformers.EetqConfig",anchor:"transformers.EetqConfig",parameters:[{name:"weights",val:": str = 'int8'"},{name:"modules_to_not_convert",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.EetqConfig.weights",description:`<strong>weights</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;int8&quot;</code>) &#x2014;
The target dtype for the weights. Supported value is only &#x201C;int8&#x201D;`,name:"weights"},{anchor:"transformers.EetqConfig.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>list</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have
some modules left in their original precision.`,name:"modules_to_not_convert"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1038"}}),Qe=new b({props:{name:"post_init",anchor:"transformers.EetqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1063"}}),De=new P({props:{title:"GPTQConfig",local:"transformers.GPTQConfig ][ transformers.GPTQConfig",headingTag:"h2"}}),Ee=new b({props:{name:"class transformers.GPTQConfig",anchor:"transformers.GPTQConfig",parameters:[{name:"bits",val:": int"},{name:"tokenizer",val:": Any = None"},{name:"dataset",val:": Union = None"},{name:"group_size",val:": int = 128"},{name:"damp_percent",val:": float = 0.1"},{name:"desc_act",val:": bool = False"},{name:"sym",val:": bool = True"},{name:"true_sequential",val:": bool = True"},{name:"use_cuda_fp16",val:": bool = False"},{name:"model_seqlen",val:": Optional = None"},{name:"block_name_to_quantize",val:": Optional = None"},{name:"module_name_preceding_first_block",val:": Optional = None"},{name:"batch_size",val:": int = 1"},{name:"pad_token_id",val:": Optional = None"},{name:"use_exllama",val:": Optional = None"},{name:"max_input_length",val:": Optional = None"},{name:"exllama_config",val:": Optional = None"},{name:"cache_block_outputs",val:": bool = True"},{name:"modules_in_block_to_quantize",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GPTQConfig.bits",description:`<strong>bits</strong> (<code>int</code>) &#x2014;
The number of bits to quantize to, supported numbers are (2, 3, 4, 8).`,name:"bits"},{anchor:"transformers.GPTQConfig.tokenizer",description:`<strong>tokenizer</strong> (<code>str</code> or <code>PreTrainedTokenizerBase</code>, <em>optional</em>) &#x2014;
The tokenizer used to process the dataset. You can pass either:<ul>
<li>A custom tokenizer object.</li>
<li>A string, the <em>model id</em> of a predefined tokenizer hosted inside a model repo on huggingface.co.</li>
<li>A path to a <em>directory</em> containing vocabulary files required by the tokenizer, for instance saved
using the <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
</ul>`,name:"tokenizer"},{anchor:"transformers.GPTQConfig.dataset",description:`<strong>dataset</strong> (<code>Union[List[str]]</code>, <em>optional</em>) &#x2014;
The dataset used for quantization. You can provide your own dataset in a list of string or just use the
original datasets used in GPTQ paper [&#x2018;wikitext2&#x2019;,&#x2018;c4&#x2019;,&#x2018;c4-new&#x2019;]`,name:"dataset"},{anchor:"transformers.GPTQConfig.group_size",description:`<strong>group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The group size to use for quantization. Recommended value is 128 and -1 uses per-column quantization.`,name:"group_size"},{anchor:"transformers.GPTQConfig.damp_percent",description:`<strong>damp_percent</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The percent of the average Hessian diagonal to use for dampening. Recommended value is 0.1.`,name:"damp_percent"},{anchor:"transformers.GPTQConfig.desc_act",description:`<strong>desc_act</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to quantize columns in order of decreasing activation size. Setting it to False can significantly
speed up inference but the perplexity may become slightly worse. Also known as act-order.`,name:"desc_act"},{anchor:"transformers.GPTQConfig.sym",description:`<strong>sym</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use symetric quantization.`,name:"sym"},{anchor:"transformers.GPTQConfig.true_sequential",description:`<strong>true_sequential</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to perform sequential quantization even within a single Transformer block. Instead of quantizing
the entire block at once, we perform layer-wise quantization. As a result, each layer undergoes
quantization using inputs that have passed through the previously quantized layers.`,name:"true_sequential"},{anchor:"transformers.GPTQConfig.use_cuda_fp16",description:`<strong>use_cuda_fp16</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use optimized cuda kernel for fp16 model. Need to have model in fp16.`,name:"use_cuda_fp16"},{anchor:"transformers.GPTQConfig.model_seqlen",description:`<strong>model_seqlen</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum sequence length that the model can take.`,name:"model_seqlen"},{anchor:"transformers.GPTQConfig.block_name_to_quantize",description:`<strong>block_name_to_quantize</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The transformers block name to quantize. If None, we will infer the block name using common patterns (e.g. model.layers)`,name:"block_name_to_quantize"},{anchor:"transformers.GPTQConfig.module_name_preceding_first_block",description:`<strong>module_name_preceding_first_block</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The layers that are preceding the first Transformer block.`,name:"module_name_preceding_first_block"},{anchor:"transformers.GPTQConfig.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The batch size used when processing the dataset`,name:"batch_size"},{anchor:"transformers.GPTQConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The pad token id. Needed to prepare the dataset when <code>batch_size</code> &gt; 1.`,name:"pad_token_id"},{anchor:"transformers.GPTQConfig.use_exllama",description:`<strong>use_exllama</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to use exllama backend. Defaults to <code>True</code> if unset. Only works with <code>bits</code> = 4.`,name:"use_exllama"},{anchor:"transformers.GPTQConfig.max_input_length",description:`<strong>max_input_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum input length. This is needed to initialize a buffer that depends on the maximum expected input
length. It is specific to the exllama backend with act-order.`,name:"max_input_length"},{anchor:"transformers.GPTQConfig.exllama_config",description:`<strong>exllama_config</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The exllama config. You can specify the version of the exllama kernel through the <code>version</code> key. Defaults
to <code>{&quot;version&quot;: 1}</code> if unset.`,name:"exllama_config"},{anchor:"transformers.GPTQConfig.cache_block_outputs",description:`<strong>cache_block_outputs</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to cache block outputs to reuse as inputs for the succeeding block.`,name:"cache_block_outputs"},{anchor:"transformers.GPTQConfig.modules_in_block_to_quantize",description:`<strong>modules_in_block_to_quantize</strong> (<code>List[List[str]]</code>, <em>optional</em>) &#x2014;
List of list of module names to quantize in the specified block. This argument is useful to exclude certain linear modules from being quantized.
The block to quantize can be specified by setting <code>block_name_to_quantize</code>. We will quantize each list sequentially. If not set, we will quantize all linear layers.
Example: <code>modules_in_block_to_quantize =[[&quot;self_attn.k_proj&quot;, &quot;self_attn.v_proj&quot;, &quot;self_attn.q_proj&quot;], [&quot;self_attn.o_proj&quot;]]</code>.
In this example, we will first quantize the q,k,v layers simultaneously since they are independent.
Then, we will quantize <code>self_attn.o_proj</code> layer with the q,k,v layers quantized. This way, we will get
better results since it reflects the real input <code>self_attn.o_proj</code> will get when the model is quantized.`,name:"modules_in_block_to_quantize"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L547"}}),Ne=new b({props:{name:"from_dict_optimum",anchor:"transformers.GPTQConfig.from_dict_optimum",parameters:[{name:"config_dict",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L749"}}),Be=new b({props:{name:"post_init",anchor:"transformers.GPTQConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L661"}}),Fe=new b({props:{name:"to_dict_optimum",anchor:"transformers.GPTQConfig.to_dict_optimum",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L740"}}),Ie=new P({props:{title:"BitsAndBytesConfig",local:"#transformers.BitsAndBytesConfig ][ transformers.BitsAndBytesConfig",headingTag:"h2"}}),Ve=new b({props:{name:"class transformers.BitsAndBytesConfig",anchor:"transformers.BitsAndBytesConfig",parameters:[{name:"load_in_8bit",val:" = False"},{name:"load_in_4bit",val:" = False"},{name:"llm_int8_threshold",val:" = 6.0"},{name:"llm_int8_skip_modules",val:" = None"},{name:"llm_int8_enable_fp32_cpu_offload",val:" = False"},{name:"llm_int8_has_fp16_weight",val:" = False"},{name:"bnb_4bit_compute_dtype",val:" = None"},{name:"bnb_4bit_quant_type",val:" = 'fp4'"},{name:"bnb_4bit_use_double_quant",val:" = False"},{name:"bnb_4bit_quant_storage",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BitsAndBytesConfig.load_in_8bit",description:`<strong>load_in_8bit</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used to enable 8-bit quantization with LLM.int8().`,name:"load_in_8bit"},{anchor:"transformers.BitsAndBytesConfig.load_in_4bit",description:`<strong>load_in_4bit</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used to enable 4-bit quantization by replacing the Linear layers with FP4/NF4 layers from
<code>bitsandbytes</code>.`,name:"load_in_4bit"},{anchor:"transformers.BitsAndBytesConfig.llm_int8_threshold",description:`<strong>llm_int8_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 6.0) &#x2014;
This corresponds to the outlier threshold for outlier detection as described in <code>LLM.int8() : 8-bit Matrix Multiplication for Transformers at Scale</code> paper: <a href="https://arxiv.org/abs/2208.07339" rel="nofollow">https://arxiv.org/abs/2208.07339</a> Any hidden states value
that is above this threshold will be considered an outlier and the operation on those values will be done
in fp16. Values are usually normally distributed, that is, most values are in the range [-3.5, 3.5], but
there are some exceptional systematic outliers that are very differently distributed for large models.
These outliers are often in the interval [-60, -6] or [6, 60]. Int8 quantization works well for values of
magnitude ~5, but beyond that, there is a significant performance penalty. A good default threshold is 6,
but a lower threshold might be needed for more unstable models (small models, fine-tuning).`,name:"llm_int8_threshold"},{anchor:"transformers.BitsAndBytesConfig.llm_int8_skip_modules",description:`<strong>llm_int8_skip_modules</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
An explicit list of the modules that we do not want to convert in 8-bit. This is useful for models such as
Jukebox that has several heads in different places and not necessarily at the last position. For example
for <code>CausalLM</code> models, the last <code>lm_head</code> is kept in its original <code>dtype</code>.`,name:"llm_int8_skip_modules"},{anchor:"transformers.BitsAndBytesConfig.llm_int8_enable_fp32_cpu_offload",description:`<strong>llm_int8_enable_fp32_cpu_offload</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used for advanced use cases and users that are aware of this feature. If you want to split
your model in different parts and run some parts in int8 on GPU and some parts in fp32 on CPU, you can use
this flag. This is useful for offloading large models such as <code>google/flan-t5-xxl</code>. Note that the int8
operations will not be run on CPU.`,name:"llm_int8_enable_fp32_cpu_offload"},{anchor:"transformers.BitsAndBytesConfig.llm_int8_has_fp16_weight",description:`<strong>llm_int8_has_fp16_weight</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag runs LLM.int8() with 16-bit main weights. This is useful for fine-tuning as the weights do not
have to be converted back and forth for the backward pass.`,name:"llm_int8_has_fp16_weight"},{anchor:"transformers.BitsAndBytesConfig.bnb_4bit_compute_dtype",description:`<strong>bnb_4bit_compute_dtype</strong> (<code>torch.dtype</code> or str, <em>optional</em>, defaults to <code>torch.float32</code>) &#x2014;
This sets the computational type which might be different than the input type. For example, inputs might be
fp32, but computation can be set to bf16 for speedups.`,name:"bnb_4bit_compute_dtype"},{anchor:"transformers.BitsAndBytesConfig.bnb_4bit_quant_type",description:`<strong>bnb_4bit_quant_type</strong> (<code>str</code>,  <em>optional</em>, defaults to <code>&quot;fp4&quot;</code>) &#x2014;
This sets the quantization data type in the bnb.nn.Linear4Bit layers. Options are FP4 and NF4 data types
which are specified by <code>fp4</code> or <code>nf4</code>.`,name:"bnb_4bit_quant_type"},{anchor:"transformers.BitsAndBytesConfig.bnb_4bit_use_double_quant",description:`<strong>bnb_4bit_use_double_quant</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used for nested quantization where the quantization constants from the first quantization are
quantized again.`,name:"bnb_4bit_use_double_quant"},{anchor:"transformers.BitsAndBytesConfig.bnb_4bit_quant_storage",description:`<strong>bnb_4bit_quant_storage</strong> (<code>torch.dtype</code> or str, <em>optional</em>, defaults to <code>torch.uint8</code>) &#x2014;
This sets the storage type to pack the quanitzed 4-bit prarams.`,name:"bnb_4bit_quant_storage"},{anchor:"transformers.BitsAndBytesConfig.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional parameters from which to initialize the configuration object.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L311"}}),Ge=new b({props:{name:"is_quantizable",anchor:"transformers.BitsAndBytesConfig.is_quantizable",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L482"}}),je=new b({props:{name:"post_init",anchor:"transformers.BitsAndBytesConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L445"}}),We=new b({props:{name:"quantization_method",anchor:"transformers.BitsAndBytesConfig.quantization_method",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L488"}}),Oe=new b({props:{name:"to_diff_dict",anchor:"transformers.BitsAndBytesConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L519",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>
`}}),Se=new P({props:{title:"HfQuantizer",local:"transformers.quantizers.HfQuantizer ][ transformers.quantizers.HfQuantizer",headingTag:"h2"}}),Ue=new b({props:{name:"class transformers.quantizers.HfQuantizer",anchor:"transformers.quantizers.HfQuantizer",parameters:[{name:"quantization_config",val:": QuantizationConfigMixin"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L28"}}),Re=new b({props:{name:"adjust_max_memory",anchor:"transformers.quantizers.HfQuantizer.adjust_max_memory",parameters:[{name:"max_memory",val:": Dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L143"}}),Ye=new b({props:{name:"adjust_target_dtype",anchor:"transformers.quantizers.HfQuantizer.adjust_target_dtype",parameters:[{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.adjust_target_dtype.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>, <em>optional</em>) &#x2014;
The torch_dtype that is used to compute the device_map.`,name:"torch_dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L90"}}),Ze=new b({props:{name:"check_quantized_param",anchor:"transformers.quantizers.HfQuantizer.check_quantized_param",parameters:[{name:"model",val:": PreTrainedModel"},{name:"param_value",val:": torch.Tensor"},{name:"param_name",val:": str"},{name:"state_dict",val:": Dict"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L147"}}),Xe=new b({props:{name:"create_quantized_param",anchor:"transformers.quantizers.HfQuantizer.create_quantized_param",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L162"}}),Je=new b({props:{name:"dequantize",anchor:"transformers.quantizers.HfQuantizer.dequantize",parameters:[{name:"model",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L209"}}),Ke=new b({props:{name:"get_special_dtypes_update",anchor:"transformers.quantizers.HfQuantizer.get_special_dtypes_update",parameters:[{name:"model",val:""},{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.get_special_dtypes_update.model",description:`<strong>model</strong> (<code>~transformers.PreTrainedModel</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"transformers.quantizers.HfQuantizer.get_special_dtypes_update.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The dtype passed in <code>from_pretrained</code> method.`,name:"torch_dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L124"}}),et=new b({props:{name:"postprocess_model",anchor:"transformers.quantizers.HfQuantizer.postprocess_model",parameters:[{name:"model",val:": PreTrainedModel"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.postprocess_model.model",description:`<strong>model</strong> (<code>~transformers.PreTrainedModel</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"transformers.quantizers.HfQuantizer.postprocess_model.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The keyword arguments that are passed along <code>_process_model_after_weight_loading</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L196"}}),tt=new b({props:{name:"preprocess_model",anchor:"transformers.quantizers.HfQuantizer.preprocess_model",parameters:[{name:"model",val:": PreTrainedModel"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.preprocess_model.model",description:`<strong>model</strong> (<code>~transformers.PreTrainedModel</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"transformers.quantizers.HfQuantizer.preprocess_model.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The keyword arguments that are passed along <code>_process_model_before_weight_loading</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L180"}}),nt=new b({props:{name:"update_device_map",anchor:"transformers.quantizers.HfQuantizer.update_device_map",parameters:[{name:"device_map",val:": Optional"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.update_device_map.device_map",description:`<strong>device_map</strong> (<code>Union[dict, str]</code>, <em>optional</em>) &#x2014;
The device_map that is passed through the <code>from_pretrained</code> method.`,name:"device_map"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L78"}}),ot=new b({props:{name:"update_expected_keys",anchor:"transformers.quantizers.HfQuantizer.update_expected_keys",parameters:[{name:"model",val:""},{name:"expected_keys",val:": List"},{name:"loaded_keys",val:": List"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.update_expected_keys.expected_keys",description:`<strong>expected_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of the expected keys in the initialized model.`,name:"expected_keys"},{anchor:"transformers.quantizers.HfQuantizer.update_expected_keys.loaded_keys",description:`<strong>loaded_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of the loaded keys in the checkpoint.`,name:"loaded_keys"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L112"}}),rt=new b({props:{name:"update_missing_keys",anchor:"transformers.quantizers.HfQuantizer.update_missing_keys",parameters:[{name:"model",val:""},{name:"missing_keys",val:": List"},{name:"prefix",val:": str"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.update_missing_keys.missing_keys",description:`<strong>missing_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of missing keys in the checkpoint compared to the state dict of the model`,name:"missing_keys"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L102"}}),at=new b({props:{name:"update_torch_dtype",anchor:"transformers.quantizers.HfQuantizer.update_torch_dtype",parameters:[{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"transformers.quantizers.HfQuantizer.update_torch_dtype.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The input dtype that is passed in <code>from_pretrained</code>`,name:"torch_dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L66"}}),st=new b({props:{name:"validate_environment",anchor:"transformers.quantizers.HfQuantizer.validate_environment",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py#L172"}}),it=new P({props:{title:"HqqConfig",local:"transformers.HqqConfig ][ transformers.HqqConfig",headingTag:"h2"}}),dt=new b({props:{name:"class transformers.HqqConfig",anchor:"transformers.HqqConfig",parameters:[{name:"nbits",val:": int = 4"},{name:"group_size",val:": int = 64"},{name:"view_as_float",val:": bool = False"},{name:"axis",val:": Optional = None"},{name:"dynamic_config",val:": Optional = None"},{name:"skip_modules",val:": List = ['lm_head']"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.HqqConfig.nbits",description:`<strong>nbits</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of bits. Supported values are (8, 4, 3, 2, 1).`,name:"nbits"},{anchor:"transformers.HqqConfig.group_size",description:`<strong>group_size</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Group-size value. Supported values are any value that is divisble by weight.shape[axis]).`,name:"group_size"},{anchor:"transformers.HqqConfig.view_as_float",description:`<strong>view_as_float</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
View the quantized weight as float (used in distributed training) if set to <code>True</code>.`,name:"view_as_float"},{anchor:"transformers.HqqConfig.axis",description:`<strong>axis</strong> (<code>Optional[int]</code>, <em>optional</em>) &#x2014;
Axis along which grouping is performed. Supported values are 0 or 1.`,name:"axis"},{anchor:"transformers.HqqConfig.dynamic_config",description:`<strong>dynamic_config</strong> (dict, <em>optional</em>) &#x2014;
Parameters for dynamic configuration. The key is the name tag of the layer and the value is a quantization config.
If set, each layer specified by its id will use its dedicated quantization configuration.`,name:"dynamic_config"},{anchor:"transformers.HqqConfig.skip_modules",description:`<strong>skip_modules</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&apos;lm_head&apos;]</code>) &#x2014;
List of <code>nn.Linear</code> layers to skip.`,name:"skip_modules"},{anchor:"transformers.HqqConfig.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional parameters from which to initialize the configuration object.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L190"}}),lt=new b({props:{name:"from_dict",anchor:"transformers.HqqConfig.from_dict",parameters:[{name:"config",val:": Dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L264"}}),mt=new b({props:{name:"post_init",anchor:"transformers.HqqConfig.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L258"}}),ct=new b({props:{name:"to_diff_dict",anchor:"transformers.HqqConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L289",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>
`}}),ft=new P({props:{title:"FbgemmFp8Config",local:"transformers.FbgemmFp8Config ][ transformers.FbgemmFp8Config",headingTag:"h2"}}),ut=new b({props:{name:"class transformers.FbgemmFp8Config",anchor:"transformers.FbgemmFp8Config",parameters:[{name:"activation_scale_ub",val:": float = 1200.0"},{name:"modules_to_not_convert",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FbgemmFp8Config.activation_scale_ub",description:`<strong>activation_scale_ub</strong> (<code>float</code>, <em>optional</em>, defaults to 1200.0) &#x2014;
The activation scale upper bound. This is used when quantizing the input activation.`,name:"activation_scale_ub"},{anchor:"transformers.FbgemmFp8Config.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>list</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have
some modules left in their original precision.`,name:"modules_to_not_convert"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1196"}}),pt=new P({props:{title:"CompressedTensorsConfig",local:"transformers.CompressedTensorsConfig ][ transformers.CompressedTensorsConfig",headingTag:"h2"}}),gt=new b({props:{name:"class transformers.CompressedTensorsConfig",anchor:"transformers.CompressedTensorsConfig",parameters:[{name:"config_groups",val:": Dict = None"},{name:"format",val:": str = 'dense'"},{name:"quantization_status",val:": QuantizationStatus = 'initialized'"},{name:"kv_cache_scheme",val:": Optional = None"},{name:"global_compression_ratio",val:": Optional = None"},{name:"ignore",val:": Optional = None"},{name:"sparsity_config",val:": Dict = None"},{name:"quant_method",val:": str = 'compressed-tensors'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CompressedTensorsConfig.config_groups",description:`<strong>config_groups</strong> (<code>typing.Dict[str, typing.Union[ForwardRef(&apos;QuantizationScheme&apos;), typing.List[str]]]</code>, <em>optional</em>) &#x2014;
dictionary mapping group name to a quantization scheme definition`,name:"config_groups"},{anchor:"transformers.CompressedTensorsConfig.format",description:`<strong>format</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;dense&quot;</code>) &#x2014;
format the model is represented as`,name:"format"},{anchor:"transformers.CompressedTensorsConfig.quantization_status",description:`<strong>quantization_status</strong> (<code>QuantizationStatus</code>, <em>optional</em>, defaults to <code>&quot;initialized&quot;</code>) &#x2014;
status of model in the quantization lifecycle, ie &#x2018;initialized&#x2019;, &#x2018;calibration&#x2019;, &#x2018;frozen&#x2019;`,name:"quantization_status"},{anchor:"transformers.CompressedTensorsConfig.kv_cache_scheme",description:`<strong>kv_cache_scheme</strong> (<code>typing.Union[QuantizationArgs, NoneType]</code>, <em>optional</em>) &#x2014;
specifies quantization of the kv cache. If None, kv cache is not quantized.`,name:"kv_cache_scheme"},{anchor:"transformers.CompressedTensorsConfig.global_compression_ratio",description:`<strong>global_compression_ratio</strong> (<code>typing.Union[float, NoneType]</code>, <em>optional</em>) &#x2014;
0-1 float percentage of model compression`,name:"global_compression_ratio"},{anchor:"transformers.CompressedTensorsConfig.ignore",description:`<strong>ignore</strong> (<code>typing.Union[typing.List[str], NoneType]</code>, <em>optional</em>) &#x2014;
layer names or types to not quantize, supports regex prefixed by &#x2018;re:&#x2019;`,name:"ignore"},{anchor:"transformers.CompressedTensorsConfig.sparsity_config",description:`<strong>sparsity_config</strong> (<code>typing.Dict[str, typing.Any]</code>, <em>optional</em>) &#x2014;
configuration for sparsity compression`,name:"sparsity_config"},{anchor:"transformers.CompressedTensorsConfig.quant_method",description:`<strong>quant_method</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;compressed-tensors&quot;</code>) &#x2014;
do not override, should be compressed-tensors`,name:"quant_method"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1072"}}),ht=new b({props:{name:"from_dict",anchor:"transformers.CompressedTensorsConfig.from_dict",parameters:[{name:"config_dict",val:""},{name:"return_unused_kwargs",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CompressedTensorsConfig.from_dict.config_dict",description:`<strong>config_dict</strong> (<code>Dict[str, Any]</code>) &#x2014;
Dictionary that will be used to instantiate the configuration object.`,name:"config_dict"},{anchor:"transformers.CompressedTensorsConfig.from_dict.return_unused_kwargs",description:`<strong>return_unused_kwargs</strong> (<code>bool</code>,<em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return a list of unused keyword arguments. Used for <code>from_pretrained</code> method in
<code>PreTrainedModel</code>.`,name:"return_unused_kwargs"},{anchor:"transformers.CompressedTensorsConfig.from_dict.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>) &#x2014;
Additional parameters from which to initialize the configuration object.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/quantization_config.py#L1135",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


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