import{s as Ys,o as Xs,n as x}from"../chunks/scheduler.9bc65507.js";import{S as Bs,i as Hs,g as d,s as o,r as g,A as Ns,h,f as s,c as i,j as zs,u as y,x as _,k as Fs,l as Es,y as Is,a,v as b,d as $,t as M,w as j}from"../chunks/index.707bf1b6.js";import{T as Ie}from"../chunks/Tip.c2ecdbf4.js";import{C as J}from"../chunks/CodeBlock.54a9f38d.js";import{F as xs,M as Kt}from"../chunks/Markdown.fef84341.js";import{H as G}from"../chunks/Heading.342b1fa6.js";import{H as Qs,a as Gs}from"../chunks/HfOption.6d864328.js";function Ls(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 Ps(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.",v,w,T='Create a pretrained model with <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a>:',r,k,U,R,z="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:",F,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}}),k=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,v=o(),w=d("p"),w.innerHTML=T,r=o(),g(k.$$.fragment),U=o(),R=d("p"),R.textContent=z,F=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),v=i(m),w=h(m,"P",{"data-svelte-h":!0}),_(w)!=="svelte-tpvila"&&(w.innerHTML=T),r=i(m),y(k.$$.fragment,m),U=i(m),R=h(m,"P",{"data-svelte-h":!0}),_(R)!=="svelte-1dfgiok"&&(R.textContent=z),F=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,v,W),a(m,w,W),a(m,r,W),b(k,m,W),a(m,U,W),a(m,R,W),a(m,F,W),b(q,m,W),V=!0},p:x,i(m){V||($(p.$$.fragment,m),$(k.$$.fragment,m),$(q.$$.fragment,m),V=!0)},o(m){M(p.$$.fragment,m),M(k.$$.fragment,m),M(q.$$.fragment,m),V=!1},d(m){m&&(s(n),s(l),s(c),s(u),s(v),s(w),s(r),s(U),s(R),s(F)),j(p,m),j(k,m),j(q,m)}}}function Ss(Z){let n,f;return n=new Kt({props:{$$slots:{default:[Ps]},$$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 Ds(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.",v,w,T='Create a pretrained model with <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a>:',r,k,U,R,z="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:",F,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}}),k=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,v=o(),w=d("p"),w.innerHTML=T,r=o(),g(k.$$.fragment),U=o(),R=d("p"),R.textContent=z,F=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),v=i(m),w=h(m,"P",{"data-svelte-h":!0}),_(w)!=="svelte-lmxxbw"&&(w.innerHTML=T),r=i(m),y(k.$$.fragment,m),U=i(m),R=h(m,"P",{"data-svelte-h":!0}),_(R)!=="svelte-1dfgiok"&&(R.textContent=z),F=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,v,W),a(m,w,W),a(m,r,W),b(k,m,W),a(m,U,W),a(m,R,W),a(m,F,W),b(q,m,W),V=!0},p:x,i(m){V||($(p.$$.fragment,m),$(k.$$.fragment,m),$(q.$$.fragment,m),V=!0)},o(m){M(p.$$.fragment,m),M(k.$$.fragment,m),M(q.$$.fragment,m),V=!1},d(m){m&&(s(n),s(l),s(c),s(u),s(v),s(w),s(r),s(U),s(R),s(F)),j(p,m),j(k,m),j(q,m)}}}function As(Z){let n,f;return n=new Kt({props:{$$slots:{default:[Ds]},$$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 Ks(Z){let n,f='For example, <a href="/docs/transformers/main/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/main/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.',v,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,v=o(),g(w.$$.fragment)},l(r){n=h(r,"P",{"data-svelte-h":!0}),_(n)!=="svelte-uspjcb"&&(n.innerHTML=f),l=i(r),y(p.$$.fragment,r),c=i(r),u=h(r,"P",{"data-svelte-h":!0}),_(u)!=="svelte-1vvpxtz"&&(u.innerHTML=C),v=i(r),y(w.$$.fragment,r)},m(r,k){a(r,n,k),a(r,l,k),b(p,r,k),a(r,c,k),a(r,u,k),a(r,v,k),b(w,r,k),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(v)),j(p,r),j(w,r)}}}function Os(Z){let n,f;return n=new Kt({props:{$$slots:{default:[Ks]},$$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 ea(Z){let n,f='For example, <a href="/docs/transformers/main/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/main/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.',v,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,v=o(),g(w.$$.fragment)},l(r){n=h(r,"P",{"data-svelte-h":!0}),_(n)!=="svelte-1acqkur"&&(n.innerHTML=f),l=i(r),y(p.$$.fragment,r),c=i(r),u=h(r,"P",{"data-svelte-h":!0}),_(u)!=="svelte-usn93"&&(u.innerHTML=C),v=i(r),y(w.$$.fragment,r)},m(r,k){a(r,n,k),a(r,l,k),b(p,r,k),a(r,c,k),a(r,u,k),a(r,v,k),b(w,r,k),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(v)),j(p,r),j(w,r)}}}function ta(Z){let n,f;return n=new Kt({props:{$$slots:{default:[ea]},$$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 sa(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 aa(Z){let n,f='By default, <a href="/docs/transformers/main/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-1krn5l6"&&(n.innerHTML=f)},m(l,p){a(l,n,p)},p:x,d(l){l&&s(n)}}}function na(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 la(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.",v,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,v=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),v=i(r),y(w.$$.fragment,r)},m(r,k){a(r,n,k),a(r,l,k),b(p,r,k),a(r,c,k),a(r,u,k),a(r,v,k),b(w,r,k),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(v)),j(p,r),j(w,r)}}}function ra(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.",v,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,v=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),v=i(r),y(w.$$.fragment,r)},m(r,k){a(r,n,k),a(r,l,k),b(p,r,k),a(r,c,k),a(r,u,k),a(r,v,k),b(w,r,k),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(v)),j(p,r),j(w,r)}}}function oa(Z){let n,f,l,p;return n=new Gs({props:{id:"backbone",option:"pretrained weights",$$slots:{default:[la]},$$scope:{ctx:Z}}}),l=new Gs({props:{id:"backbone",option:"random weights",$$slots:{default:[ra]},$$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 v={};u&2&&(v.$$scope={dirty:u,ctx:c}),l.$set(v)},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 ia(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 pa(Z){let n,f,l,p,c,u,C,v='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>",k,U,R,z,F='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/main/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</a> to inspect it’s attributes:',W,P,Qe,S,Ot='<a href="/docs/transformers/main/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</a> displays all the default attributes used to build a base <a href="/docs/transformers/main/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:',Le,D,es="<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>",Pe,A,Se,K,ts='Pretrained model attributes can be modified in the <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig.from_pretrained">from_pretrained()</a> function:',De,O,Ae,ee,ss='Once you are satisfied with your model configuration, you can save it with <a href="/docs/transformers/main/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:',Ke,te,Oe,se,as='To reuse the configuration file, load it with <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig.from_pretrained">from_pretrained()</a>:',et,ae,tt,Y,st,ne,at,le,ns='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/main/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.',nt,X,lt,re,rt,oe,ls="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).",ot,B,it,ie,pt,pe,rs='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:',mt,me,os='<li><a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>: a Python implementation of a tokenizer.</li> <li><a href="/docs/transformers/main/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>',ct,ce,is="Both tokenizers support common methods such as encoding and decoding, adding new tokens, and managing special tokens.",ft,H,ut,fe,ps="If you trained your own tokenizer, you can create one from your <em>vocabulary</em> file:",dt,ue,ht,de,ms='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/main/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a> class:',gt,he,yt,ge,cs='Create a fast tokenizer with the <a href="/docs/transformers/main/en/model_doc/distilbert#transformers.DistilBertTokenizerFast">DistilBertTokenizerFast</a> class:',bt,ye,$t,N,Mt,be,jt,$e,fs='An image processor processes vision inputs. It inherits from the base <a href="/docs/transformers/main/en/main_classes/image_processor#transformers.ImageProcessingMixin">ImageProcessingMixin</a> class.',_t,Me,us='To use, create an image processor associated with the model you’re using. For example, create a default <a href="/docs/transformers/main/en/model_doc/vit#transformers.ViTImageProcessor">ViTImageProcessor</a> if you are using <a href="model_doc/vit">ViT</a> for image classification:',wt,je,kt,E,vt,_e,ds='Modify any of the <a href="/docs/transformers/main/en/model_doc/vit#transformers.ViTImageProcessor">ViTImageProcessor</a> parameters to create your custom image processor:',Tt,we,Zt,ke,Wt,I,hs='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/Backbone.png"/>',Jt,ve,gs="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.",Ct,Te,ys='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:',Rt,Q,qt,Ze,bs='<a href="https://hf.co/docs/timm/index" rel="nofollow">timm</a> models are loaded with <a href="/docs/transformers/main/en/main_classes/backbones#transformers.TimmBackbone">TimmBackbone</a> and <a href="/docs/transformers/main/en/main_classes/backbones#transformers.TimmBackboneConfig">TimmBackboneConfig</a>.',Ut,We,Vt,Je,zt,Ce,$s='A feature extractor processes audio inputs. It inherits from the base <a href="/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin">FeatureExtractionMixin</a> class, and may also inherit from the <a href="/docs/transformers/main/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor">SequenceFeatureExtractor</a> class for processing audio inputs.',Ft,Re,Ms='To use, create a feature extractor associated with the model you’re using. For example, create a default <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor">Wav2Vec2FeatureExtractor</a> if you are using <a href="model_doc/wav2vec2">Wav2Vec2</a> for audio classification:',xt,qe,Gt,L,Yt,Ue,js='Modify any of the <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor">Wav2Vec2FeatureExtractor</a> parameters to create your custom feature extractor:',Xt,Ve,Bt,ze,Ht,Fe,_s='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/main/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.',Nt,xe,ws="Create a feature extractor to handle the audio inputs:",Et,Ge,It,Ye,ks="Create a tokenizer to handle the text inputs:",Qt,Xe,Lt,Be,vs='Combine the feature extractor and tokenizer in <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor">Wav2Vec2Processor</a>:',Pt,He,St,Ne,Ts="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.",Dt,Ee,At;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 Ie({props:{$$slots:{default:[Ls]},$$scope:{ctx:Z}}}),ne=new G({props:{title:"Model",local:"model",headingTag:"h2"}}),X=new xs({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[As],pytorch:[Ss]},$$scope:{ctx:Z}}}),re=new G({props:{title:"Model heads",local:"model-heads",headingTag:"h3"}}),B=new xs({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ta],pytorch:[Os]},$$scope:{ctx:Z}}}),ie=new G({props:{title:"Tokenizer",local:"tokenizer",headingTag:"h2"}}),H=new Ie({props:{warning:!0,$$slots:{default:[sa]},$$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 Ie({props:{$$slots:{default:[aa]},$$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 Ie({props:{$$slots:{default:[na]},$$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}}),ke=new G({props:{title:"Backbone",local:"backbone",headingTag:"h2"}}),Q=new Qs({props:{id:"backbone",options:["pretrained weights","random weights"],$$slots:{default:[oa]},$$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 Ie({props:{$$slots:{default:[ia]},$$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}}),ze=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}}),{c(){n=d("meta"),f=o(),l=d("p"),p=o(),g(c.$$.fragment),u=o(),C=d("p"),C.innerHTML=v,w=o(),T=d("ul"),T.innerHTML=r,k=o(),g(U.$$.fragment),R=o(),z=d("p"),z.innerHTML=F,q=o(),V=d("p"),V.innerHTML=m,W=o(),g(P.$$.fragment),Qe=o(),S=d("p"),S.innerHTML=Ot,Le=o(),D=d("ul"),D.innerHTML=es,Pe=o(),g(A.$$.fragment),Se=o(),K=d("p"),K.innerHTML=ts,De=o(),g(O.$$.fragment),Ae=o(),ee=d("p"),ee.innerHTML=ss,Ke=o(),g(te.$$.fragment),Oe=o(),se=d("p"),se.innerHTML=as,et=o(),g(ae.$$.fragment),tt=o(),g(Y.$$.fragment),st=o(),g(ne.$$.fragment),at=o(),le=d("p"),le.innerHTML=ns,nt=o(),g(X.$$.fragment),lt=o(),g(re.$$.fragment),rt=o(),oe=d("p"),oe.innerHTML=ls,ot=o(),g(B.$$.fragment),it=o(),g(ie.$$.fragment),pt=o(),pe=d("p"),pe.innerHTML=rs,mt=o(),me=d("ul"),me.innerHTML=os,ct=o(),ce=d("p"),ce.textContent=is,ft=o(),g(H.$$.fragment),ut=o(),fe=d("p"),fe.innerHTML=ps,dt=o(),g(ue.$$.fragment),ht=o(),de=d("p"),de.innerHTML=ms,gt=o(),g(he.$$.fragment),yt=o(),ge=d("p"),ge.innerHTML=cs,bt=o(),g(ye.$$.fragment),$t=o(),g(N.$$.fragment),Mt=o(),g(be.$$.fragment),jt=o(),$e=d("p"),$e.innerHTML=fs,_t=o(),Me=d("p"),Me.innerHTML=us,wt=o(),g(je.$$.fragment),kt=o(),g(E.$$.fragment),vt=o(),_e=d("p"),_e.innerHTML=ds,Tt=o(),g(we.$$.fragment),Zt=o(),g(ke.$$.fragment),Wt=o(),I=d("div"),I.innerHTML=hs,Jt=o(),ve=d("p"),ve.textContent=gs,Ct=o(),Te=d("p"),Te.innerHTML=ys,Rt=o(),g(Q.$$.fragment),qt=o(),Ze=d("p"),Ze.innerHTML=bs,Ut=o(),g(We.$$.fragment),Vt=o(),g(Je.$$.fragment),zt=o(),Ce=d("p"),Ce.innerHTML=$s,Ft=o(),Re=d("p"),Re.innerHTML=Ms,xt=o(),g(qe.$$.fragment),Gt=o(),g(L.$$.fragment),Yt=o(),Ue=d("p"),Ue.innerHTML=js,Xt=o(),g(Ve.$$.fragment),Bt=o(),g(ze.$$.fragment),Ht=o(),Fe=d("p"),Fe.innerHTML=_s,Nt=o(),xe=d("p"),xe.textContent=ws,Et=o(),g(Ge.$$.fragment),It=o(),Ye=d("p"),Ye.textContent=ks,Qt=o(),g(Xe.$$.fragment),Lt=o(),Be=d("p"),Be.innerHTML=vs,Pt=o(),g(He.$$.fragment),St=o(),Ne=d("p"),Ne.textContent=Ts,Dt=o(),Ee=d("p"),this.h()},l(e){const t=Ns("svelte-u9bgzb",document.head);n=h(t,"META",{name:!0,content:!0}),t.forEach(s),f=i(e),l=h(e,"P",{}),zs(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=v),w=i(e),T=h(e,"UL",{"data-svelte-h":!0}),_(T)!=="svelte-p41iia"&&(T.innerHTML=r),k=i(e),y(U.$$.fragment,e),R=i(e),z=h(e,"P",{"data-svelte-h":!0}),_(z)!=="svelte-mxa1qr"&&(z.innerHTML=F),q=i(e),V=h(e,"P",{"data-svelte-h":!0}),_(V)!=="svelte-vrxcow"&&(V.innerHTML=m),W=i(e),y(P.$$.fragment,e),Qe=i(e),S=h(e,"P",{"data-svelte-h":!0}),_(S)!=="svelte-1lmljjk"&&(S.innerHTML=Ot),Le=i(e),D=h(e,"UL",{"data-svelte-h":!0}),_(D)!=="svelte-1ohji3r"&&(D.innerHTML=es),Pe=i(e),y(A.$$.fragment,e),Se=i(e),K=h(e,"P",{"data-svelte-h":!0}),_(K)!=="svelte-1xkajim"&&(K.innerHTML=ts),De=i(e),y(O.$$.fragment,e),Ae=i(e),ee=h(e,"P",{"data-svelte-h":!0}),_(ee)!=="svelte-1et9obi"&&(ee.innerHTML=ss),Ke=i(e),y(te.$$.fragment,e),Oe=i(e),se=h(e,"P",{"data-svelte-h":!0}),_(se)!=="svelte-ru6nfz"&&(se.innerHTML=as),et=i(e),y(ae.$$.fragment,e),tt=i(e),y(Y.$$.fragment,e),st=i(e),y(ne.$$.fragment,e),at=i(e),le=h(e,"P",{"data-svelte-h":!0}),_(le)!=="svelte-17cfqfu"&&(le.innerHTML=ns),nt=i(e),y(X.$$.fragment,e),lt=i(e),y(re.$$.fragment,e),rt=i(e),oe=h(e,"P",{"data-svelte-h":!0}),_(oe)!=="svelte-1a6phur"&&(oe.innerHTML=ls),ot=i(e),y(B.$$.fragment,e),it=i(e),y(ie.$$.fragment,e),pt=i(e),pe=h(e,"P",{"data-svelte-h":!0}),_(pe)!=="svelte-1czw1fm"&&(pe.innerHTML=rs),mt=i(e),me=h(e,"UL",{"data-svelte-h":!0}),_(me)!=="svelte-ynby9s"&&(me.innerHTML=os),ct=i(e),ce=h(e,"P",{"data-svelte-h":!0}),_(ce)!=="svelte-9binde"&&(ce.textContent=is),ft=i(e),y(H.$$.fragment,e),ut=i(e),fe=h(e,"P",{"data-svelte-h":!0}),_(fe)!=="svelte-9kjh08"&&(fe.innerHTML=ps),dt=i(e),y(ue.$$.fragment,e),ht=i(e),de=h(e,"P",{"data-svelte-h":!0}),_(de)!=="svelte-1v3vqzb"&&(de.innerHTML=ms),gt=i(e),y(he.$$.fragment,e),yt=i(e),ge=h(e,"P",{"data-svelte-h":!0}),_(ge)!=="svelte-36ahsm"&&(ge.innerHTML=cs),bt=i(e),y(ye.$$.fragment,e),$t=i(e),y(N.$$.fragment,e),Mt=i(e),y(be.$$.fragment,e),jt=i(e),$e=h(e,"P",{"data-svelte-h":!0}),_($e)!=="svelte-ir3sju"&&($e.innerHTML=fs),_t=i(e),Me=h(e,"P",{"data-svelte-h":!0}),_(Me)!=="svelte-1pc38py"&&(Me.innerHTML=us),wt=i(e),y(je.$$.fragment,e),kt=i(e),y(E.$$.fragment,e),vt=i(e),_e=h(e,"P",{"data-svelte-h":!0}),_(_e)!=="svelte-5euq7e"&&(_e.innerHTML=ds),Tt=i(e),y(we.$$.fragment,e),Zt=i(e),y(ke.$$.fragment,e),Wt=i(e),I=h(e,"DIV",{style:!0,"data-svelte-h":!0}),_(I)!=="svelte-ymdemd"&&(I.innerHTML=hs),Jt=i(e),ve=h(e,"P",{"data-svelte-h":!0}),_(ve)!=="svelte-1q0lfob"&&(ve.textContent=gs),Ct=i(e),Te=h(e,"P",{"data-svelte-h":!0}),_(Te)!=="svelte-10wagau"&&(Te.innerHTML=ys),Rt=i(e),y(Q.$$.fragment,e),qt=i(e),Ze=h(e,"P",{"data-svelte-h":!0}),_(Ze)!=="svelte-mzc14e"&&(Ze.innerHTML=bs),Ut=i(e),y(We.$$.fragment,e),Vt=i(e),y(Je.$$.fragment,e),zt=i(e),Ce=h(e,"P",{"data-svelte-h":!0}),_(Ce)!=="svelte-1uwunme"&&(Ce.innerHTML=$s),Ft=i(e),Re=h(e,"P",{"data-svelte-h":!0}),_(Re)!=="svelte-1dt9qv9"&&(Re.innerHTML=Ms),xt=i(e),y(qe.$$.fragment,e),Gt=i(e),y(L.$$.fragment,e),Yt=i(e),Ue=h(e,"P",{"data-svelte-h":!0}),_(Ue)!=="svelte-i8ex5y"&&(Ue.innerHTML=js),Xt=i(e),y(Ve.$$.fragment,e),Bt=i(e),y(ze.$$.fragment,e),Ht=i(e),Fe=h(e,"P",{"data-svelte-h":!0}),_(Fe)!=="svelte-fopbq2"&&(Fe.innerHTML=_s),Nt=i(e),xe=h(e,"P",{"data-svelte-h":!0}),_(xe)!=="svelte-gl9p7k"&&(xe.textContent=ws),Et=i(e),y(Ge.$$.fragment,e),It=i(e),Ye=h(e,"P",{"data-svelte-h":!0}),_(Ye)!=="svelte-1qntmzi"&&(Ye.textContent=ks),Qt=i(e),y(Xe.$$.fragment,e),Lt=i(e),Be=h(e,"P",{"data-svelte-h":!0}),_(Be)!=="svelte-1sega3y"&&(Be.innerHTML=vs),Pt=i(e),y(He.$$.fragment,e),St=i(e),Ne=h(e,"P",{"data-svelte-h":!0}),_(Ne)!=="svelte-1wdo2ao"&&(Ne.textContent=Ts),Dt=i(e),Ee=h(e,"P",{}),zs(Ee).forEach(s),this.h()},h(){Fs(n,"name","hf:doc:metadata"),Fs(n,"content",ma),Es(I,"text-align","center")},m(e,t){Is(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,k,t),b(U,e,t),a(e,R,t),a(e,z,t),a(e,q,t),a(e,V,t),a(e,W,t),b(P,e,t),a(e,Qe,t),a(e,S,t),a(e,Le,t),a(e,D,t),a(e,Pe,t),b(A,e,t),a(e,Se,t),a(e,K,t),a(e,De,t),b(O,e,t),a(e,Ae,t),a(e,ee,t),a(e,Ke,t),b(te,e,t),a(e,Oe,t),a(e,se,t),a(e,et,t),b(ae,e,t),a(e,tt,t),b(Y,e,t),a(e,st,t),b(ne,e,t),a(e,at,t),a(e,le,t),a(e,nt,t),b(X,e,t),a(e,lt,t),b(re,e,t),a(e,rt,t),a(e,oe,t),a(e,ot,t),b(B,e,t),a(e,it,t),b(ie,e,t),a(e,pt,t),a(e,pe,t),a(e,mt,t),a(e,me,t),a(e,ct,t),a(e,ce,t),a(e,ft,t),b(H,e,t),a(e,ut,t),a(e,fe,t),a(e,dt,t),b(ue,e,t),a(e,ht,t),a(e,de,t),a(e,gt,t),b(he,e,t),a(e,yt,t),a(e,ge,t),a(e,bt,t),b(ye,e,t),a(e,$t,t),b(N,e,t),a(e,Mt,t),b(be,e,t),a(e,jt,t),a(e,$e,t),a(e,_t,t),a(e,Me,t),a(e,wt,t),b(je,e,t),a(e,kt,t),b(E,e,t),a(e,vt,t),a(e,_e,t),a(e,Tt,t),b(we,e,t),a(e,Zt,t),b(ke,e,t),a(e,Wt,t),a(e,I,t),a(e,Jt,t),a(e,ve,t),a(e,Ct,t),a(e,Te,t),a(e,Rt,t),b(Q,e,t),a(e,qt,t),a(e,Ze,t),a(e,Ut,t),b(We,e,t),a(e,Vt,t),b(Je,e,t),a(e,zt,t),a(e,Ce,t),a(e,Ft,t),a(e,Re,t),a(e,xt,t),b(qe,e,t),a(e,Gt,t),b(L,e,t),a(e,Yt,t),a(e,Ue,t),a(e,Xt,t),b(Ve,e,t),a(e,Bt,t),b(ze,e,t),a(e,Ht,t),a(e,Fe,t),a(e,Nt,t),a(e,xe,t),a(e,Et,t),b(Ge,e,t),a(e,It,t),a(e,Ye,t),a(e,Qt,t),b(Xe,e,t),a(e,Lt,t),a(e,Be,t),a(e,Pt,t),b(He,e,t),a(e,St,t),a(e,Ne,t),a(e,Dt,t),a(e,Ee,t),At=!0},p(e,[t]){const Zs={};t&2&&(Zs.$$scope={dirty:t,ctx:e}),Y.$set(Zs);const Ws={};t&2&&(Ws.$$scope={dirty:t,ctx:e}),X.$set(Ws);const Js={};t&2&&(Js.$$scope={dirty:t,ctx:e}),B.$set(Js);const Cs={};t&2&&(Cs.$$scope={dirty:t,ctx:e}),H.$set(Cs);const Rs={};t&2&&(Rs.$$scope={dirty:t,ctx:e}),N.$set(Rs);const qs={};t&2&&(qs.$$scope={dirty:t,ctx:e}),E.$set(qs);const Us={};t&2&&(Us.$$scope={dirty:t,ctx:e}),Q.$set(Us);const Vs={};t&2&&(Vs.$$scope={dirty:t,ctx:e}),L.$set(Vs)},i(e){At||($(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),$(ke.$$.fragment,e),$(Q.$$.fragment,e),$(We.$$.fragment,e),$(Je.$$.fragment,e),$(qe.$$.fragment,e),$(L.$$.fragment,e),$(Ve.$$.fragment,e),$(ze.$$.fragment,e),$(Ge.$$.fragment,e),$(Xe.$$.fragment,e),$(He.$$.fragment,e),At=!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(ke.$$.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(ze.$$.fragment,e),M(Ge.$$.fragment,e),M(Xe.$$.fragment,e),M(He.$$.fragment,e),At=!1},d(e){e&&(s(f),s(l),s(p),s(u),s(C),s(w),s(T),s(k),s(R),s(z),s(q),s(V),s(W),s(Qe),s(S),s(Le),s(D),s(Pe),s(Se),s(K),s(De),s(Ae),s(ee),s(Ke),s(Oe),s(se),s(et),s(tt),s(st),s(at),s(le),s(nt),s(lt),s(rt),s(oe),s(ot),s(it),s(pt),s(pe),s(mt),s(me),s(ct),s(ce),s(ft),s(ut),s(fe),s(dt),s(ht),s(de),s(gt),s(yt),s(ge),s(bt),s($t),s(Mt),s(jt),s($e),s(_t),s(Me),s(wt),s(kt),s(vt),s(_e),s(Tt),s(Zt),s(Wt),s(I),s(Jt),s(ve),s(Ct),s(Te),s(Rt),s(qt),s(Ze),s(Ut),s(Vt),s(zt),s(Ce),s(Ft),s(Re),s(xt),s(Gt),s(Yt),s(Ue),s(Xt),s(Bt),s(Ht),s(Fe),s(Nt),s(xe),s(Et),s(It),s(Ye),s(Qt),s(Lt),s(Be),s(Pt),s(St),s(Ne),s(Dt),s(Ee)),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(ke,e),j(Q,e),j(We,e),j(Je,e),j(qe,e),j(L,e),j(Ve,e),j(ze,e),j(Ge,e),j(Xe,e),j(He,e)}}}const ma='{"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 ca(Z){return Xs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $a extends Bs{constructor(n){super(),Hs(this,n,ca,pa,Ys,{})}}export{$a as component};
