import{s as Ve,o as Le,n as Me}from"../chunks/scheduler.9991993c.js";import{S as Re,i as Xe,g as d,s as c,r as y,A as Ae,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 Ge}from"../chunks/Tip.9de92fc6.js";import{C as G}from"../chunks/CodeBlock.e11cba92.js";import{F as Ne,M as He}from"../chunks/Markdown.87f31c7e.js";import{H as O}from"../chunks/Heading.e3de321f.js";function Ee(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:Me,d(n){n&&t(l)}}}function Ye(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 Pe(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 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}}),g=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}}),b=new Ge({props:{warning:!0,$$slots:{default:[Ye]},$$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 He({props:{$$slots:{default:[Pe]},$$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 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}}),g=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(),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 He({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,X,ve="然后按照如下方式对输入进行分词：",ne,A,re,z,oe,N,Te="对于视觉任务，<code>image processor</code>将图像处理成正确的输入格式。",pe,E,ce,Y,me,P,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,H,ye,ee,je;return f=new O({props:{title:"使用AutoClass加载预训练实例",local:"使用autoclass加载预训练实例",headingTag:"h1"}}),_=new Ge({props:{$$slots:{default:[Ee]},$$scope:{ctx:J}}}),F=new O({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}}),A=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}}),z=new O({props:{title:"AutoImageProcessor",local:"autoimageprocessor",headingTag:"h2"}}),E=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 O({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 O({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 O({props:{title:"AutoModel",local:"automodel",headingTag:"h2"}}),H=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(),X=d("p"),X.textContent=ve,ne=c(),y(A.$$.fragment),re=c(),y(z.$$.fragment),oe=c(),N=d("p"),N.innerHTML=Te,pe=c(),y(E.$$.fragment),ce=c(),y(Y.$$.fragment),me=c(),P=d("p"),P.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(H.$$.fragment),ye=c(),ee=d("p"),this.h()},l(e){const s=Ae("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),X=$(e,"P",{"data-svelte-h":!0}),T(X)!=="svelte-17yq2d2"&&(X.textContent=ve),ne=m(e),j(A.$$.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(E.$$.fragment,e),ce=m(e),j(Y.$$.fragment,e),me=m(e),P=$(e,"P",{"data-svelte-h":!0}),T(P)!=="svelte-1hrqris"&&(P.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(H.$$.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,X,s),a(e,ne,s),M(A,e,s),a(e,re,s),M(z,e,s),a(e,oe,s),a(e,N,s),a(e,pe,s),M(E,e,s),a(e,ce,s),M(Y,e,s),a(e,me,s),a(e,P,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(H,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}),H.$set(Je)},i(e){je||(k(f.$$.fragment,e),k(_.$$.fragment,e),k(F.$$.fragment,e),k(R.$$.fragment,e),k(A.$$.fragment,e),k(z.$$.fragment,e),k(E.$$.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),je=!0)},o(e){w(f.$$.fragment,e),w(_.$$.fragment,e),w(F.$$.fragment,e),w(R.$$.fragment,e),w(A.$$.fragment,e),w(z.$$.fragment,e),w(E.$$.fragment,e),w(Y.$$.fragment,e),w(I.$$.fragment,e),w(Q.$$.fragment,e),w(K.$$.fragment,e),w(D.$$.fragment,e),w(H.$$.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(X),t(ne),t(re),t(oe),t(N),t(pe),t(ce),t(me),t(P),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(A,e),v(z,e),v(E,e),v(Y,e),v(I,e),v(Q,e),v(K,e),v(D,e),v(H,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(),Xe(this,l,Ke,Be,Ve,{})}}export{at as component};
