import{s as Ve,o as Le,n as Me}from"../chunks/scheduler.9991993c.js";import{S as Re,i as Ae,g as d,s as c,r as y,A as Ee,h as $,f as t,c as m,j as Ue,u as j,x as T,k as Fe,y as ze,a,v as M,d as k,t as w,w as v}from"../chunks/index.7fc9a5e7.js";import{T as He}from"../chunks/Tip.9de92fc6.js";import{C as H}from"../chunks/CodeBlock.e11cba92.js";import{F as Ne,M as Ge}from"../chunks/Markdown.87f31c7e.js";import{H as O}from"../chunks/Heading.e3de321f.js";function Xe(J){let l,u='请记住，架构指的是模型的结构，而checkpoints是给定架构的权重。例如，<a href="https://huggingface.co/bert-base-uncased" rel="nofollow">BERT</a>是一种架构，而<code>bert-base-uncased</code>是一个checkpoint。模型是一个通用术语，可以指代架构或checkpoint。';return{c(){l=d("p"),l.innerHTML=u},l(n){l=$(n,"P",{"data-svelte-h":!0}),T(l)!=="svelte-17s6y00"&&(l.innerHTML=u)},m(n,o){a(n,l,o)},p:Me,d(n){n&&t(l)}}}function Pe(J){let l,u='对于PyTorch模型，<code>from_pretrained()</code>方法使用<code>torch.load()</code>，它内部使用已知是不安全的<code>pickle</code>。一般来说，永远不要加载来自不可信来源或可能被篡改的模型。对于托管在Hugging Face Hub上的公共模型，这种安全风险在一定程度上得到了缓解，因为每次提交都会进行<a href="https://huggingface.co/docs/hub/security-malware" rel="nofollow">恶意软件扫描</a>。请参阅<a href="https://huggingface.co/docs/hub/security" rel="nofollow">Hub文档</a>以了解最佳实践，例如使用GPG进行<a href="https://huggingface.co/docs/hub/security-gpg#signing-commits-with-gpg" rel="nofollow">签名提交验证</a>。',n,o,f="TensorFlow和Flax的checkpoints不受影响，并且可以在PyTorch架构中使用<code>from_tf</code>和<code>from_flax</code>关键字参数,通过<code>from_pretrained</code>方法进行加载,来绕过此问题。";return{c(){l=d("p"),l.innerHTML=u,n=c(),o=d("p"),o.innerHTML=f},l(i){l=$(i,"P",{"data-svelte-h":!0}),T(l)!=="svelte-ld8qf7"&&(l.innerHTML=u),n=m(i),o=$(i,"P",{"data-svelte-h":!0}),T(o)!=="svelte-rnk7qb"&&(o.innerHTML=f)},m(i,x){a(i,l,x),a(i,n,x),a(i,o,x)},p:Me,d(i){i&&(t(l),t(n),t(o))}}}function Ye(J){let l,u='最后，<code>AutoModelFor</code>类让你可以加载给定任务的预训练模型（参见<a href="model_doc/auto">这里</a>获取可用任务的完整列表）。例如，使用<code>AutoModelForSequenceClassification.from_pretrained()</code>加载用于序列分类的模型：',n,o,f,i,x="轻松地重复使用相同的checkpoint来为不同任务加载模型架构：",U,g,_,b,C,W,p='一般来说，我们建议使用<code>AutoTokenizer</code>类和<code>AutoModelFor</code>类来加载预训练的模型实例。这样可以确保每次加载正确的架构。在下一个<a href="preprocessing">教程</a>中，学习如何使用新加载的<code>tokenizer</code>, <code>image processor</code>, <code>feature extractor</code>和<code>processor</code>对数据集进行预处理以进行微调。',h;return o=new H({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>)`,wrap:!1}}),g=new H({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>)`,wrap:!1}}),b=new He({props:{warning:!0,$$slots:{default:[Pe]},$$scope:{ctx:J}}}),{c(){l=d("p"),l.innerHTML=u,n=c(),y(o.$$.fragment),f=c(),i=d("p"),i.textContent=x,U=c(),y(g.$$.fragment),_=c(),y(b.$$.fragment),C=c(),W=d("p"),W.innerHTML=p},l(r){l=$(r,"P",{"data-svelte-h":!0}),T(l)!=="svelte-vsnimi"&&(l.innerHTML=u),n=m(r),j(o.$$.fragment,r),f=m(r),i=$(r,"P",{"data-svelte-h":!0}),T(i)!=="svelte-1uuscan"&&(i.textContent=x),U=m(r),j(g.$$.fragment,r),_=m(r),j(b.$$.fragment,r),C=m(r),W=$(r,"P",{"data-svelte-h":!0}),T(W)!=="svelte-14oiyax"&&(W.innerHTML=p)},m(r,Z){a(r,l,Z),a(r,n,Z),M(o,r,Z),a(r,f,Z),a(r,i,Z),a(r,U,Z),M(g,r,Z),a(r,_,Z),M(b,r,Z),a(r,C,Z),a(r,W,Z),h=!0},p(r,Z){const F={};Z&2&&(F.$$scope={dirty:Z,ctx:r}),b.$set(F)},i(r){h||(k(o.$$.fragment,r),k(g.$$.fragment,r),k(b.$$.fragment,r),h=!0)},o(r){w(o.$$.fragment,r),w(g.$$.fragment,r),w(b.$$.fragment,r),h=!1},d(r){r&&(t(l),t(n),t(f),t(i),t(U),t(_),t(C),t(W)),v(o,r),v(g,r),v(b,r)}}}function qe(J){let l,u;return l=new Ge({props:{$$slots:{default:[Ye]},$$scope:{ctx:J}}}),{c(){y(l.$$.fragment)},l(n){j(l.$$.fragment,n)},m(n,o){M(l,n,o),u=!0},p(n,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:n}),l.$set(f)},i(n){u||(k(l.$$.fragment,n),u=!0)},o(n){w(l.$$.fragment,n),u=!1},d(n){v(l,n)}}}function Ie(J){let l,u='最后，<code>TFAutoModelFor</code>类允许您加载给定任务的预训练模型（请参阅<a href="model_doc/auto">这里</a>获取可用任务的完整列表）。例如，使用<code>TFAutoModelForSequenceClassification.from_pretrained()</code>加载用于序列分类的模型：',n,o,f,i,x="轻松地重复使用相同的checkpoint来为不同任务加载模型架构：",U,g,_,b,C='一般来说，我们推荐使用<code>AutoTokenizer</code>类和<code>TFAutoModelFor</code>类来加载模型的预训练实例。这样可以确保每次加载正确的架构。在下一个<a href="preprocessing">教程</a>中，学习如何使用新加载的<code>tokenizer</code>, <code>image processor</code>, <code>feature extractor</code>和<code>processor</code>对数据集进行预处理以进行微调。',W;return o=new H({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>)`,wrap:!1}}),g=new H({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>)`,wrap:!1}}),{c(){l=d("p"),l.innerHTML=u,n=c(),y(o.$$.fragment),f=c(),i=d("p"),i.textContent=x,U=c(),y(g.$$.fragment),_=c(),b=d("p"),b.innerHTML=C},l(p){l=$(p,"P",{"data-svelte-h":!0}),T(l)!=="svelte-168f311"&&(l.innerHTML=u),n=m(p),j(o.$$.fragment,p),f=m(p),i=$(p,"P",{"data-svelte-h":!0}),T(i)!=="svelte-1uuscan"&&(i.textContent=x),U=m(p),j(g.$$.fragment,p),_=m(p),b=$(p,"P",{"data-svelte-h":!0}),T(b)!=="svelte-s7ckvf"&&(b.innerHTML=C)},m(p,h){a(p,l,h),a(p,n,h),M(o,p,h),a(p,f,h),a(p,i,h),a(p,U,h),M(g,p,h),a(p,_,h),a(p,b,h),W=!0},p:Me,i(p){W||(k(o.$$.fragment,p),k(g.$$.fragment,p),W=!0)},o(p){w(o.$$.fragment,p),w(g.$$.fragment,p),W=!1},d(p){p&&(t(l),t(n),t(f),t(i),t(U),t(_),t(b)),v(o,p),v(g,p)}}}function Qe(J){let l,u;return l=new Ge({props:{$$slots:{default:[Ie]},$$scope:{ctx:J}}}),{c(){y(l.$$.fragment)},l(n){j(l.$$.fragment,n)},m(n,o){M(l,n,o),u=!0},p(n,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:n}),l.$set(f)},i(n){u||(k(l.$$.fragment,n),u=!0)},o(n){w(l.$$.fragment,n),u=!1},d(n){v(l,n)}}}function Be(J){let l,u,n,o,f,i,x,U="由于存在许多不同的Transformer架构，因此为您的checkpoint创建一个可用架构可能会具有挑战性。通过<code>AutoClass</code>可以自动推断并从给定的checkpoint加载正确的架构, 这也是🤗 Transformers易于使用、简单且灵活核心规则的重要一部分。<code>from_pretrained()</code>方法允许您快速加载任何架构的预训练模型，因此您不必花费时间和精力从头开始训练模型。生成这种与checkpoint无关的代码意味着，如果您的代码适用于一个checkpoint，它将适用于另一个checkpoint - 只要它们是为了类似的任务进行训练的 - 即使架构不同。",g,_,b,C,W="在这个教程中，学习如何：",p,h,r="<li>加载预训练的分词器（<code>tokenizer</code>）</li> <li>加载预训练的图像处理器(<code>image processor</code>)</li> <li>加载预训练的特征提取器(<code>feature extractor</code>)</li> <li>加载预训练的处理器(<code>processor</code>)</li> <li>加载预训练的模型。</li>",Z,F,te,V,ke="几乎所有的NLP任务都以<code>tokenizer</code>开始。<code>tokenizer</code>将您的输入转换为模型可以处理的格式。",se,L,we="使用<code>AutoTokenizer.from_pretrained()</code>加载<code>tokenizer</code>：",le,R,ae,A,ve="然后按照如下方式对输入进行分词：",ne,E,re,z,oe,N,Te="对于视觉任务，<code>image processor</code>将图像处理成正确的输入格式。",pe,X,ce,P,me,Y,Ze="对于音频任务,<code>feature extractor</code>将音频信号处理成正确的输入格式。",ie,q,_e="使用<code>AutoFeatureExtractor.from_pretrained()</code>加载<code>feature extractor</code>：",ue,I,fe,Q,de,B,xe='多模态任务需要一种<code>processor</code>，将两种类型的预处理工具结合起来。例如，<a href="model_doc/layoutlmv2">LayoutLMV2</a>模型需要一个<code>image processo</code>来处理图像和一个<code>tokenizer</code>来处理文本；<code>processor</code>将两者结合起来。',$e,S,Ce="使用<code>AutoProcessor.from_pretrained()</code>加载<code>processor</code>：",he,K,be,D,ge,G,ye,ee,je;return f=new O({props:{title:"使用AutoClass加载预训练实例",local:"使用autoclass加载预训练实例",headingTag:"h1"}}),_=new He({props:{$$slots:{default:[Xe]},$$scope:{ctx:J}}}),F=new O({props:{title:"AutoTokenizer",local:"autotokenizer",headingTag:"h2"}}),R=new H({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>)`,wrap:!1}}),E=new H({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>]}`,wrap:!1}}),z=new O({props:{title:"AutoImageProcessor",local:"autoimageprocessor",headingTag:"h2"}}),X=new H({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>)`,wrap:!1}}),P=new O({props:{title:"AutoFeatureExtractor",local:"autofeatureextractor",headingTag:"h2"}}),I=new H({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>)`,wrap:!1}}),Q=new O({props:{title:"AutoProcessor",local:"autoprocessor",headingTag:"h2"}}),K=new H({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>)`,wrap:!1}}),D=new O({props:{title:"AutoModel",local:"automodel",headingTag:"h2"}}),G=new Ne({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Qe],pytorch:[qe]},$$scope:{ctx:J}}}),{c(){l=d("meta"),u=c(),n=d("p"),o=c(),y(f.$$.fragment),i=c(),x=d("p"),x.innerHTML=U,g=c(),y(_.$$.fragment),b=c(),C=d("p"),C.textContent=W,p=c(),h=d("ul"),h.innerHTML=r,Z=c(),y(F.$$.fragment),te=c(),V=d("p"),V.innerHTML=ke,se=c(),L=d("p"),L.innerHTML=we,le=c(),y(R.$$.fragment),ae=c(),A=d("p"),A.textContent=ve,ne=c(),y(E.$$.fragment),re=c(),y(z.$$.fragment),oe=c(),N=d("p"),N.innerHTML=Te,pe=c(),y(X.$$.fragment),ce=c(),y(P.$$.fragment),me=c(),Y=d("p"),Y.innerHTML=Ze,ie=c(),q=d("p"),q.innerHTML=_e,ue=c(),y(I.$$.fragment),fe=c(),y(Q.$$.fragment),de=c(),B=d("p"),B.innerHTML=xe,$e=c(),S=d("p"),S.innerHTML=Ce,he=c(),y(K.$$.fragment),be=c(),y(D.$$.fragment),ge=c(),y(G.$$.fragment),ye=c(),ee=d("p"),this.h()},l(e){const s=Ee("svelte-u9bgzb",document.head);l=$(s,"META",{name:!0,content:!0}),s.forEach(t),u=m(e),n=$(e,"P",{}),Ue(n).forEach(t),o=m(e),j(f.$$.fragment,e),i=m(e),x=$(e,"P",{"data-svelte-h":!0}),T(x)!=="svelte-18z3i3s"&&(x.innerHTML=U),g=m(e),j(_.$$.fragment,e),b=m(e),C=$(e,"P",{"data-svelte-h":!0}),T(C)!=="svelte-xl7sbb"&&(C.textContent=W),p=m(e),h=$(e,"UL",{"data-svelte-h":!0}),T(h)!=="svelte-3sz20a"&&(h.innerHTML=r),Z=m(e),j(F.$$.fragment,e),te=m(e),V=$(e,"P",{"data-svelte-h":!0}),T(V)!=="svelte-ligbgn"&&(V.innerHTML=ke),se=m(e),L=$(e,"P",{"data-svelte-h":!0}),T(L)!=="svelte-1ynkc97"&&(L.innerHTML=we),le=m(e),j(R.$$.fragment,e),ae=m(e),A=$(e,"P",{"data-svelte-h":!0}),T(A)!=="svelte-17yq2d2"&&(A.textContent=ve),ne=m(e),j(E.$$.fragment,e),re=m(e),j(z.$$.fragment,e),oe=m(e),N=$(e,"P",{"data-svelte-h":!0}),T(N)!=="svelte-6vccm7"&&(N.innerHTML=Te),pe=m(e),j(X.$$.fragment,e),ce=m(e),j(P.$$.fragment,e),me=m(e),Y=$(e,"P",{"data-svelte-h":!0}),T(Y)!=="svelte-1hrqris"&&(Y.innerHTML=Ze),ie=m(e),q=$(e,"P",{"data-svelte-h":!0}),T(q)!=="svelte-1t3pkzv"&&(q.innerHTML=_e),ue=m(e),j(I.$$.fragment,e),fe=m(e),j(Q.$$.fragment,e),de=m(e),B=$(e,"P",{"data-svelte-h":!0}),T(B)!=="svelte-rmwte1"&&(B.innerHTML=xe),$e=m(e),S=$(e,"P",{"data-svelte-h":!0}),T(S)!=="svelte-1oyckm3"&&(S.innerHTML=Ce),he=m(e),j(K.$$.fragment,e),be=m(e),j(D.$$.fragment,e),ge=m(e),j(G.$$.fragment,e),ye=m(e),ee=$(e,"P",{}),Ue(ee).forEach(t),this.h()},h(){Fe(l,"name","hf:doc:metadata"),Fe(l,"content",Se)},m(e,s){ze(document.head,l),a(e,u,s),a(e,n,s),a(e,o,s),M(f,e,s),a(e,i,s),a(e,x,s),a(e,g,s),M(_,e,s),a(e,b,s),a(e,C,s),a(e,p,s),a(e,h,s),a(e,Z,s),M(F,e,s),a(e,te,s),a(e,V,s),a(e,se,s),a(e,L,s),a(e,le,s),M(R,e,s),a(e,ae,s),a(e,A,s),a(e,ne,s),M(E,e,s),a(e,re,s),M(z,e,s),a(e,oe,s),a(e,N,s),a(e,pe,s),M(X,e,s),a(e,ce,s),M(P,e,s),a(e,me,s),a(e,Y,s),a(e,ie,s),a(e,q,s),a(e,ue,s),M(I,e,s),a(e,fe,s),M(Q,e,s),a(e,de,s),a(e,B,s),a(e,$e,s),a(e,S,s),a(e,he,s),M(K,e,s),a(e,be,s),M(D,e,s),a(e,ge,s),M(G,e,s),a(e,ye,s),a(e,ee,s),je=!0},p(e,[s]){const We={};s&2&&(We.$$scope={dirty:s,ctx:e}),_.$set(We);const Je={};s&2&&(Je.$$scope={dirty:s,ctx:e}),G.$set(Je)},i(e){je||(k(f.$$.fragment,e),k(_.$$.fragment,e),k(F.$$.fragment,e),k(R.$$.fragment,e),k(E.$$.fragment,e),k(z.$$.fragment,e),k(X.$$.fragment,e),k(P.$$.fragment,e),k(I.$$.fragment,e),k(Q.$$.fragment,e),k(K.$$.fragment,e),k(D.$$.fragment,e),k(G.$$.fragment,e),je=!0)},o(e){w(f.$$.fragment,e),w(_.$$.fragment,e),w(F.$$.fragment,e),w(R.$$.fragment,e),w(E.$$.fragment,e),w(z.$$.fragment,e),w(X.$$.fragment,e),w(P.$$.fragment,e),w(I.$$.fragment,e),w(Q.$$.fragment,e),w(K.$$.fragment,e),w(D.$$.fragment,e),w(G.$$.fragment,e),je=!1},d(e){e&&(t(u),t(n),t(o),t(i),t(x),t(g),t(b),t(C),t(p),t(h),t(Z),t(te),t(V),t(se),t(L),t(le),t(ae),t(A),t(ne),t(re),t(oe),t(N),t(pe),t(ce),t(me),t(Y),t(ie),t(q),t(ue),t(fe),t(de),t(B),t($e),t(S),t(he),t(be),t(ge),t(ye),t(ee)),t(l),v(f,e),v(_,e),v(F,e),v(R,e),v(E,e),v(z,e),v(X,e),v(P,e),v(I,e),v(Q,e),v(K,e),v(D,e),v(G,e)}}}const Se='{"title":"使用AutoClass加载预训练实例","local":"使用autoclass加载预训练实例","sections":[{"title":"AutoTokenizer","local":"autotokenizer","sections":[],"depth":2},{"title":"AutoImageProcessor","local":"autoimageprocessor","sections":[],"depth":2},{"title":"AutoFeatureExtractor","local":"autofeatureextractor","sections":[],"depth":2},{"title":"AutoProcessor","local":"autoprocessor","sections":[],"depth":2},{"title":"AutoModel","local":"automodel","sections":[],"depth":2}],"depth":1}';function Ke(J){return Le(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class at extends Re{constructor(l){super(),Ae(this,l,Ke,Be,Ve,{})}}export{at as component};
