import{s as Bs,o as Hs,n as x}from"../chunks/scheduler.25b97de1.js";import{S as Ns,i as Es,g as d,s as o,r as g,A as Is,h,f as s,c as i,j as xs,u as y,x as _,k as Gs,l as Qs,y as Ls,a,v as b,d as $,t as M,w as j}from"../chunks/index.d9030fc9.js";import{T as Qe}from"../chunks/Tip.baa67368.js";import{C as J}from"../chunks/CodeBlock.e6cd0d95.js";import{F as Ys,M as es}from"../chunks/Markdown.7217f838.js";import{H as G,E as Ps}from"../chunks/EditOnGithub.91d95064.js";import{H as Ss,a as Xs}from"../chunks/HfOption.1e589c90.js";function Ds(Z){let n,f='You can also save your configuration file as a dictionary or even just the difference between your custom configuration attributes and the default configuration attributes! See the <a href="main_classes/configuration">configuration</a> documentation for more details.';return{c(){n=d("p"),n.innerHTML=f},l(l){n=h(l,"P",{"data-svelte-h":!0}),_(n)!=="svelte-4asqog"&&(n.innerHTML=f)},m(l,p){a(l,n,p)},p:x,d(l){l&&s(n)}}}function As(Z){let n,f="Load your custom configuration attributes into the model:",l,p,c,u,C="This creates a model with random values instead of pretrained weights. You won’t be able to use this model for anything useful yet until you train it. Training is a costly and time-consuming process. It is generally better to use a pretrained model to obtain better results faster, while using only a fraction of the resources required for training.",k,w,T='Create a pretrained model with <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a>:',r,v,U,R,F="When you load pretrained weights, the default model configuration is automatically loaded if the model is provided by 🤗 Transformers. However, you can still replace - some or all of - the default model configuration attributes with your own if you’d like:",z,q,V;return p=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRNb2RlbCUwQSUwQW15X2NvbmZpZyUyMCUzRCUyMERpc3RpbEJlcnRDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUyMi4lMkZ5b3VyX21vZGVsX3NhdmVfcGF0aCUyRmNvbmZpZy5qc29uJTIyKSUwQW1vZGVsJTIwJTNEJTIwRGlzdGlsQmVydE1vZGVsKG15X2NvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span>my_config = DistilBertConfig.from_pretrained(<span class="hljs-string">&quot;./your_model_save_path/config.json&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertModel(my_config)`,wrap:!1}}),v=new J({props:{code:"bW9kZWwlMjAlM0QlMjBEaXN0aWxCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)',wrap:!1}}),q=new J({props:{code:"bW9kZWwlMjAlM0QlMjBEaXN0aWxCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMiUyQyUyMGNvbmZpZyUzRG15X2NvbmZpZyk=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>, config=my_config)',wrap:!1}}),{c(){n=d("p"),n.textContent=f,l=o(),g(p.$$.fragment),c=o(),u=d("p"),u.textContent=C,k=o(),w=d("p"),w.innerHTML=T,r=o(),g(v.$$.fragment),U=o(),R=d("p"),R.textContent=F,z=o(),g(q.$$.fragment)},l(m){n=h(m,"P",{"data-svelte-h":!0}),_(n)!=="svelte-16yp9sj"&&(n.textContent=f),l=i(m),y(p.$$.fragment,m),c=i(m),u=h(m,"P",{"data-svelte-h":!0}),_(u)!=="svelte-17byrht"&&(u.textContent=C),k=i(m),w=h(m,"P",{"data-svelte-h":!0}),_(w)!=="svelte-r3fvfg"&&(w.innerHTML=T),r=i(m),y(v.$$.fragment,m),U=i(m),R=h(m,"P",{"data-svelte-h":!0}),_(R)!=="svelte-1dfgiok"&&(R.textContent=F),z=i(m),y(q.$$.fragment,m)},m(m,W){a(m,n,W),a(m,l,W),b(p,m,W),a(m,c,W),a(m,u,W),a(m,k,W),a(m,w,W),a(m,r,W),b(v,m,W),a(m,U,W),a(m,R,W),a(m,z,W),b(q,m,W),V=!0},p:x,i(m){V||($(p.$$.fragment,m),$(v.$$.fragment,m),$(q.$$.fragment,m),V=!0)},o(m){M(p.$$.fragment,m),M(v.$$.fragment,m),M(q.$$.fragment,m),V=!1},d(m){m&&(s(n),s(l),s(c),s(u),s(k),s(w),s(r),s(U),s(R),s(z)),j(p,m),j(v,m),j(q,m)}}}function Ks(Z){let n,f;return n=new es({props:{$$slots:{default:[As]},$$scope:{ctx:Z}}}),{c(){g(n.$$.fragment)},l(l){y(n.$$.fragment,l)},m(l,p){b(n,l,p),f=!0},p(l,p){const c={};p&2&&(c.$$scope={dirty:p,ctx:l}),n.$set(c)},i(l){f||($(n.$$.fragment,l),f=!0)},o(l){M(n.$$.fragment,l),f=!1},d(l){j(n,l)}}}function Os(Z){let n,f="Load your custom configuration attributes into the model:",l,p,c,u,C="This creates a model with random values instead of pretrained weights. You won’t be able to use this model for anything useful yet until you train it. Training is a costly and time-consuming process. It is generally better to use a pretrained model to obtain better results faster, while using only a fraction of the resources required for training.",k,w,T='Create a pretrained model with <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a>:',r,v,U,R,F="When you load pretrained weights, the default model configuration is automatically loaded if the model is provided by 🤗 Transformers. However, you can still replace - some or all of - the default model configuration attributes with your own if you’d like:",z,q,V;return p=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGRGlzdGlsQmVydE1vZGVsJTBBJTBBbXlfY29uZmlnJTIwJTNEJTIwRGlzdGlsQmVydENvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIyLiUyRnlvdXJfbW9kZWxfc2F2ZV9wYXRoJTJGbXlfY29uZmlnLmpzb24lMjIpJTBBdGZfbW9kZWwlMjAlM0QlMjBURkRpc3RpbEJlcnRNb2RlbChteV9jb25maWcp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFDistilBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span>my_config = DistilBertConfig.from_pretrained(<span class="hljs-string">&quot;./your_model_save_path/my_config.json&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFDistilBertModel(my_config)`,wrap:!1}}),v=new J({props:{code:"dGZfbW9kZWwlMjAlM0QlMjBURkRpc3RpbEJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydCUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFDistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)',wrap:!1}}),q=new J({props:{code:"dGZfbW9kZWwlMjAlM0QlMjBURkRpc3RpbEJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydCUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyJTJDJTIwY29uZmlnJTNEbXlfY29uZmlnKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFDistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>, config=my_config)',wrap:!1}}),{c(){n=d("p"),n.textContent=f,l=o(),g(p.$$.fragment),c=o(),u=d("p"),u.textContent=C,k=o(),w=d("p"),w.innerHTML=T,r=o(),g(v.$$.fragment),U=o(),R=d("p"),R.textContent=F,z=o(),g(q.$$.fragment)},l(m){n=h(m,"P",{"data-svelte-h":!0}),_(n)!=="svelte-16yp9sj"&&(n.textContent=f),l=i(m),y(p.$$.fragment,m),c=i(m),u=h(m,"P",{"data-svelte-h":!0}),_(u)!=="svelte-17byrht"&&(u.textContent=C),k=i(m),w=h(m,"P",{"data-svelte-h":!0}),_(w)!=="svelte-1oqtb7i"&&(w.innerHTML=T),r=i(m),y(v.$$.fragment,m),U=i(m),R=h(m,"P",{"data-svelte-h":!0}),_(R)!=="svelte-1dfgiok"&&(R.textContent=F),z=i(m),y(q.$$.fragment,m)},m(m,W){a(m,n,W),a(m,l,W),b(p,m,W),a(m,c,W),a(m,u,W),a(m,k,W),a(m,w,W),a(m,r,W),b(v,m,W),a(m,U,W),a(m,R,W),a(m,z,W),b(q,m,W),V=!0},p:x,i(m){V||($(p.$$.fragment,m),$(v.$$.fragment,m),$(q.$$.fragment,m),V=!0)},o(m){M(p.$$.fragment,m),M(v.$$.fragment,m),M(q.$$.fragment,m),V=!1},d(m){m&&(s(n),s(l),s(c),s(u),s(k),s(w),s(r),s(U),s(R),s(z)),j(p,m),j(v,m),j(q,m)}}}function ea(Z){let n,f;return n=new es({props:{$$slots:{default:[Os]},$$scope:{ctx:Z}}}),{c(){g(n.$$.fragment)},l(l){y(n.$$.fragment,l)},m(l,p){b(n,l,p),f=!0},p(l,p){const c={};p&2&&(c.$$scope={dirty:p,ctx:l}),n.$set(c)},i(l){f||($(n.$$.fragment,l),f=!0)},o(l){M(n.$$.fragment,l),f=!1},d(l){j(n,l)}}}function ta(Z){let n,f='For example, <a href="/docs/transformers/v4.41.0/en/model_doc/distilbert#transformers.DistilBertForSequenceClassification">DistilBertForSequenceClassification</a> is a base DistilBERT model with a sequence classification head. The sequence classification head is a linear layer on top of the pooled outputs.',l,p,c,u,C='Easily reuse this checkpoint for another task by switching to a different model head. For a question answering task, you would use the <a href="/docs/transformers/v4.41.0/en/model_doc/distilbert#transformers.DistilBertForQuestionAnswering">DistilBertForQuestionAnswering</a> model head. The question answering head is similar to the sequence classification head except it is a linear layer on top of the hidden states output.',k,w,T;return p=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBEaXN0aWxCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydCUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),w=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZyUwQSUwQW1vZGVsJTIwJTNEJTIwRGlzdGlsQmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),{c(){n=d("p"),n.innerHTML=f,l=o(),g(p.$$.fragment),c=o(),u=d("p"),u.innerHTML=C,k=o(),g(w.$$.fragment)},l(r){n=h(r,"P",{"data-svelte-h":!0}),_(n)!=="svelte-1vyrvoh"&&(n.innerHTML=f),l=i(r),y(p.$$.fragment,r),c=i(r),u=h(r,"P",{"data-svelte-h":!0}),_(u)!=="svelte-1xqt3nf"&&(u.innerHTML=C),k=i(r),y(w.$$.fragment,r)},m(r,v){a(r,n,v),a(r,l,v),b(p,r,v),a(r,c,v),a(r,u,v),a(r,k,v),b(w,r,v),T=!0},p:x,i(r){T||($(p.$$.fragment,r),$(w.$$.fragment,r),T=!0)},o(r){M(p.$$.fragment,r),M(w.$$.fragment,r),T=!1},d(r){r&&(s(n),s(l),s(c),s(u),s(k)),j(p,r),j(w,r)}}}function sa(Z){let n,f;return n=new es({props:{$$slots:{default:[ta]},$$scope:{ctx:Z}}}),{c(){g(n.$$.fragment)},l(l){y(n.$$.fragment,l)},m(l,p){b(n,l,p),f=!0},p(l,p){const c={};p&2&&(c.$$scope={dirty:p,ctx:l}),n.$set(c)},i(l){f||($(n.$$.fragment,l),f=!0)},o(l){M(n.$$.fragment,l),f=!1},d(l){j(n,l)}}}function aa(Z){let n,f='For example, <a href="/docs/transformers/v4.41.0/en/model_doc/distilbert#transformers.TFDistilBertForSequenceClassification">TFDistilBertForSequenceClassification</a> is a base DistilBERT model with a sequence classification head. The sequence classification head is a linear layer on top of the pooled outputs.',l,p,c,u,C='Easily reuse this checkpoint for another task by switching to a different model head. For a question answering task, you would use the <a href="/docs/transformers/v4.41.0/en/model_doc/distilbert#transformers.TFDistilBertForQuestionAnswering">TFDistilBertForQuestionAnswering</a> model head. The question answering head is similar to the sequence classification head except it is a linear layer on top of the hidden states output.',k,w,T;return p=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGRGlzdGlsQmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0Zl9tb2RlbCUyMCUzRCUyMFRGRGlzdGlsQmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFDistilBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFDistilBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),w=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGRGlzdGlsQmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBdGZfbW9kZWwlMjAlM0QlMjBURkRpc3RpbEJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydCUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFDistilBertForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFDistilBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),{c(){n=d("p"),n.innerHTML=f,l=o(),g(p.$$.fragment),c=o(),u=d("p"),u.innerHTML=C,k=o(),g(w.$$.fragment)},l(r){n=h(r,"P",{"data-svelte-h":!0}),_(n)!=="svelte-1cy2g4p"&&(n.innerHTML=f),l=i(r),y(p.$$.fragment,r),c=i(r),u=h(r,"P",{"data-svelte-h":!0}),_(u)!=="svelte-1lbfquj"&&(u.innerHTML=C),k=i(r),y(w.$$.fragment,r)},m(r,v){a(r,n,v),a(r,l,v),b(p,r,v),a(r,c,v),a(r,u,v),a(r,k,v),b(w,r,v),T=!0},p:x,i(r){T||($(p.$$.fragment,r),$(w.$$.fragment,r),T=!0)},o(r){M(p.$$.fragment,r),M(w.$$.fragment,r),T=!1},d(r){r&&(s(n),s(l),s(c),s(u),s(k)),j(p,r),j(w,r)}}}function na(Z){let n,f;return n=new es({props:{$$slots:{default:[aa]},$$scope:{ctx:Z}}}),{c(){g(n.$$.fragment)},l(l){y(n.$$.fragment,l)},m(l,p){b(n,l,p),f=!0},p(l,p){const c={};p&2&&(c.$$scope={dirty:p,ctx:l}),n.$set(c)},i(l){f||($(n.$$.fragment,l),f=!0)},o(l){M(n.$$.fragment,l),f=!1},d(l){j(n,l)}}}function la(Z){let n,f='Not every model supports a fast tokenizer. Take a look at this <a href="index#supported-frameworks">table</a> to check if a model has fast tokenizer support.';return{c(){n=d("p"),n.innerHTML=f},l(l){n=h(l,"P",{"data-svelte-h":!0}),_(n)!=="svelte-18y3slz"&&(n.innerHTML=f)},m(l,p){a(l,n,p)},p:x,d(l){l&&s(n)}}}function ra(Z){let n,f='By default, <a href="/docs/transformers/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a> will try to load a fast tokenizer. You can disable this behavior by setting <code>use_fast=False</code> in <code>from_pretrained</code>.';return{c(){n=d("p"),n.innerHTML=f},l(l){n=h(l,"P",{"data-svelte-h":!0}),_(n)!=="svelte-hkycgw"&&(n.innerHTML=f)},m(l,p){a(l,n,p)},p:x,d(l){l&&s(n)}}}function oa(Z){let n,f="If you aren’t looking for any customization, just use the <code>from_pretrained</code> method to load a model’s default image processor parameters.";return{c(){n=d("p"),n.innerHTML=f},l(l){n=h(l,"P",{"data-svelte-h":!0}),_(n)!=="svelte-10var38"&&(n.innerHTML=f)},m(l,p){a(l,n,p)},p:x,d(l){l&&s(n)}}}function ia(Z){let n,f="Set <code>use_pretrained_backbone=True</code> to load pretrained ResNet weights for the backbone.",l,p,c,u,C="You could also load the backbone config separately and then pass it to the model config.",k,w,T;return p=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1hc2tGb3JtZXJDb25maWclMkMlMjBNYXNrRm9ybWVyRm9ySW5zdGFuY2VTZWdtZW50YXRpb24lMkMlMjBSZXNOZXRDb25maWclMEElMEFjb25maWclMjAlM0QlMjBNYXNrRm9ybWVyQ29uZmlnKGJhY2tib25lJTNEJTIybWljcm9zb2Z0JTJGcmVzbmV0NTAlMjIlMkMlMjB1c2VfcHJldHJhaW5lZF9iYWNrYm9uZSUzRFRydWUpJTIwJTIzJTIwYmFja2JvbmUlMjBhbmQlMjBuZWNrJTIwY29uZmlnJTBBbW9kZWwlMjAlM0QlMjBNYXNrRm9ybWVyRm9ySW5zdGFuY2VTZWdtZW50YXRpb24oY29uZmlnKSUyMCUyMyUyMGhlYWQ=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MaskFormerConfig, MaskFormerForInstanceSegmentation, ResNetConfig

config = MaskFormerConfig(backbone=<span class="hljs-string">&quot;microsoft/resnet50&quot;</span>, use_pretrained_backbone=<span class="hljs-literal">True</span>) <span class="hljs-comment"># backbone and neck config</span>
model = MaskFormerForInstanceSegmentation(config) <span class="hljs-comment"># head</span>`,wrap:!1}}),w=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1hc2tGb3JtZXJDb25maWclMkMlMjBNYXNrRm9ybWVyRm9ySW5zdGFuY2VTZWdtZW50YXRpb24lMkMlMjBSZXNOZXRDb25maWclMEElMEFiYWNrYm9uZV9jb25maWclMjAlM0QlMjBSZXNOZXRDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnJlc25ldC01MCUyMiklMEFjb25maWclMjAlM0QlMjBNYXNrRm9ybWVyQ29uZmlnKGJhY2tib25lX2NvbmZpZyUzRGJhY2tib25lX2NvbmZpZyklMEFtb2RlbCUyMCUzRCUyME1hc2tGb3JtZXJGb3JJbnN0YW5jZVNlZ21lbnRhdGlvbihjb25maWcp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MaskFormerConfig, MaskFormerForInstanceSegmentation, ResNetConfig

backbone_config = ResNetConfig.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&quot;</span>)
config = MaskFormerConfig(backbone_config=backbone_config)
model = MaskFormerForInstanceSegmentation(config)`,wrap:!1}}),{c(){n=d("p"),n.innerHTML=f,l=o(),g(p.$$.fragment),c=o(),u=d("p"),u.textContent=C,k=o(),g(w.$$.fragment)},l(r){n=h(r,"P",{"data-svelte-h":!0}),_(n)!=="svelte-2cal1y"&&(n.innerHTML=f),l=i(r),y(p.$$.fragment,r),c=i(r),u=h(r,"P",{"data-svelte-h":!0}),_(u)!=="svelte-ioxtxg"&&(u.textContent=C),k=i(r),y(w.$$.fragment,r)},m(r,v){a(r,n,v),a(r,l,v),b(p,r,v),a(r,c,v),a(r,u,v),a(r,k,v),b(w,r,v),T=!0},p:x,i(r){T||($(p.$$.fragment,r),$(w.$$.fragment,r),T=!0)},o(r){M(p.$$.fragment,r),M(w.$$.fragment,r),T=!1},d(r){r&&(s(n),s(l),s(c),s(u),s(k)),j(p,r),j(w,r)}}}function pa(Z){let n,f="Set <code>use_pretrained_backbone=False</code> to randomly initialize a ResNet backbone.",l,p,c,u,C="You could also load the backbone config separately and then pass it to the model config.",k,w,T;return p=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1hc2tGb3JtZXJDb25maWclMkMlMjBNYXNrRm9ybWVyRm9ySW5zdGFuY2VTZWdtZW50YXRpb24lMkMlMjBSZXNOZXRDb25maWclMEElMEFjb25maWclMjAlM0QlMjBNYXNrRm9ybWVyQ29uZmlnKGJhY2tib25lJTNEJTIybWljcm9zb2Z0JTJGcmVzbmV0NTAlMjIlMkMlMjB1c2VfcHJldHJhaW5lZF9iYWNrYm9uZSUzREZhbHNlKSUyMCUyMyUyMGJhY2tib25lJTIwYW5kJTIwbmVjayUyMGNvbmZpZyUwQW1vZGVsJTIwJTNEJTIwTWFza0Zvcm1lckZvckluc3RhbmNlU2VnbWVudGF0aW9uKGNvbmZpZyklMjAlMjMlMjBoZWFk",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MaskFormerConfig, MaskFormerForInstanceSegmentation, ResNetConfig

config = MaskFormerConfig(backbone=<span class="hljs-string">&quot;microsoft/resnet50&quot;</span>, use_pretrained_backbone=<span class="hljs-literal">False</span>) <span class="hljs-comment"># backbone and neck config</span>
model = MaskFormerForInstanceSegmentation(config) <span class="hljs-comment"># head</span>`,wrap:!1}}),w=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1hc2tGb3JtZXJDb25maWclMkMlMjBNYXNrRm9ybWVyRm9ySW5zdGFuY2VTZWdtZW50YXRpb24lMkMlMjBSZXNOZXRDb25maWclMEElMEFiYWNrYm9uZV9jb25maWclMjAlM0QlMjBSZXNOZXRDb25maWcoKSUwQWNvbmZpZyUyMCUzRCUyME1hc2tGb3JtZXJDb25maWcoYmFja2JvbmVfY29uZmlnJTNEYmFja2JvbmVfY29uZmlnKSUwQW1vZGVsJTIwJTNEJTIwTWFza0Zvcm1lckZvckluc3RhbmNlU2VnbWVudGF0aW9uKGNvbmZpZyk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MaskFormerConfig, MaskFormerForInstanceSegmentation, ResNetConfig

