import{s as Re,o as Xe,n as we}from"../chunks/scheduler.9991993c.js";import{S as ze,i as Ae,g as d,s as c,r as g,A as Ee,h as $,f as t,c as m,j as Ge,u as y,x as T,k as He,y as Ne,a,v as j,d as M,t as k,w}from"../chunks/index.7fc9a5e7.js";import{T as Ve}from"../chunks/Tip.9de92fc6.js";import{C as G}from"../chunks/CodeBlock.e11cba92.js";import{F as Ye,M as Le}from"../chunks/Markdown.87f31c7e.js";import{H as ee,E as Pe}from"../chunks/EditOnGithub.84ab7f0e.js";function qe(J){let l,u='请记住，架构指的是模型的结构，而checkpoints是给定架构的权重。例如，<a href="https://huggingface.co/google-bert/bert-base-uncased" rel="nofollow">BERT</a>是一种架构，而<code>google-bert/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-1oa17xg"&&(l.innerHTML=u)},m(n,o){a(n,l,o)},p:we,d(n){n&&t(l)}}}function Ie(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:we,d(i){i&&(t(l),t(n),t(o))}}}function Qe(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,v,_,h,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>对数据集进行预处理以进行微调。',b;return o=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",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/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),v=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",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/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),h=new Ve({props:{warning:!0,$$slots:{default:[Ie]},$$scope:{ctx:J}}}),{c(){l=d("p"),l.innerHTML=u,n=c(),g(o.$$.fragment),f=c(),i=d("p"),i.textContent=x,U=c(),g(v.$$.fragment),_=c(),g(h.$$.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),y(o.$$.fragment,r),f=m(r),i=$(r,"P",{"data-svelte-h":!0}),T(i)!=="svelte-1uuscan"&&(i.textContent=x),U=m(r),y(v.$$.fragment,r),_=m(r),y(h.$$.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),j(o,r,Z),a(r,f,Z),a(r,i,Z),a(r,U,Z),j(v,r,Z),a(r,_,Z),j(h,r,Z),a(r,C,Z),a(r,W,Z),b=!0},p(r,Z){const F={};Z&2&&(F.$$scope={dirty:Z,ctx:r}),h.$set(F)},i(r){b||(M(o.$$.fragment,r),M(v.$$.fragment,r),M(h.$$.fragment,r),b=!0)},o(r){k(o.$$.fragment,r),k(v.$$.fragment,r),k(h.$$.fragment,r),b=!1},d(r){r&&(t(l),t(n),t(f),t(i),t(U),t(_),t(C),t(W)),w(o,r),w(v,r),w(h,r)}}}function Be(J){let l,u;return l=new Le({props:{$$slots:{default:[Qe]},$$scope:{ctx:J}}}),{c(){g(l.$$.fragment)},l(n){y(l.$$.fragment,n)},m(n,o){j(l,n,o),u=!0},p(n,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:n}),l.$set(f)},i(n){u||(M(l.$$.fragment,n),u=!0)},o(n){k(l.$$.fragment,n),u=!1},d(n){w(l,n)}}}function Se(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,v,_,h,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 G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",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/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),v=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",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/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),{c(){l=d("p"),l.innerHTML=u,n=c(),g(o.$$.fragment),f=c(),i=d("p"),i.textContent=x,U=c(),g(v.$$.fragment),_=c(),h=d("p"),h.innerHTML=C},l(p){l=$(p,"P",{"data-svelte-h":!0}),T(l)!=="svelte-168f311"&&(l.innerHTML=u),n=m(p),y(o.$$.fragment,p),f=m(p),i=$(p,"P",{"data-svelte-h":!0}),T(i)!=="svelte-1uuscan"&&(i.textContent=x),U=m(p),y(v.$$.fragment,p),_=m(p),h=$(p,"P",{"data-svelte-h":!0}),T(h)!=="svelte-s7ckvf"&&(h.innerHTML=C)},m(p,b){a(p,l,b),a(p,n,b),j(o,p,b),a(p,f,b),a(p,i,b),a(p,U,b),j(v,p,b),a(p,_,b),a(p,h,b),W=!0},p:we,i(p){W||(M(o.$$.fragment,p),M(v.$$.fragment,p),W=!0)},o(p){k(o.$$.fragment,p),k(v.$$.fragment,p),W=!1},d(p){p&&(t(l),t(n),t(f),t(i),t(U),t(_),t(h)),w(o,p),w(v,p)}}}function Ke(J){let l,u;return l=new Le({props:{$$slots:{default:[Se]},$$scope:{ctx:J}}}),{c(){g(l.$$.fragment)},l(n){y(l.$$.fragment,n)},m(n,o){j(l,n,o),u=!0},p(n,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:n}),l.$set(f)},i(n){u||(M(l.$$.fragment,n),u=!0)},o(n){k(l.$$.fragment,n),u=!1},d(n){w(l,n)}}}function De(J){let l,u,n,o,f,i,x,U="由于存在许多不同的Transformer架构，因此为您的checkpoint创建一个可用架构可能会具有挑战性。通过<code>AutoClass</code>可以自动推断并从给定的checkpoint加载正确的架构, 这也是🤗 Transformers易于使用、简单且灵活核心规则的重要一部分。<code>from_pretrained()</code>方法允许您快速加载任何架构的预训练模型，因此您不必花费时间和精力从头开始训练模型。生成这种与checkpoint无关的代码意味着，如果您的代码适用于一个checkpoint，它将适用于另一个checkpoint - 只要它们是为了类似的任务进行训练的 - 即使架构不同。",v,_,h,C,W="在这个教程中，学习如何：",p,b,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,se,V,ve="几乎所有的NLP任务都以<code>tokenizer</code>开始。<code>tokenizer</code>将您的输入转换为模型可以处理的格式。",le,L,Te="使用<code>AutoTokenizer.from_pretrained()</code>加载<code>tokenizer</code>：",ae,R,ne,X,Ze="然后按照如下方式对输入进行分词：",re,z,oe,A,pe,E,_e="对于视觉任务，<code>image processor</code>将图像处理成正确的输入格式。",ce,N,me,Y,ie,P,xe="对于音频任务,<code>feature extractor</code>将音频信号处理成正确的输入格式。",ue,q,Ce="使用<code>AutoFeatureExtractor.from_pretrained()</code>加载<code>feature extractor</code>：",fe,I,de,Q,$e,B,We='多模态任务需要一种<code>processor</code>，将两种类型的预处理工具结合起来。例如，<a href="model_doc/layoutlmv2">LayoutLMV2</a>模型需要一个<code>image processor</code>来处理图像和一个<code>tokenizer</code>来处理文本；<code>processor</code>将两者结合起来。',be,S,Je="使用<code>AutoProcessor.from_pretrained()</code>加载<code>processor</code>：",he,K,ge,D,ye,H,je,O,Me,te,ke;return f=new ee({props:{title:"使用AutoClass加载预训练实例",local:"使用autoclass加载预训练实例",headingTag:"h1"}}),_=new Ve({props:{$$slots:{default:[qe]},$$scope:{ctx:J}}}),F=new ee({props:{title:"AutoTokenizer",local:"autotokenizer",headingTag:"h2"}}),R=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",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;google-bert/bert-base-uncased&quot;</span>)`,wrap:!1}}),z=new G({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}}),A=new ee({props:{title:"AutoImageProcessor",local:"autoimageprocessor",headingTag:"h2"}}),N=new G({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}}),Y=new ee({props:{title:"AutoFeatureExtractor",local:"autofeatureextractor",headingTag:"h2"}}),I=new G({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 ee({props:{title:"AutoProcessor",local:"autoprocessor",headingTag:"h2"}}),K=new G({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 ee({props:{title:"AutoModel",local:"automodel",headingTag:"h2"}}),H=new Ye({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Ke],pytorch:[Be]},$$scope:{ctx:J}}}),O=new Pe({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/zh/autoclass_tutorial.md"}}),{c(){l=d("meta"),u=c(),n=d("p"),o=c(),g(f.$$.fragment),i=c(),x=d("p"),x.innerHTML=U,v=c(),g(_.$$.fragment),h=c(),C=d("p"),C.textContent=W,p=c(),b=d("ul"),b.innerHTML=r,Z=c(),g(F.$$.fragment),se=c(),V=d("p"),V.innerHTML=ve,le=c(),L=d("p"),L.innerHTML=Te,ae=c(),g(R.$$.fragment),ne=c(),X=d("p"),X.textContent=Ze,re=c(),g(z.$$.fragment),oe=c(),g(A.$$.fragment),pe=c(),E=d("p"),E.innerHTML=_e,ce=c(),g(N.$$.fragment),me=c(),g(Y.$$.fragment),ie=c(),P=d("p"),P.innerHTML=xe,ue=c(),q=d("p"),q.innerHTML=Ce,fe=c(),g(I.$$.fragment),de=c(),g(Q.$$.fragment),$e=c(),B=d("p"),B.innerHTML=We,be=c(),S=d("p"),S.innerHTML=Je,he=c(),g(K.$$.fragment),ge=c(),g(D.$$.fragment),ye=c(),g(H.$$.fragment),je=c(),g(O.$$.fragment),Me=c(),te=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",{}),Ge(n).forEach(t),o=m(e),y(f.$$.fragment,e),i=m(e),x=$(e,"P",{"data-svelte-h":!0}),T(x)!=="svelte-18z3i3s"&&(x.innerHTML=U),v=m(e),y(_.$$.fragment,e),h=m(e),C=$(e,"P",{"data-svelte-h":!0}),T(C)!=="svelte-xl7sbb"&&(C.textContent=W),p=m(e),b=$(e,"UL",{"data-svelte-h":!0}),T(b)!=="svelte-3sz20a"&&(b.innerHTML=r),Z=m(e),y(F.$$.fragment,e),se=m(e),V=$(e,"P",{"data-svelte-h":!0}),T(V)!=="svelte-ligbgn"&&(V.innerHTML=ve),le=m(e),L=$(e,"P",{"data-svelte-h":!0}),T(L)!=="svelte-1ynkc97"&&(L.innerHTML=Te),ae=m(e),y(R.$$.fragment,e),ne=m(e),X=$(e,"P",{"data-svelte-h":!0}),T(X)!=="svelte-17yq2d2"&&(X.textContent=Ze),re=m(e),y(z.$$.fragment,e),oe=m(e),y(A.$$.fragment,e),pe=m(e),E=$(e,"P",{"data-svelte-h":!0}),T(E)!=="svelte-6vccm7"&&(E.innerHTML=_e),ce=m(e),y(N.$$.fragment,e),me=m(e),y(Y.$$.fragment,e),ie=m(e),P=$(e,"P",{"data-svelte-h":!0}),T(P)!=="svelte-1hrqris"&&(P.innerHTML=xe),ue=m(e),q=$(e,"P",{"data-svelte-h":!0}),T(q)!=="svelte-1t3pkzv"&&(q.innerHTML=Ce),fe=m(e),y(I.$$.fragment,e),de=m(e),y(Q.$$.fragment,e),$e=m(e),B=$(e,"P",{"data-svelte-h":!0}),T(B)!=="svelte-1hfdtmz"&&(B.innerHTML=We),be=m(e),S=$(e,"P",{"data-svelte-h":!0}),T(S)!=="svelte-1oyckm3"&&(S.innerHTML=Je),he=m(e),y(K.$$.fragment,e),ge=m(e),y(D.$$.fragment,e),ye=m(e),y(H.$$.fragment,e),je=m(e),y(O.$$.fragment,e),Me=m(e),te=$(e,"P",{}),Ge(te).forEach(t),this.h()},h(){He(l,"name","hf:doc:metadata"),He(l,"content",Oe)},m(e,s){Ne(document.head,l),a(e,u,s),a(e,n,s),a(e,o,s),j(f,e,s),a(e,i,s),a(e,x,s),a(e,v,s),j(_,e,s),a(e,h,s),a(e,C,s),a(e,p,s),a(e,b,s),a(e,Z,s),j(F,e,s),a(e,se,s),a(e,V,s),a(e,le,s),a(e,L,s),a(e,ae,s),j(R,e,s),a(e,ne,s),a(e,X,s),a(e,re,s),j(z,e,s),a(e,oe,s),j(A,e,s),a(e,pe,s),a(e,E,s),a(e,ce,s),j(N,e,s),a(e,me,s),j(Y,e,s),a(e,ie,s),a(e,P,s),a(e,ue,s),a(e,q,s),a(e,fe,s),j(I,e,s),a(e,de,s),j(Q,e,s),a(e,$e,s),a(e,B,s),a(e,be,s),a(e,S,s),a(e,he,s),j(K,e,s),a(e,ge,s),j(D,e,s),a(e,ye,s),j(H,e,s),a(e,je,s),j(O,e,s),a(e,Me,s),a(e,te,s),ke=!0},p(e,[s]){const Ue={};s&2&&(Ue.$$scope={dirty:s,ctx:e}),_.$set(Ue);const Fe={};s&2&&(Fe.$$scope={dirty:s,ctx:e}),H.$set(Fe)},i(e){ke||(M(f.$$.fragment,e),M(_.$$.fragment,e),M(F.$$.fragment,e),M(R.$$.fragment,e),M(z.$$.fragment,e),M(A.$$.fragment,e),M(N.$$.fragment,e),M(Y.$$.fragment,e),M(I.$$.fragment,e),M(Q.$$.fragment,e),M(K.$$.fragment,e),M(D.$$.fragment,e),M(H.$$.fragment,e),M(O.$$.fragment,e),ke=!0)},o(e){k(f.$$.fragment,e),k(_.$$.fragment,e),k(F.$$.fragment,e),k(R.$$.fragment,e),k(z.$$.fragment,e),k(A.$$.fragment,e),k(N.$$.fragment,e),k(Y.$$.fragment,e),k(I.$$.fragment,e),k(Q.$$.fragment,e),k(K.$$.fragment,e),k(D.$$.fragment,e),k(H.$$.fragment,e),k(O.$$.fragment,e),ke=!1},d(e){e&&(t(u),t(n),t(o),t(i),t(x),t(v),t(h),t(C),t(p),t(b),t(Z),t(se),t(V),t(le),t(L),t(ae),t(ne),t(X),t(re),t(oe),t(pe),t(E),t(ce),t(me),t(ie),t(P),t(ue),t(q),t(fe),t(de),t($e),t(B),t(be),t(S),t(he),t(ge),t(ye),t(je),t(Me),t(te)),t(l),w(f,e),w(_,e),w(F,e),w(R,e),w(z,e),w(A,e),w(N,e),w(Y,e),w(I,e),w(Q,e),w(K,e),w(D,e),w(H,e),w(O,e)}}}const Oe='{"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 et(J){return Xe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ot extends ze{constructor(l){super(),Ae(this,l,et,De,Re,{})}}export{ot as component};
