import{s as Bi,o as Zi,n as $i}from"../chunks/scheduler.c90a44b2.js";import{S as Fi,i as Ei,e as o,s as a,c as r,h as Ri,a as s,d as i,b as l,f as Qi,g as m,j as d,k as He,q as w,l as Xi,m as n,n as c,t as p,o as u,p as y}from"../chunks/index.66c3f415.js";import{T as Gi}from"../chunks/Tip.4ffa6759.js";import{C as Oi,H as M}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.0df90478.js";import{C as T}from"../chunks/CodeBlock.434286b4.js";function Li(jt){let b,h="If quantization_config is not provided, model will be exported in 8 bits by default when it has more than 1 billion parameters. You can disable it with <code>load_in_8bit=False</code>.";return{c(){b=o("p"),b.innerHTML=h},l(f){b=s(f,"P",{"data-svelte-h":!0}),d(b)!=="svelte-1g2mh0l"&&(b.innerHTML=h)},m(f,Wt){n(f,b,Wt)},p:$i,d(f){f&&i(b)}}}function Si(jt){let b,h,f,Wt,_,Qt,x,Bt,C,Ne='🤗 Optimum Intel provides an <code>openvino</code> package that enables you to apply a variety of model quantization methods on many models hosted on the 🤗 hub using the <a href="https://docs.openvino.ai/2024/openvino-workflow/model-optimization.html" rel="nofollow">NNCF</a> framework.',Zt,k,Ye="Quantization is a technique to reduce the computational and memory costs of running inference by representing the weights and / or the activations with lower precision data types like 8-bit or 4-bit.",$t,z,Ft,J,Ae="Click on a ✅ to copy the command/code for the corresponding optimization case.",Et,g,Pe="Command copied to clipboard",Rt,V,De=`<thead><tr><th rowspan="3">Task<br/>(OV Model Class)</th> <th colspan="4">Weight-only Quantization</th> <th colspan="2" rowspan="2">Hybrid Quantization</th> <th colspan="2" rowspan="2">Full Quantization</th> <th colspan="2" rowspan="2">Mixed Quantization</th></tr> <tr><th colspan="2">Data-free</th> <th colspan="2">Data-aware</th></tr> <tr><th>CLI</th> <th>Python</th> <th>CLI</th> <th>Python</th> <th>CLI</th> <th>Python</th> <th>CLI</th> <th>Python</th> <th>CLI</th> <th>Python</th></tr></thead> <tbody><tr><td style="text-align: center; vertical-align: middle;">text-generation<br/>(OVModelForCausalLM)</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m TinyLlama/TinyLlama-1.1B-Chat-v1.0 --weight-format int8 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForCausalLM.from_pretrained(&#39;TinyLlama/TinyLlama-1.1B-Chat-v1.0&#39;, quantization_config=OVWeightQuantizationConfig(bits=8)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m TinyLlama/TinyLlama-1.1B-Chat-v1.0 --weight-format int4 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForCausalLM.from_pretrained(&#39;TinyLlama/TinyLlama-1.1B-Chat-v1.0&#39;, quantization_config=OVWeightQuantizationConfig(bits=4, dataset=&#39;wikitext2&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">-</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m TinyLlama/TinyLlama-1.1B-Chat-v1.0 --quant-mode int8 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForCausalLM.from_pretrained(&#39;TinyLlama/TinyLlama-1.1B-Chat-v1.0&#39;, quantization_config=OVQuantizationConfig(bits=8, dataset=&#39;wikitext2&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m TinyLlama/TinyLlama-1.1B-Chat-v1.0 --quant-mode nf4_f8e4m3 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForCausalLM.from_pretrained(&#39;TinyLlama/TinyLlama-1.1B-Chat-v1.0&#39;, quantization_config=OVMixedQuantizationConfig(OVWeightQuantizationConfig(bits=4, dtype=&#39;nf4&#39;), OVQuantizationConfig(dtype=&#39;f8e4m3&#39;, dataset=&#39;wikitext2&#39;))).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td></tr> <tr><td style="text-align: center; vertical-align: middle;">image-text-to-text<br/>(OVModelForVisualCausalLM)</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino --task image-text-to-text -m OpenGVLab/InternVL2-1B --trust-remote-code --weight-format int4 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForVisualCausalLM.from_pretrained(&#39;OpenGVLab/InternVL2-1B&#39;, trust_remote_code=True, quantization_config=OVWeightQuantizationConfig(bits=4)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino --task image-text-to-text -m OpenGVLab/InternVL2-1B --trust-remote-code --weight-format int4 --dataset contextual ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForVisualCausalLM.from_pretrained(&#39;OpenGVLab/InternVL2-1B&#39;, trust_remote_code=True, quantization_config=OVWeightQuantizationConfig(bits=4, dataset=&#39;contextual&#39;, trust_remote_code=True)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino --task image-text-to-text -m OpenGVLab/InternVL2-1B --trust-remote-code --quant-mode int8 --dataset contextual ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForVisualCausalLM.from_pretrained(&#39;OpenGVLab/InternVL2-1B&#39;, trust_remote_code=True, quantization_config=OVQuantizationConfig(bits=8, dataset=&#39;contextual&#39;, trust_remote_code=True)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td></tr> <tr><td style="text-align: center; vertical-align: middle;">text-to-image, text-to-video<br/>(OVDiffusionPipeline)</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m dreamlike-art/dreamlike-anime-1.0 --weight-format int8 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVDiffusionPipeline.from_pretrained(&#39;dreamlike-art/dreamlike-anime-1.0&#39;, quantization_config=OVWeightQuantizationConfig(bits=8)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m dreamlike-art/dreamlike-anime-1.0 --weight-format int8 --dataset conceptual_captions ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVDiffusionPipeline.from_pretrained(&#39;dreamlike-art/dreamlike-anime-1.0&#39;, quantization_config=OVWeightQuantizationConfig(bits=8, quant_method=&#39;hybrid&#39;, dataset=&#39;conceptual_captions&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m dreamlike-art/dreamlike-anime-1.0 --quant-mode int8 --dataset conceptual_captions ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVDiffusionPipeline.from_pretrained(&#39;dreamlike-art/dreamlike-anime-1.0&#39;, quantization_config=OVQuantizationConfig(bits=8, dataset=&#39;conceptual_captions&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td></tr> <tr><td style="text-align: center; vertical-align: middle;">automatic-speech-recognition<br/>(OVModelForSpeechSeq2Seq)</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m openai/whisper-large-v3-turbo --disable-stateful --quant-mode int8 --dataset librispeech --num-samples 10 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForSpeechSeq2Seq.from_pretrained(&#39;openai/whisper-large-v3-turbo&#39;, stateful=False, quantization_config=OVQuantizationConfig(bits=8, dataset=&#39;librispeech&#39;, num_samples=10)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td></tr> <tr><td style="text-align: center; vertical-align: middle;">feature-extraction<br/>(OVModelForFeatureExtraction)</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m microsoft/codebert-base --weight-format int8 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForFeatureExtraction.from_pretrained(&#39;microsoft/codebert-base&#39;, quantization_config=OVWeightQuantizationConfig(bits=8)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m microsoft/codebert-base --weight-format int4 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForFeatureExtraction.from_pretrained(&#39;microsoft/codebert-base&#39;, quantization_config=OVWeightQuantizationConfig(bits=4, dataset=&#39;wikitext2&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">-</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m microsoft/codebert-base --quant-mode int8 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForFeatureExtraction.from_pretrained(&#39;microsoft/codebert-base&#39;, quantization_config=OVQuantizationConfig(bits=8, dataset=&#39;wikitext2&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m microsoft/codebert-base --quant-mode nf4_f8e4m3 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForFeatureExtraction.from_pretrained(&#39;microsoft/codebert-base&#39;, quantization_config=OVMixedQuantizationConfig(OVWeightQuantizationConfig(bits=4, dtype=&#39;nf4&#39;), OVQuantizationConfig(dtype=&#39;f8e4m3&#39;, dataset=&#39;wikitext2&#39;))).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td></tr> <tr><td style="text-align: center; vertical-align: middle;">feature-extraction<br/>(OVSentenceTransformer)</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino --library sentence_transformers -m sentence-transformers/all-mpnet-base-v2 --weight-format int8 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVSentenceTransformer.from_pretrained(&#39;sentence-transformers/all-mpnet-base-v2&#39;, quantization_config=OVWeightQuantizationConfig(bits=8)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino --library sentence_transformers -m sentence-transformers/all-mpnet-base-v2 --weight-format int4 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVSentenceTransformer.from_pretrained(&#39;sentence-transformers/all-mpnet-base-v2&#39;, quantization_config=OVWeightQuantizationConfig(bits=4, dataset=&#39;wikitext2&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">-</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino --library sentence_transformers -m sentence-transformers/all-mpnet-base-v2 --quant-mode int8 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVSentenceTransformer.from_pretrained(&#39;sentence-transformers/all-mpnet-base-v2&#39;, quantization_config=OVQuantizationConfig(bits=8, dataset=&#39;wikitext2&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino --library sentence_transformers -m sentence-transformers/all-mpnet-base-v2 --quant-mode nf4_f8e4m3 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVSentenceTransformer.from_pretrained(&#39;sentence-transformers/all-mpnet-base-v2&#39;, quantization_config=OVMixedQuantizationConfig(OVWeightQuantizationConfig(bits=4, dtype=&#39;nf4&#39;), OVQuantizationConfig(dtype=&#39;f8e4m3&#39;, dataset=&#39;wikitext2&#39;))).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td></tr> <tr><td style="text-align: center; vertical-align: middle;">fill-mask<br/>(OVModelForMaskedLM)</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m FacebookAI/roberta-base --weight-format int8 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForMaskedLM.from_pretrained(&#39;FacebookAI/roberta-base&#39;, quantization_config=OVWeightQuantizationConfig(bits=8)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m FacebookAI/roberta-base --weight-format int4 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForMaskedLM.from_pretrained(&#39;FacebookAI/roberta-base&#39;, quantization_config=OVWeightQuantizationConfig(bits=4, dataset=&#39;wikitext2&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">-</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m FacebookAI/roberta-base --quant-mode int8 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForMaskedLM.from_pretrained(&#39;FacebookAI/roberta-base&#39;, quantization_config=OVQuantizationConfig(bits=8, dataset=&#39;wikitext2&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m FacebookAI/roberta-base --quant-mode nf4_f8e4m3 --dataset wikitext2 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForMaskedLM.from_pretrained(&#39;FacebookAI/roberta-base&#39;, quantization_config=OVMixedQuantizationConfig(OVWeightQuantizationConfig(bits=4, dtype=&#39;nf4&#39;), OVQuantizationConfig(dtype=&#39;f8e4m3&#39;, dataset=&#39;wikitext2&#39;))).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td></tr> <tr><td style="text-align: center; vertical-align: middle;">text2text-generation<br/>(OVModelForSeq2SeqLM)</td> <td style="text-align: center; vertical-align: middle;"><button onclick="navigator.clipboard.writeText(&#39;optimum-cli export openvino -m google-t5/t5-small --weight-format int8 ./save_dir&#39;)">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="navigator.clipboard.writeText(&#39;OVModelForSeq2SeqLM.from_pretrained(&#39;google-t5/t5-small&#39;, quantization_config=OVWeightQuantizationConfig(bits=8)).save_pretrained(&#39;save_dir&#39;)&#39;)">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="navigator.clipboard.writeText(&#39;optimum-cli export openvino -m google-t5/t5-small --weight-format int4 --dataset wikitext2 ./save_dir&#39;)">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="navigator.clipboard.writeText(&#39;OVModelForSeq2SeqLM.from_pretrained(&#39;google-t5/t5-small&#39;, quantization_config=OVWeightQuantizationConfig(bits=4, dataset=&#39;wikitext2&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;)">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">-</td> <td style="text-align: center; vertical-align: middle;"><button onclick="navigator.clipboard.writeText(&#39;optimum-cli export openvino -m google-t5/t5-small --quant-mode int8 --dataset wikitext2 --smooth-quant-alpha -1 ./save_dir&#39;)">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="navigator.clipboard.writeText(&#39;OVModelForSeq2SeqLM.from_pretrained(&#39;google-t5/t5-small&#39;, quantization_config=OVQuantizationConfig(bits=8, dataset=&#39;wikitext2&#39;, smooth_quant_alpha=-1)).save_pretrained(&#39;save_dir&#39;)&#39;)">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="navigator.clipboard.writeText(&#39;optimum-cli export openvino -m google-t5/t5-small --quant-mode nf4_f8e4m3 --dataset wikitext2 --smooth-quant-alpha -1 ./save_dir&#39;)">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="navigator.clipboard.writeText(&#39;OVModelForSeq2SeqLM.from_pretrained(&#39;google-t5/t5-small&#39;, quantization_config=OVMixedQuantizationConfig(OVWeightQuantizationConfig(bits=4, dtype=&#39;nf4&#39;), OVQuantizationConfig(dtype=&#39;f8e4m3&#39;, dataset=&#39;wikitext2&#39;, smooth_quant_alpha=-1))).save_pretrained(&#39;save_dir&#39;)&#39;)">✅</button></td></tr> <tr><td style="text-align: center; vertical-align: middle;">zero-shot-image-classification<br/>(OVModelForZeroShotImageClassification)</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m openai/clip-vit-base-patch16 --weight-format int8 ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForZeroShotImageClassification.from_pretrained(&#39;openai/clip-vit-base-patch16&#39;, quantization_config=OVWeightQuantizationConfig(bits=8)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m openai/clip-vit-base-patch16 --weight-format int4 --dataset conceptual_captions ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForZeroShotImageClassification.from_pretrained(&#39;openai/clip-vit-base-patch16&#39;, quantization_config=OVWeightQuantizationConfig(bits=4, dataset=&#39;conceptual_captions&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">-</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m openai/clip-vit-base-patch16 --quant-mode int8 --dataset conceptual_captions ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForZeroShotImageClassification.from_pretrained(&#39;openai/clip-vit-base-patch16&#39;, quantization_config=OVQuantizationConfig(bits=8, dataset=&#39;conceptual_captions&#39;)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m openai/clip-vit-base-patch16 --quant-mode nf4_f8e4m3 --dataset conceptual_captions ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForZeroShotImageClassification.from_pretrained(&#39;openai/clip-vit-base-patch16&#39;, quantization_config=OVMixedQuantizationConfig(OVWeightQuantizationConfig(bits=4, dtype=&#39;nf4&#39;), OVQuantizationConfig(dtype=&#39;f8e4m3&#39;, dataset=&#39;conceptual_captions&#39;))).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td></tr> <tr><td style="text-align: center; vertical-align: middle;">feature-extraction<br/>(OVSamModel)</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVSamModel.from_pretrained(&#39;facebook/sam-vit-base&#39;, quantization_config=OVPipelineQuantizationConfig(quantization_configs=dict(vision_encoder=OVWeightQuantizationConfig(bits=8)))).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVSamModel.from_pretrained(&#39;facebook/sam-vit-base&#39;, quantization_config=OVPipelineQuantizationConfig(quantization_configs=dict(vision_encoder=OVWeightQuantizationConfig(bits=4, dataset=&#39;coco&#39;)))).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">-</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;optimum-cli export openvino -m facebook/sam-vit-base --quant-mode int8 --dataset coco ./save_dir&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVSamModel.from_pretrained(&#39;facebook/sam-vit-base&#39;, quantization_config=OVPipelineQuantizationConfig(quantization_configs=dict(vision_encoder=OVQuantizationConfig(bits=8, dataset=&#39;coco&#39;)))).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td></tr> <tr><td style="text-align: center; vertical-align: middle;">text-to-audio<br/>(OVModelForTextToSpeechSeq2Seq)</td> <td style="text-align: center; vertical-align: middle;">✅</td> <td style="text-align: center; vertical-align: middle;"><button onclick="
                    navigator.clipboard.writeText(&#39;OVModelForTextToSpeechSeq2Seq.from_pretrained(&#39;microsoft/speecht5_tts&#39;, vocoder=&#39;microsoft/speecht5_hifigan&#39;, quantization_config=OVWeightQuantizationConfig(bits=8)).save_pretrained(&#39;save_dir&#39;)&#39;);
                    let m=document.getElementById(&#39;copyMsg&#39;);
                    m.style.display=&#39;block&#39;;
                    clearTimeout(window._copyTimeout);
                    window._copyTimeout=setTimeout(()=&gt;m.style.display=&#39;none&#39;, 2000);
                ">✅</button></td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td> <td style="text-align: center; vertical-align: middle;">–</td></tr></tbody>`,Xt,U,Gt,I,Ke="Quantization can be applied on the model’s Linear, Convolutional and Embedding layers, enabling the loading of large models on memory-limited devices. For example, when applying 8-bit quantization, the resulting model will be x4 smaller than its fp32 counterpart. For 4-bit quantization, the reduction in memory could theoretically reach x8, but is closer to x6 in practice.",Ot,W,Lt,q,ti="For the 8-bit weight quantization you can provide <code>quantization_config</code> equal to <code>OVWeightQuantizationConfig(bits=8)</code> to load your model’s weights in 8-bit:",St,j,Ht,Q,ei="Weights of language models inside vision-language pipelines can be quantized in a similar way:",Nt,B,Yt,v,At,Z,Pt,$,ii="4-bit weight quantization can be achieved in a similar way:",Dt,F,Kt,E,ni='For some models, we provide preconfigured 4-bit weight-only quantization <a href="https://github.com/huggingface/optimum-intel/blob/main/optimum/intel/openvino/configuration.py" rel="nofollow">configurations</a> that offer a good trade-off between quality and speed. This default 4-bit configuration is applied automatically when you specify <code>quantization_config={&quot;bits&quot;: 4}</code>.',te,R,ai="Or for vision-language pipelines:",ee,X,ie,G,li="You can tune quantization parameters to achieve a better performance accuracy trade-off as follows:",ne,O,ae,L,oi="Note: <code>OVWeightQuantizationConfig</code> also accepts keyword arguments that are not listed in its constructor. In this case such arguments will be passed directly to <code>nncf.compress_weights()</code> call. This is useful for passing additional parameters to the quantization algorithm.",le,S,si='By default the quantization scheme will be <a href="https://github.com/openvinotoolkit/nncf/blob/develop/docs/usage/training_time_compression/other_algorithms/LegacyQuantization.md#asymmetric-quantization" rel="nofollow">asymmetric</a>, to make it <a href="https://github.com/openvinotoolkit/nncf/blob/develop/docs/usage/training_time_compression/other_algorithms/LegacyQuantization.md#symmetric-quantization" rel="nofollow">symmetric</a> you can add <code>sym=True</code>.',oe,H,di="For 4-bit quantization you can also specify the following arguments in the quantization configuration :",se,N,ri="<li>The <code>group_size</code> parameter will define the group size to use for quantization, <code>-1</code> it will results in per-column quantization.</li> <li>The <code>ratio</code> parameter controls the ratio between 4-bit and 8-bit quantization. If set to 0.9, it means that 90% of the layers will be quantized to <code>int4</code> while 10% will be quantized to <code>int8</code>.</li>",de,Y,mi="Smaller <code>group_size</code> and <code>ratio</code> values usually improve accuracy at the sacrifice of the model size and inference latency.",re,A,ci="Quality of 4-bit weight compressed model can further be improved by employing one of the following data-dependent methods:",me,P,pi="<li><strong>AWQ</strong> which stands for Activation Aware Quantization is an algorithm that tunes model weights for more accurate 4-bit compression. It slightly improves generation quality of compressed LLMs, but requires significant additional time and memory for tuning weights on a calibration dataset. Please note that it is possible that there will be no matching patterns in the model to apply AWQ, in such case it will be skipped. There is also a data-free version of AWQ available that relies on per-column magnitudes of weights instead of activations.</li> <li><strong>Scale Estimation</strong> is a method that tunes quantization scales to minimize the <code>L2</code> error between the original and compressed layers. Providing a dataset is required to run scale estimation. Using this method also incurs additional time and memory overhead.</li> <li><strong>GPTQ</strong> optimizes compressed weights in a layer-wise fashion to minimize the difference between activations of a compressed and original layer.</li> <li><strong>LoRA Correction</strong> mitigates quantization noise introduced during weight compression by leveraging low-rank adaptation.</li>",ce,D,ui="Data-aware algorithms can be applied together or separately. For that, provide corresponding arguments to the 4-bit <code>OVWeightQuantizationConfig</code> together with a dataset. For example:",pe,K,ue,tt,yi="Note: GPTQ and LoRA Correction algorithms can’t be applied simultaneously.",ye,et,ge,it,gi=`When applying post-training full quantization, both the weights and the activations are quantized.
To apply quantization on the activations, an additional calibration step is needed which consists in feeding a <code>calibration_dataset</code> to the network in order to estimate the quantization activations parameters.`,be,nt,bi="Here is how to apply full quantization on a fine-tuned DistilBERT given your own <code>calibration_dataset</code>:",we,at,Te,lt,wi="The calibration dataset can also be created easily using your <code>OVQuantizer</code>:",fe,ot,Me,st,Ti="The <code>quantize()</code> method applies post-training quantization and export the resulting quantized model to the OpenVINO Intermediate Representation (IR). The resulting graph is represented with two files: an XML file describing the network topology and a binary file describing the weights. The resulting model can be run on any target Intel device.",ve,dt,he,rt,fi="The speech-to-text Whisper model can be quantized without the need for preparing a custom calibration dataset. Please see example below.",_e,mt,xe,ct,Mi="With this, encoder, decoder and decoder-with-past models of the Whisper pipeline will be fully quantized, including activations.",Ce,pt,ke,ut,vi=`Traditional optimization methods like post-training 8-bit quantization do not work well for Stable Diffusion (SD) models and can lead to poor generation results. On the other hand, weight compression does not improve performance significantly when applied to Stable Diffusion models, as the size of activations is comparable to weights.
The U-Net component takes up most of the overall execution time of the pipeline. Thus, optimizing just this one component can bring substantial benefits in terms of inference speed while keeping acceptable accuracy without fine-tuning. Quantizing the rest of the diffusion pipeline does not significantly improve inference performance but could potentially lead to substantial accuracy degradation.
Therefore, the proposal is to apply quantization in <em>hybrid mode</em> for the U-Net model and weight-only quantization for the rest of the pipeline components :`,ze,yt,hi="<li>U-Net : quantization applied on both the weights and activations</li> <li>The text encoder, VAE encoder / decoder : quantization applied on the weights</li>",Je,gt,_i="The hybrid mode involves the quantization of weights in MatMul and Embedding layers, and activations of other layers, facilitating accuracy preservation post-optimization while reducing the model size.",Ve,bt,xi="The <code>quantization_config</code> is utilized to define optimization parameters for optimizing the SD pipeline. To enable hybrid quantization, specify the quantization dataset in the <code>quantization_config</code>. If the dataset is not defined, weight-only quantization will be applied on all components.",Ue,wt,Ie,Tt,Ci='For more details, please refer to the corresponding NNCF <a href="https://github.com/openvinotoolkit/nncf/blob/develop/docs/usage/post_training_compression/weights_compression/Usage.md" rel="nofollow">documentation</a>.',We,ft,qe,Mt,ki="Mixed quantization is a technique that combines weight-only quantization with full quantization. During mixed quantization we separately quantize:",je,vt,zi="<li>weights of weighted layers to one precision, and</li> <li>activations (and possibly, weights, if some were skipped at the first step) of other supported layers to another precision.</li>",Qe,ht,Ji="By default, weights of all weighted layers are quantized in the first step. In the second step activations of weighted and non-weighted layers are quantized. If some layers are instructed to be ignored in the first step with <code>weight_quantization_config.ignored_scope</code> parameter, both weights and activations of these layers are quantized to the precision given in the <code>full_quantization_config</code>.",Be,_t,Vi="When running this kind of optimization through Python API, <code>OVMixedQuantizationConfig</code> should be used. In such case the precision for the first step should be provided with <code>weight_quantization_config</code> argument and the precision for the second step with <code>full_quantization_config</code> argument. For example:",Ze,xt,$e,Ct,Ui="To apply mixed quantization through CLI, the <code>--quant-mode</code> argument should be used. For example:",Fe,kt,Ee,zt,Ii="Don’t forget to provide a dataset since it is required for the calibration procedure during full quantization.",Re,Jt,Xe,Vt,Wi="There are multimodal pipelines that consist of multiple components, such as Stable Diffusion or Visual Language models. In these cases, there may be a need to apply different quantization methods to different components of the pipeline. For example, you may want to apply int4 data-aware weight-only quantization to a language model in visual-language pipeline, while applying int8 weight-only quantization to other components. In this case you can use the <code>OVPipelineQuantizationConfig</code> class to specify the quantization configuration for each component of the pipeline.",Ge,Ut,qi="For example, the code below quantizes weights and activations of a language model inside InternVL2-1B, compresses weights of a text embedding model and skips any quantization for vision embedding model.",Oe,It,Le,qt,Se;return _=new Oi({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),x=new M({props:{title:"Optimization",local:"optimization",headingTag:"h1"}}),z=new M({props:{title:"Optimization Support Matrix",local:"optimization-support-matrix",headingTag:"h2"}}),U=new M({props:{title:"Weight-only Quantization",local:"weight-only-quantization",headingTag:"h2"}}),W=new M({props:{title:"8-bit",local:"8-bit",headingTag:"h3"}}),j=new T({props:{code:"ZnJvbSUyMG9wdGltdW0uaW50ZWwlMjBpbXBvcnQlMjBPVk1vZGVsRm9yQ2F1c2FsTE0lMkMlMjBPVldlaWdodFF1YW50aXphdGlvbkNvbmZpZyUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyaGVsZW5haSUyRmdwdDItb3YlMjIlMEFxdWFudGl6YXRpb25fY29uZmlnJTIwJTNEJTIwT1ZXZWlnaHRRdWFudGl6YXRpb25Db25maWcoYml0cyUzRDgpJTBBbW9kZWwlMjAlM0QlMjBPVk1vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkJTJDJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzRHF1YW50aXphdGlvbl9jb25maWcpJTBBJTBBJTIzJTIwU2F2ZXMlMjB0aGUlMjBpbnQ4JTIwbW9kZWwlMjB0aGF0JTIwd2lsbCUyMGJlJTIweDQlMjBzbWFsbGVyJTIwdGhhbiUyMGl0cyUyMGZwMzIlMjBjb3VudGVycGFydCUwQW1vZGVsLnNhdmVfcHJldHJhaW5lZChzYXZpbmdfZGlyZWN0b3J5KQ==",highlighted:`<span class="hljs-keyword">from</span> optimum.intel <span class="hljs-keyword">import</span> OVModelForCausalLM, OVWeightQuantizationConfig

model_id = <span class="hljs-string">&quot;helenai/gpt2-ov&quot;</span>
quantization_config = OVWeightQuantizationConfig(bits=<span class="hljs-number">8</span>)
model = OVModelForCausalLM.from_pretrained(model_id, quantization_config=quantization_config)

<span class="hljs-comment"># Saves the int8 model that will be x4 smaller than its fp32 counterpart</span>
model.save_pretrained(saving_directory)`,wrap:!1}}),B=new T({props:{code:"bW9kZWwlMjAlM0QlMjBPVk1vZGVsRm9yVmlzdWFsQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmxsYXZhLWhmJTJGbGxhdmEtdjEuNi1taXN0cmFsLTdiLWhmJTIyJTJDJTBBJTIwJTIwJTIwJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzRHF1YW50aXphdGlvbl9jb25maWclMEEp",highlighted:`model = OVModelForVisualCausalLM.from_pretrained(
    <span class="hljs-string">&quot;llava-hf/llava-v1.6-mistral-7b-hf&quot;</span>,
    quantization_config=quantization_config
)`,wrap:!1}}),v=new Gi({props:{warning:!0,$$slots:{default:[Li]},$$scope:{ctx:jt}}}),Z=new M({props:{title:"4-bit",local:"4-bit",headingTag:"h3"}}),F=new T({props:{code:"ZnJvbSUyMG9wdGltdW0uaW50ZWwlMjBpbXBvcnQlMjBPVk1vZGVsRm9yQ2F1c2FsTE0lMEElMEFtb2RlbCUyMCUzRCUyME9WTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBxdWFudGl6YXRpb25fY29uZmlnJTNEJTdCJTIyYml0cyUyMiUzQSUyMDQlN0Qp",highlighted:`<span class="hljs-keyword">from</span> optimum.intel <span class="hljs-keyword">import</span> OVModelForCausalLM

model = OVModelForCausalLM.from_pretrained(model_id, quantization_config={<span class="hljs-string">&quot;bits&quot;</span>: <span class="hljs-number">4</span>})`,wrap:!1}}),X=new T({props:{code:"bW9kZWwlMjAlM0QlMjBPVk1vZGVsRm9yVmlzdWFsQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmxsYXZhLWhmJTJGbGxhdmEtdjEuNi1taXN0cmFsLTdiLWhmJTIyJTJDJTBBJTIwJTIwJTIwJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzRCU3QiUyMmJpdHMlMjIlM0ElMjA0JTdEJTBBKQ==",highlighted:`model = OVModelForVisualCausalLM.from_pretrained(
    <span class="hljs-string">&quot;llava-hf/llava-v1.6-mistral-7b-hf&quot;</span>,
    quantization_config={<span class="hljs-string">&quot;bits&quot;</span>: <span class="hljs-number">4</span>}
)`,wrap:!1}}),O=new T({props:{code:"ZnJvbSUyMG9wdGltdW0uaW50ZWwlMjBpbXBvcnQlMjBPVldlaWdodFF1YW50aXphdGlvbkNvbmZpZyUwQSUwQXF1YW50aXphdGlvbl9jb25maWclMjAlM0QlMjBPVldlaWdodFF1YW50aXphdGlvbkNvbmZpZyglMEElMjAlMjAlMjAlMjBiaXRzJTNENCUyQyUwQSUyMCUyMCUyMCUyMHN5bSUzREZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwcmF0aW8lM0QwLjglMkMlMEElMjAlMjAlMjAlMjBxdWFudF9tZXRob2QlM0QlMjJhd3ElMjIlMkMlMEElMjAlMjAlMjAlMjBkYXRhc2V0JTNEJTIyd2lraXRleHQyJTIyJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> optimum.intel <span class="hljs-keyword">import</span> OVWeightQuantizationConfig

quantization_config = OVWeightQuantizationConfig(
    bits=<span class="hljs-number">4</span>,
    sym=<span class="hljs-literal">False</span>,
    ratio=<span class="hljs-number">0.8</span>,
    quant_method=<span class="hljs-string">&quot;awq&quot;</span>,
    dataset=<span class="hljs-string">&quot;wikitext2&quot;</span>
)`,wrap:!1}}),K=new T({props:{code:"cXVhbnRpemF0aW9uX2NvbmZpZyUyMCUzRCUyME9WV2VpZ2h0UXVhbnRpemF0aW9uQ29uZmlnKCUwQSUyMCUyMCUyMCUyMGJpdHMlM0Q0JTJDJTBBJTIwJTIwJTIwJTIwc3ltJTNERmFsc2UlMkMlMEElMjAlMjAlMjAlMjByYXRpbyUzRDAuOCUyQyUwQSUyMCUyMCUyMCUyMHF1YW50X21ldGhvZCUzRCUyMmF3cSUyMiUyQyUwQSUyMCUyMCUyMCUyMHNjYWxlX2VzdGltYXRpb24lM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwZ3B0cSUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBkYXRhc2V0JTNEJTIyd2lraXRleHQyJTIyJTBBKQ==",highlighted:`quantization_config = OVWeightQuantizationConfig(
    bits=<span class="hljs-number">4</span>,
    sym=<span class="hljs-literal">False</span>,
    ratio=<span class="hljs-number">0.8</span>,
    quant_method=<span class="hljs-string">&quot;awq&quot;</span>,
    scale_estimation=<span class="hljs-literal">True</span>,
    gptq=<span class="hljs-literal">True</span>,
    dataset=<span class="hljs-string">&quot;wikitext2&quot;</span>
)`,wrap:!1}}),et=new M({props:{title:"Full quantization",local:"full-quantization",headingTag:"h2"}}),at=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5pbnRlbCUyMGltcG9ydCUyME9WUXVhbnRpemVyJTJDJTIwT1ZNb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMkMlMjBPVkNvbmZpZyUyQyUyME9WUXVhbnRpemF0aW9uQ29uZmlnJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZC1maW5ldHVuZWQtc3N0LTItZW5nbGlzaCUyMiUwQW1vZGVsJTIwJTNEJTIwT1ZNb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkJTJDJTIwZXhwb3J0JTNEVHJ1ZSklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCklMEElMjMlMjBUaGUlMjBkaXJlY3RvcnklMjB3aGVyZSUyMHRoZSUyMHF1YW50aXplZCUyMG1vZGVsJTIwd2lsbCUyMGJlJTIwc2F2ZWQlMEFzYXZlX2RpciUyMCUzRCUyMCUyMnB0cV9tb2RlbCUyMiUwQSUwQXF1YW50aXplciUyMCUzRCUyME9WUXVhbnRpemVyLmZyb21fcHJldHJhaW5lZChtb2RlbCklMEElMEElMjMlMjBBcHBseSUyMGZ1bGwlMjBxdWFudGl6YXRpb24lMjBhbmQlMjBleHBvcnQlMjB0aGUlMjByZXN1bHRpbmclMjBxdWFudGl6ZWQlMjBtb2RlbCUyMHRvJTIwT3BlblZJTk8lMjBJUiUyMGZvcm1hdCUwQW92X2NvbmZpZyUyMCUzRCUyME9WQ29uZmlnKHF1YW50aXphdGlvbl9jb25maWclM0RPVlF1YW50aXphdGlvbkNvbmZpZygpKSUwQXF1YW50aXplci5xdWFudGl6ZShvdl9jb25maWclM0Rvdl9jb25maWclMkMlMjBjYWxpYnJhdGlvbl9kYXRhc2V0JTNEY2FsaWJyYXRpb25fZGF0YXNldCUyQyUyMHNhdmVfZGlyZWN0b3J5JTNEc2F2ZV9kaXIpJTBBJTIzJTIwU2F2ZSUyMHRoZSUyMHRva2VuaXplciUwQXRva2VuaXplci5zYXZlX3ByZXRyYWluZWQoc2F2ZV9kaXIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-keyword">from</span> optimum.intel <span class="hljs-keyword">import</span> OVQuantizer, OVModelForSequenceClassification, OVConfig, OVQuantizationConfig

