import{s as Et,o as Ht,n as lt}from"../chunks/scheduler.9bc65507.js";import{S as Nt,i as Gt,g as o,s as p,u as w,A as Lt,h as i,f as t,c,j as v,v as j,y as $,k as y,o as b,a as s,w as k,d as M,t as x,x as _}from"../chunks/index.78c82d43.js";import{T as Jt}from"../chunks/Tip.87d55b76.js";import{I as ve}from"../chunks/IconCopyLink.bedaa44d.js";import{C as R}from"../chunks/CodeBlock.48618ec2.js";import{F as Vt,M as Ut}from"../chunks/Markdown.993b48ef.js";function Pt(U){let n,d='Remember, architecture refers to the skeleton of the model and checkpoints are the weights for a given architecture. For example, <a href="https://huggingface.co/bert-base-uncased" rel="nofollow">BERT</a> is an architecture, while <code>bert-base-uncased</code> is a checkpoint. Model is a general term that can mean either architecture or checkpoint.';return{c(){n=o("p"),n.innerHTML=d},l(r){n=i(r,"P",{"data-svelte-h":!0}),$(n)!=="svelte-a5apxu"&&(n.innerHTML=d)},m(r,m){s(r,n,m)},p:lt,d(r){r&&t(n)}}}function Rt(U){let n,d='For PyTorch models, the <code>from_pretrained()</code> method uses <code>torch.load()</code> which internally uses <code>pickle</code> and is known to be insecure. In general, never load a model that could have come from an untrusted source, or that could have been tampered with. This security risk is partially mitigated for public models hosted on the Hugging Face Hub, which are <a href="https://huggingface.co/docs/hub/security-malware" rel="nofollow">scanned for malware</a> at each commit. See the <a href="https://huggingface.co/docs/hub/security" rel="nofollow">Hub documentation</a> for best practices like <a href="https://huggingface.co/docs/hub/security-gpg#signing-commits-with-gpg" rel="nofollow">signed commit verification</a> with GPG.',r,m,f="TensorFlow and Flax checkpoints are not affected, and can be loaded within PyTorch architectures using the <code>from_tf</code> and <code>from_flax</code> kwargs for the <code>from_pretrained</code> method to circumvent this issue.";return{c(){n=o("p"),n.innerHTML=d,r=p(),m=o("p"),m.innerHTML=f},l(h){n=i(h,"P",{"data-svelte-h":!0}),$(n)!=="svelte-12xgjc6"&&(n.innerHTML=d),r=c(h),m=i(h,"P",{"data-svelte-h":!0}),$(m)!=="svelte-gbqaor"&&(m.innerHTML=f)},m(h,J){s(h,n,J),s(h,r,J),s(h,m,J)},p:lt,d(h){h&&(t(n),t(r),t(m))}}}function zt(U){let n,d='Finally, the <code>AutoModelFor</code> classes let you load a pretrained model for a given task (see <a href="model_doc/auto">here</a> for a complete list of available tasks). For example, load a model for sequence classification with <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.FlaxAutoModelForVision2Seq.from_pretrained">AutoModelForSequenceClassification.from_pretrained()</a>:',r,m,f,h,J="Easily reuse the same checkpoint to load an architecture for a different task:",A,C,W,T,E,g,u='Generally, we recommend using the <code>AutoTokenizer</code> class and the <code>AutoModelFor</code> class to load pretrained instances of models. This will ensure you load the correct architecture every time. In the next <a href="preprocessing">tutorial</a>, learn how to use your newly loaded tokenizer, image processor, feature extractor and processor to preprocess a dataset for fine-tuning.',Z;return m=new R({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)`}}),C=new R({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)`}}),T=new Jt({props:{warning:!0,$$slots:{default:[Rt]},$$scope:{ctx:U}}}),{c(){n=o("p"),n.innerHTML=d,r=p(),w(m.$$.fragment),f=p(),h=o("p"),h.textContent=J,A=p(),w(C.$$.fragment),W=p(),w(T.$$.fragment),E=p(),g=o("p"),g.innerHTML=u},l(l){n=i(l,"P",{"data-svelte-h":!0}),$(n)!=="svelte-wrifer"&&(n.innerHTML=d),r=c(l),j(m.$$.fragment,l),f=c(l),h=i(l,"P",{"data-svelte-h":!0}),$(h)!=="svelte-98u76l"&&(h.textContent=J),A=c(l),j(C.$$.fragment,l),W=c(l),j(T.$$.fragment,l),E=c(l),g=i(l,"P",{"data-svelte-h":!0}),$(g)!=="svelte-a18ug5"&&(g.innerHTML=u)},m(l,F){s(l,n,F),s(l,r,F),k(m,l,F),s(l,f,F),s(l,h,F),s(l,A,F),k(C,l,F),s(l,W,F),k(T,l,F),s(l,E,F),s(l,g,F),Z=!0},p(l,F){const H={};F&2&&(H.$$scope={dirty:F,ctx:l}),T.$set(H)},i(l){Z||(M(m.$$.fragment,l),M(C.$$.fragment,l),M(T.$$.fragment,l),Z=!0)},o(l){x(m.$$.fragment,l),x(C.$$.fragment,l),x(T.$$.fragment,l),Z=!1},d(l){l&&(t(n),t(r),t(f),t(h),t(A),t(W),t(E),t(g)),_(m,l),_(C,l),_(T,l)}}}function Xt(U){let n,d;return n=new Ut({props:{$$slots:{default:[zt]},$$scope:{ctx:U}}}),{c(){w(n.$$.fragment)},l(r){j(n.$$.fragment,r)},m(r,m){k(n,r,m),d=!0},p(r,m){const f={};m&2&&(f.$$scope={dirty:m,ctx:r}),n.$set(f)},i(r){d||(M(n.$$.fragment,r),d=!0)},o(r){x(n.$$.fragment,r),d=!1},d(r){_(n,r)}}}function St(U){let n,d='Finally, the <code>TFAutoModelFor</code> classes let you load a pretrained model for a given task (see <a href="model_doc/auto">here</a> for a complete list of available tasks). For example, load a model for sequence classification with <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.FlaxAutoModelForVision2Seq.from_pretrained">TFAutoModelForSequenceClassification.from_pretrained()</a>:',r,m,f,h,J="Easily reuse the same checkpoint to load an architecture for a different task:",A,C,W,T,E='Generally, we recommend using the <code>AutoTokenizer</code> class and the <code>TFAutoModelFor</code> class to load pretrained instances of models. This will ensure you load the correct architecture every time. In the next <a href="preprocessing">tutorial</a>, learn how to use your newly loaded tokenizer, image processor, feature extractor and processor to preprocess a dataset for fine-tuning.',g;return m=new R({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)`}}),C=new R({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)`}}),{c(){n=o("p"),n.innerHTML=d,r=p(),w(m.$$.fragment),f=p(),h=o("p"),h.textContent=J,A=p(),w(C.$$.fragment),W=p(),T=o("p"),T.innerHTML=E},l(u){n=i(u,"P",{"data-svelte-h":!0}),$(n)!=="svelte-1oc1n67"&&(n.innerHTML=d),r=c(u),j(m.$$.fragment,u),f=c(u),h=i(u,"P",{"data-svelte-h":!0}),$(h)!=="svelte-98u76l"&&(h.textContent=J),A=c(u),j(C.$$.fragment,u),W=c(u),T=i(u,"P",{"data-svelte-h":!0}),$(T)!=="svelte-19d9o2j"&&(T.innerHTML=E)},m(u,Z){s(u,n,Z),s(u,r,Z),k(m,u,Z),s(u,f,Z),s(u,h,Z),s(u,A,Z),k(C,u,Z),s(u,W,Z),s(u,T,Z),g=!0},p:lt,i(u){g||(M(m.$$.fragment,u),M(C.$$.fragment,u),g=!0)},o(u){x(m.$$.fragment,u),x(C.$$.fragment,u),g=!1},d(u){u&&(t(n),t(r),t(f),t(h),t(A),t(W),t(T)),_(m,u),_(C,u)}}}function qt(U){let n,d;return n=new Ut({props:{$$slots:{default:[St]},$$scope:{ctx:U}}}),{c(){w(n.$$.fragment)},l(r){j(n.$$.fragment,r)},m(r,m){k(n,r,m),d=!0},p(r,m){const f={};m&2&&(f.$$scope={dirty:m,ctx:r}),n.$set(f)},i(r){d||(M(n.$$.fragment,r),d=!0)},o(r){x(n.$$.fragment,r),d=!1},d(r){_(n,r)}}}function Yt(U){let n,d,r,m,f,h,J,A,C,W,T="Load pretrained instances with an AutoClass",E,g,u="With so many different Transformer architectures, it can be challenging to create one for your checkpoint. As a part of 🤗 Transformers core philosophy to make the library easy, simple and flexible to use, an <code>AutoClass</code> automatically infers and loads the correct architecture from a given checkpoint. The <code>from_pretrained()</code> method lets you quickly load a pretrained model for any architecture so you don’t have to devote time and resources to train a model from scratch. Producing this type of checkpoint-agnostic code means if your code works for one checkpoint, it will work with another checkpoint - as long as it was trained for a similar task - even if the architecture is different.",Z,l,F,H,ot="In this tutorial, learn to:",Te,Q,it="<li>Load a pretrained tokenizer.</li> <li>Load a pretrained image processor</li> <li>Load a pretrained feature extractor.</li> <li>Load a pretrained processor.</li> <li>Load a pretrained model.</li>",Ze,N,z,we,B,tt,de,pt="AutoTokenizer",Fe,K,ct="Nearly every NLP task begins with a tokenizer. A tokenizer converts your input into a format that can be processed by the model.",Ae,D,mt='Load a tokenizer with <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer.from_pretrained">AutoTokenizer.from_pretrained()</a>:',We,O,Je,ee,ut="Then tokenize your input as shown below:",Ue,te,Ee,G,X,je,se,st,ye,ht="AutoImageProcessor",He,ae,ft="For vision tasks, an image processor processes the image into the correct input format.",Ne,ne,Ge,L,S,ke,re,at,$e,dt="AutoFeatureExtractor",Le,le,yt="For audio tasks, a feature extractor processes the audio signal the correct input format.",Ve,oe,$t='Load a feature extractor with <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoFeatureExtractor.from_pretrained">AutoFeatureExtractor.from_pretrained()</a>:',Pe,ie,Re,V,q,Me,pe,nt,be,bt="AutoProcessor",ze,ce,gt='Multimodal tasks require a processor that combines two types of preprocessing tools. For example, the <a href="model_doc/layoutlmv2">LayoutLMV2</a> model requires an image processor to handle images and a tokenizer to handle text; a processor combines both of them.',Xe,me,vt='Load a processor with <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoProcessor.from_pretrained">AutoProcessor.from_pretrained()</a>:',Se,ue,qe,P,Y,xe,he,rt,ge,wt="AutoModel",Ye,I,Ie,_e,Qe;return A=new ve({}),l=new Jt({props:{$$slots:{default:[Pt]},$$scope:{ctx:U}}}),B=new ve({}),O=new R({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)`}}),te=new R({props:{code:"c2VxdWVuY2UlMjAlM0QlMjAlMjJJbiUyMGElMjBob2xlJTIwaW4lMjB0aGUlMjBncm91bmQlMjB0aGVyZSUyMGxpdmVkJTIwYSUyMGhvYmJpdC4lMjIlMEFwcmludCh0b2tlbml6ZXIoc2VxdWVuY2UpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>sequence = <span class="hljs-string">&quot;In a hole in the ground there lived a hobbit.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer(sequence))
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: [<span class="hljs-number">101</span>, <span class="hljs-number">1999</span>, <span class="hljs-number">1037</span>, <span class="hljs-number">4920</span>, <span class="hljs-number">1999</span>, <span class="hljs-number">1996</span>, <span class="hljs-number">2598</span>, <span class="hljs-number">2045</span>, <span class="hljs-number">2973</span>, <span class="hljs-number">1037</span>, <span class="hljs-number">7570</span>, <span class="hljs-number">10322</span>, <span class="hljs-number">4183</span>, <span class="hljs-number">1012</span>, <span class="hljs-number">102</span>], 
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>], 
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]}`}}),se=new ve({}),ne=new R({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdml0LWJhc2UtcGF0Y2gxNi0yMjQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/vit-base-patch16-224&quot;</span>)`}}),re=new ve({}),ie=new R({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZWhjYWxhYnJlcyUyRndhdjJ2ZWMyLWxnLXhsc3ItZW4tc3BlZWNoLWVtb3Rpb24tcmVjb2duaXRpb24lMjIlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition&quot;</span>
<span class="hljs-meta">... </span>)`}}),pe=new ve({}),ue=new R({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZsYXlvdXRsbXYyLWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv2-base-uncased&quot;</span>)`}}),he=new ve({}),I=new Vt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[qt],pytorch:[Xt]},$$scope:{ctx:U}}}),{c(){n=o("meta"),d=p(),r=o("p"),m=p(),f=o("h1"),h=o("a"),J=o("span"),w(A.$$.fragment),C=p(),W=o("span"),W.textContent=T,E=p(),g=o("p"),g.innerHTML=u,Z=p(),w(l.$$.fragment),F=p(),H=o("p"),H.textContent=ot,Te=p(),Q=o("ul"),Q.innerHTML=it,Ze=p(),N=o("h2"),z=o("a"),we=o("span"),w(B.$$.fragment),tt=p(),de=o("span"),de.textContent=pt,Fe=p(),K=o("p"),K.textContent=ct,Ae=p(),D=o("p"),D.innerHTML=mt,We=p(),w(O.$$.fragment),Je=p(),ee=o("p"),ee.textContent=ut,Ue=p(),w(te.$$.fragment),Ee=p(),G=o("h2"),X=o("a"),je=o("span"),w(se.$$.fragment),st=p(),ye=o("span"),ye.textContent=ht,He=p(),ae=o("p"),ae.textContent=ft,Ne=p(),w(ne.$$.fragment),Ge=p(),L=o("h2"),S=o("a"),ke=o("span"),w(re.$$.fragment),at=p(),$e=o("span"),$e.textContent=dt,Le=p(),le=o("p"),le.textContent=yt,Ve=p(),oe=o("p"),oe.innerHTML=$t,Pe=p(),w(ie.$$.fragment),Re=p(),V=o("h2"),q=o("a"),Me=o("span"),w(pe.$$.fragment),nt=p(),be=o("span"),be.textContent=bt,ze=p(),ce=o("p"),ce.innerHTML=gt,Xe=p(),me=o("p"),me.innerHTML=vt,Se=p(),w(ue.$$.fragment),qe=p(),P=o("h2"),Y=o("a"),xe=o("span"),w(he.$$.fragment),rt=p(),ge=o("span"),ge.textContent=wt,Ye=p(),w(I.$$.fragment),Ie=p(),_e=o("p"),this.h()},l(e){const a=Lt("svelte-1phssyn",document.head);n=i(a,"META",{name:!0,content:!0}),a.forEach(t),d=c(e),r=i(e,"P",{}),v(r).forEach(t),m=c(e),f=i(e,"H1",{class:!0});var fe=v(f);h=i(fe,"A",{id:!0,class:!0,href:!0});var Ce=v(h);J=i(Ce,"SPAN",{});var jt=v(J);j(A.$$.fragment,jt),jt.forEach(t),Ce.forEach(t),C=c(fe),W=i(fe,"SPAN",{"data-svelte-h":!0}),$(W)!=="svelte-1j9dtjx"&&(W.textContent=T),fe.forEach(t),E=c(e),g=i(e,"P",{"data-svelte-h":!0}),$(g)!=="svelte-j0p9ct"&&(g.innerHTML=u),Z=c(e),j(l.$$.fragment,e),F=c(e),H=i(e,"P",{"data-svelte-h":!0}),$(H)!=="svelte-1kmbcqk"&&(H.textContent=ot),Te=c(e),Q=i(e,"UL",{"data-svelte-h":!0}),$(Q)!=="svelte-12313ht"&&(Q.innerHTML=it),Ze=c(e),N=i(e,"H2",{class:!0});var Be=v(N);z=i(Be,"A",{id:!0,class:!0,href:!0});var kt=v(z);we=i(kt,"SPAN",{});var Mt=v(we);j(B.$$.fragment,Mt),Mt.forEach(t),kt.forEach(t),tt=c(Be),de=i(Be,"SPAN",{"data-svelte-h":!0}),$(de)!=="svelte-5wpjmf"&&(de.textContent=pt),Be.forEach(t),Fe=c(e),K=i(e,"P",{"data-svelte-h":!0}),$(K)!=="svelte-8r2c79"&&(K.textContent=ct),Ae=c(e),D=i(e,"P",{"data-svelte-h":!0}),$(D)!=="svelte-9ypr1h"&&(D.innerHTML=mt),We=c(e),j(O.$$.fragment,e),Je=c(e),ee=i(e,"P",{"data-svelte-h":!0}),$(ee)!=="svelte-1idptsb"&&(ee.textContent=ut),Ue=c(e),j(te.$$.fragment,e),Ee=c(e),G=i(e,"H2",{class:!0});var Ke=v(G);X=i(Ke,"A",{id:!0,class:!0,href:!0});var xt=v(X);je=i(xt,"SPAN",{});var _t=v(je);j(se.$$.fragment,_t),_t.forEach(t),xt.forEach(t),st=c(Ke),ye=i(Ke,"SPAN",{"data-svelte-h":!0}),$(ye)!=="svelte-1t92jbp"&&(ye.textContent=ht),Ke.forEach(t),He=c(e),ae=i(e,"P",{"data-svelte-h":!0}),$(ae)!=="svelte-1d6dyuq"&&(ae.textContent=ft),Ne=c(e),j(ne.$$.fragment,e),Ge=c(e),L=i(e,"H2",{class:!0});var De=v(L);S=i(De,"A",{id:!0,class:!0,href:!0});var Ct=v(S);ke=i(Ct,"SPAN",{});var Tt=v(ke);j(re.$$.fragment,Tt),Tt.forEach(t),Ct.forEach(t),at=c(De),$e=i(De,"SPAN",{"data-svelte-h":!0}),$($e)!=="svelte-qfeipy"&&($e.textContent=dt),De.forEach(t),Le=c(e),le=i(e,"P",{"data-svelte-h":!0}),$(le)!=="svelte-f3nvdu"&&(le.textContent=yt),Ve=c(e),oe=i(e,"P",{"data-svelte-h":!0}),$(oe)!=="svelte-cimx30"&&(oe.innerHTML=$t),Pe=c(e),j(ie.$$.fragment,e),Re=c(e),V=i(e,"H2",{class:!0});var Oe=v(V);q=i(Oe,"A",{id:!0,class:!0,href:!0});var Zt=v(q);Me=i(Zt,"SPAN",{});var Ft=v(Me);j(pe.$$.fragment,Ft),Ft.forEach(t),Zt.forEach(t),nt=c(Oe),be=i(Oe,"SPAN",{"data-svelte-h":!0}),$(be)!=="svelte-yif3ge"&&(be.textContent=bt),Oe.forEach(t),ze=c(e),ce=i(e,"P",{"data-svelte-h":!0}),$(ce)!=="svelte-p2h4f9"&&(ce.innerHTML=gt),Xe=c(e),me=i(e,"P",{"data-svelte-h":!0}),$(me)!=="svelte-ezca6y"&&(me.innerHTML=vt),Se=c(e),j(ue.$$.fragment,e),qe=c(e),P=i(e,"H2",{class:!0});var et=v(P);Y=i(et,"A",{id:!0,class:!0,href:!0});var At=v(Y);xe=i(At,"SPAN",{});var Wt=v(xe);j(he.$$.fragment,Wt),Wt.forEach(t),At.forEach(t),rt=c(et),ge=i(et,"SPAN",{"data-svelte-h":!0}),$(ge)!=="svelte-12n7lj"&&(ge.textContent=wt),et.forEach(t),Ye=c(e),j(I.$$.fragment,e),Ie=c(e),_e=i(e,"P",{}),v(_e).forEach(t),this.h()},h(){y(n,"name","hf:doc:metadata"),y(n,"content",JSON.stringify(It)),y(h,"id","load-pretrained-instances-with-an-autoclass"),y(h,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(h,"href","#load-pretrained-instances-with-an-autoclass"),y(f,"class","relative group"),y(z,"id","autotokenizer"),y(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(z,"href","#autotokenizer"),y(N,"class","relative group"),y(X,"id","autoimageprocessor"),y(X,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(X,"href","#autoimageprocessor"),y(G,"class","relative group"),y(S,"id","autofeatureextractor"),y(S,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(S,"href","#autofeatureextractor"),y(L,"class","relative group"),y(q,"id","autoprocessor"),y(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(q,"href","#autoprocessor"),y(V,"class","relative group"),y(Y,"id","automodel"),y(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(Y,"href","#automodel"),y(P,"class","relative group")},m(e,a){b(document.head,n),s(e,d,a),s(e,r,a),s(e,m,a),s(e,f,a),b(f,h),b(h,J),k(A,J,null),b(f,C),b(f,W),s(e,E,a),s(e,g,a),s(e,Z,a),k(l,e,a),s(e,F,a),s(e,H,a),s(e,Te,a),s(e,Q,a),s(e,Ze,a),s(e,N,a),b(N,z),b(z,we),k(B,we,null),b(N,tt),b(N,de),s(e,Fe,a),s(e,K,a),s(e,Ae,a),s(e,D,a),s(e,We,a),k(O,e,a),s(e,Je,a),s(e,ee,a),s(e,Ue,a),k(te,e,a),s(e,Ee,a),s(e,G,a),b(G,X),b(X,je),k(se,je,null),b(G,st),b(G,ye),s(e,He,a),s(e,ae,a),s(e,Ne,a),k(ne,e,a),s(e,Ge,a),s(e,L,a),b(L,S),b(S,ke),k(re,ke,null),b(L,at),b(L,$e),s(e,Le,a),s(e,le,a),s(e,Ve,a),s(e,oe,a),s(e,Pe,a),k(ie,e,a),s(e,Re,a),s(e,V,a),b(V,q),b(q,Me),k(pe,Me,null),b(V,nt),b(V,be),s(e,ze,a),s(e,ce,a),s(e,Xe,a),s(e,me,a),s(e,Se,a),k(ue,e,a),s(e,qe,a),s(e,P,a),b(P,Y),b(Y,xe),k(he,xe,null),b(P,rt),b(P,ge),s(e,Ye,a),k(I,e,a),s(e,Ie,a),s(e,_e,a),Qe=!0},p(e,[a]){const fe={};a&2&&(fe.$$scope={dirty:a,ctx:e}),l.$set(fe);const Ce={};a&2&&(Ce.$$scope={dirty:a,ctx:e}),I.$set(Ce)},i(e){Qe||(M(A.$$.fragment,e),M(l.$$.fragment,e),M(B.$$.fragment,e),M(O.$$.fragment,e),M(te.$$.fragment,e),M(se.$$.fragment,e),M(ne.$$.fragment,e),M(re.$$.fragment,e),M(ie.$$.fragment,e),M(pe.$$.fragment,e),M(ue.$$.fragment,e),M(he.$$.fragment,e),M(I.$$.fragment,e),Qe=!0)},o(e){x(A.$$.fragment,e),x(l.$$.fragment,e),x(B.$$.fragment,e),x(O.$$.fragment,e),x(te.$$.fragment,e),x(se.$$.fragment,e),x(ne.$$.fragment,e),x(re.$$.fragment,e),x(ie.$$.fragment,e),x(pe.$$.fragment,e),x(ue.$$.fragment,e),x(he.$$.fragment,e),x(I.$$.fragment,e),Qe=!1},d(e){e&&(t(d),t(r),t(m),t(f),t(E),t(g),t(Z),t(F),t(H),t(Te),t(Q),t(Ze),t(N),t(Fe),t(K),t(Ae),t(D),t(We),t(Je),t(ee),t(Ue),t(Ee),t(G),t(He),t(ae),t(Ne),t(Ge),t(L),t(Le),t(le),t(Ve),t(oe),t(Pe),t(Re),t(V),t(ze),t(ce),t(Xe),t(me),t(Se),t(qe),t(P),t(Ye),t(Ie),t(_e)),t(n),_(A),_(l,e),_(B),_(O,e),_(te,e),_(se),_(ne,e),_(re),_(ie,e),_(pe),_(ue,e),_(he),_(I,e)}}}const It={local:"load-pretrained-instances-with-an-autoclass",sections:[{local:"autotokenizer",title:"AutoTokenizer"},{local:"autoimageprocessor",title:"AutoImageProcessor"},{local:"autofeatureextractor",title:"AutoFeatureExtractor"},{local:"autoprocessor",title:"AutoProcessor"},{local:"automodel",title:"AutoModel"}],title:"Load pretrained instances with an AutoClass"};function Qt(U){return Ht(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ss extends Nt{constructor(n){super(),Gt(this,n,Qt,Yt,Et,{})}}export{ss as component};
