import{S as ni,i as ii,s as pi,e as o,k as m,w as k,t as a,M as fi,c as l,d as s,m as d,a as n,x as E,h as r,b as y,G as t,g as p,y as q,q as T,o as M,B as Z,v as ci,L as cr}from"../chunks/vendor-hf-doc-builder.js";import{T as xs}from"../chunks/Tip-hf-doc-builder.js";import{I as Ae}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as G}from"../chunks/CodeBlock-hf-doc-builder.js";import{F as li,M as ur}from"../chunks/Markdown-hf-doc-builder.js";function ui(U){let f,v,c,g,$;return{c(){f=o("p"),v=a("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 "),c=o("a"),g=a("configuration"),$=a(" documentation for more details."),this.h()},l(b){f=l(b,"P",{});var _=n(f);v=r(_,"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 "),c=l(_,"A",{href:!0});var z=n(c);g=r(z,"configuration"),z.forEach(s),$=r(_," documentation for more details."),_.forEach(s),this.h()},h(){y(c,"href","main_classes/configuration")},m(b,_){p(b,f,_),t(f,v),t(f,c),t(c,g),t(f,$)},d(b){b&&s(f)}}}function mi(U){let f,v,c,g,$,b,_,z,w,X,j,B,R,C,J,x,h,V,I,F,P;return g=new G({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)`}}),J=new G({props:{code:"bW9kZWwlMjAlM0QlMjBEaXN0aWxCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)'}}),F=new G({props:{code:"bW9kZWwlMjAlM0QlMjBEaXN0aWxCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyJTJDJTIwY29uZmlnJTNEbXlfY29uZmlnKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>, config=my_config)'}}),{c(){f=o("p"),v=a("Load your custom configuration attributes into the model:"),c=m(),k(g.$$.fragment),$=m(),b=o("p"),_=a("This creates a model with random values instead of pretrained weights. You won\u2019t 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."),z=m(),w=o("p"),X=a("Create a pretrained model with "),j=o("a"),B=a("from_pretrained()"),R=a(":"),C=m(),k(J.$$.fragment),x=m(),h=o("p"),V=a("When you load pretrained weights, the default model configuration is automatically loaded if the model is provided by \u{1F917} Transformers. However, you can still replace - some or all of - the default model configuration attributes with your own if you\u2019d like:"),I=m(),k(F.$$.fragment),this.h()},l(u){f=l(u,"P",{});var W=n(f);v=r(W,"Load your custom configuration attributes into the model:"),W.forEach(s),c=d(u),E(g.$$.fragment,u),$=d(u),b=l(u,"P",{});var A=n(b);_=r(A,"This creates a model with random values instead of pretrained weights. You won\u2019t 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."),A.forEach(s),z=d(u),w=l(u,"P",{});var N=n(w);X=r(N,"Create a pretrained model with "),j=l(N,"A",{href:!0});var ae=n(j);B=r(ae,"from_pretrained()"),ae.forEach(s),R=r(N,":"),N.forEach(s),C=d(u),E(J.$$.fragment,u),x=d(u),h=l(u,"P",{});var re=n(h);V=r(re,"When you load pretrained weights, the default model configuration is automatically loaded if the model is provided by \u{1F917} Transformers. However, you can still replace - some or all of - the default model configuration attributes with your own if you\u2019d like:"),re.forEach(s),I=d(u),E(F.$$.fragment,u),this.h()},h(){y(j,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained")},m(u,W){p(u,f,W),t(f,v),p(u,c,W),q(g,u,W),p(u,$,W),p(u,b,W),t(b,_),p(u,z,W),p(u,w,W),t(w,X),t(w,j),t(j,B),t(w,R),p(u,C,W),q(J,u,W),p(u,x,W),p(u,h,W),t(h,V),p(u,I,W),q(F,u,W),P=!0},p:cr,i(u){P||(T(g.$$.fragment,u),T(J.$$.fragment,u),T(F.$$.fragment,u),P=!0)},o(u){M(g.$$.fragment,u),M(J.$$.fragment,u),M(F.$$.fragment,u),P=!1},d(u){u&&s(f),u&&s(c),Z(g,u),u&&s($),u&&s(b),u&&s(z),u&&s(w),u&&s(C),Z(J,u),u&&s(x),u&&s(h),u&&s(I),Z(F,u)}}}function di(U){let f,v;return f=new ur({props:{$$slots:{default:[mi]},$$scope:{ctx:U}}}),{c(){k(f.$$.fragment)},l(c){E(f.$$.fragment,c)},m(c,g){q(f,c,g),v=!0},p(c,g){const $={};g&2&&($.$$scope={dirty:g,ctx:c}),f.$set($)},i(c){v||(T(f.$$.fragment,c),v=!0)},o(c){M(f.$$.fragment,c),v=!1},d(c){Z(f,c)}}}function hi(U){let f,v,c,g,$,b,_,z,w,X,j,B,R,C,J,x,h,V,I,F,P;return g=new G({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)`}}),J=new G({props:{code:"dGZfbW9kZWwlMjAlM0QlMjBURkRpc3RpbEJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFDistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)'}}),F=new G({props:{code:"dGZfbW9kZWwlMjAlM0QlMjBURkRpc3RpbEJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIlMkMlMjBjb25maWclM0RteV9jb25maWcp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFDistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>, config=my_config)'}}),{c(){f=o("p"),v=a("Load your custom configuration attributes into the model:"),c=m(),k(g.$$.fragment),$=m(),b=o("p"),_=a("This creates a model with random values instead of pretrained weights. You won\u2019t 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."),z=m(),w=o("p"),X=a("Create a pretrained model with "),j=o("a"),B=a("from_pretrained()"),R=a(":"),C=m(),k(J.$$.fragment),x=m(),h=o("p"),V=a("When you load pretrained weights, the default model configuration is automatically loaded if the model is provided by \u{1F917} Transformers. However, you can still replace - some or all of - the default model configuration attributes with your own if you\u2019d like:"),I=m(),k(F.$$.fragment),this.h()},l(u){f=l(u,"P",{});var W=n(f);v=r(W,"Load your custom configuration attributes into the model:"),W.forEach(s),c=d(u),E(g.$$.fragment,u),$=d(u),b=l(u,"P",{});var A=n(b);_=r(A,"This creates a model with random values instead of pretrained weights. You won\u2019t 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."),A.forEach(s),z=d(u),w=l(u,"P",{});var N=n(w);X=r(N,"Create a pretrained model with "),j=l(N,"A",{href:!0});var ae=n(j);B=r(ae,"from_pretrained()"),ae.forEach(s),R=r(N,":"),N.forEach(s),C=d(u),E(J.$$.fragment,u),x=d(u),h=l(u,"P",{});var re=n(h);V=r(re,"When you load pretrained weights, the default model configuration is automatically loaded if the model is provided by \u{1F917} Transformers. However, you can still replace - some or all of - the default model configuration attributes with your own if you\u2019d like:"),re.forEach(s),I=d(u),E(F.$$.fragment,u),this.h()},h(){y(j,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained")},m(u,W){p(u,f,W),t(f,v),p(u,c,W),q(g,u,W),p(u,$,W),p(u,b,W),t(b,_),p(u,z,W),p(u,w,W),t(w,X),t(w,j),t(j,B),t(w,R),p(u,C,W),q(J,u,W),p(u,x,W),p(u,h,W),t(h,V),p(u,I,W),q(F,u,W),P=!0},p:cr,i(u){P||(T(g.$$.fragment,u),T(J.$$.fragment,u),T(F.$$.fragment,u),P=!0)},o(u){M(g.$$.fragment,u),M(J.$$.fragment,u),M(F.$$.fragment,u),P=!1},d(u){u&&s(f),u&&s(c),Z(g,u),u&&s($),u&&s(b),u&&s(z),u&&s(w),u&&s(C),Z(J,u),u&&s(x),u&&s(h),u&&s(I),Z(F,u)}}}function yi(U){let f,v;return f=new ur({props:{$$slots:{default:[hi]},$$scope:{ctx:U}}}),{c(){k(f.$$.fragment)},l(c){E(f.$$.fragment,c)},m(c,g){q(f,c,g),v=!0},p(c,g){const $={};g&2&&($.$$scope={dirty:g,ctx:c}),f.$set($)},i(c){v||(T(f.$$.fragment,c),v=!0)},o(c){M(f.$$.fragment,c),v=!1},d(c){Z(f,c)}}}function gi(U){let f,v,c,g,$,b,_,z,w,X,j,B,R,C,J,x;return _=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBEaXN0aWxCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",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-base-uncased&quot;</span>)`}}),J=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZyUwQSUwQW1vZGVsJTIwJTNEJTIwRGlzdGlsQmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",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-base-uncased&quot;</span>)`}}),{c(){f=o("p"),v=a("For example, "),c=o("a"),g=a("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."),b=m(),k(_.$$.fragment),z=m(),w=o("p"),X=a("Easily reuse this checkpoint for another task by switching to a different model head. For a question answering task, you would use the "),j=o("a"),B=a("DistilBertForQuestionAnswering"),R=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."),C=m(),k(J.$$.fragment),this.h()},l(h){f=l(h,"P",{});var V=n(f);v=r(V,"For example, "),c=l(V,"A",{href:!0});var I=n(c);g=r(I,"DistilBertForSequenceClassification"),I.forEach(s),$=r(V," is a base DistilBERT model with a sequence classification head. The sequence classification head is a linear layer on top of the pooled outputs."),V.forEach(s),b=d(h),E(_.$$.fragment,h),z=d(h),w=l(h,"P",{});var F=n(w);X=r(F,"Easily reuse this checkpoint for another task by switching to a different model head. For a question answering task, you would use the "),j=l(F,"A",{href:!0});var P=n(j);B=r(P,"DistilBertForQuestionAnswering"),P.forEach(s),R=r(F," 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."),F.forEach(s),C=d(h),E(J.$$.fragment,h),this.h()},h(){y(c,"href","/docs/transformers/v4.32.0/en/model_doc/distilbert#transformers.DistilBertForSequenceClassification"),y(j,"href","/docs/transformers/v4.32.0/en/model_doc/distilbert#transformers.DistilBertForQuestionAnswering")},m(h,V){p(h,f,V),t(f,v),t(f,c),t(c,g),t(f,$),p(h,b,V),q(_,h,V),p(h,z,V),p(h,w,V),t(w,X),t(w,j),t(j,B),t(w,R),p(h,C,V),q(J,h,V),x=!0},p:cr,i(h){x||(T(_.$$.fragment,h),T(J.$$.fragment,h),x=!0)},o(h){M(_.$$.fragment,h),M(J.$$.fragment,h),x=!1},d(h){h&&s(f),h&&s(b),Z(_,h),h&&s(z),h&&s(w),h&&s(C),Z(J,h)}}}function bi(U){let f,v;return f=new ur({props:{$$slots:{default:[gi]},$$scope:{ctx:U}}}),{c(){k(f.$$.fragment)},l(c){E(f.$$.fragment,c)},m(c,g){q(f,c,g),v=!0},p(c,g){const $={};g&2&&($.$$scope={dirty:g,ctx:c}),f.$set($)},i(c){v||(T(f.$$.fragment,c),v=!0)},o(c){M(f.$$.fragment,c),v=!1},d(c){Z(f,c)}}}function vi(U){let f,v,c,g,$,b,_,z,w,X,j,B,R,C,J,x;return _=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGRGlzdGlsQmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0Zl9tb2RlbCUyMCUzRCUyMFRGRGlzdGlsQmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",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-base-uncased&quot;</span>)`}}),J=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGRGlzdGlsQmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBdGZfbW9kZWwlMjAlM0QlMjBURkRpc3RpbEJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",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-base-uncased&quot;</span>)`}}),{c(){f=o("p"),v=a("For example, "),c=o("a"),g=a("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."),b=m(),k(_.$$.fragment),z=m(),w=o("p"),X=a("Easily reuse this checkpoint for another task by switching to a different model head. For a question answering task, you would use the "),j=o("a"),B=a("TFDistilBertForQuestionAnswering"),R=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."),C=m(),k(J.$$.fragment),this.h()},l(h){f=l(h,"P",{});var V=n(f);v=r(V,"For example, "),c=l(V,"A",{href:!0});var I=n(c);g=r(I,"TFDistilBertForSequenceClassification"),I.forEach(s),$=r(V," is a base DistilBERT model with a sequence classification head. The sequence classification head is a linear layer on top of the pooled outputs."),V.forEach(s),b=d(h),E(_.$$.fragment,h),z=d(h),w=l(h,"P",{});var F=n(w);X=r(F,"Easily reuse this checkpoint for another task by switching to a different model head. For a question answering task, you would use the "),j=l(F,"A",{href:!0});var P=n(j);B=r(P,"TFDistilBertForQuestionAnswering"),P.forEach(s),R=r(F," 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."),F.forEach(s),C=d(h),E(J.$$.fragment,h),this.h()},h(){y(c,"href","/docs/transformers/v4.32.0/en/model_doc/distilbert#transformers.TFDistilBertForSequenceClassification"),y(j,"href","/docs/transformers/v4.32.0/en/model_doc/distilbert#transformers.TFDistilBertForQuestionAnswering")},m(h,V){p(h,f,V),t(f,v),t(f,c),t(c,g),t(f,$),p(h,b,V),q(_,h,V),p(h,z,V),p(h,w,V),t(w,X),t(w,j),t(j,B),t(w,R),p(h,C,V),q(J,h,V),x=!0},p:cr,i(h){x||(T(_.$$.fragment,h),T(J.$$.fragment,h),x=!0)},o(h){M(_.$$.fragment,h),M(J.$$.fragment,h),x=!1},d(h){h&&s(f),h&&s(b),Z(_,h),h&&s(z),h&&s(w),h&&s(C),Z(J,h)}}}function _i(U){let f,v;return f=new ur({props:{$$slots:{default:[vi]},$$scope:{ctx:U}}}),{c(){k(f.$$.fragment)},l(c){E(f.$$.fragment,c)},m(c,g){q(f,c,g),v=!0},p(c,g){const $={};g&2&&($.$$scope={dirty:g,ctx:c}),f.$set($)},i(c){v||(T(f.$$.fragment,c),v=!0)},o(c){M(f.$$.fragment,c),v=!1},d(c){Z(f,c)}}}function $i(U){let f,v,c,g,$;return{c(){f=o("p"),v=a("Not every model supports a fast tokenizer. Take a look at this "),c=o("a"),g=a("table"),$=a(" to check if a model has fast tokenizer support."),this.h()},l(b){f=l(b,"P",{});var _=n(f);v=r(_,"Not every model supports a fast tokenizer. Take a look at this "),c=l(_,"A",{href:!0});var z=n(c);g=r(z,"table"),z.forEach(s),$=r(_," to check if a model has fast tokenizer support."),_.forEach(s),this.h()},h(){y(c,"href","index#supported-frameworks")},m(b,_){p(b,f,_),t(f,v),t(f,c),t(c,g),t(f,$)},d(b){b&&s(f)}}}function wi(U){let f,v,c,g,$,b,_,z,w,X,j;return{c(){f=o("p"),v=a("By default, "),c=o("a"),g=a("AutoTokenizer"),$=a(" will try to load a fast tokenizer. You can disable this behavior by setting "),b=o("code"),_=a("use_fast=False"),z=a(" in "),w=o("code"),X=a("from_pretrained"),j=a("."),this.h()},l(B){f=l(B,"P",{});var R=n(f);v=r(R,"By default, "),c=l(R,"A",{href:!0});var C=n(c);g=r(C,"AutoTokenizer"),C.forEach(s),$=r(R," will try to load a fast tokenizer. You can disable this behavior by setting "),b=l(R,"CODE",{});var J=n(b);_=r(J,"use_fast=False"),J.forEach(s),z=r(R," in "),w=l(R,"CODE",{});var x=n(w);X=r(x,"from_pretrained"),x.forEach(s),j=r(R,"."),R.forEach(s),this.h()},h(){y(c,"href","/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer")},m(B,R){p(B,f,R),t(f,v),t(f,c),t(c,g),t(f,$),t(f,b),t(b,_),t(f,z),t(f,w),t(w,X),t(f,j)},d(B){B&&s(f)}}}function ji(U){let f,v,c,g,$;return{c(){f=o("p"),v=a("If you aren\u2019t looking for any customization, just use the "),c=o("code"),g=a("from_pretrained"),$=a(" method to load a model\u2019s default image processor parameters.")},l(b){f=l(b,"P",{});var _=n(f);v=r(_,"If you aren\u2019t looking for any customization, just use the "),c=l(_,"CODE",{});var z=n(c);g=r(z,"from_pretrained"),z.forEach(s),$=r(_," method to load a model\u2019s default image processor parameters."),_.forEach(s)},m(b,_){p(b,f,_),t(f,v),t(f,c),t(c,g),t(f,$)},d(b){b&&s(f)}}}function ki(U){let f,v,c,g,$;return{c(){f=o("p"),v=a("If you aren\u2019t looking for any customization, just use the "),c=o("code"),g=a("from_pretrained"),$=a(" method to load a model\u2019s default feature extractor parameters.")},l(b){f=l(b,"P",{});var _=n(f);v=r(_,"If you aren\u2019t looking for any customization, just use the "),c=l(_,"CODE",{});var z=n(c);g=r(z,"from_pretrained"),z.forEach(s),$=r(_," method to load a model\u2019s default feature extractor parameters."),_.forEach(s)},m(b,_){p(b,f,_),t(f,v),t(f,c),t(c,g),t(f,$)},d(b){b&&s(f)}}}function Ei(U){let f,v,c,g,$,b,_,z,w,X,j,B,R,C,J,x,h,V,I,F,P,u,W,A,N,ae,re,es,mr,dr,ts,hr,yr,ss,gr,br,as,vr,_r,rs,$r,Bs,oe,me,os,Ie,wr,ls,jr,Gs,D,kr,vt,Er,qr,ns,Tr,Mr,is,Zr,zr,ps,Jr,Wr,fs,Vr,Rr,Xs,K,Fr,_t,Cr,Ur,$t,xr,Br,As,Pe,Is,le,wt,Gr,Xr,jt,Ar,Ir,Ps,de,Ye,Pr,cs,Yr,Dr,Nr,De,Qr,us,Sr,Hr,Ys,Ne,Ds,he,Lr,kt,Kr,Or,Ns,Qe,Qs,ye,eo,Et,to,so,Ss,Se,Hs,ge,ao,qt,ro,oo,Ls,He,Ks,be,Os,ne,ve,ms,Le,lo,ds,no,ea,Y,io,Tt,po,fo,hs,co,uo,Mt,mo,ho,Ke,ys,yo,go,Oe,gs,bo,vo,et,bs,_o,$o,ta,_e,sa,ie,$e,vs,tt,wo,_s,jo,aa,we,ko,$s,Eo,qo,ra,je,oa,pe,ke,ws,st,To,js,Mo,la,Ee,Zo,Zt,zo,Jo,na,qe,zt,Jt,Wo,Vo,Ro,O,Wt,Fo,Co,at,Uo,xo,ks,Bo,Go,ia,Vt,Xo,pa,Te,fa,Me,Ao,Es,Io,Po,ca,rt,ua,Ze,Yo,Rt,Do,No,ma,ot,da,ze,Qo,Ft,So,Ho,ha,lt,ya,Je,ga,fe,We,qs,nt,Lo,Ts,Ko,ba,Ve,Oo,Ct,el,tl,va,ee,sl,Ut,al,rl,xt,ol,ll,_a,it,$a,Re,wa,Fe,nl,Bt,il,pl,ja,pt,ka,ce,Ce,Ms,ft,fl,Zs,cl,Ea,te,ul,Gt,ml,dl,Xt,hl,yl,qa,se,gl,At,bl,vl,It,_l,$l,Ta,ct,Ma,Ue,Za,xe,wl,Pt,jl,kl,za,ut,Ja,ue,Be,zs,mt,El,Js,ql,Wa,Ge,Tl,Yt,Ml,Zl,Va,Dt,zl,Ra,dt,Fa,Nt,Jl,Ca,ht,Ua,Xe,Wl,Qt,Vl,Rl,xa,yt,Ba,St,Fl,Ga;return b=new Ae({}),Ie=new Ae({}),Pe=new G({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>
}`}}),Ne=new G({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>
}`}}),Qe=new G({props:{code:"bXlfY29uZmlnJTIwJTNEJTIwRGlzdGlsQmVydENvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIlMkMlMjBhY3RpdmF0aW9uJTNEJTIycmVsdSUyMiUyQyUyMGF0dGVudGlvbl9kcm9wb3V0JTNEMC40KQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>my_config = DistilBertConfig.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>, activation=<span class="hljs-string">&quot;relu&quot;</span>, attention_dropout=<span class="hljs-number">0.4</span>)'}}),Se=new G({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>)'}}),He=new G({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>)'}}),be=new xs({props:{$$slots:{default:[ui]},$$scope:{ctx:U}}}),Le=new Ae({}),_e=new li({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[yi],pytorch:[di]},$$scope:{ctx:U}}}),tt=new Ae({}),je=new li({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[_i],pytorch:[bi]},$$scope:{ctx:U}}}),st=new Ae({}),Te=new xs({props:{warning:!0,$$slots:{default:[$i]},$$scope:{ctx:U}}}),rt=new G({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>)`}}),ot=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRUb2tlbml6ZXIlMEElMEFzbG93X3Rva2VuaXplciUyMCUzRCUyMERpc3RpbEJlcnRUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",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-base-uncased&quot;</span>)`}}),lt=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRUb2tlbml6ZXJGYXN0JTBBJTBBZmFzdF90b2tlbml6ZXIlMjAlM0QlMjBEaXN0aWxCZXJ0VG9rZW5pemVyRmFzdC5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",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-base-uncased&quot;</span>)`}}),Je=new xs({props:{$$slots:{default:[wi]},$$scope:{ctx:U}}}),nt=new Ae({}),it=new G({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>
}`}}),Re=new xs({props:{$$slots:{default:[ji]},$$scope:{ctx:U}}}),pt=new G({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>
}`}}),ft=new Ae({}),ct=new G({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>
}`}}),Ue=new xs({props:{$$slots:{default:[ki]},$$scope:{ctx:U}}}),ut=new G({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>
}`}}),mt=new Ae({}),dt=new G({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>)`}}),ht=new G({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>)`}}),yt=new G({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)`}}),{c(){f=o("meta"),v=m(),c=o("h1"),g=o("a"),$=o("span"),k(b.$$.fragment),_=m(),z=o("span"),w=a("Create a custom architecture"),X=m(),j=o("p"),B=a("An "),R=o("a"),C=o("code"),J=a("AutoClass"),x=a(" automatically infers the model architecture and downloads pretrained configuration and weights. Generally, we recommend using an "),h=o("code"),V=a("AutoClass"),I=a(" to produce checkpoint-agnostic code. But users who want more control over specific model parameters can create a custom \u{1F917} 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 \u{1F917} Transformers model. In this guide, dive deeper into creating a custom model without an "),F=o("code"),P=a("AutoClass"),u=a(". Learn how to:"),W=m(),A=o("ul"),N=o("li"),ae=a("Load and customize a model configuration."),re=m(),es=o("li"),mr=a("Create a model architecture."),dr=m(),ts=o("li"),hr=a("Create a slow and fast tokenizer for text."),yr=m(),ss=o("li"),gr=a("Create an image processor for vision tasks."),br=m(),as=o("li"),vr=a("Create a feature extractor for audio tasks."),_r=m(),rs=o("li"),$r=a("Create a processor for multimodal tasks."),Bs=m(),oe=o("h2"),me=o("a"),os=o("span"),k(Ie.$$.fragment),wr=m(),ls=o("span"),jr=a("Configuration"),Gs=m(),D=o("p"),kr=a("A "),vt=o("a"),Er=a("configuration"),qr=a(" refers to a model\u2019s specific attributes. Each model configuration has different attributes; for instance, all NLP models have the "),ns=o("code"),Tr=a("hidden_size"),Mr=a(", "),is=o("code"),Zr=a("num_attention_heads"),zr=a(", "),ps=o("code"),Jr=a("num_hidden_layers"),Wr=a(" and "),fs=o("code"),Vr=a("vocab_size"),Rr=a(" attributes in common. These attributes specify the number of attention heads or hidden layers to construct a model with."),Xs=m(),K=o("p"),Fr=a("Get a closer look at "),_t=o("a"),Cr=a("DistilBERT"),Ur=a(" by accessing "),$t=o("a"),xr=a("DistilBertConfig"),Br=a(" to inspect it\u2019s attributes:"),As=m(),k(Pe.$$.fragment),Is=m(),le=o("p"),wt=o("a"),Gr=a("DistilBertConfig"),Xr=a(" displays all the default attributes used to build a base "),jt=o("a"),Ar=a("DistilBertModel"),Ir=a(". All attributes are customizable, creating space for experimentation. For example, you can customize a default model to:"),Ps=m(),de=o("ul"),Ye=o("li"),Pr=a("Try a different activation function with the "),cs=o("code"),Yr=a("activation"),Dr=a(" parameter."),Nr=m(),De=o("li"),Qr=a("Use a higher dropout ratio for the attention probabilities with the "),us=o("code"),Sr=a("attention_dropout"),Hr=a(" parameter."),Ys=m(),k(Ne.$$.fragment),Ds=m(),he=o("p"),Lr=a("Pretrained model attributes can be modified in the "),kt=o("a"),Kr=a("from_pretrained()"),Or=a(" function:"),Ns=m(),k(Qe.$$.fragment),Qs=m(),ye=o("p"),eo=a("Once you are satisfied with your model configuration, you can save it with "),Et=o("a"),to=a("save_pretrained()"),so=a(". Your configuration file is stored as a JSON file in the specified save directory:"),Ss=m(),k(Se.$$.fragment),Hs=m(),ge=o("p"),ao=a("To reuse the configuration file, load it with "),qt=o("a"),ro=a("from_pretrained()"),oo=a(":"),Ls=m(),k(He.$$.fragment),Ks=m(),k(be.$$.fragment),Os=m(),ne=o("h2"),ve=o("a"),ms=o("span"),k(Le.$$.fragment),lo=m(),ds=o("span"),no=a("Model"),ea=m(),Y=o("p"),io=a("The next step is to create a "),Tt=o("a"),po=a("model"),fo=a(". The model - also loosely referred to as the architecture - defines what each layer is doing and what operations are happening. Attributes like "),hs=o("code"),co=a("num_hidden_layers"),uo=a(" from the configuration are used to define the architecture. Every model shares the base class "),Mt=o("a"),mo=a("PreTrainedModel"),ho=a(" and a few common methods like resizing input embeddings and pruning self-attention heads. In addition, all models are also either a "),Ke=o("a"),ys=o("code"),yo=a("torch.nn.Module"),go=a(", "),Oe=o("a"),gs=o("code"),bo=a("tf.keras.Model"),vo=a(" or "),et=o("a"),bs=o("code"),_o=a("flax.linen.Module"),$o=a(" subclass. This means models are compatible with each of their respective framework\u2019s usage."),ta=m(),k(_e.$$.fragment),sa=m(),ie=o("h3"),$e=o("a"),vs=o("span"),k(tt.$$.fragment),wo=m(),_s=o("span"),jo=a("Model heads"),aa=m(),we=o("p"),ko=a("At this point, you have a base DistilBERT model which outputs the "),$s=o("em"),Eo=a("hidden states"),qo=a(". The hidden states are passed as inputs to a model head to produce the final output. \u{1F917} Transformers provides a different model head for each task as long as a model supports the task (i.e., you can\u2019t use DistilBERT for a sequence-to-sequence task like translation)."),ra=m(),k(je.$$.fragment),oa=m(),pe=o("h2"),ke=o("a"),ws=o("span"),k(st.$$.fragment),To=m(),js=o("span"),Mo=a("Tokenizer"),la=m(),Ee=o("p"),Zo=a("The last base class you need before using a model for textual data is a "),Zt=o("a"),zo=a("tokenizer"),Jo=a(" to convert raw text to tensors. There are two types of tokenizers you can use with \u{1F917} Transformers:"),na=m(),qe=o("ul"),zt=o("li"),Jt=o("a"),Wo=a("PreTrainedTokenizer"),Vo=a(": a Python implementation of a tokenizer."),Ro=m(),O=o("li"),Wt=o("a"),Fo=a("PreTrainedTokenizerFast"),Co=a(": a tokenizer from our Rust-based "),at=o("a"),Uo=a("\u{1F917} Tokenizer"),xo=a(" library. This tokenizer type is significantly faster - especially during batch tokenization - due to it\u2019s Rust implementation. The fast tokenizer also offers additional methods like "),ks=o("em"),Bo=a("offset mapping"),Go=a(" which maps tokens to their original words or characters."),ia=m(),Vt=o("p"),Xo=a("Both tokenizers support common methods such as encoding and decoding, adding new tokens, and managing special tokens."),pa=m(),k(Te.$$.fragment),fa=m(),Me=o("p"),Ao=a("If you trained your own tokenizer, you can create one from your "),Es=o("em"),Io=a("vocabulary"),Po=a(" file:"),ca=m(),k(rt.$$.fragment),ua=m(),Ze=o("p"),Yo=a("It is important to remember the vocabulary from a custom tokenizer will be different from the vocabulary generated by a pretrained model\u2019s tokenizer. You need to use a pretrained model\u2019s vocabulary if you are using a pretrained model, otherwise the inputs won\u2019t make sense. Create a tokenizer with a pretrained model\u2019s vocabulary with the "),Rt=o("a"),Do=a("DistilBertTokenizer"),No=a(" class:"),ma=m(),k(ot.$$.fragment),da=m(),ze=o("p"),Qo=a("Create a fast tokenizer with the "),Ft=o("a"),So=a("DistilBertTokenizerFast"),Ho=a(" class:"),ha=m(),k(lt.$$.fragment),ya=m(),k(Je.$$.fragment),ga=m(),fe=o("h2"),We=o("a"),qs=o("span"),k(nt.$$.fragment),Lo=m(),Ts=o("span"),Ko=a("Image Processor"),ba=m(),Ve=o("p"),Oo=a("An image processor processes vision inputs. It inherits from the base "),Ct=o("a"),el=a("ImageProcessingMixin"),tl=a(" class."),va=m(),ee=o("p"),sl=a("To use, create an image processor associated with the model you\u2019re using. For example, create a default "),Ut=o("a"),al=a("ViTImageProcessor"),rl=a(" if you are using "),xt=o("a"),ol=a("ViT"),ll=a(" for image classification:"),_a=m(),k(it.$$.fragment),$a=m(),k(Re.$$.fragment),wa=m(),Fe=o("p"),nl=a("Modify any of the "),Bt=o("a"),il=a("ViTImageProcessor"),pl=a(" parameters to create your custom image processor:"),ja=m(),k(pt.$$.fragment),ka=m(),ce=o("h2"),Ce=o("a"),Ms=o("span"),k(ft.$$.fragment),fl=m(),Zs=o("span"),cl=a("Feature Extractor"),Ea=m(),te=o("p"),ul=a("A feature extractor processes audio inputs. It inherits from the base "),Gt=o("a"),ml=a("FeatureExtractionMixin"),dl=a(" class, and may also inherit from the "),Xt=o("a"),hl=a("SequenceFeatureExtractor"),yl=a(" class for processing audio inputs."),qa=m(),se=o("p"),gl=a("To use, create a feature extractor associated with the model you\u2019re using. For example, create a default "),At=o("a"),bl=a("Wav2Vec2FeatureExtractor"),vl=a(" if you are using "),It=o("a"),_l=a("Wav2Vec2"),$l=a(" for audio classification:"),Ta=m(),k(ct.$$.fragment),Ma=m(),k(Ue.$$.fragment),Za=m(),xe=o("p"),wl=a("Modify any of the "),Pt=o("a"),jl=a("Wav2Vec2FeatureExtractor"),kl=a(" parameters to create your custom feature extractor:"),za=m(),k(ut.$$.fragment),Ja=m(),ue=o("h2"),Be=o("a"),zs=o("span"),k(mt.$$.fragment),El=m(),Js=o("span"),ql=a("Processor"),Wa=m(),Ge=o("p"),Tl=a("For models that support multimodal tasks, \u{1F917} 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\u2019s use the "),Yt=o("a"),Ml=a("Wav2Vec2Processor"),Zl=a(" for an automatic speech recognition task (ASR). ASR transcribes audio to text, so you will need a feature extractor and a tokenizer."),Va=m(),Dt=o("p"),zl=a("Create a feature extractor to handle the audio inputs:"),Ra=m(),k(dt.$$.fragment),Fa=m(),Nt=o("p"),Jl=a("Create a tokenizer to handle the text inputs:"),Ca=m(),k(ht.$$.fragment),Ua=m(),Xe=o("p"),Wl=a("Combine the feature extractor and tokenizer in "),Qt=o("a"),Vl=a("Wav2Vec2Processor"),Rl=a(":"),xa=m(),k(yt.$$.fragment),Ba=m(),St=o("p"),Fl=a("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 \u{1F917} 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."),this.h()},l(e){const i=fi('[data-svelte="svelte-1phssyn"]',document.head);f=l(i,"META",{name:!0,content:!0}),i.forEach(s),v=d(e),c=l(e,"H1",{class:!0});var gt=n(c);g=l(gt,"A",{id:!0,class:!0,href:!0});var Ws=n(g);$=l(Ws,"SPAN",{});var Vs=n($);E(b.$$.fragment,Vs),Vs.forEach(s),Ws.forEach(s),_=d(gt),z=l(gt,"SPAN",{});var Rs=n(z);w=r(Rs,"Create a custom architecture"),Rs.forEach(s),gt.forEach(s),X=d(e),j=l(e,"P",{});var L=n(j);B=r(L,"An "),R=l(L,"A",{href:!0});var Fs=n(R);C=l(Fs,"CODE",{});var Cs=n(C);J=r(Cs,"AutoClass"),Cs.forEach(s),Fs.forEach(s),x=r(L," automatically infers the model architecture and downloads pretrained configuration and weights. Generally, we recommend using an "),h=l(L,"CODE",{});var Ul=n(h);V=r(Ul,"AutoClass"),Ul.forEach(s),I=r(L," to produce checkpoint-agnostic code. But users who want more control over specific model parameters can create a custom \u{1F917} 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 \u{1F917} Transformers model. In this guide, dive deeper into creating a custom model without an "),F=l(L,"CODE",{});var xl=n(F);P=r(xl,"AutoClass"),xl.forEach(s),u=r(L,". Learn how to:"),L.forEach(s),W=d(e),A=l(e,"UL",{});var S=n(A);N=l(S,"LI",{});var Bl=n(N);ae=r(Bl,"Load and customize a model configuration."),Bl.forEach(s),re=d(S),es=l(S,"LI",{});var Gl=n(es);mr=r(Gl,"Create a model architecture."),Gl.forEach(s),dr=d(S),ts=l(S,"LI",{});var Xl=n(ts);hr=r(Xl,"Create a slow and fast tokenizer for text."),Xl.forEach(s),yr=d(S),ss=l(S,"LI",{});var Al=n(ss);gr=r(Al,"Create an image processor for vision tasks."),Al.forEach(s),br=d(S),as=l(S,"LI",{});var Il=n(as);vr=r(Il,"Create a feature extractor for audio tasks."),Il.forEach(s),_r=d(S),rs=l(S,"LI",{});var Pl=n(rs);$r=r(Pl,"Create a processor for multimodal tasks."),Pl.forEach(s),S.forEach(s),Bs=d(e),oe=l(e,"H2",{class:!0});var Xa=n(oe);me=l(Xa,"A",{id:!0,class:!0,href:!0});var Yl=n(me);os=l(Yl,"SPAN",{});var Dl=n(os);E(Ie.$$.fragment,Dl),Dl.forEach(s),Yl.forEach(s),wr=d(Xa),ls=l(Xa,"SPAN",{});var Nl=n(ls);jr=r(Nl,"Configuration"),Nl.forEach(s),Xa.forEach(s),Gs=d(e),D=l(e,"P",{});var H=n(D);kr=r(H,"A "),vt=l(H,"A",{href:!0});var Ql=n(vt);Er=r(Ql,"configuration"),Ql.forEach(s),qr=r(H," refers to a model\u2019s specific attributes. Each model configuration has different attributes; for instance, all NLP models have the "),ns=l(H,"CODE",{});var Sl=n(ns);Tr=r(Sl,"hidden_size"),Sl.forEach(s),Mr=r(H,", "),is=l(H,"CODE",{});var Hl=n(is);Zr=r(Hl,"num_attention_heads"),Hl.forEach(s),zr=r(H,", "),ps=l(H,"CODE",{});var Ll=n(ps);Jr=r(Ll,"num_hidden_layers"),Ll.forEach(s),Wr=r(H," and "),fs=l(H,"CODE",{});var Kl=n(fs);Vr=r(Kl,"vocab_size"),Kl.forEach(s),Rr=r(H," attributes in common. These attributes specify the number of attention heads or hidden layers to construct a model with."),H.forEach(s),Xs=d(e),K=l(e,"P",{});var Ht=n(K);Fr=r(Ht,"Get a closer look at "),_t=l(Ht,"A",{href:!0});var Ol=n(_t);Cr=r(Ol,"DistilBERT"),Ol.forEach(s),Ur=r(Ht," by accessing "),$t=l(Ht,"A",{href:!0});var en=n($t);xr=r(en,"DistilBertConfig"),en.forEach(s),Br=r(Ht," to inspect it\u2019s attributes:"),Ht.forEach(s),As=d(e),E(Pe.$$.fragment,e),Is=d(e),le=l(e,"P",{});var Us=n(le);wt=l(Us,"A",{href:!0});var tn=n(wt);Gr=r(tn,"DistilBertConfig"),tn.forEach(s),Xr=r(Us," displays all the default attributes used to build a base "),jt=l(Us,"A",{href:!0});var sn=n(jt);Ar=r(sn,"DistilBertModel"),sn.forEach(s),Ir=r(Us,". All attributes are customizable, creating space for experimentation. For example, you can customize a default model to:"),Us.forEach(s),Ps=d(e),de=l(e,"UL",{});var Aa=n(de);Ye=l(Aa,"LI",{});var Ia=n(Ye);Pr=r(Ia,"Try a different activation function with the "),cs=l(Ia,"CODE",{});var an=n(cs);Yr=r(an,"activation"),an.forEach(s),Dr=r(Ia," parameter."),Ia.forEach(s),Nr=d(Aa),De=l(Aa,"LI",{});var Pa=n(De);Qr=r(Pa,"Use a higher dropout ratio for the attention probabilities with the "),us=l(Pa,"CODE",{});var rn=n(us);Sr=r(rn,"attention_dropout"),rn.forEach(s),Hr=r(Pa," parameter."),Pa.forEach(s),Aa.forEach(s),Ys=d(e),E(Ne.$$.fragment,e),Ds=d(e),he=l(e,"P",{});var Ya=n(he);Lr=r(Ya,"Pretrained model attributes can be modified in the "),kt=l(Ya,"A",{href:!0});var on=n(kt);Kr=r(on,"from_pretrained()"),on.forEach(s),Or=r(Ya," function:"),Ya.forEach(s),Ns=d(e),E(Qe.$$.fragment,e),Qs=d(e),ye=l(e,"P",{});var Da=n(ye);eo=r(Da,"Once you are satisfied with your model configuration, you can save it with "),Et=l(Da,"A",{href:!0});var ln=n(Et);to=r(ln,"save_pretrained()"),ln.forEach(s),so=r(Da,". Your configuration file is stored as a JSON file in the specified save directory:"),Da.forEach(s),Ss=d(e),E(Se.$$.fragment,e),Hs=d(e),ge=l(e,"P",{});var Na=n(ge);ao=r(Na,"To reuse the configuration file, load it with "),qt=l(Na,"A",{href:!0});var nn=n(qt);ro=r(nn,"from_pretrained()"),nn.forEach(s),oo=r(Na,":"),Na.forEach(s),Ls=d(e),E(He.$$.fragment,e),Ks=d(e),E(be.$$.fragment,e),Os=d(e),ne=l(e,"H2",{class:!0});var Qa=n(ne);ve=l(Qa,"A",{id:!0,class:!0,href:!0});var pn=n(ve);ms=l(pn,"SPAN",{});var fn=n(ms);E(Le.$$.fragment,fn),fn.forEach(s),pn.forEach(s),lo=d(Qa),ds=l(Qa,"SPAN",{});var cn=n(ds);no=r(cn,"Model"),cn.forEach(s),Qa.forEach(s),ea=d(e),Y=l(e,"P",{});var Q=n(Y);io=r(Q,"The next step is to create a "),Tt=l(Q,"A",{href:!0});var un=n(Tt);po=r(un,"model"),un.forEach(s),fo=r(Q,". The model - also loosely referred to as the architecture - defines what each layer is doing and what operations are happening. Attributes like "),hs=l(Q,"CODE",{});var mn=n(hs);co=r(mn,"num_hidden_layers"),mn.forEach(s),uo=r(Q," from the configuration are used to define the architecture. Every model shares the base class "),Mt=l(Q,"A",{href:!0});var dn=n(Mt);mo=r(dn,"PreTrainedModel"),dn.forEach(s),ho=r(Q," and a few common methods like resizing input embeddings and pruning self-attention heads. In addition, all models are also either a "),Ke=l(Q,"A",{href:!0,rel:!0});var hn=n(Ke);ys=l(hn,"CODE",{});var yn=n(ys);yo=r(yn,"torch.nn.Module"),yn.forEach(s),hn.forEach(s),go=r(Q,", "),Oe=l(Q,"A",{href:!0,rel:!0});var gn=n(Oe);gs=l(gn,"CODE",{});var bn=n(gs);bo=r(bn,"tf.keras.Model"),bn.forEach(s),gn.forEach(s),vo=r(Q," or "),et=l(Q,"A",{href:!0,rel:!0});var vn=n(et);bs=l(vn,"CODE",{});var _n=n(bs);_o=r(_n,"flax.linen.Module"),_n.forEach(s),vn.forEach(s),$o=r(Q," subclass. This means models are compatible with each of their respective framework\u2019s usage."),Q.forEach(s),ta=d(e),E(_e.$$.fragment,e),sa=d(e),ie=l(e,"H3",{class:!0});var Sa=n(ie);$e=l(Sa,"A",{id:!0,class:!0,href:!0});var $n=n($e);vs=l($n,"SPAN",{});var wn=n(vs);E(tt.$$.fragment,wn),wn.forEach(s),$n.forEach(s),wo=d(Sa),_s=l(Sa,"SPAN",{});var jn=n(_s);jo=r(jn,"Model heads"),jn.forEach(s),Sa.forEach(s),aa=d(e),we=l(e,"P",{});var Ha=n(we);ko=r(Ha,"At this point, you have a base DistilBERT model which outputs the "),$s=l(Ha,"EM",{});var kn=n($s);Eo=r(kn,"hidden states"),kn.forEach(s),qo=r(Ha,". The hidden states are passed as inputs to a model head to produce the final output. \u{1F917} Transformers provides a different model head for each task as long as a model supports the task (i.e., you can\u2019t use DistilBERT for a sequence-to-sequence task like translation)."),Ha.forEach(s),ra=d(e),E(je.$$.fragment,e),oa=d(e),pe=l(e,"H2",{class:!0});var La=n(pe);ke=l(La,"A",{id:!0,class:!0,href:!0});var En=n(ke);ws=l(En,"SPAN",{});var qn=n(ws);E(st.$$.fragment,qn),qn.forEach(s),En.forEach(s),To=d(La),js=l(La,"SPAN",{});var Tn=n(js);Mo=r(Tn,"Tokenizer"),Tn.forEach(s),La.forEach(s),la=d(e),Ee=l(e,"P",{});var Ka=n(Ee);Zo=r(Ka,"The last base class you need before using a model for textual data is a "),Zt=l(Ka,"A",{href:!0});var Mn=n(Zt);zo=r(Mn,"tokenizer"),Mn.forEach(s),Jo=r(Ka," to convert raw text to tensors. There are two types of tokenizers you can use with \u{1F917} Transformers:"),Ka.forEach(s),na=d(e),qe=l(e,"UL",{});var Oa=n(qe);zt=l(Oa,"LI",{});var Cl=n(zt);Jt=l(Cl,"A",{href:!0});var Zn=n(Jt);Wo=r(Zn,"PreTrainedTokenizer"),Zn.forEach(s),Vo=r(Cl,": a Python implementation of a tokenizer."),Cl.forEach(s),Ro=d(Oa),O=l(Oa,"LI",{});var bt=n(O);Wt=l(bt,"A",{href:!0});var zn=n(Wt);Fo=r(zn,"PreTrainedTokenizerFast"),zn.forEach(s),Co=r(bt,": a tokenizer from our Rust-based "),at=l(bt,"A",{href:!0,rel:!0});var Jn=n(at);Uo=r(Jn,"\u{1F917} Tokenizer"),Jn.forEach(s),xo=r(bt," library. This tokenizer type is significantly faster - especially during batch tokenization - due to it\u2019s Rust implementation. The fast tokenizer also offers additional methods like "),ks=l(bt,"EM",{});var Wn=n(ks);Bo=r(Wn,"offset mapping"),Wn.forEach(s),Go=r(bt," which maps tokens to their original words or characters."),bt.forEach(s),Oa.forEach(s),ia=d(e),Vt=l(e,"P",{});var Vn=n(Vt);Xo=r(Vn,"Both tokenizers support common methods such as encoding and decoding, adding new tokens, and managing special tokens."),Vn.forEach(s),pa=d(e),E(Te.$$.fragment,e),fa=d(e),Me=l(e,"P",{});var er=n(Me);Ao=r(er,"If you trained your own tokenizer, you can create one from your "),Es=l(er,"EM",{});var Rn=n(Es);Io=r(Rn,"vocabulary"),Rn.forEach(s),Po=r(er," file:"),er.forEach(s),ca=d(e),E(rt.$$.fragment,e),ua=d(e),Ze=l(e,"P",{});var tr=n(Ze);Yo=r(tr,"It is important to remember the vocabulary from a custom tokenizer will be different from the vocabulary generated by a pretrained model\u2019s tokenizer. You need to use a pretrained model\u2019s vocabulary if you are using a pretrained model, otherwise the inputs won\u2019t make sense. Create a tokenizer with a pretrained model\u2019s vocabulary with the "),Rt=l(tr,"A",{href:!0});var Fn=n(Rt);Do=r(Fn,"DistilBertTokenizer"),Fn.forEach(s),No=r(tr," class:"),tr.forEach(s),ma=d(e),E(ot.$$.fragment,e),da=d(e),ze=l(e,"P",{});var sr=n(ze);Qo=r(sr,"Create a fast tokenizer with the "),Ft=l(sr,"A",{href:!0});var Cn=n(Ft);So=r(Cn,"DistilBertTokenizerFast"),Cn.forEach(s),Ho=r(sr," class:"),sr.forEach(s),ha=d(e),E(lt.$$.fragment,e),ya=d(e),E(Je.$$.fragment,e),ga=d(e),fe=l(e,"H2",{class:!0});var ar=n(fe);We=l(ar,"A",{id:!0,class:!0,href:!0});var Un=n(We);qs=l(Un,"SPAN",{});var xn=n(qs);E(nt.$$.fragment,xn),xn.forEach(s),Un.forEach(s),Lo=d(ar),Ts=l(ar,"SPAN",{});var Bn=n(Ts);Ko=r(Bn,"Image Processor"),Bn.forEach(s),ar.forEach(s),ba=d(e),Ve=l(e,"P",{});var rr=n(Ve);Oo=r(rr,"An image processor processes vision inputs. It inherits from the base "),Ct=l(rr,"A",{href:!0});var Gn=n(Ct);el=r(Gn,"ImageProcessingMixin"),Gn.forEach(s),tl=r(rr," class."),rr.forEach(s),va=d(e),ee=l(e,"P",{});var Lt=n(ee);sl=r(Lt,"To use, create an image processor associated with the model you\u2019re using. For example, create a default "),Ut=l(Lt,"A",{href:!0});var Xn=n(Ut);al=r(Xn,"ViTImageProcessor"),Xn.forEach(s),rl=r(Lt," if you are using "),xt=l(Lt,"A",{href:!0});var An=n(xt);ol=r(An,"ViT"),An.forEach(s),ll=r(Lt," for image classification:"),Lt.forEach(s),_a=d(e),E(it.$$.fragment,e),$a=d(e),E(Re.$$.fragment,e),wa=d(e),Fe=l(e,"P",{});var or=n(Fe);nl=r(or,"Modify any of the "),Bt=l(or,"A",{href:!0});var In=n(Bt);il=r(In,"ViTImageProcessor"),In.forEach(s),pl=r(or," parameters to create your custom image processor:"),or.forEach(s),ja=d(e),E(pt.$$.fragment,e),ka=d(e),ce=l(e,"H2",{class:!0});var lr=n(ce);Ce=l(lr,"A",{id:!0,class:!0,href:!0});var Pn=n(Ce);Ms=l(Pn,"SPAN",{});var Yn=n(Ms);E(ft.$$.fragment,Yn),Yn.forEach(s),Pn.forEach(s),fl=d(lr),Zs=l(lr,"SPAN",{});var Dn=n(Zs);cl=r(Dn,"Feature Extractor"),Dn.forEach(s),lr.forEach(s),Ea=d(e),te=l(e,"P",{});var Kt=n(te);ul=r(Kt,"A feature extractor processes audio inputs. It inherits from the base "),Gt=l(Kt,"A",{href:!0});var Nn=n(Gt);ml=r(Nn,"FeatureExtractionMixin"),Nn.forEach(s),dl=r(Kt," class, and may also inherit from the "),Xt=l(Kt,"A",{href:!0});var Qn=n(Xt);hl=r(Qn,"SequenceFeatureExtractor"),Qn.forEach(s),yl=r(Kt," class for processing audio inputs."),Kt.forEach(s),qa=d(e),se=l(e,"P",{});var Ot=n(se);gl=r(Ot,"To use, create a feature extractor associated with the model you\u2019re using. For example, create a default "),At=l(Ot,"A",{href:!0});var Sn=n(At);bl=r(Sn,"Wav2Vec2FeatureExtractor"),Sn.forEach(s),vl=r(Ot," if you are using "),It=l(Ot,"A",{href:!0});var Hn=n(It);_l=r(Hn,"Wav2Vec2"),Hn.forEach(s),$l=r(Ot," for audio classification:"),Ot.forEach(s),Ta=d(e),E(ct.$$.fragment,e),Ma=d(e),E(Ue.$$.fragment,e),Za=d(e),xe=l(e,"P",{});var nr=n(xe);wl=r(nr,"Modify any of the "),Pt=l(nr,"A",{href:!0});var Ln=n(Pt);jl=r(Ln,"Wav2Vec2FeatureExtractor"),Ln.forEach(s),kl=r(nr," parameters to create your custom feature extractor:"),nr.forEach(s),za=d(e),E(ut.$$.fragment,e),Ja=d(e),ue=l(e,"H2",{class:!0});var ir=n(ue);Be=l(ir,"A",{id:!0,class:!0,href:!0});var Kn=n(Be);zs=l(Kn,"SPAN",{});var On=n(zs);E(mt.$$.fragment,On),On.forEach(s),Kn.forEach(s),El=d(ir),Js=l(ir,"SPAN",{});var ei=n(Js);ql=r(ei,"Processor"),ei.forEach(s),ir.forEach(s),Wa=d(e),Ge=l(e,"P",{});var pr=n(Ge);Tl=r(pr,"For models that support multimodal tasks, \u{1F917} 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\u2019s use the "),Yt=l(pr,"A",{href:!0});var ti=n(Yt);Ml=r(ti,"Wav2Vec2Processor"),ti.forEach(s),Zl=r(pr," for an automatic speech recognition task (ASR). ASR transcribes audio to text, so you will need a feature extractor and a tokenizer."),pr.forEach(s),Va=d(e),Dt=l(e,"P",{});var si=n(Dt);zl=r(si,"Create a feature extractor to handle the audio inputs:"),si.forEach(s),Ra=d(e),E(dt.$$.fragment,e),Fa=d(e),Nt=l(e,"P",{});var ai=n(Nt);Jl=r(ai,"Create a tokenizer to handle the text inputs:"),ai.forEach(s),Ca=d(e),E(ht.$$.fragment,e),Ua=d(e),Xe=l(e,"P",{});var fr=n(Xe);Wl=r(fr,"Combine the feature extractor and tokenizer in "),Qt=l(fr,"A",{href:!0});var ri=n(Qt);Vl=r(ri,"Wav2Vec2Processor"),ri.forEach(s),Rl=r(fr,":"),fr.forEach(s),xa=d(e),E(yt.$$.fragment,e),Ba=d(e),St=l(e,"P",{});var oi=n(St);Fl=r(oi,"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 \u{1F917} 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."),oi.forEach(s),this.h()},h(){y(f,"name","hf:doc:metadata"),y(f,"content",JSON.stringify(qi)),y(g,"id","create-a-custom-architecture"),y(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(g,"href","#create-a-custom-architecture"),y(c,"class","relative group"),y(R,"href","model_doc/auto"),y(me,"id","configuration"),y(me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(me,"href","#configuration"),y(oe,"class","relative group"),y(vt,"href","main_classes/configuration"),y(_t,"href","model_doc/distilbert"),y($t,"href","/docs/transformers/v4.32.0/en/model_doc/distilbert#transformers.DistilBertConfig"),y(wt,"href","/docs/transformers/v4.32.0/en/model_doc/distilbert#transformers.DistilBertConfig"),y(jt,"href","/docs/transformers/v4.32.0/en/model_doc/distilbert#transformers.DistilBertModel"),y(kt,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig.from_pretrained"),y(Et,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig.save_pretrained"),y(qt,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig.from_pretrained"),y(ve,"id","model"),y(ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(ve,"href","#model"),y(ne,"class","relative group"),y(Tt,"href","main_classes/models"),y(Mt,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),y(Ke,"href","https://pytorch.org/docs/stable/generated/torch.nn.Module.html"),y(Ke,"rel","nofollow"),y(Oe,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),y(Oe,"rel","nofollow"),y(et,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),y(et,"rel","nofollow"),y($e,"id","model-heads"),y($e,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y($e,"href","#model-heads"),y(ie,"class","relative group"),y(ke,"id","tokenizer"),y(ke,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(ke,"href","#tokenizer"),y(pe,"class","relative group"),y(Zt,"href","main_classes/tokenizer"),y(Jt,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),y(Wt,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),y(at,"href","https://huggingface.co/docs/tokenizers/python/latest/"),y(at,"rel","nofollow"),y(Rt,"href","/docs/transformers/v4.32.0/en/model_doc/distilbert#transformers.DistilBertTokenizer"),y(Ft,"href","/docs/transformers/v4.32.0/en/model_doc/distilbert#transformers.DistilBertTokenizerFast"),y(We,"id","image-processor"),y(We,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(We,"href","#image-processor"),y(fe,"class","relative group"),y(Ct,"href","/docs/transformers/v4.32.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin"),y(Ut,"href","/docs/transformers/v4.32.0/en/model_doc/vit#transformers.ViTImageProcessor"),y(xt,"href","model_doc/vit"),y(Bt,"href","/docs/transformers/v4.32.0/en/model_doc/vit#transformers.ViTImageProcessor"),y(Ce,"id","feature-extractor"),y(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(Ce,"href","#feature-extractor"),y(ce,"class","relative group"),y(Gt,"href","/docs/transformers/v4.32.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin"),y(Xt,"href","/docs/transformers/v4.32.0/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor"),y(At,"href","/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor"),y(It,"href","model_doc/wav2vec2"),y(Pt,"href","/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor"),y(Be,"id","processor"),y(Be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(Be,"href","#processor"),y(ue,"class","relative group"),y(Yt,"href","/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor"),y(Qt,"href","/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor")},m(e,i){t(document.head,f),p(e,v,i),p(e,c,i),t(c,g),t(g,$),q(b,$,null),t(c,_),t(c,z),t(z,w),p(e,X,i),p(e,j,i),t(j,B),t(j,R),t(R,C),t(C,J),t(j,x),t(j,h),t(h,V),t(j,I),t(j,F),t(F,P),t(j,u),p(e,W,i),p(e,A,i),t(A,N),t(N,ae),t(A,re),t(A,es),t(es,mr),t(A,dr),t(A,ts),t(ts,hr),t(A,yr),t(A,ss),t(ss,gr),t(A,br),t(A,as),t(as,vr),t(A,_r),t(A,rs),t(rs,$r),p(e,Bs,i),p(e,oe,i),t(oe,me),t(me,os),q(Ie,os,null),t(oe,wr),t(oe,ls),t(ls,jr),p(e,Gs,i),p(e,D,i),t(D,kr),t(D,vt),t(vt,Er),t(D,qr),t(D,ns),t(ns,Tr),t(D,Mr),t(D,is),t(is,Zr),t(D,zr),t(D,ps),t(ps,Jr),t(D,Wr),t(D,fs),t(fs,Vr),t(D,Rr),p(e,Xs,i),p(e,K,i),t(K,Fr),t(K,_t),t(_t,Cr),t(K,Ur),t(K,$t),t($t,xr),t(K,Br),p(e,As,i),q(Pe,e,i),p(e,Is,i),p(e,le,i),t(le,wt),t(wt,Gr),t(le,Xr),t(le,jt),t(jt,Ar),t(le,Ir),p(e,Ps,i),p(e,de,i),t(de,Ye),t(Ye,Pr),t(Ye,cs),t(cs,Yr),t(Ye,Dr),t(de,Nr),t(de,De),t(De,Qr),t(De,us),t(us,Sr),t(De,Hr),p(e,Ys,i),q(Ne,e,i),p(e,Ds,i),p(e,he,i),t(he,Lr),t(he,kt),t(kt,Kr),t(he,Or),p(e,Ns,i),q(Qe,e,i),p(e,Qs,i),p(e,ye,i),t(ye,eo),t(ye,Et),t(Et,to),t(ye,so),p(e,Ss,i),q(Se,e,i),p(e,Hs,i),p(e,ge,i),t(ge,ao),t(ge,qt),t(qt,ro),t(ge,oo),p(e,Ls,i),q(He,e,i),p(e,Ks,i),q(be,e,i),p(e,Os,i),p(e,ne,i),t(ne,ve),t(ve,ms),q(Le,ms,null),t(ne,lo),t(ne,ds),t(ds,no),p(e,ea,i),p(e,Y,i),t(Y,io),t(Y,Tt),t(Tt,po),t(Y,fo),t(Y,hs),t(hs,co),t(Y,uo),t(Y,Mt),t(Mt,mo),t(Y,ho),t(Y,Ke),t(Ke,ys),t(ys,yo),t(Y,go),t(Y,Oe),t(Oe,gs),t(gs,bo),t(Y,vo),t(Y,et),t(et,bs),t(bs,_o),t(Y,$o),p(e,ta,i),q(_e,e,i),p(e,sa,i),p(e,ie,i),t(ie,$e),t($e,vs),q(tt,vs,null),t(ie,wo),t(ie,_s),t(_s,jo),p(e,aa,i),p(e,we,i),t(we,ko),t(we,$s),t($s,Eo),t(we,qo),p(e,ra,i),q(je,e,i),p(e,oa,i),p(e,pe,i),t(pe,ke),t(ke,ws),q(st,ws,null),t(pe,To),t(pe,js),t(js,Mo),p(e,la,i),p(e,Ee,i),t(Ee,Zo),t(Ee,Zt),t(Zt,zo),t(Ee,Jo),p(e,na,i),p(e,qe,i),t(qe,zt),t(zt,Jt),t(Jt,Wo),t(zt,Vo),t(qe,Ro),t(qe,O),t(O,Wt),t(Wt,Fo),t(O,Co),t(O,at),t(at,Uo),t(O,xo),t(O,ks),t(ks,Bo),t(O,Go),p(e,ia,i),p(e,Vt,i),t(Vt,Xo),p(e,pa,i),q(Te,e,i),p(e,fa,i),p(e,Me,i),t(Me,Ao),t(Me,Es),t(Es,Io),t(Me,Po),p(e,ca,i),q(rt,e,i),p(e,ua,i),p(e,Ze,i),t(Ze,Yo),t(Ze,Rt),t(Rt,Do),t(Ze,No),p(e,ma,i),q(ot,e,i),p(e,da,i),p(e,ze,i),t(ze,Qo),t(ze,Ft),t(Ft,So),t(ze,Ho),p(e,ha,i),q(lt,e,i),p(e,ya,i),q(Je,e,i),p(e,ga,i),p(e,fe,i),t(fe,We),t(We,qs),q(nt,qs,null),t(fe,Lo),t(fe,Ts),t(Ts,Ko),p(e,ba,i),p(e,Ve,i),t(Ve,Oo),t(Ve,Ct),t(Ct,el),t(Ve,tl),p(e,va,i),p(e,ee,i),t(ee,sl),t(ee,Ut),t(Ut,al),t(ee,rl),t(ee,xt),t(xt,ol),t(ee,ll),p(e,_a,i),q(it,e,i),p(e,$a,i),q(Re,e,i),p(e,wa,i),p(e,Fe,i),t(Fe,nl),t(Fe,Bt),t(Bt,il),t(Fe,pl),p(e,ja,i),q(pt,e,i),p(e,ka,i),p(e,ce,i),t(ce,Ce),t(Ce,Ms),q(ft,Ms,null),t(ce,fl),t(ce,Zs),t(Zs,cl),p(e,Ea,i),p(e,te,i),t(te,ul),t(te,Gt),t(Gt,ml),t(te,dl),t(te,Xt),t(Xt,hl),t(te,yl),p(e,qa,i),p(e,se,i),t(se,gl),t(se,At),t(At,bl),t(se,vl),t(se,It),t(It,_l),t(se,$l),p(e,Ta,i),q(ct,e,i),p(e,Ma,i),q(Ue,e,i),p(e,Za,i),p(e,xe,i),t(xe,wl),t(xe,Pt),t(Pt,jl),t(xe,kl),p(e,za,i),q(ut,e,i),p(e,Ja,i),p(e,ue,i),t(ue,Be),t(Be,zs),q(mt,zs,null),t(ue,El),t(ue,Js),t(Js,ql),p(e,Wa,i),p(e,Ge,i),t(Ge,Tl),t(Ge,Yt),t(Yt,Ml),t(Ge,Zl),p(e,Va,i),p(e,Dt,i),t(Dt,zl),p(e,Ra,i),q(dt,e,i),p(e,Fa,i),p(e,Nt,i),t(Nt,Jl),p(e,Ca,i),q(ht,e,i),p(e,Ua,i),p(e,Xe,i),t(Xe,Wl),t(Xe,Qt),t(Qt,Vl),t(Xe,Rl),p(e,xa,i),q(yt,e,i),p(e,Ba,i),p(e,St,i),t(St,Fl),Ga=!0},p(e,[i]){const gt={};i&2&&(gt.$$scope={dirty:i,ctx:e}),be.$set(gt);const Ws={};i&2&&(Ws.$$scope={dirty:i,ctx:e}),_e.$set(Ws);const Vs={};i&2&&(Vs.$$scope={dirty:i,ctx:e}),je.$set(Vs);const Rs={};i&2&&(Rs.$$scope={dirty:i,ctx:e}),Te.$set(Rs);const L={};i&2&&(L.$$scope={dirty:i,ctx:e}),Je.$set(L);const Fs={};i&2&&(Fs.$$scope={dirty:i,ctx:e}),Re.$set(Fs);const Cs={};i&2&&(Cs.$$scope={dirty:i,ctx:e}),Ue.$set(Cs)},i(e){Ga||(T(b.$$.fragment,e),T(Ie.$$.fragment,e),T(Pe.$$.fragment,e),T(Ne.$$.fragment,e),T(Qe.$$.fragment,e),T(Se.$$.fragment,e),T(He.$$.fragment,e),T(be.$$.fragment,e),T(Le.$$.fragment,e),T(_e.$$.fragment,e),T(tt.$$.fragment,e),T(je.$$.fragment,e),T(st.$$.fragment,e),T(Te.$$.fragment,e),T(rt.$$.fragment,e),T(ot.$$.fragment,e),T(lt.$$.fragment,e),T(Je.$$.fragment,e),T(nt.$$.fragment,e),T(it.$$.fragment,e),T(Re.$$.fragment,e),T(pt.$$.fragment,e),T(ft.$$.fragment,e),T(ct.$$.fragment,e),T(Ue.$$.fragment,e),T(ut.$$.fragment,e),T(mt.$$.fragment,e),T(dt.$$.fragment,e),T(ht.$$.fragment,e),T(yt.$$.fragment,e),Ga=!0)},o(e){M(b.$$.fragment,e),M(Ie.$$.fragment,e),M(Pe.$$.fragment,e),M(Ne.$$.fragment,e),M(Qe.$$.fragment,e),M(Se.$$.fragment,e),M(He.$$.fragment,e),M(be.$$.fragment,e),M(Le.$$.fragment,e),M(_e.$$.fragment,e),M(tt.$$.fragment,e),M(je.$$.fragment,e),M(st.$$.fragment,e),M(Te.$$.fragment,e),M(rt.$$.fragment,e),M(ot.$$.fragment,e),M(lt.$$.fragment,e),M(Je.$$.fragment,e),M(nt.$$.fragment,e),M(it.$$.fragment,e),M(Re.$$.fragment,e),M(pt.$$.fragment,e),M(ft.$$.fragment,e),M(ct.$$.fragment,e),M(Ue.$$.fragment,e),M(ut.$$.fragment,e),M(mt.$$.fragment,e),M(dt.$$.fragment,e),M(ht.$$.fragment,e),M(yt.$$.fragment,e),Ga=!1},d(e){s(f),e&&s(v),e&&s(c),Z(b),e&&s(X),e&&s(j),e&&s(W),e&&s(A),e&&s(Bs),e&&s(oe),Z(Ie),e&&s(Gs),e&&s(D),e&&s(Xs),e&&s(K),e&&s(As),Z(Pe,e),e&&s(Is),e&&s(le),e&&s(Ps),e&&s(de),e&&s(Ys),Z(Ne,e),e&&s(Ds),e&&s(he),e&&s(Ns),Z(Qe,e),e&&s(Qs),e&&s(ye),e&&s(Ss),Z(Se,e),e&&s(Hs),e&&s(ge),e&&s(Ls),Z(He,e),e&&s(Ks),Z(be,e),e&&s(Os),e&&s(ne),Z(Le),e&&s(ea),e&&s(Y),e&&s(ta),Z(_e,e),e&&s(sa),e&&s(ie),Z(tt),e&&s(aa),e&&s(we),e&&s(ra),Z(je,e),e&&s(oa),e&&s(pe),Z(st),e&&s(la),e&&s(Ee),e&&s(na),e&&s(qe),e&&s(ia),e&&s(Vt),e&&s(pa),Z(Te,e),e&&s(fa),e&&s(Me),e&&s(ca),Z(rt,e),e&&s(ua),e&&s(Ze),e&&s(ma),Z(ot,e),e&&s(da),e&&s(ze),e&&s(ha),Z(lt,e),e&&s(ya),Z(Je,e),e&&s(ga),e&&s(fe),Z(nt),e&&s(ba),e&&s(Ve),e&&s(va),e&&s(ee),e&&s(_a),Z(it,e),e&&s($a),Z(Re,e),e&&s(wa),e&&s(Fe),e&&s(ja),Z(pt,e),e&&s(ka),e&&s(ce),Z(ft),e&&s(Ea),e&&s(te),e&&s(qa),e&&s(se),e&&s(Ta),Z(ct,e),e&&s(Ma),Z(Ue,e),e&&s(Za),e&&s(xe),e&&s(za),Z(ut,e),e&&s(Ja),e&&s(ue),Z(mt),e&&s(Wa),e&&s(Ge),e&&s(Va),e&&s(Dt),e&&s(Ra),Z(dt,e),e&&s(Fa),e&&s(Nt),e&&s(Ca),Z(ht,e),e&&s(Ua),e&&s(Xe),e&&s(xa),Z(yt,e),e&&s(Ba),e&&s(St)}}}const qi={local:"create-a-custom-architecture",sections:[{local:"configuration",title:"Configuration"},{local:"model",sections:[{local:"model-heads",title:"Model heads"}],title:"Model"},{local:"tokenizer",title:"Tokenizer"},{local:"image-processor",title:"Image Processor"},{local:"feature-extractor",title:"Feature Extractor"},{local:"processor",title:"Processor"}],title:"Create a custom architecture"};function Ti(U){return ci(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Vi extends ni{constructor(f){super();ii(this,f,Ti,Ei,pi,{})}}export{Vi as default,qi as metadata};