backbone_config = ResNetConfig()
config = MaskFormerConfig(backbone_config=backbone_config)
model = MaskFormerForInstanceSegmentation(config)`,wrap:!1}}),{c(){n=d("p"),n.innerHTML=f,l=o(),g(p.$$.fragment),c=o(),u=d("p"),u.textContent=C,k=o(),g(w.$$.fragment)},l(r){n=h(r,"P",{"data-svelte-h":!0}),_(n)!=="svelte-d4czvf"&&(n.innerHTML=f),l=i(r),y(p.$$.fragment,r),c=i(r),u=h(r,"P",{"data-svelte-h":!0}),_(u)!=="svelte-ioxtxg"&&(u.textContent=C),k=i(r),y(w.$$.fragment,r)},m(r,v){a(r,n,v),a(r,l,v),b(p,r,v),a(r,c,v),a(r,u,v),a(r,k,v),b(w,r,v),T=!0},p:x,i(r){T||($(p.$$.fragment,r),$(w.$$.fragment,r),T=!0)},o(r){M(p.$$.fragment,r),M(w.$$.fragment,r),T=!1},d(r){r&&(s(n),s(l),s(c),s(u),s(k)),j(p,r),j(w,r)}}}function ma(Z){let n,f,l,p;return n=new Xs({props:{id:"backbone",option:"pretrained weights",$$slots:{default:[ia]},$$scope:{ctx:Z}}}),l=new Xs({props:{id:"backbone",option:"random weights",$$slots:{default:[pa]},$$scope:{ctx:Z}}}),{c(){g(n.$$.fragment),f=o(),g(l.$$.fragment)},l(c){y(n.$$.fragment,c),f=i(c),y(l.$$.fragment,c)},m(c,u){b(n,c,u),a(c,f,u),b(l,c,u),p=!0},p(c,u){const C={};u&2&&(C.$$scope={dirty:u,ctx:c}),n.$set(C);const k={};u&2&&(k.$$scope={dirty:u,ctx:c}),l.$set(k)},i(c){p||($(n.$$.fragment,c),$(l.$$.fragment,c),p=!0)},o(c){M(n.$$.fragment,c),M(l.$$.fragment,c),p=!1},d(c){c&&s(f),j(n,c),j(l,c)}}}function ca(Z){let n,f="If you aren’t looking for any customization, just use the <code>from_pretrained</code> method to load a model’s default feature extractor parameters.";return{c(){n=d("p"),n.innerHTML=f},l(l){n=h(l,"P",{"data-svelte-h":!0}),_(n)!=="svelte-1e7p61z"&&(n.innerHTML=f)},m(l,p){a(l,n,p)},p:x,d(l){l&&s(n)}}}function fa(Z){let n,f,l,p,c,u,C,k='An <a href="model_doc/auto"><code>AutoClass</code></a> automatically infers the model architecture and downloads pretrained configuration and weights. Generally, we recommend using an <code>AutoClass</code> to produce checkpoint-agnostic code. But users who want more control over specific model parameters can create a custom 🤗 Transformers model from just a few base classes. This could be particularly useful for anyone who is interested in studying, training or experimenting with a 🤗 Transformers model. In this guide, dive deeper into creating a custom model without an <code>AutoClass</code>. Learn how to:',w,T,r="<li>Load and customize a model configuration.</li> <li>Create a model architecture.</li> <li>Create a slow and fast tokenizer for text.</li> <li>Create an image processor for vision tasks.</li> <li>Create a feature extractor for audio tasks.</li> <li>Create a processor for multimodal tasks.</li>",v,U,R,F,z='A <a href="main_classes/configuration">configuration</a> refers to a model’s specific attributes. Each model configuration has different attributes; for instance, all NLP models have the <code>hidden_size</code>, <code>num_attention_heads</code>, <code>num_hidden_layers</code> and <code>vocab_size</code> attributes in common. These attributes specify the number of attention heads or hidden layers to construct a model with.',q,V,m='Get a closer look at <a href="model_doc/distilbert">DistilBERT</a> by accessing <a href="/docs/transformers/v4.41.0/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</a> to inspect it’s attributes:',W,P,Le,S,ts='<a href="/docs/transformers/v4.41.0/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</a> displays all the default attributes used to build a base <a href="/docs/transformers/v4.41.0/en/model_doc/distilbert#transformers.DistilBertModel">DistilBertModel</a>. All attributes are customizable, creating space for experimentation. For example, you can customize a default model to:',Pe,D,ss="<li>Try a different activation function with the <code>activation</code> parameter.</li> <li>Use a higher dropout ratio for the attention probabilities with the <code>attention_dropout</code> parameter.</li>",Se,A,De,K,as='Pretrained model attributes can be modified in the <a href="/docs/transformers/v4.41.0/en/main_classes/configuration#transformers.PretrainedConfig.from_pretrained">from_pretrained()</a> function:',Ae,O,Ke,ee,ns='Once you are satisfied with your model configuration, you can save it with <a href="/docs/transformers/v4.41.0/en/main_classes/configuration#transformers.PretrainedConfig.save_pretrained">save_pretrained()</a>. Your configuration file is stored as a JSON file in the specified save directory:',Oe,te,et,se,ls='To reuse the configuration file, load it with <a href="/docs/transformers/v4.41.0/en/main_classes/configuration#transformers.PretrainedConfig.from_pretrained">from_pretrained()</a>:',tt,ae,st,Y,at,ne,nt,le,rs='The next step is to create a <a href="main_classes/models">model</a>. The model - also loosely referred to as the architecture - defines what each layer is doing and what operations are happening. Attributes like <code>num_hidden_layers</code> from the configuration are used to define the architecture. Every model shares the base class <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> and a few common methods like resizing input embeddings and pruning self-attention heads. In addition, all models are also either a <a href="https://pytorch.org/docs/stable/generated/torch.nn.Module.html" rel="nofollow"><code>torch.nn.Module</code></a>, <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow"><code>tf.keras.Model</code></a> or <a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow"><code>flax.linen.Module</code></a> subclass. This means models are compatible with each of their respective framework’s usage.',lt,X,rt,re,ot,oe,os="At this point, you have a base DistilBERT model which outputs the <em>hidden states</em>. The hidden states are passed as inputs to a model head to produce the final output. 🤗 Transformers provides a different model head for each task as long as a model supports the task (i.e., you can’t use DistilBERT for a sequence-to-sequence task like translation).",it,B,pt,ie,mt,pe,is='The last base class you need before using a model for textual data is a <a href="main_classes/tokenizer">tokenizer</a> to convert raw text to tensors. There are two types of tokenizers you can use with 🤗 Transformers:',ct,me,ps='<li><a href="/docs/transformers/v4.41.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>: a Python implementation of a tokenizer.</li> <li><a href="/docs/transformers/v4.41.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>: a tokenizer from our Rust-based <a href="https://huggingface.co/docs/tokenizers/python/latest/" rel="nofollow">🤗 Tokenizer</a> library. This tokenizer type is significantly faster - especially during batch tokenization - due to its Rust implementation. The fast tokenizer also offers additional methods like <em>offset mapping</em> which maps tokens to their original words or characters.</li>',ft,ce,ms="Both tokenizers support common methods such as encoding and decoding, adding new tokens, and managing special tokens.",ut,H,dt,fe,cs="If you trained your own tokenizer, you can create one from your <em>vocabulary</em> file:",ht,ue,gt,de,fs='It is important to remember the vocabulary from a custom tokenizer will be different from the vocabulary generated by a pretrained model’s tokenizer. You need to use a pretrained model’s vocabulary if you are using a pretrained model, otherwise the inputs won’t make sense. Create a tokenizer with a pretrained model’s vocabulary with the <a href="/docs/transformers/v4.41.0/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a> class:',yt,he,bt,ge,us='Create a fast tokenizer with the <a href="/docs/transformers/v4.41.0/en/model_doc/distilbert#transformers.DistilBertTokenizerFast">DistilBertTokenizerFast</a> class:',$t,ye,Mt,N,jt,be,_t,$e,ds='An image processor processes vision inputs. It inherits from the base <a href="/docs/transformers/v4.41.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin">ImageProcessingMixin</a> class.',wt,Me,hs='To use, create an image processor associated with the model you’re using. For example, create a default <a href="/docs/transformers/v4.41.0/en/model_doc/vit#transformers.ViTImageProcessor">ViTImageProcessor</a> if you are using <a href="model_doc/vit">ViT</a> for image classification:',vt,je,kt,E,Tt,_e,gs='Modify any of the <a href="/docs/transformers/v4.41.0/en/model_doc/vit#transformers.ViTImageProcessor">ViTImageProcessor</a> parameters to create your custom image processor:',Zt,we,Wt,ve,Jt,I,ys='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/Backbone.png"/>',Ct,ke,bs="Computer vision models consist of a backbone, neck, and head. The backbone extracts features from an input image, the neck combines and enhances the extracted features, and the head is used for the main task (e.g., object detection). Start by initializing a backbone in the model config and specify whether you want to load pretrained weights or load randomly initialized weights. Then you can pass the model config to the model head.",Rt,Te,$s='For example, to load a <a href="../model_doc/resnet">ResNet</a> backbone into a <a href="../model_doc/maskformer">MaskFormer</a> model with an instance segmentation head:',qt,Q,Ut,Ze,Ms='<a href="https://hf.co/docs/timm/index" rel="nofollow">timm</a> models are loaded with <a href="/docs/transformers/v4.41.0/en/main_classes/backbones#transformers.TimmBackbone">TimmBackbone</a> and <a href="/docs/transformers/v4.41.0/en/main_classes/backbones#transformers.TimmBackboneConfig">TimmBackboneConfig</a>.',Vt,We,Ft,Je,zt,Ce,js='A feature extractor processes audio inputs. It inherits from the base <a href="/docs/transformers/v4.41.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin">FeatureExtractionMixin</a> class, and may also inherit from the <a href="/docs/transformers/v4.41.0/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor">SequenceFeatureExtractor</a> class for processing audio inputs.',xt,Re,_s='To use, create a feature extractor associated with the model you’re using. For example, create a default <a href="/docs/transformers/v4.41.0/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor">Wav2Vec2FeatureExtractor</a> if you are using <a href="model_doc/wav2vec2">Wav2Vec2</a> for audio classification:',Gt,qe,Yt,L,Xt,Ue,ws='Modify any of the <a href="/docs/transformers/v4.41.0/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor">Wav2Vec2FeatureExtractor</a> parameters to create your custom feature extractor:',Bt,Ve,Ht,Fe,Nt,ze,vs='For models that support multimodal tasks, 🤗 Transformers offers a processor class that conveniently wraps processing classes such as a feature extractor and a tokenizer into a single object. For example, let’s use the <a href="/docs/transformers/v4.41.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor">Wav2Vec2Processor</a> for an automatic speech recognition task (ASR). ASR transcribes audio to text, so you will need a feature extractor and a tokenizer.',Et,xe,ks="Create a feature extractor to handle the audio inputs:",It,Ge,Qt,Ye,Ts="Create a tokenizer to handle the text inputs:",Lt,Xe,Pt,Be,Zs='Combine the feature extractor and tokenizer in <a href="/docs/transformers/v4.41.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor">Wav2Vec2Processor</a>:',St,He,Dt,Ne,Ws="With two basic classes - configuration and model - and an additional preprocessing class (tokenizer, image processor, feature extractor, or processor), you can create any of the models supported by 🤗 Transformers. Each of these base classes are configurable, allowing you to use the specific attributes you want. You can easily setup a model for training or modify an existing pretrained model to fine-tune.",At,Ee,Kt,Ie,Ot;return c=new G({props:{title:"Create a custom architecture",local:"create-a-custom-architecture",headingTag:"h1"}}),U=new G({props:{title:"Configuration",local:"configuration",headingTag:"h2"}}),P=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRDb25maWclMEElMEFjb25maWclMjAlM0QlMjBEaXN0aWxCZXJ0Q29uZmlnKCklMEFwcmludChjb25maWcp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>config = DistilBertConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(config)
DistilBertConfig {
  <span class="hljs-string">&quot;activation&quot;</span>: <span class="hljs-string">&quot;gelu&quot;</span>,
  <span class="hljs-string">&quot;attention_dropout&quot;</span>: <span class="hljs-number">0.1</span>,
  <span class="hljs-string">&quot;dim&quot;</span>: <span class="hljs-number">768</span>,
  <span class="hljs-string">&quot;dropout&quot;</span>: <span class="hljs-number">0.1</span>,
  <span class="hljs-string">&quot;hidden_dim&quot;</span>: <span class="hljs-number">3072</span>,
  <span class="hljs-string">&quot;initializer_range&quot;</span>: <span class="hljs-number">0.02</span>,
  <span class="hljs-string">&quot;max_position_embeddings&quot;</span>: <span class="hljs-number">512</span>,
  <span class="hljs-string">&quot;model_type&quot;</span>: <span class="hljs-string">&quot;distilbert&quot;</span>,
  <span class="hljs-string">&quot;n_heads&quot;</span>: <span class="hljs-number">12</span>,
  <span class="hljs-string">&quot;n_layers&quot;</span>: <span class="hljs-number">6</span>,
  <span class="hljs-string">&quot;pad_token_id&quot;</span>: <span class="hljs-number">0</span>,
  <span class="hljs-string">&quot;qa_dropout&quot;</span>: <span class="hljs-number">0.1</span>,
  <span class="hljs-string">&quot;seq_classif_dropout&quot;</span>: <span class="hljs-number">0.2</span>,
  <span class="hljs-string">&quot;sinusoidal_pos_embds&quot;</span>: false,
  <span class="hljs-string">&quot;transformers_version&quot;</span>: <span class="hljs-string">&quot;4.16.2&quot;</span>,
  <span class="hljs-string">&quot;vocab_size&quot;</span>: <span class="hljs-number">30522</span>
}`,wrap:!1}}),A=new J({props:{code:"bXlfY29uZmlnJTIwJTNEJTIwRGlzdGlsQmVydENvbmZpZyhhY3RpdmF0aW9uJTNEJTIycmVsdSUyMiUyQyUyMGF0dGVudGlvbl9kcm9wb3V0JTNEMC40KSUwQXByaW50KG15X2NvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>my_config = DistilBertConfig(activation=<span class="hljs-string">&quot;relu&quot;</span>, attention_dropout=<span class="hljs-number">0.4</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(my_config)
DistilBertConfig {
  <span class="hljs-string">&quot;activation&quot;</span>: <span class="hljs-string">&quot;relu&quot;</span>,
  <span class="hljs-string">&quot;attention_dropout&quot;</span>: <span class="hljs-number">0.4</span>,
  <span class="hljs-string">&quot;dim&quot;</span>: <span class="hljs-number">768</span>,
  <span class="hljs-string">&quot;dropout&quot;</span>: <span class="hljs-number">0.1</span>,
  <span class="hljs-string">&quot;hidden_dim&quot;</span>: <span class="hljs-number">3072</span>,
  <span class="hljs-string">&quot;initializer_range&quot;</span>: <span class="hljs-number">0.02</span>,
  <span class="hljs-string">&quot;max_position_embeddings&quot;</span>: <span class="hljs-number">512</span>,
  <span class="hljs-string">&quot;model_type&quot;</span>: <span class="hljs-string">&quot;distilbert&quot;</span>,
  <span class="hljs-string">&quot;n_heads&quot;</span>: <span class="hljs-number">12</span>,
  <span class="hljs-string">&quot;n_layers&quot;</span>: <span class="hljs-number">6</span>,
  <span class="hljs-string">&quot;pad_token_id&quot;</span>: <span class="hljs-number">0</span>,
  <span class="hljs-string">&quot;qa_dropout&quot;</span>: <span class="hljs-number">0.1</span>,
  <span class="hljs-string">&quot;seq_classif_dropout&quot;</span>: <span class="hljs-number">0.2</span>,
  <span class="hljs-string">&quot;sinusoidal_pos_embds&quot;</span>: false,
  <span class="hljs-string">&quot;transformers_version&quot;</span>: <span class="hljs-string">&quot;4.16.2&quot;</span>,
  <span class="hljs-string">&quot;vocab_size&quot;</span>: <span class="hljs-number">30522</span>
}`,wrap:!1}}),O=new J({props:{code:"bXlfY29uZmlnJTIwJTNEJTIwRGlzdGlsQmVydENvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydCUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyJTJDJTIwYWN0aXZhdGlvbiUzRCUyMnJlbHUlMjIlMkMlMjBhdHRlbnRpb25fZHJvcG91dCUzRDAuNCk=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>my_config = DistilBertConfig.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>, activation=<span class="hljs-string">&quot;relu&quot;</span>, attention_dropout=<span class="hljs-number">0.4</span>)',wrap:!1}}),te=new J({props:{code:"bXlfY29uZmlnLnNhdmVfcHJldHJhaW5lZChzYXZlX2RpcmVjdG9yeSUzRCUyMi4lMkZ5b3VyX21vZGVsX3NhdmVfcGF0aCUyMik=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>my_config.save_pretrained(save_directory=<span class="hljs-string">&quot;./your_model_save_path&quot;</span>)',wrap:!1}}),ae=new J({props:{code:"bXlfY29uZmlnJTIwJTNEJTIwRGlzdGlsQmVydENvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIyLiUyRnlvdXJfbW9kZWxfc2F2ZV9wYXRoJTJGY29uZmlnLmpzb24lMjIp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>my_config = DistilBertConfig.from_pretrained(<span class="hljs-string">&quot;./your_model_save_path/config.json&quot;</span>)',wrap:!1}}),Y=new Qe({props:{$$slots:{default:[Ds]},$$scope:{ctx:Z}}}),ne=new G({props:{title:"Model",local:"model",headingTag:"h2"}}),X=new Ys({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ea],pytorch:[Ks]},$$scope:{ctx:Z}}}),re=new G({props:{title:"Model heads",local:"model-heads",headingTag:"h3"}}),B=new Ys({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[na],pytorch:[sa]},$$scope:{ctx:Z}}}),ie=new G({props:{title:"Tokenizer",local:"tokenizer",headingTag:"h2"}}),H=new Qe({props:{warning:!0,$$slots:{default:[la]},$$scope:{ctx:Z}}}),ue=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRUb2tlbml6ZXIlMEElMEFteV90b2tlbml6ZXIlMjAlM0QlMjBEaXN0aWxCZXJ0VG9rZW5pemVyKHZvY2FiX2ZpbGUlM0QlMjJteV92b2NhYl9maWxlLnR4dCUyMiUyQyUyMGRvX2xvd2VyX2Nhc2UlM0RGYWxzZSUyQyUyMHBhZGRpbmdfc2lkZSUzRCUyMmxlZnQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>my_tokenizer = DistilBertTokenizer(vocab_file=<span class="hljs-string">&quot;my_vocab_file.txt&quot;</span>, do_lower_case=<span class="hljs-literal">False</span>, padding_side=<span class="hljs-string">&quot;left&quot;</span>)`,wrap:!1}}),he=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRUb2tlbml6ZXIlMEElMEFzbG93X3Rva2VuaXplciUyMCUzRCUyMERpc3RpbEJlcnRUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>slow_tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),ye=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRUb2tlbml6ZXJGYXN0JTBBJTBBZmFzdF90b2tlbml6ZXIlMjAlM0QlMjBEaXN0aWxCZXJ0VG9rZW5pemVyRmFzdC5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydCUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>fast_tokenizer = DistilBertTokenizerFast.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),N=new Qe({props:{$$slots:{default:[ra]},$$scope:{ctx:Z}}}),be=new G({props:{title:"Image processor",local:"image-processor",headingTag:"h2"}}),je=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpVEltYWdlUHJvY2Vzc29yJTBBJTBBdml0X2V4dHJhY3RvciUyMCUzRCUyMFZpVEltYWdlUHJvY2Vzc29yKCklMEFwcmludCh2aXRfZXh0cmFjdG9yKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ViTImageProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>vit_extractor = ViTImageProcessor()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(vit_extractor)
ViTImageProcessor {
  <span class="hljs-string">&quot;do_normalize&quot;</span>: true,
  <span class="hljs-string">&quot;do_resize&quot;</span>: true,
  <span class="hljs-string">&quot;image_processor_type&quot;</span>: <span class="hljs-string">&quot;ViTImageProcessor&quot;</span>,
  <span class="hljs-string">&quot;image_mean&quot;</span>: [
    <span class="hljs-number">0.5</span>,
    <span class="hljs-number">0.5</span>,
    <span class="hljs-number">0.5</span>
  ],
  <span class="hljs-string">&quot;image_std&quot;</span>: [
    <span class="hljs-number">0.5</span>,
    <span class="hljs-number">0.5</span>,
    <span class="hljs-number">0.5</span>
  ],
  <span class="hljs-string">&quot;resample&quot;</span>: <span class="hljs-number">2</span>,
  <span class="hljs-string">&quot;size&quot;</span>: <span class="hljs-number">224</span>
}`,wrap:!1}}),E=new Qe({props:{$$slots:{default:[oa]},$$scope:{ctx:Z}}}),we=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpVEltYWdlUHJvY2Vzc29yJTBBJTBBbXlfdml0X2V4dHJhY3RvciUyMCUzRCUyMFZpVEltYWdlUHJvY2Vzc29yKHJlc2FtcGxlJTNEJTIyUElMLkltYWdlLkJPWCUyMiUyQyUyMGRvX25vcm1hbGl6ZSUzREZhbHNlJTJDJTIwaW1hZ2VfbWVhbiUzRCU1QjAuMyUyQyUyMDAuMyUyQyUyMDAuMyU1RCklMEFwcmludChteV92aXRfZXh0cmFjdG9yKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ViTImageProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>my_vit_extractor = ViTImageProcessor(resample=<span class="hljs-string">&quot;PIL.Image.BOX&quot;</span>, do_normalize=<span class="hljs-literal">False</span>, image_mean=[<span class="hljs-number">0.3</span>, <span class="hljs-number">0.3</span>, <span class="hljs-number">0.3</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(my_vit_extractor)
ViTImageProcessor {
  <span class="hljs-string">&quot;do_normalize&quot;</span>: false,
  <span class="hljs-string">&quot;do_resize&quot;</span>: true,
  <span class="hljs-string">&quot;image_processor_type&quot;</span>: <span class="hljs-string">&quot;ViTImageProcessor&quot;</span>,
  <span class="hljs-string">&quot;image_mean&quot;</span>: [
    <span class="hljs-number">0.3</span>,
    <span class="hljs-number">0.3</span>,
    <span class="hljs-number">0.3</span>
  ],
  <span class="hljs-string">&quot;image_std&quot;</span>: [
    <span class="hljs-number">0.5</span>,
    <span class="hljs-number">0.5</span>,
    <span class="hljs-number">0.5</span>
  ],
  <span class="hljs-string">&quot;resample&quot;</span>: <span class="hljs-string">&quot;PIL.Image.BOX&quot;</span>,
  <span class="hljs-string">&quot;size&quot;</span>: <span class="hljs-number">224</span>
}`,wrap:!1}}),ve=new G({props:{title:"Backbone",local:"backbone",headingTag:"h2"}}),Q=new Ss({props:{id:"backbone",options:["pretrained weights","random weights"],$$slots:{default:[ma]},$$scope:{ctx:Z}}}),We=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRpbW1CYWNrYm9uZUNvbmZpZyUyQyUyMFRpbW1CYWNrYm9uZSUwQSUwQWJhY2tib25lX2NvbmZpZyUyMCUzRCUyMFRpbW1CYWNrYm9uZUNvbmZpZyglMjJyZXNuZXQ1MCUyMiklMEFtb2RlbCUyMCUzRCUyMFRpbW1CYWNrYm9uZShjb25maWclM0RiYWNrYm9uZV9jb25maWcp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TimmBackboneConfig, TimmBackbone