model_id = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
model = OVModelForSequenceClassification.from_pretrained(model_id, export=<span class="hljs-literal">True</span>)
tokenizer = AutoTokenizer.from_pretrained(model_id)
<span class="hljs-comment"># The directory where the quantized model will be saved</span>
save_dir = <span class="hljs-string">&quot;ptq_model&quot;</span>

quantizer = OVQuantizer.from_pretrained(model)

<span class="hljs-comment"># Apply full quantization and export the resulting quantized model to OpenVINO IR format</span>
ov_config = OVConfig(quantization_config=OVQuantizationConfig())
quantizer.quantize(ov_config=ov_config, calibration_dataset=calibration_dataset, save_directory=save_dir)
<span class="hljs-comment"># Save the tokenizer</span>
tokenizer.save_pretrained(save_dir)`,wrap:!1}}),ot=new T({props:{code:"ZnJvbSUyMGZ1bmN0b29scyUyMGltcG9ydCUyMHBhcnRpYWwlMEElMEFkZWYlMjBwcmVwcm9jZXNzX2Z1bmN0aW9uKGV4YW1wbGVzJTJDJTIwdG9rZW5pemVyKSUzQSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMHRva2VuaXplcihleGFtcGxlcyU1QiUyMnNlbnRlbmNlJTIyJTVEJTJDJTIwcGFkZGluZyUzRCUyMm1heF9sZW5ndGglMjIlMkMlMjBtYXhfbGVuZ3RoJTNEMTI4JTJDJTIwdHJ1bmNhdGlvbiUzRFRydWUpJTBBJTBBJTIzJTIwQ3JlYXRlJTIwdGhlJTIwY2FsaWJyYXRpb24lMjBkYXRhc2V0JTIwdXNlZCUyMHRvJTIwcGVyZm9ybSUyMGZ1bGwlMjBxdWFudGl6YXRpb24lMEFjYWxpYnJhdGlvbl9kYXRhc2V0JTIwJTNEJTIwcXVhbnRpemVyLmdldF9jYWxpYnJhdGlvbl9kYXRhc2V0KCUwQSUyMCUyMCUyMCUyMCUyMmdsdWUlMjIlMkMlMEElMjAlMjAlMjAlMjBkYXRhc2V0X2NvbmZpZ19uYW1lJTNEJTIyc3N0MiUyMiUyQyUwQSUyMCUyMCUyMCUyMHByZXByb2Nlc3NfZnVuY3Rpb24lM0RwYXJ0aWFsKHByZXByb2Nlc3NfZnVuY3Rpb24lMkMlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIpJTJDJTBBJTIwJTIwJTIwJTIwbnVtX3NhbXBsZXMlM0QzMDAlMkMlMEElMjAlMjAlMjAlMjBkYXRhc2V0X3NwbGl0JTNEJTIydHJhaW4lMjIlMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> functools <span class="hljs-keyword">import</span> partial

<span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_function</span>(<span class="hljs-params">examples, tokenizer</span>):
    <span class="hljs-keyword">return</span> tokenizer(examples[<span class="hljs-string">&quot;sentence&quot;</span>], padding=<span class="hljs-string">&quot;max_length&quot;</span>, max_length=<span class="hljs-number">128</span>, truncation=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># Create the calibration dataset used to perform full quantization</span>
calibration_dataset = quantizer.get_calibration_dataset(
    <span class="hljs-string">&quot;glue&quot;</span>,
    dataset_config_name=<span class="hljs-string">&quot;sst2&quot;</span>,
    preprocess_function=partial(preprocess_function, tokenizer=tokenizer),
    num_samples=<span class="hljs-number">300</span>,
    dataset_split=<span class="hljs-string">&quot;train&quot;</span>,
)`,wrap:!1}}),dt=new M({props:{title:"Speech-to-text Models Quantization",local:"speech-to-text-models-quantization",headingTag:"h3"}}),mt=new T({props:{code:"bW9kZWxfaWQlMjAlM0QlMjAlMjJvcGVuYWklMkZ3aGlzcGVyLXRpbnklMjIlMEFvdl9tb2RlbCUyMCUzRCUyME9WTW9kZWxGb3JTcGVlY2hTZXEyU2VxLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUyQyUwQSUyMCUyMCUyMCUyMHN0YXRlZnVsJTNERmFsc2UlMkMlMEElMjAlMjAlMjAlMjBxdWFudGl6YXRpb25fY29uZmlnJTNET1ZRdWFudGl6YXRpb25Db25maWcoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbnVtX3NhbXBsZXMlM0QxMCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGRhdGFzZXQlM0QlMjJsaWJyaXNwZWVjaCUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHByb2Nlc3NvciUzRG1vZGVsX2lkJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc21vb3RoX3F1YW50X2FscGhhJTNEMC45NSUyQyUwQSUyMCUyMCUyMCUyMCklMEEp",highlighted:`model_id = <span class="hljs-string">&quot;openai/whisper-tiny&quot;</span>
ov_model = OVModelForSpeechSeq2Seq.from_pretrained(
    model_id,
    stateful=<span class="hljs-literal">False</span>,
    quantization_config=OVQuantizationConfig(
        num_samples=<span class="hljs-number">10</span>,
        dataset=<span class="hljs-string">&quot;librispeech&quot;</span>,
        processor=model_id,
        smooth_quant_alpha=<span class="hljs-number">0.95</span>,
    )
)`,wrap:!1}}),pt=new M({props:{title:"Hybrid quantization",local:"hybrid-quantization",headingTag:"h2"}}),wt=new T({props:{code:"ZnJvbSUyMG9wdGltdW0uaW50ZWwlMjBpbXBvcnQlMjBPVlN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTJDJTIwT1ZXZWlnaHRRdWFudGl6YXRpb25Db25maWclMEElMEFtb2RlbCUyMCUzRCUyME9WU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2lkJTJDJTBBJTIwJTIwJTIwJTIwZXhwb3J0JTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHF1YW50aXphdGlvbl9jb25maWclM0RPVldlaWdodFF1YW50aXphdGlvbkNvbmZpZyhiaXRzJTNEOCUyQyUyMGRhdGFzZXQlM0QlMjJjb25jZXB0dWFsX2NhcHRpb25zJTIyKSUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> optimum.intel <span class="hljs-keyword">import</span> OVStableDiffusionPipeline, OVWeightQuantizationConfig

model = OVStableDiffusionPipeline.from_pretrained(
    model_id,
    export=<span class="hljs-literal">True</span>,
    quantization_config=OVWeightQuantizationConfig(bits=<span class="hljs-number">8</span>, dataset=<span class="hljs-string">&quot;conceptual_captions&quot;</span>),
)`,wrap:!1}}),ft=new M({props:{title:"Mixed Quantization",local:"mixed-quantization",headingTag:"h2"}}),xt=new T({props:{code:"bW9kZWwlMjAlM0QlMjBPVk1vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCdUaW55TGxhbWElMkZUaW55TGxhbWEtMS4xQi1DaGF0LXYxLjAnJTJDJTBBJTIwJTIwJTIwJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzRE9WTWl4ZWRRdWFudGl6YXRpb25Db25maWcoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwd2VpZ2h0X3F1YW50aXphdGlvbl9jb25maWclM0RPVldlaWdodFF1YW50aXphdGlvbkNvbmZpZyhiaXRzJTNENCUyQyUyMGR0eXBlJTNEJ25mNCcpJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZnVsbF9xdWFudGl6YXRpb25fY29uZmlnJTNET1ZRdWFudGl6YXRpb25Db25maWcoZHR5cGUlM0QnZjhlNG0zJyUyQyUyMGRhdGFzZXQlM0Qnd2lraXRleHQyJyklMEElMjAlMjAlMjAlMjApJTBBKQ==",highlighted:`model = OVModelForCausalLM.from_pretrained(
    <span class="hljs-string">&#x27;TinyLlama/TinyLlama-1.1B-Chat-v1.0&#x27;</span>,
    quantization_config=OVMixedQuantizationConfig(
        weight_quantization_config=OVWeightQuantizationConfig(bits=<span class="hljs-number">4</span>, dtype=<span class="hljs-string">&#x27;nf4&#x27;</span>),
        full_quantization_config=OVQuantizationConfig(dtype=<span class="hljs-string">&#x27;f8e4m3&#x27;</span>, dataset=<span class="hljs-string">&#x27;wikitext2&#x27;</span>)
    )
)`,wrap:!1}}),kt=new T({props:{code:"b3B0aW11bS1jbGklMjBleHBvcnQlMjBvcGVudmlubyUyMC1tJTIwVGlueUxsYW1hJTJGVGlueUxsYW1hLTEuMUItQ2hhdC12MS4wJTIwLS1xdWFudC1tb2RlJTIwbmY0X2Y4ZTRtMyUyMC0tZGF0YXNldCUyMHdpa2l0ZXh0MiUyMC4lMkZzYXZlX2Rpcg==",highlighted:'optimum-cli <span class="hljs-built_in">export</span> openvino -m TinyLlama/TinyLlama-1.1B-Chat-v1.0 --quant-mode nf4_f8e4m3 --dataset wikitext2 ./save_dir',wrap:!1}}),Jt=new M({props:{title:"Pipeline Quantization",local:"pipeline-quantization",headingTag:"h2"}}),It=new T({props:{code:"ZnJvbSUyMG9wdGltdW0uaW50ZWwlMjBpbXBvcnQlMjBPVk1vZGVsRm9yVmlzdWFsQ2F1c2FsTE0lMEFmcm9tJTIwb3B0aW11bS5pbnRlbCUyMGltcG9ydCUyME9WUGlwZWxpbmVRdWFudGl6YXRpb25Db25maWclMkMlMjBPVlF1YW50aXphdGlvbkNvbmZpZyUyQyUyME9WV2VpZ2h0UXVhbnRpemF0aW9uQ29uZmlnJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJPcGVuR1ZMYWIlMkZJbnRlcm5WTDItMUIlMjIlMEFtb2RlbCUyMCUzRCUyME9WTW9kZWxGb3JWaXN1YWxDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlMkMlMEElMjAlMjAlMjAlMjBleHBvcnQlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzRE9WUGlwZWxpbmVRdWFudGl6YXRpb25Db25maWcoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcXVhbnRpemF0aW9uX2NvbmZpZ3MlM0QlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJsbV9tb2RlbCUyMiUzQSUyME9WUXVhbnRpemF0aW9uQ29uZmlnKGJpdHMlM0Q4KSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnRleHRfZW1iZWRkaW5nc19tb2RlbCUyMiUzQSUyME9WV2VpZ2h0UXVhbnRpemF0aW9uQ29uZmlnKGJpdHMlM0Q4KSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGRhdGFzZXQlM0QlMjJjb250ZXh0dWFsJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwKSUwQSk=",highlighted:`<span class="hljs-keyword">from</span> optimum.intel <span class="hljs-keyword">import</span> OVModelForVisualCausalLM
<span class="hljs-keyword">from</span> optimum.intel <span class="hljs-keyword">import</span> OVPipelineQuantizationConfig, OVQuantizationConfig, OVWeightQuantizationConfig

model_id = <span class="hljs-string">&quot;OpenGVLab/InternVL2-1B&quot;</span>
model = OVModelForVisualCausalLM.from_pretrained(
    model_id,
    export=<span class="hljs-literal">True</span>,
    trust_remote_code=<span class="hljs-literal">True</span>,
    quantization_config=OVPipelineQuantizationConfig(
        quantization_configs={
            <span class="hljs-string">&quot;lm_model&quot;</span>: OVQuantizationConfig(bits=<span class="hljs-number">8</span>),
            <span class="hljs-string">&quot;text_embeddings_model&quot;</span>: OVWeightQuantizationConfig(bits=<span class="hljs-number">8</span>),
        },
        dataset=<span class="hljs-string">&quot;contextual&quot;</span>,
        trust_remote_code=<span class="hljs-literal">True</span>,
    )
)`,wrap:!1}}),{c(){b=o("meta"),h=a(),f=o("p"),Wt=a(),r(_.$$.fragment),Qt=a(),r(x.$$.fragment),Bt=a(),C=o("p"),C.innerHTML=Ne,Zt=a(),k=o("p"),k.textContent=Ye,$t=a(),r(z.$$.fragment),Ft=a(),J=o("p"),J.textContent=Ae,Et=a(),g=o("div"),g.textContent=Pe,Rt=a(),V=o("table"),V.innerHTML=De,Xt=a(),r(U.$$.fragment),Gt=a(),I=o("p"),I.textContent=Ke,Ot=a(),r(W.$$.fragment),Lt=a(),q=o("p"),q.innerHTML=ti,St=a(),r(j.$$.fragment),Ht=a(),Q=o("p"),Q.textContent=ei,Nt=a(),r(B.$$.fragment),Yt=a(),r(v.$$.fragment),At=a(),r(Z.$$.fragment),Pt=a(),$=o("p"),$.textContent=ii,Dt=a(),r(F.$$.fragment),Kt=a(),E=o("p"),E.innerHTML=ni,te=a(),R=o("p"),R.textContent=ai,ee=a(),r(X.$$.fragment),ie=a(),G=o("p"),G.textContent=li,ne=a(),r(O.$$.fragment),ae=a(),L=o("p"),L.innerHTML=oi,le=a(),S=o("p"),S.innerHTML=si,oe=a(),H=o("p"),H.textContent=di,se=a(),N=o("ul"),N.innerHTML=ri,de=a(),Y=o("p"),Y.innerHTML=mi,re=a(),A=o("p"),A.textContent=ci,me=a(),P=o("ul"),P.innerHTML=pi,ce=a(),D=o("p"),D.innerHTML=ui,pe=a(),r(K.$$.fragment),ue=a(),tt=o("p"),tt.textContent=yi,ye=a(),r(et.$$.fragment),ge=a(),it=o("p"),it.innerHTML=gi,be=a(),nt=o("p"),nt.innerHTML=bi,we=a(),r(at.$$.fragment),Te=a(),lt=o("p"),lt.innerHTML=wi,fe=a(),r(ot.$$.fragment),Me=a(),st=o("p"),st.innerHTML=Ti,ve=a(),r(dt.$$.fragment),he=a(),rt=o("p"),rt.textContent=fi,_e=a(),r(mt.$$.fragment),xe=a(),ct=o("p"),ct.textContent=Mi,Ce=a(),r(pt.$$.fragment),ke=a(),ut=o("p"),ut.innerHTML=vi,ze=a(),yt=o("ul"),yt.innerHTML=hi,Je=a(),gt=o("p"),gt.textContent=_i,Ve=a(),bt=o("p"),bt.innerHTML=xi,Ue=a(),r(wt.$$.fragment),Ie=a(),Tt=o("p"),Tt.innerHTML=Ci,We=a(),r(ft.$$.fragment),qe=a(),Mt=o("p"),Mt.textContent=ki,je=a(),vt=o("ol"),vt.innerHTML=zi,Qe=a(),ht=o("p"),ht.innerHTML=Ji,Be=a(),_t=o("p"),_t.innerHTML=Vi,Ze=a(),r(xt.$$.fragment),$e=a(),Ct=o("p"),Ct.innerHTML=Ui,Fe=a(),r(kt.$$.fragment),Ee=a(),zt=o("p"),zt.textContent=Ii,Re=a(),r(Jt.$$.fragment),Xe=a(),Vt=o("p"),Vt.innerHTML=Wi,Ge=a(),Ut=o("p"),Ut.textContent=qi,Oe=a(),r(It.$$.fragment),Le=a(),qt=o("p"),this.h()},l(t){const e=Ri("svelte-u9bgzb",document.head);b=s(e,"META",{name:!0,content:!0}),e.forEach(i),h=l(t),f=s(t,"P",{}),Qi(f).forEach(i),Wt=l(t),m(_.$$.fragment,t),Qt=l(t),m(x.$$.fragment,t),Bt=l(t),C=s(t,"P",{"data-svelte-h":!0}),d(C)!=="svelte-1kqt85y"&&(C.innerHTML=Ne),Zt=l(t),k=s(t,"P",{"data-svelte-h":!0}),d(k)!=="svelte-1bioojp"&&(k.textContent=Ye),$t=l(t),m(z.$$.fragment,t),Ft=l(t),J=s(t,"P",{"data-svelte-h":!0}),d(J)!=="svelte-yz1bv9"&&(J.textContent=Ae),Et=l(t),g=s(t,"DIV",{id:!0,style:!0,"data-svelte-h":!0}),d(g)!=="svelte-lctq22"&&(g.textContent=Pe),Rt=l(t),V=s(t,"TABLE",{"data-svelte-h":!0}),d(V)!=="svelte-1cdjh6c"&&(V.innerHTML=De),Xt=l(t),m(U.$$.fragment,t),Gt=l(t),I=s(t,"P",{"data-svelte-h":!0}),d(I)!=="svelte-17xp9b"&&(I.textContent=Ke),Ot=l(t),m(W.$$.fragment,t),Lt=l(t),q=s(t,"P",{"data-svelte-h":!0}),d(q)!=="svelte-vqgrfh"&&(q.innerHTML=ti),St=l(t),m(j.$$.fragment,t),Ht=l(t),Q=s(t,"P",{"data-svelte-h":!0}),d(Q)!=="svelte-16a1vs2"&&(Q.textContent=ei),Nt=l(t),m(B.$$.fragment,t),Yt=l(t),m(v.$$.fragment,t),At=l(t),m(Z.$$.fragment,t),Pt=l(t),$=s(t,"P",{"data-svelte-h":!0}),d($)!=="svelte-1ynyujr"&&($.textContent=ii),Dt=l(t),m(F.$$.fragment,t),Kt=l(t),E=s(t,"P",{"data-svelte-h":!0}),d(E)!=="svelte-r299rx"&&(E.innerHTML=ni),te=l(t),R=s(t,"P",{"data-svelte-h":!0}),d(R)!=="svelte-ckhwzy"&&(R.textContent=ai),ee=l(t),m(X.$$.fragment,t),ie=l(t),G=s(t,"P",{"data-svelte-h":!0}),d(G)!=="svelte-1oj65vk"&&(G.textContent=li),ne=l(t),m(O.$$.fragment,t),ae=l(t),L=s(t,"P",{"data-svelte-h":!0}),d(L)!=="svelte-jq996k"&&(L.innerHTML=oi),le=l(t),S=s(t,"P",{"data-svelte-h":!0}),d(S)!=="svelte-11zrdex"&&(S.innerHTML=si),oe=l(t),H=s(t,"P",{"data-svelte-h":!0}),d(H)!=="svelte-1edxsd4"&&(H.textContent=di),se=l(t),N=s(t,"UL",{"data-svelte-h":!0}),d(N)!=="svelte-1xdcez2"&&(N.innerHTML=ri),de=l(t),Y=s(t,"P",{"data-svelte-h":!0}),d(Y)!=="svelte-1pvf0nk"&&(Y.innerHTML=mi),re=l(t),A=s(t,"P",{"data-svelte-h":!0}),d(A)!=="svelte-27zu87"&&(A.textContent=ci),me=l(t),P=s(t,"UL",{"data-svelte-h":!0}),d(P)!=="svelte-o0edvn"&&(P.innerHTML=pi),ce=l(t),D=s(t,"P",{"data-svelte-h":!0}),d(D)!=="svelte-1xeos13"&&(D.innerHTML=ui),pe=l(t),m(K.$$.fragment,t),ue=l(t),tt=s(t,"P",{"data-svelte-h":!0}),d(tt)!=="svelte-19pmlig"&&(tt.textContent=yi),ye=l(t),m(et.$$.fragment,t),ge=l(t),it=s(t,"P",{"data-svelte-h":!0}),d(it)!=="svelte-9ojby0"&&(it.innerHTML=gi),be=l(t),nt=s(t,"P",{"data-svelte-h":!0}),d(nt)!=="svelte-u6rwxg"&&(nt.innerHTML=bi),we=l(t),m(at.$$.fragment,t),Te=l(t),lt=s(t,"P",{"data-svelte-h":!0}),d(lt)!=="svelte-1bmrgi2"&&(lt.innerHTML=wi),fe=l(t),m(ot.$$.fragment,t),Me=l(t),st=s(t,"P",{"data-svelte-h":!0}),d(st)!=="svelte-1tr5712"&&(st.innerHTML=Ti),ve=l(t),m(dt.$$.fragment,t),he=l(t),rt=s(t,"P",{"data-svelte-h":!0}),d(rt)!=="svelte-2xlwma"&&(rt.textContent=fi),_e=l(t),m(mt.$$.fragment,t),xe=l(t),ct=s(t,"P",{"data-svelte-h":!0}),d(ct)!=="svelte-1euukhf"&&(ct.textContent=Mi),Ce=l(t),m(pt.$$.fragment,t),ke=l(t),ut=s(t,"P",{"data-svelte-h":!0}),d(ut)!=="svelte-1r5icyl"&&(ut.innerHTML=vi),ze=l(t),yt=s(t,"UL",{"data-svelte-h":!0}),d(yt)!=="svelte-5q7f0v"&&(yt.innerHTML=hi),Je=l(t),gt=s(t,"P",{"data-svelte-h":!0}),d(gt)!=="svelte-5c3t0d"&&(gt.textContent=_i),Ve=l(t),bt=s(t,"P",{"data-svelte-h":!0}),d(bt)!=="svelte-1vn2n7x"&&(bt.innerHTML=xi),Ue=l(t),m(wt.$$.fragment,t),Ie=l(t),Tt=s(t,"P",{"data-svelte-h":!0}),d(Tt)!=="svelte-1w2f7fi"&&(Tt.innerHTML=Ci),We=l(t),m(ft.$$.fragment,t),qe=l(t),Mt=s(t,"P",{"data-svelte-h":!0}),d(Mt)!=="svelte-5y3yhc"&&(Mt.textContent=ki),je=l(t),vt=s(t,"OL",{"data-svelte-h":!0}),d(vt)!=="svelte-1shxxwh"&&(vt.innerHTML=zi),Qe=l(t),ht=s(t,"P",{"data-svelte-h":!0}),d(ht)!=="svelte-2bh5m6"&&(ht.innerHTML=Ji),Be=l(t),_t=s(t,"P",{"data-svelte-h":!0}),d(_t)!=="svelte-m6e5t3"&&(_t.innerHTML=Vi),Ze=l(t),m(xt.$$.fragment,t),$e=l(t),Ct=s(t,"P",{"data-svelte-h":!0}),d(Ct)!=="svelte-d2xo64"&&(Ct.innerHTML=Ui),Fe=l(t),m(kt.$$.fragment,t),Ee=l(t),zt=s(t,"P",{"data-svelte-h":!0}),d(zt)!=="svelte-4hpsr0"&&(zt.textContent=Ii),Re=l(t),m(Jt.$$.fragment,t),Xe=l(t),Vt=s(t,"P",{"data-svelte-h":!0}),d(Vt)!=="svelte-1e55rgb"&&(Vt.innerHTML=Wi),Ge=l(t),Ut=s(t,"P",{"data-svelte-h":!0}),d(Ut)!=="svelte-17ga14b"&&(Ut.textContent=qi),Oe=l(t),m(It.$$.fragment,t),Le=l(t),qt=s(t,"P",{}),Qi(qt).forEach(i),this.h()},h(){He(b,"name","hf:doc:metadata"),He(b,"content",Hi),He(g,"id","copyMsg"),w(g,"display","none"),w(g,"position","fixed"),w(g,"top","20px"),w(g,"left","50%"),w(g,"transform","translateX(-50%)"),w(g,"background","rgba(60, 179, 113, 0.95)"),w(g,"color","white"),w(g,"padding","10px 20px"),w(g,"border-radius","6px"),w(g,"box-shadow","0 4px 12px rgba(0, 0, 0, 0.15)"),w(g,"z-index","1000"),w(g,"font-family","'Segoe UI', sans-serif"),w(g,"font-size","14px"),w(g,"font-weight","500"),w(g,"letter-spacing","0.3px"),w(g,"white-space","nowrap")},m(t,e){Xi(document.head,b),n(t,h,e),n(t,f,e),n(t,Wt,e),c(_,t,e),n(t,Qt,e),c(x,t,e),n(t,Bt,e),n(t,C,e),n(t,Zt,e),n(t,k,e),n(t,$t,e),c(z,t,e),n(t,Ft,e),n(t,J,e),n(t,Et,e),n(t,g,e),n(t,Rt,e),n(t,V,e),n(t,Xt,e),c(U,t,e),n(t,Gt,e),n(t,I,e),n(t,Ot,e),c(W,t,e),n(t,Lt,e),n(t,q,e),n(t,St,e),c(j,t,e),n(t,Ht,e),n(t,Q,e),n(t,Nt,e),c(B,t,e),n(t,Yt,e),c(v,t,e),n(t,At,e),c(Z,t,e),n(t,Pt,e),n(t,$,e),n(t,Dt,e),c(F,t,e),n(t,Kt,e),n(t,E,e),n(t,te,e),n(t,R,e),n(t,ee,e),c(X,t,e),n(t,ie,e),n(t,G,e),n(t,ne,e),c(O,t,e),n(t,ae,e),n(t,L,e),n(t,le,e),n(t,S,e),n(t,oe,e),n(t,H,e),n(t,se,e),n(t,N,e),n(t,de,e),n(t,Y,e),n(t,re,e),n(t,A,e),n(t,me,e),n(t,P,e),n(t,ce,e),n(t,D,e),n(t,pe,e),c(K,t,e),n(t,ue,e),n(t,tt,e),n(t,ye,e),c(et,t,e),n(t,ge,e),n(t,it,e),n(t,be,e),n(t,nt,e),n(t,we,e),c(at,t,e),n(t,Te,e),n(t,lt,e),n(t,fe,e),c(ot,t,e),n(t,Me,e),n(t,st,e),n(t,ve,e),c(dt,t,e),n(t,he,e),n(t,rt,e),n(t,_e,e),c(mt,t,e),n(t,xe,e),n(t,ct,e),n(t,Ce,e),c(pt,t,e),n(t,ke,e),n(t,ut,e),n(t,ze,e),n(t,yt,e),n(t,Je,e),n(t,gt,e),n(t,Ve,e),n(t,bt,e),n(t,Ue,e),c(wt,t,e),n(t,Ie,e),n(t,Tt,e),n(t,We,e),c(ft,t,e),n(t,qe,e),n(t,Mt,e),n(t,je,e),n(t,vt,e),n(t,Qe,e),n(t,ht,e),n(t,Be,e),n(t,_t,e),n(t,Ze,e),c(xt,t,e),n(t,$e,e),n(t,Ct,e),n(t,Fe,e),c(kt,t,e),n(t,Ee,e),n(t,zt,e),n(t,Re,e),c(Jt,t,e),n(t,Xe,e),n(t,Vt,e),n(t,Ge,e),n(t,Ut,e),n(t,Oe,e),c(It,t,e),n(t,Le,e),n(t,qt,e),Se=!0},p(t,[e]){const ji={};e&2&&(ji.$$scope={dirty:e,ctx:t}),v.$set(ji)},i(t){Se||(p(_.$$.fragment,t),p(x.$$.fragment,t),p(z.$$.fragment,t),p(U.$$.fragment,t),p(W.$$.fragment,t),p(j.$$.fragment,t),p(B.$$.fragment,t),p(v.$$.fragment,t),p(Z.$$.fragment,t),p(F.$$.fragment,t),p(X.$$.fragment,t),p(O.$$.fragment,t),p(K.$$.fragment,t),p(et.$$.fragment,t),p(at.$$.fragment,t),p(ot.$$.fragment,t),p(dt.$$.fragment,t),p(mt.$$.fragment,t),p(pt.$$.fragment,t),p(wt.$$.fragment,t),p(ft.$$.fragment,t),p(xt.$$.fragment,t),p(kt.$$.fragment,t),p(Jt.$$.fragment,t),p(It.$$.fragment,t),Se=!0)},o(t){u(_.$$.fragment,t),u(x.$$.fragment,t),u(z.$$.fragment,t),u(U.$$.fragment,t),u(W.$$.fragment,t),u(j.$$.fragment,t),u(B.$$.fragment,t),u(v.$$.fragment,t),u(Z.$$.fragment,t),u(F.$$.fragment,t),u(X.$$.fragment,t),u(O.$$.fragment,t),u(K.$$.fragment,t),u(et.$$.fragment,t),u(at.$$.fragment,t),u(ot.$$.fragment,t),u(dt.$$.fragment,t),u(mt.$$.fragment,t),u(pt.$$.fragment,t),u(wt.$$.fragment,t),u(ft.$$.fragment,t),u(xt.$$.fragment,t),u(kt.$$.fragment,t),u(Jt.$$.fragment,t),u(It.$$.fragment,t),Se=!1},d(t){t&&(i(h),i(f),i(Wt),i(Qt),i(Bt),i(C),i(Zt),i(k),i($t),i(Ft),i(J),i(Et),i(g),i(Rt),i(V),i(Xt),i(Gt),i(I),i(Ot),i(Lt),i(q),i(St),i(Ht),i(Q),i(Nt),i(Yt),i(At),i(Pt),i($),i(Dt),i(Kt),i(E),i(te),i(R),i(ee),i(ie),i(G),i(ne),i(ae),i(L),i(le),i(S),i(oe),i(H),i(se),i(N),i(de),i(Y),i(re),i(A),i(me),i(P),i(ce),i(D),i(pe),i(ue),i(tt),i(ye),i(ge),i(it),i(be),i(nt),i(we),i(Te),i(lt),i(fe),i(Me),i(st),i(ve),i(he),i(rt),i(_e),i(xe),i(ct),i(Ce),i(ke),i(ut),i(ze),i(yt),i(Je),i(gt),i(Ve),i(bt),i(Ue),i(Ie),i(Tt),i(We),i(qe),i(Mt),i(je),i(vt),i(Qe),i(ht),i(Be),i(_t),i(Ze),i($e),i(Ct),i(Fe),i(Ee),i(zt),i(Re),i(Xe),i(Vt),i(Ge),i(Ut),i(Oe),i(Le),i(qt)),i(b),y(_,t),y(x,t),y(z,t),y(U,t),y(W,t),y(j,t),y(B,t),y(v,t),y(Z,t),y(F,t),y(X,t),y(O,t),y(K,t),y(et,t),y(at,t),y(ot,t),y(dt,t),y(mt,t),y(pt,t),y(wt,t),y(ft,t),y(xt,t),y(kt,t),y(Jt,t),y(It,t)}}}const Hi='{"title":"Optimization","local":"optimization","sections":[{"title":"Optimization Support Matrix","local":"optimization-support-matrix","sections":[],"depth":2},{"title":"Weight-only Quantization","local":"weight-only-quantization","sections":[{"title":"8-bit","local":"8-bit","sections":[],"depth":3},{"title":"4-bit","local":"4-bit","sections":[],"depth":3}],"depth":2},{"title":"Full quantization","local":"full-quantization","sections":[{"title":"Speech-to-text Models Quantization","local":"speech-to-text-models-quantization","sections":[],"depth":3}],"depth":2},{"title":"Hybrid quantization","local":"hybrid-quantization","sections":[],"depth":2},{"title":"Mixed Quantization","local":"mixed-quantization","sections":[],"depth":2},{"title":"Pipeline Quantization","local":"pipeline-quantization","sections":[],"depth":2}],"depth":1}';function Ni(jt){return Zi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class tn extends Fi{constructor(b){super(),Ei(this,b,Ni,Si,Bi,{})}}export{tn as component};