backbone_config = TimmBackboneConfig(<span class="hljs-string">&quot;resnet50&quot;</span>)
model = TimmBackbone(config=backbone_config)`,wrap:!1}}),Je=new G({props:{title:"Feature extractor",local:"feature-extractor",headingTag:"h2"}}),qe=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyRmVhdHVyZUV4dHJhY3RvciUwQSUwQXcydjJfZXh0cmFjdG9yJTIwJTNEJTIwV2F2MlZlYzJGZWF0dXJlRXh0cmFjdG9yKCklMEFwcmludCh3MnYyX2V4dHJhY3Rvcik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2FeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>w2v2_extractor = Wav2Vec2FeatureExtractor()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(w2v2_extractor)
Wav2Vec2FeatureExtractor {
  <span class="hljs-string">&quot;do_normalize&quot;</span>: true,
  <span class="hljs-string">&quot;feature_extractor_type&quot;</span>: <span class="hljs-string">&quot;Wav2Vec2FeatureExtractor&quot;</span>,
  <span class="hljs-string">&quot;feature_size&quot;</span>: <span class="hljs-number">1</span>,
  <span class="hljs-string">&quot;padding_side&quot;</span>: <span class="hljs-string">&quot;right&quot;</span>,
  <span class="hljs-string">&quot;padding_value&quot;</span>: <span class="hljs-number">0.0</span>,
  <span class="hljs-string">&quot;return_attention_mask&quot;</span>: false,
  <span class="hljs-string">&quot;sampling_rate&quot;</span>: <span class="hljs-number">16000</span>
}`,wrap:!1}}),L=new Qe({props:{$$slots:{default:[ca]},$$scope:{ctx:Z}}}),Ve=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyRmVhdHVyZUV4dHJhY3RvciUwQSUwQXcydjJfZXh0cmFjdG9yJTIwJTNEJTIwV2F2MlZlYzJGZWF0dXJlRXh0cmFjdG9yKHNhbXBsaW5nX3JhdGUlM0Q4MDAwJTJDJTIwZG9fbm9ybWFsaXplJTNERmFsc2UpJTBBcHJpbnQodzJ2Ml9leHRyYWN0b3Ip",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2FeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>w2v2_extractor = Wav2Vec2FeatureExtractor(sampling_rate=<span class="hljs-number">8000</span>, do_normalize=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(w2v2_extractor)
Wav2Vec2FeatureExtractor {
  <span class="hljs-string">&quot;do_normalize&quot;</span>: false,
  <span class="hljs-string">&quot;feature_extractor_type&quot;</span>: <span class="hljs-string">&quot;Wav2Vec2FeatureExtractor&quot;</span>,
  <span class="hljs-string">&quot;feature_size&quot;</span>: <span class="hljs-number">1</span>,
  <span class="hljs-string">&quot;padding_side&quot;</span>: <span class="hljs-string">&quot;right&quot;</span>,
  <span class="hljs-string">&quot;padding_value&quot;</span>: <span class="hljs-number">0.0</span>,
  <span class="hljs-string">&quot;return_attention_mask&quot;</span>: false,
  <span class="hljs-string">&quot;sampling_rate&quot;</span>: <span class="hljs-number">8000</span>
}`,wrap:!1}}),Fe=new G({props:{title:"Processor",local:"processor",headingTag:"h2"}}),Ge=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyRmVhdHVyZUV4dHJhY3RvciUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwV2F2MlZlYzJGZWF0dXJlRXh0cmFjdG9yKHBhZGRpbmdfdmFsdWUlM0QxLjAlMkMlMjBkb19ub3JtYWxpemUlM0RUcnVlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2FeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = Wav2Vec2FeatureExtractor(padding_value=<span class="hljs-number">1.0</span>, do_normalize=<span class="hljs-literal">True</span>)`,wrap:!1}}),Xe=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyQ1RDVG9rZW5pemVyJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwV2F2MlZlYzJDVENUb2tlbml6ZXIodm9jYWJfZmlsZSUzRCUyMm15X3ZvY2FiX2ZpbGUudHh0JTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2CTCTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = Wav2Vec2CTCTokenizer(vocab_file=<span class="hljs-string">&quot;my_vocab_file.txt&quot;</span>)`,wrap:!1}}),He=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyUHJvY2Vzc29yJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwV2F2MlZlYzJQcm9jZXNzb3IoZmVhdHVyZV9leHRyYWN0b3IlM0RmZWF0dXJlX2V4dHJhY3RvciUyQyUyMHRva2VuaXplciUzRHRva2VuaXplcik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2Processor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Wav2Vec2Processor(feature_extractor=feature_extractor, tokenizer=tokenizer)`,wrap:!1}}),Ee=new Ps({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/create_a_model.md"}}),{c(){n=d("meta"),f=o(),l=d("p"),p=o(),g(c.$$.fragment),u=o(),C=d("p"),C.innerHTML=k,w=o(),T=d("ul"),T.innerHTML=r,v=o(),g(U.$$.fragment),R=o(),F=d("p"),F.innerHTML=z,q=o(),V=d("p"),V.innerHTML=m,W=o(),g(P.$$.fragment),Le=o(),S=d("p"),S.innerHTML=ts,Pe=o(),D=d("ul"),D.innerHTML=ss,Se=o(),g(A.$$.fragment),De=o(),K=d("p"),K.innerHTML=as,Ae=o(),g(O.$$.fragment),Ke=o(),ee=d("p"),ee.innerHTML=ns,Oe=o(),g(te.$$.fragment),et=o(),se=d("p"),se.innerHTML=ls,tt=o(),g(ae.$$.fragment),st=o(),g(Y.$$.fragment),at=o(),g(ne.$$.fragment),nt=o(),le=d("p"),le.innerHTML=rs,lt=o(),g(X.$$.fragment),rt=o(),g(re.$$.fragment),ot=o(),oe=d("p"),oe.innerHTML=os,it=o(),g(B.$$.fragment),pt=o(),g(ie.$$.fragment),mt=o(),pe=d("p"),pe.innerHTML=is,ct=o(),me=d("ul"),me.innerHTML=ps,ft=o(),ce=d("p"),ce.textContent=ms,ut=o(),g(H.$$.fragment),dt=o(),fe=d("p"),fe.innerHTML=cs,ht=o(),g(ue.$$.fragment),gt=o(),de=d("p"),de.innerHTML=fs,yt=o(),g(he.$$.fragment),bt=o(),ge=d("p"),ge.innerHTML=us,$t=o(),g(ye.$$.fragment),Mt=o(),g(N.$$.fragment),jt=o(),g(be.$$.fragment),_t=o(),$e=d("p"),$e.innerHTML=ds,wt=o(),Me=d("p"),Me.innerHTML=hs,vt=o(),g(je.$$.fragment),kt=o(),g(E.$$.fragment),Tt=o(),_e=d("p"),_e.innerHTML=gs,Zt=o(),g(we.$$.fragment),Wt=o(),g(ve.$$.fragment),Jt=o(),I=d("div"),I.innerHTML=ys,Ct=o(),ke=d("p"),ke.textContent=bs,Rt=o(),Te=d("p"),Te.innerHTML=$s,qt=o(),g(Q.$$.fragment),Ut=o(),Ze=d("p"),Ze.innerHTML=Ms,Vt=o(),g(We.$$.fragment),Ft=o(),g(Je.$$.fragment),zt=o(),Ce=d("p"),Ce.innerHTML=js,xt=o(),Re=d("p"),Re.innerHTML=_s,Gt=o(),g(qe.$$.fragment),Yt=o(),g(L.$$.fragment),Xt=o(),Ue=d("p"),Ue.innerHTML=ws,Bt=o(),g(Ve.$$.fragment),Ht=o(),g(Fe.$$.fragment),Nt=o(),ze=d("p"),ze.innerHTML=vs,Et=o(),xe=d("p"),xe.textContent=ks,It=o(),g(Ge.$$.fragment),Qt=o(),Ye=d("p"),Ye.textContent=Ts,Lt=o(),g(Xe.$$.fragment),Pt=o(),Be=d("p"),Be.innerHTML=Zs,St=o(),g(He.$$.fragment),Dt=o(),Ne=d("p"),Ne.textContent=Ws,At=o(),g(Ee.$$.fragment),Kt=o(),Ie=d("p"),this.h()},l(e){const t=Is("svelte-u9bgzb",document.head);n=h(t,"META",{name:!0,content:!0}),t.forEach(s),f=i(e),l=h(e,"P",{}),xs(l).forEach(s),p=i(e),y(c.$$.fragment,e),u=i(e),C=h(e,"P",{"data-svelte-h":!0}),_(C)!=="svelte-1rebmo9"&&(C.innerHTML=k),w=i(e),T=h(e,"UL",{"data-svelte-h":!0}),_(T)!=="svelte-p41iia"&&(T.innerHTML=r),v=i(e),y(U.$$.fragment,e),R=i(e),F=h(e,"P",{"data-svelte-h":!0}),_(F)!=="svelte-mxa1qr"&&(F.innerHTML=z),q=i(e),V=h(e,"P",{"data-svelte-h":!0}),_(V)!=="svelte-1cph5ve"&&(V.innerHTML=m),W=i(e),y(P.$$.fragment,e),Le=i(e),S=h(e,"P",{"data-svelte-h":!0}),_(S)!=="svelte-fbq3xg"&&(S.innerHTML=ts),Pe=i(e),D=h(e,"UL",{"data-svelte-h":!0}),_(D)!=="svelte-1ohji3r"&&(D.innerHTML=ss),Se=i(e),y(A.$$.fragment,e),De=i(e),K=h(e,"P",{"data-svelte-h":!0}),_(K)!=="svelte-5pskf0"&&(K.innerHTML=as),Ae=i(e),y(O.$$.fragment,e),Ke=i(e),ee=h(e,"P",{"data-svelte-h":!0}),_(ee)!=="svelte-1qamtly"&&(ee.innerHTML=ns),Oe=i(e),y(te.$$.fragment,e),et=i(e),se=h(e,"P",{"data-svelte-h":!0}),_(se)!=="svelte-1pqqy39"&&(se.innerHTML=ls),tt=i(e),y(ae.$$.fragment,e),st=i(e),y(Y.$$.fragment,e),at=i(e),y(ne.$$.fragment,e),nt=i(e),le=h(e,"P",{"data-svelte-h":!0}),_(le)!=="svelte-137wrn4"&&(le.innerHTML=rs),lt=i(e),y(X.$$.fragment,e),rt=i(e),y(re.$$.fragment,e),ot=i(e),oe=h(e,"P",{"data-svelte-h":!0}),_(oe)!=="svelte-1a6phur"&&(oe.innerHTML=os),it=i(e),y(B.$$.fragment,e),pt=i(e),y(ie.$$.fragment,e),mt=i(e),pe=h(e,"P",{"data-svelte-h":!0}),_(pe)!=="svelte-1czw1fm"&&(pe.innerHTML=is),ct=i(e),me=h(e,"UL",{"data-svelte-h":!0}),_(me)!=="svelte-12mwpcu"&&(me.innerHTML=ps),ft=i(e),ce=h(e,"P",{"data-svelte-h":!0}),_(ce)!=="svelte-9binde"&&(ce.textContent=ms),ut=i(e),y(H.$$.fragment,e),dt=i(e),fe=h(e,"P",{"data-svelte-h":!0}),_(fe)!=="svelte-9kjh08"&&(fe.innerHTML=cs),ht=i(e),y(ue.$$.fragment,e),gt=i(e),de=h(e,"P",{"data-svelte-h":!0}),_(de)!=="svelte-119jqb3"&&(de.innerHTML=fs),yt=i(e),y(he.$$.fragment,e),bt=i(e),ge=h(e,"P",{"data-svelte-h":!0}),_(ge)!=="svelte-1mbn7u6"&&(ge.innerHTML=us),$t=i(e),y(ye.$$.fragment,e),Mt=i(e),y(N.$$.fragment,e),jt=i(e),y(be.$$.fragment,e),_t=i(e),$e=h(e,"P",{"data-svelte-h":!0}),_($e)!=="svelte-4zpma0"&&($e.innerHTML=ds),wt=i(e),Me=h(e,"P",{"data-svelte-h":!0}),_(Me)!=="svelte-ocvbgg"&&(Me.innerHTML=hs),vt=i(e),y(je.$$.fragment,e),kt=i(e),y(E.$$.fragment,e),Tt=i(e),_e=h(e,"P",{"data-svelte-h":!0}),_(_e)!=="svelte-im3jb4"&&(_e.innerHTML=gs),Zt=i(e),y(we.$$.fragment,e),Wt=i(e),y(ve.$$.fragment,e),Jt=i(e),I=h(e,"DIV",{style:!0,"data-svelte-h":!0}),_(I)!=="svelte-ymdemd"&&(I.innerHTML=ys),Ct=i(e),ke=h(e,"P",{"data-svelte-h":!0}),_(ke)!=="svelte-1q0lfob"&&(ke.textContent=bs),Rt=i(e),Te=h(e,"P",{"data-svelte-h":!0}),_(Te)!=="svelte-10wagau"&&(Te.innerHTML=$s),qt=i(e),y(Q.$$.fragment,e),Ut=i(e),Ze=h(e,"P",{"data-svelte-h":!0}),_(Ze)!=="svelte-uamqgu"&&(Ze.innerHTML=Ms),Vt=i(e),y(We.$$.fragment,e),Ft=i(e),y(Je.$$.fragment,e),zt=i(e),Ce=h(e,"P",{"data-svelte-h":!0}),_(Ce)!=="svelte-hpkg94"&&(Ce.innerHTML=js),xt=i(e),Re=h(e,"P",{"data-svelte-h":!0}),_(Re)!=="svelte-ei39v7"&&(Re.innerHTML=_s),Gt=i(e),y(qe.$$.fragment,e),Yt=i(e),y(L.$$.fragment,e),Xt=i(e),Ue=h(e,"P",{"data-svelte-h":!0}),_(Ue)!=="svelte-1ndfhrg"&&(Ue.innerHTML=ws),Bt=i(e),y(Ve.$$.fragment,e),Ht=i(e),y(Fe.$$.fragment,e),Nt=i(e),ze=h(e,"P",{"data-svelte-h":!0}),_(ze)!=="svelte-138685s"&&(ze.innerHTML=vs),Et=i(e),xe=h(e,"P",{"data-svelte-h":!0}),_(xe)!=="svelte-gl9p7k"&&(xe.textContent=ks),It=i(e),y(Ge.$$.fragment,e),Qt=i(e),Ye=h(e,"P",{"data-svelte-h":!0}),_(Ye)!=="svelte-1qntmzi"&&(Ye.textContent=Ts),Lt=i(e),y(Xe.$$.fragment,e),Pt=i(e),Be=h(e,"P",{"data-svelte-h":!0}),_(Be)!=="svelte-ozu91u"&&(Be.innerHTML=Zs),St=i(e),y(He.$$.fragment,e),Dt=i(e),Ne=h(e,"P",{"data-svelte-h":!0}),_(Ne)!=="svelte-1wdo2ao"&&(Ne.textContent=Ws),At=i(e),y(Ee.$$.fragment,e),Kt=i(e),Ie=h(e,"P",{}),xs(Ie).forEach(s),this.h()},h(){Gs(n,"name","hf:doc:metadata"),Gs(n,"content",ua),Qs(I,"text-align","center")},m(e,t){Ls(document.head,n),a(e,f,t),a(e,l,t),a(e,p,t),b(c,e,t),a(e,u,t),a(e,C,t),a(e,w,t),a(e,T,t),a(e,v,t),b(U,e,t),a(e,R,t),a(e,F,t),a(e,q,t),a(e,V,t),a(e,W,t),b(P,e,t),a(e,Le,t),a(e,S,t),a(e,Pe,t),a(e,D,t),a(e,Se,t),b(A,e,t),a(e,De,t),a(e,K,t),a(e,Ae,t),b(O,e,t),a(e,Ke,t),a(e,ee,t),a(e,Oe,t),b(te,e,t),a(e,et,t),a(e,se,t),a(e,tt,t),b(ae,e,t),a(e,st,t),b(Y,e,t),a(e,at,t),b(ne,e,t),a(e,nt,t),a(e,le,t),a(e,lt,t),b(X,e,t),a(e,rt,t),b(re,e,t),a(e,ot,t),a(e,oe,t),a(e,it,t),b(B,e,t),a(e,pt,t),b(ie,e,t),a(e,mt,t),a(e,pe,t),a(e,ct,t),a(e,me,t),a(e,ft,t),a(e,ce,t),a(e,ut,t),b(H,e,t),a(e,dt,t),a(e,fe,t),a(e,ht,t),b(ue,e,t),a(e,gt,t),a(e,de,t),a(e,yt,t),b(he,e,t),a(e,bt,t),a(e,ge,t),a(e,$t,t),b(ye,e,t),a(e,Mt,t),b(N,e,t),a(e,jt,t),b(be,e,t),a(e,_t,t),a(e,$e,t),a(e,wt,t),a(e,Me,t),a(e,vt,t),b(je,e,t),a(e,kt,t),b(E,e,t),a(e,Tt,t),a(e,_e,t),a(e,Zt,t),b(we,e,t),a(e,Wt,t),b(ve,e,t),a(e,Jt,t),a(e,I,t),a(e,Ct,t),a(e,ke,t),a(e,Rt,t),a(e,Te,t),a(e,qt,t),b(Q,e,t),a(e,Ut,t),a(e,Ze,t),a(e,Vt,t),b(We,e,t),a(e,Ft,t),b(Je,e,t),a(e,zt,t),a(e,Ce,t),a(e,xt,t),a(e,Re,t),a(e,Gt,t),b(qe,e,t),a(e,Yt,t),b(L,e,t),a(e,Xt,t),a(e,Ue,t),a(e,Bt,t),b(Ve,e,t),a(e,Ht,t),b(Fe,e,t),a(e,Nt,t),a(e,ze,t),a(e,Et,t),a(e,xe,t),a(e,It,t),b(Ge,e,t),a(e,Qt,t),a(e,Ye,t),a(e,Lt,t),b(Xe,e,t),a(e,Pt,t),a(e,Be,t),a(e,St,t),b(He,e,t),a(e,Dt,t),a(e,Ne,t),a(e,At,t),b(Ee,e,t),a(e,Kt,t),a(e,Ie,t),Ot=!0},p(e,[t]){const Js={};t&2&&(Js.$$scope={dirty:t,ctx:e}),Y.$set(Js);const Cs={};t&2&&(Cs.$$scope={dirty:t,ctx:e}),X.$set(Cs);const Rs={};t&2&&(Rs.$$scope={dirty:t,ctx:e}),B.$set(Rs);const qs={};t&2&&(qs.$$scope={dirty:t,ctx:e}),H.$set(qs);const Us={};t&2&&(Us.$$scope={dirty:t,ctx:e}),N.$set(Us);const Vs={};t&2&&(Vs.$$scope={dirty:t,ctx:e}),E.$set(Vs);const Fs={};t&2&&(Fs.$$scope={dirty:t,ctx:e}),Q.$set(Fs);const zs={};t&2&&(zs.$$scope={dirty:t,ctx:e}),L.$set(zs)},i(e){Ot||($(c.$$.fragment,e),$(U.$$.fragment,e),$(P.$$.fragment,e),$(A.$$.fragment,e),$(O.$$.fragment,e),$(te.$$.fragment,e),$(ae.$$.fragment,e),$(Y.$$.fragment,e),$(ne.$$.fragment,e),$(X.$$.fragment,e),$(re.$$.fragment,e),$(B.$$.fragment,e),$(ie.$$.fragment,e),$(H.$$.fragment,e),$(ue.$$.fragment,e),$(he.$$.fragment,e),$(ye.$$.fragment,e),$(N.$$.fragment,e),$(be.$$.fragment,e),$(je.$$.fragment,e),$(E.$$.fragment,e),$(we.$$.fragment,e),$(ve.$$.fragment,e),$(Q.$$.fragment,e),$(We.$$.fragment,e),$(Je.$$.fragment,e),$(qe.$$.fragment,e),$(L.$$.fragment,e),$(Ve.$$.fragment,e),$(Fe.$$.fragment,e),$(Ge.$$.fragment,e),$(Xe.$$.fragment,e),$(He.$$.fragment,e),$(Ee.$$.fragment,e),Ot=!0)},o(e){M(c.$$.fragment,e),M(U.$$.fragment,e),M(P.$$.fragment,e),M(A.$$.fragment,e),M(O.$$.fragment,e),M(te.$$.fragment,e),M(ae.$$.fragment,e),M(Y.$$.fragment,e),M(ne.$$.fragment,e),M(X.$$.fragment,e),M(re.$$.fragment,e),M(B.$$.fragment,e),M(ie.$$.fragment,e),M(H.$$.fragment,e),M(ue.$$.fragment,e),M(he.$$.fragment,e),M(ye.$$.fragment,e),M(N.$$.fragment,e),M(be.$$.fragment,e),M(je.$$.fragment,e),M(E.$$.fragment,e),M(we.$$.fragment,e),M(ve.$$.fragment,e),M(Q.$$.fragment,e),M(We.$$.fragment,e),M(Je.$$.fragment,e),M(qe.$$.fragment,e),M(L.$$.fragment,e),M(Ve.$$.fragment,e),M(Fe.$$.fragment,e),M(Ge.$$.fragment,e),M(Xe.$$.fragment,e),M(He.$$.fragment,e),M(Ee.$$.fragment,e),Ot=!1},d(e){e&&(s(f),s(l),s(p),s(u),s(C),s(w),s(T),s(v),s(R),s(F),s(q),s(V),s(W),s(Le),s(S),s(Pe),s(D),s(Se),s(De),s(K),s(Ae),s(Ke),s(ee),s(Oe),s(et),s(se),s(tt),s(st),s(at),s(nt),s(le),s(lt),s(rt),s(ot),s(oe),s(it),s(pt),s(mt),s(pe),s(ct),s(me),s(ft),s(ce),s(ut),s(dt),s(fe),s(ht),s(gt),s(de),s(yt),s(bt),s(ge),s($t),s(Mt),s(jt),s(_t),s($e),s(wt),s(Me),s(vt),s(kt),s(Tt),s(_e),s(Zt),s(Wt),s(Jt),s(I),s(Ct),s(ke),s(Rt),s(Te),s(qt),s(Ut),s(Ze),s(Vt),s(Ft),s(zt),s(Ce),s(xt),s(Re),s(Gt),s(Yt),s(Xt),s(Ue),s(Bt),s(Ht),s(Nt),s(ze),s(Et),s(xe),s(It),s(Qt),s(Ye),s(Lt),s(Pt),s(Be),s(St),s(Dt),s(Ne),s(At),s(Kt),s(Ie)),s(n),j(c,e),j(U,e),j(P,e),j(A,e),j(O,e),j(te,e),j(ae,e),j(Y,e),j(ne,e),j(X,e),j(re,e),j(B,e),j(ie,e),j(H,e),j(ue,e),j(he,e),j(ye,e),j(N,e),j(be,e),j(je,e),j(E,e),j(we,e),j(ve,e),j(Q,e),j(We,e),j(Je,e),j(qe,e),j(L,e),j(Ve,e),j(Fe,e),j(Ge,e),j(Xe,e),j(He,e),j(Ee,e)}}}const ua='{"title":"Create a custom architecture","local":"create-a-custom-architecture","sections":[{"title":"Configuration","local":"configuration","sections":[],"depth":2},{"title":"Model","local":"model","sections":[{"title":"Model heads","local":"model-heads","sections":[],"depth":3}],"depth":2},{"title":"Tokenizer","local":"tokenizer","sections":[],"depth":2},{"title":"Image processor","local":"image-processor","sections":[],"depth":2},{"title":"Backbone","local":"backbone","sections":[],"depth":2},{"title":"Feature extractor","local":"feature-extractor","sections":[],"depth":2},{"title":"Processor","local":"processor","sections":[],"depth":2}],"depth":1}';function da(Z){return Hs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _a extends Ns{constructor(n){super(),Es(this,n,da,fa,Bs,{})}}export{_a as component};
