import{S as zw,i as Cw,s as Bw,e as a,k as c,w,t as n,M as Iw,c as r,d as t,m as p,a as i,x as k,h as s,b as m,G as e,g,y as v,q as M,o as $,B as E,v as Uw,L as Se}from"../../chunks/vendor-hf-doc-builder.js";import{T as at}from"../../chunks/Tip-hf-doc-builder.js";import{D as te}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Xe}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as tt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ve}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as Lc}from"../../chunks/PipelineTag-hf-doc-builder.js";function xw(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERlYmVydGFDb25maWclMkMlMjBEZWJlcnRhTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwRGVCRVJUYSUyMG1pY3Jvc29mdCUyRmRlYmVydGEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBEZWJlcnRhQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMG1pY3Jvc29mdCUyRmRlYmVydGEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwRGViZXJ0YU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DebertaConfig, DebertaModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a DeBERTa microsoft/deberta-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = DebertaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the microsoft/deberta-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Ww(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERlYmVydGFUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBEZWJlcnRhVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZkZWJlcnRhLWJhc2UlMjIpJTBBdG9rZW5pemVyKCUyMkhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBJTBBdG9rZW5pemVyKCUyMiUyMEhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DebertaTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DebertaTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">31414</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">20920</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]`}}),{c(){d=a("p"),b=n("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function qw(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("When used with "),f=a("code"),u=n("is_split_into_words=True"),T=n(", this tokenizer will add a space before each word (even the first one).")},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"When used with "),f=r(h,"CODE",{});var j=i(f);u=s(j,"is_split_into_words=True"),j.forEach(t),T=s(h,", this tokenizer will add a space before each word (even the first one)."),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function Zw(J){let d,b,f,u,T;return u=new Xe({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),b=n("sequence pair mask has the following format:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"sequence pair mask has the following format:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Nw(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERlYmVydGFUb2tlbml6ZXJGYXN0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwRGViZXJ0YVRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtYmFzZSUyMiklMEF0b2tlbml6ZXIoJTIySGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMEF0b2tlbml6ZXIoJTIyJTIwSGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DebertaTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DebertaTokenizerFast.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">31414</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">20920</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]`}}),{c(){d=a("p"),b=n("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Gw(J){let d,b,f,u,T,l,h,j;return{c(){d=a("p"),b=n("When used with "),f=a("code"),u=n("is_split_into_words=True"),T=n(", this tokenizer needs to be instantiated with "),l=a("code"),h=n("add_prefix_space=True"),j=n(".")},l(ae){d=r(ae,"P",{});var Q=i(d);b=s(Q,"When used with "),f=r(Q,"CODE",{});var x=i(f);u=s(x,"is_split_into_words=True"),x.forEach(t),T=s(Q,", this tokenizer needs to be instantiated with "),l=r(Q,"CODE",{});var oe=i(l);h=s(oe,"add_prefix_space=True"),oe.forEach(t),j=s(Q,"."),Q.forEach(t)},m(ae,Q){g(ae,d,Q),e(d,b),e(d,f),e(f,u),e(d,T),e(d,l),e(l,h),e(d,j)},d(ae){ae&&t(d)}}}function Aw(J){let d,b,f,u,T;return u=new Xe({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),b=n("sequence pair mask has the following format:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"sequence pair mask has the following format:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Vw(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function Sw(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBEZWJlcnRhTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMERlYmVydGFNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaModel.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Xw(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function Pw(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBEZWJlcnRhRm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmxzYW5vY2hraW4lMkZkZWJlcnRhLWxhcmdlLWZlZWRiYWNrJTIyKSUwQW1vZGVsJTIwJTNEJTIwRGViZXJ0YUZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJsc2Fub2Noa2luJTJGZGViZXJ0YS1sYXJnZS1mZWVkYmFjayUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlNUJNQVNLJTVEJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RC5ub256ZXJvKGFzX3R1cGxlJTNEVHJ1ZSklNUIwJTVEJTBBJTBBcHJlZGljdGVkX3Rva2VuX2lkJTIwJTNEJTIwbG9naXRzJTVCMCUyQyUyMG1hc2tfdG9rZW5faW5kZXglNUQuYXJnbWF4KGF4aXMlM0QtMSklMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RlZF90b2tlbl9pZCklMEElMEFsYWJlbHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjBQYXJpcy4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUyMyUyMG1hc2slMjBsYWJlbHMlMjBvZiUyMG5vbi0lNUJNQVNLJTVEJTIwdG9rZW5zJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gud2hlcmUoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkJTJDJTIwbGFiZWxzJTJDJTIwLTEwMCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTBBcm91bmQob3V0cHV0cy5sb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;lsanochkin/deberta-large-feedback&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;lsanochkin/deberta-large-feedback&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of [MASK]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = logits[<span class="hljs-number">0</span>, mask_token_index].argmax(axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27; Paris&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-[MASK] tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.54</span>`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Lw(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function Qw(J){let d,b,f,u,T;return u=new Xe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMERlYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRGViZXJ0YUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KCkuaXRlbSgpJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwRGViZXJ0YUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=a("p"),b=n("Example of single-label classification:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example of single-label classification:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Yw(J){let d,b,f,u,T;return u=new Xe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMERlYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRGViZXJ0YUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtYmFzZSUyMiUyQyUyMHByb2JsZW1fdHlwZSUzRCUyMm11bHRpX2xhYmVsX2NsYXNzaWZpY2F0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZHMlMjAlM0QlMjB0b3JjaC5hcmFuZ2UoMCUyQyUyMGxvZ2l0cy5zaGFwZSU1Qi0xJTVEKSU1QnRvcmNoLnNpZ21vaWQobG9naXRzKS5zcXVlZXplKGRpbSUzRDApJTIwJTNFJTIwMC41JTVEJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwRGViZXJ0YUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=a("p"),b=n("Example of multi-label classification:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example of multi-label classification:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Hw(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function Ow(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBEZWJlcnRhRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRGViZXJ0YUZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0Lml0ZW0oKSU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVEJTVEJTBBJTBBbGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Kw(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function ek(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBEZWJlcnRhRm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlBhbGFrJTJGbWljcm9zb2Z0X2RlYmVydGEtbGFyZ2Vfc3F1YWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBEZWJlcnRhRm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMlBhbGFrJTJGbWljcm9zb2Z0X2RlYmVydGEtbGFyZ2Vfc3F1YWQlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RfYW5zd2VyX3Rva2VucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQSUwQSUyMyUyMHRhcmdldCUyMGlzJTIwJTIybmljZSUyMHB1cHBldCUyMiUwQXRhcmdldF9zdGFydF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxMiU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE0JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Palak/microsoft_deberta-large_squad&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;Palak/microsoft_deberta-large_squad&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27; a nice puppet&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">12</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">14</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.14</span>`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function tk(J){let d,b,f,u,T,l,h,j,ae,Q,x,oe,se,D,ve,L,Me,_e,Z,$e,de,Y,Ee,be,X,De,Te,P,Fe,ye,ne,z,C,ce,H,Je,we,W,je,pe,B,Re,A,ze,Ce,V,Be,Ie,q,re,N,fe,K,I,ue,U,ke,me;return{c(){d=a("p"),b=n("TensorFlow models and layers in "),f=a("code"),u=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),j=a("li"),ae=n("having all inputs as keyword arguments (like PyTorch models), or"),Q=c(),x=a("li"),oe=n("having all inputs as a list, tuple or dict in the first positional argument."),se=c(),D=a("p"),ve=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=a("code"),Me=n("model.fit()"),_e=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),$e=n("model.fit()"),de=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=a("code"),Ee=n("fit()"),be=n(" and "),X=a("code"),De=n("predict()"),Te=n(`, such as when creating your own layers or models with
the Keras `),P=a("code"),Fe=n("Functional"),ye=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),z=a("ul"),C=a("li"),ce=n("a single Tensor with "),H=a("code"),Je=n("input_ids"),we=n(" only and nothing else: "),W=a("code"),je=n("model(input_ids)"),pe=c(),B=a("li"),Re=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=a("code"),ze=n("model([input_ids, attention_mask])"),Ce=n(" or "),V=a("code"),Be=n("model([input_ids, attention_mask, token_type_ids])"),Ie=c(),q=a("li"),re=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=a("code"),fe=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=c(),I=a("p"),ue=n(`Note that when creating models and layers with
`),U=a("a"),ke=n("subclassing"),me=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=r(y,"P",{});var F=i(d);b=s(F,"TensorFlow models and layers in "),f=r(F,"CODE",{});var We=i(f);u=s(We,"transformers"),We.forEach(t),T=s(F," accept two formats as input:"),F.forEach(t),l=p(y),h=r(y,"UL",{});var ie=i(h);j=r(ie,"LI",{});var le=i(j);ae=s(le,"having all inputs as keyword arguments (like PyTorch models), or"),le.forEach(t),Q=p(ie),x=r(ie,"LI",{});var qe=i(x);oe=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ie.forEach(t),se=p(y),D=r(y,"P",{});var R=i(D);ve=s(R,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=r(R,"CODE",{});var Ze=i(L);Me=s(Ze,"model.fit()"),Ze.forEach(t),_e=s(R,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(R,"CODE",{});var Pe=i(Z);$e=s(Pe,"model.fit()"),Pe.forEach(t),de=s(R,` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=r(R,"CODE",{});var Le=i(Y);Ee=s(Le,"fit()"),Le.forEach(t),be=s(R," and "),X=r(R,"CODE",{});var Qe=i(X);De=s(Qe,"predict()"),Qe.forEach(t),Te=s(R,`, such as when creating your own layers or models with
the Keras `),P=r(R,"CODE",{});var Ne=i(P);Fe=s(Ne,"Functional"),Ne.forEach(t),ye=s(R,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),R.forEach(t),ne=p(y),z=r(y,"UL",{});var G=i(z);C=r(G,"LI",{});var S=i(C);ce=s(S,"a single Tensor with "),H=r(S,"CODE",{});var Ye=i(H);Je=s(Ye,"input_ids"),Ye.forEach(t),we=s(S," only and nothing else: "),W=r(S,"CODE",{});var He=i(W);je=s(He,"model(input_ids)"),He.forEach(t),S.forEach(t),pe=p(G),B=r(G,"LI",{});var O=i(B);Re=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=r(O,"CODE",{});var ge=i(A);ze=s(ge,"model([input_ids, attention_mask])"),ge.forEach(t),Ce=s(O," or "),V=r(O,"CODE",{});var Ae=i(V);Be=s(Ae,"model([input_ids, attention_mask, token_type_ids])"),Ae.forEach(t),O.forEach(t),Ie=p(G),q=r(G,"LI",{});var Ue=i(q);re=s(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=r(Ue,"CODE",{});var Oe=i(N);fe=s(Oe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Oe.forEach(t),Ue.forEach(t),G.forEach(t),K=p(y),I=r(y,"P",{});var ee=i(I);ue=s(ee,`Note that when creating models and layers with
`),U=r(ee,"A",{href:!0,rel:!0});var Ke=i(U);ke=s(Ke,"subclassing"),Ke.forEach(t),me=s(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){m(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(U,"rel","nofollow")},m(y,F){g(y,d,F),e(d,b),e(d,f),e(f,u),e(d,T),g(y,l,F),g(y,h,F),e(h,j),e(j,ae),e(h,Q),e(h,x),e(x,oe),g(y,se,F),g(y,D,F),e(D,ve),e(D,L),e(L,Me),e(D,_e),e(D,Z),e(Z,$e),e(D,de),e(D,Y),e(Y,Ee),e(D,be),e(D,X),e(X,De),e(D,Te),e(D,P),e(P,Fe),e(D,ye),g(y,ne,F),g(y,z,F),e(z,C),e(C,ce),e(C,H),e(H,Je),e(C,we),e(C,W),e(W,je),e(z,pe),e(z,B),e(B,Re),e(B,A),e(A,ze),e(B,Ce),e(B,V),e(V,Be),e(z,Ie),e(z,q),e(q,re),e(q,N),e(N,fe),g(y,K,F),g(y,I,F),e(I,ue),e(I,U),e(U,ke),e(I,me)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(se),y&&t(D),y&&t(ne),y&&t(z),y&&t(K),y&&t(I)}}}function ok(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function nk(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIya2FtYWxrcmFqJTJGZGViZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWJlcnRhTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmthbWFsa3JhaiUyRmRlYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaModel.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function sk(J){let d,b,f,u,T,l,h,j,ae,Q,x,oe,se,D,ve,L,Me,_e,Z,$e,de,Y,Ee,be,X,De,Te,P,Fe,ye,ne,z,C,ce,H,Je,we,W,je,pe,B,Re,A,ze,Ce,V,Be,Ie,q,re,N,fe,K,I,ue,U,ke,me;return{c(){d=a("p"),b=n("TensorFlow models and layers in "),f=a("code"),u=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),j=a("li"),ae=n("having all inputs as keyword arguments (like PyTorch models), or"),Q=c(),x=a("li"),oe=n("having all inputs as a list, tuple or dict in the first positional argument."),se=c(),D=a("p"),ve=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=a("code"),Me=n("model.fit()"),_e=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),$e=n("model.fit()"),de=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=a("code"),Ee=n("fit()"),be=n(" and "),X=a("code"),De=n("predict()"),Te=n(`, such as when creating your own layers or models with
the Keras `),P=a("code"),Fe=n("Functional"),ye=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),z=a("ul"),C=a("li"),ce=n("a single Tensor with "),H=a("code"),Je=n("input_ids"),we=n(" only and nothing else: "),W=a("code"),je=n("model(input_ids)"),pe=c(),B=a("li"),Re=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=a("code"),ze=n("model([input_ids, attention_mask])"),Ce=n(" or "),V=a("code"),Be=n("model([input_ids, attention_mask, token_type_ids])"),Ie=c(),q=a("li"),re=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=a("code"),fe=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=c(),I=a("p"),ue=n(`Note that when creating models and layers with
`),U=a("a"),ke=n("subclassing"),me=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=r(y,"P",{});var F=i(d);b=s(F,"TensorFlow models and layers in "),f=r(F,"CODE",{});var We=i(f);u=s(We,"transformers"),We.forEach(t),T=s(F," accept two formats as input:"),F.forEach(t),l=p(y),h=r(y,"UL",{});var ie=i(h);j=r(ie,"LI",{});var le=i(j);ae=s(le,"having all inputs as keyword arguments (like PyTorch models), or"),le.forEach(t),Q=p(ie),x=r(ie,"LI",{});var qe=i(x);oe=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ie.forEach(t),se=p(y),D=r(y,"P",{});var R=i(D);ve=s(R,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=r(R,"CODE",{});var Ze=i(L);Me=s(Ze,"model.fit()"),Ze.forEach(t),_e=s(R,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(R,"CODE",{});var Pe=i(Z);$e=s(Pe,"model.fit()"),Pe.forEach(t),de=s(R,` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=r(R,"CODE",{});var Le=i(Y);Ee=s(Le,"fit()"),Le.forEach(t),be=s(R," and "),X=r(R,"CODE",{});var Qe=i(X);De=s(Qe,"predict()"),Qe.forEach(t),Te=s(R,`, such as when creating your own layers or models with
the Keras `),P=r(R,"CODE",{});var Ne=i(P);Fe=s(Ne,"Functional"),Ne.forEach(t),ye=s(R,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),R.forEach(t),ne=p(y),z=r(y,"UL",{});var G=i(z);C=r(G,"LI",{});var S=i(C);ce=s(S,"a single Tensor with "),H=r(S,"CODE",{});var Ye=i(H);Je=s(Ye,"input_ids"),Ye.forEach(t),we=s(S," only and nothing else: "),W=r(S,"CODE",{});var He=i(W);je=s(He,"model(input_ids)"),He.forEach(t),S.forEach(t),pe=p(G),B=r(G,"LI",{});var O=i(B);Re=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=r(O,"CODE",{});var ge=i(A);ze=s(ge,"model([input_ids, attention_mask])"),ge.forEach(t),Ce=s(O," or "),V=r(O,"CODE",{});var Ae=i(V);Be=s(Ae,"model([input_ids, attention_mask, token_type_ids])"),Ae.forEach(t),O.forEach(t),Ie=p(G),q=r(G,"LI",{});var Ue=i(q);re=s(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=r(Ue,"CODE",{});var Oe=i(N);fe=s(Oe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Oe.forEach(t),Ue.forEach(t),G.forEach(t),K=p(y),I=r(y,"P",{});var ee=i(I);ue=s(ee,`Note that when creating models and layers with
`),U=r(ee,"A",{href:!0,rel:!0});var Ke=i(U);ke=s(Ke,"subclassing"),Ke.forEach(t),me=s(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){m(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(U,"rel","nofollow")},m(y,F){g(y,d,F),e(d,b),e(d,f),e(f,u),e(d,T),g(y,l,F),g(y,h,F),e(h,j),e(j,ae),e(h,Q),e(h,x),e(x,oe),g(y,se,F),g(y,D,F),e(D,ve),e(D,L),e(L,Me),e(D,_e),e(D,Z),e(Z,$e),e(D,de),e(D,Y),e(Y,Ee),e(D,be),e(D,X),e(X,De),e(D,Te),e(D,P),e(P,Fe),e(D,ye),g(y,ne,F),g(y,z,F),e(z,C),e(C,ce),e(C,H),e(H,Je),e(C,we),e(C,W),e(W,je),e(z,pe),e(z,B),e(B,Re),e(B,A),e(A,ze),e(B,Ce),e(B,V),e(V,Be),e(z,Ie),e(z,q),e(q,re),e(q,N),e(N,fe),g(y,K,F),g(y,I,F),e(I,ue),e(I,U),e(U,ke),e(I,me)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(se),y&&t(D),y&&t(ne),y&&t(z),y&&t(K),y&&t(I)}}}function ak(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function rk(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFGb3JNYXNrZWRMTSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIya2FtYWxrcmFqJTJGZGViZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWJlcnRhRm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmthbWFsa3JhaiUyRmRlYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMHJldHJpZXZlJTIwaW5kZXglMjBvZiUyMCU1Qk1BU0slNUQlMEFtYXNrX3Rva2VuX2luZGV4JTIwJTNEJTIwdGYud2hlcmUoKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCklNUIwJTVEKSUwQXNlbGVjdGVkX2xvZ2l0cyUyMCUzRCUyMHRmLmdhdGhlcl9uZChsb2dpdHMlNUIwJTVEJTJDJTIwaW5kaWNlcyUzRG1hc2tfdG9rZW5faW5kZXgpJTBBJTBBcHJlZGljdGVkX3Rva2VuX2lkJTIwJTNEJTIwdGYubWF0aC5hcmdtYXgoc2VsZWN0ZWRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of [MASK]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>selected_logits = tf.gather_nd(logits[<span class="hljs-number">0</span>], indices=mask_token_index)

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function ik(J){let d,b;return d=new Xe({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRmLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-[MASK] tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){w(d.$$.fragment)},l(f){k(d.$$.fragment,f)},m(f,u){v(d,f,u),b=!0},p:Se,i(f){b||(M(d.$$.fragment,f),b=!0)},o(f){$(d.$$.fragment,f),b=!1},d(f){E(d,f)}}}function lk(J){let d,b,f,u,T,l,h,j,ae,Q,x,oe,se,D,ve,L,Me,_e,Z,$e,de,Y,Ee,be,X,De,Te,P,Fe,ye,ne,z,C,ce,H,Je,we,W,je,pe,B,Re,A,ze,Ce,V,Be,Ie,q,re,N,fe,K,I,ue,U,ke,me;return{c(){d=a("p"),b=n("TensorFlow models and layers in "),f=a("code"),u=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),j=a("li"),ae=n("having all inputs as keyword arguments (like PyTorch models), or"),Q=c(),x=a("li"),oe=n("having all inputs as a list, tuple or dict in the first positional argument."),se=c(),D=a("p"),ve=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=a("code"),Me=n("model.fit()"),_e=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),$e=n("model.fit()"),de=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=a("code"),Ee=n("fit()"),be=n(" and "),X=a("code"),De=n("predict()"),Te=n(`, such as when creating your own layers or models with
the Keras `),P=a("code"),Fe=n("Functional"),ye=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),z=a("ul"),C=a("li"),ce=n("a single Tensor with "),H=a("code"),Je=n("input_ids"),we=n(" only and nothing else: "),W=a("code"),je=n("model(input_ids)"),pe=c(),B=a("li"),Re=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=a("code"),ze=n("model([input_ids, attention_mask])"),Ce=n(" or "),V=a("code"),Be=n("model([input_ids, attention_mask, token_type_ids])"),Ie=c(),q=a("li"),re=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=a("code"),fe=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=c(),I=a("p"),ue=n(`Note that when creating models and layers with
`),U=a("a"),ke=n("subclassing"),me=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=r(y,"P",{});var F=i(d);b=s(F,"TensorFlow models and layers in "),f=r(F,"CODE",{});var We=i(f);u=s(We,"transformers"),We.forEach(t),T=s(F," accept two formats as input:"),F.forEach(t),l=p(y),h=r(y,"UL",{});var ie=i(h);j=r(ie,"LI",{});var le=i(j);ae=s(le,"having all inputs as keyword arguments (like PyTorch models), or"),le.forEach(t),Q=p(ie),x=r(ie,"LI",{});var qe=i(x);oe=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ie.forEach(t),se=p(y),D=r(y,"P",{});var R=i(D);ve=s(R,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=r(R,"CODE",{});var Ze=i(L);Me=s(Ze,"model.fit()"),Ze.forEach(t),_e=s(R,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(R,"CODE",{});var Pe=i(Z);$e=s(Pe,"model.fit()"),Pe.forEach(t),de=s(R,` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=r(R,"CODE",{});var Le=i(Y);Ee=s(Le,"fit()"),Le.forEach(t),be=s(R," and "),X=r(R,"CODE",{});var Qe=i(X);De=s(Qe,"predict()"),Qe.forEach(t),Te=s(R,`, such as when creating your own layers or models with
the Keras `),P=r(R,"CODE",{});var Ne=i(P);Fe=s(Ne,"Functional"),Ne.forEach(t),ye=s(R,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),R.forEach(t),ne=p(y),z=r(y,"UL",{});var G=i(z);C=r(G,"LI",{});var S=i(C);ce=s(S,"a single Tensor with "),H=r(S,"CODE",{});var Ye=i(H);Je=s(Ye,"input_ids"),Ye.forEach(t),we=s(S," only and nothing else: "),W=r(S,"CODE",{});var He=i(W);je=s(He,"model(input_ids)"),He.forEach(t),S.forEach(t),pe=p(G),B=r(G,"LI",{});var O=i(B);Re=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=r(O,"CODE",{});var ge=i(A);ze=s(ge,"model([input_ids, attention_mask])"),ge.forEach(t),Ce=s(O," or "),V=r(O,"CODE",{});var Ae=i(V);Be=s(Ae,"model([input_ids, attention_mask, token_type_ids])"),Ae.forEach(t),O.forEach(t),Ie=p(G),q=r(G,"LI",{});var Ue=i(q);re=s(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=r(Ue,"CODE",{});var Oe=i(N);fe=s(Oe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Oe.forEach(t),Ue.forEach(t),G.forEach(t),K=p(y),I=r(y,"P",{});var ee=i(I);ue=s(ee,`Note that when creating models and layers with
`),U=r(ee,"A",{href:!0,rel:!0});var Ke=i(U);ke=s(Ke,"subclassing"),Ke.forEach(t),me=s(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){m(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(U,"rel","nofollow")},m(y,F){g(y,d,F),e(d,b),e(d,f),e(f,u),e(d,T),g(y,l,F),g(y,h,F),e(h,j),e(j,ae),e(h,Q),e(h,x),e(x,oe),g(y,se,F),g(y,D,F),e(D,ve),e(D,L),e(L,Me),e(D,_e),e(D,Z),e(Z,$e),e(D,de),e(D,Y),e(Y,Ee),e(D,be),e(D,X),e(X,De),e(D,Te),e(D,P),e(P,Fe),e(D,ye),g(y,ne,F),g(y,z,F),e(z,C),e(C,ce),e(C,H),e(H,Je),e(C,we),e(C,W),e(W,je),e(z,pe),e(z,B),e(B,Re),e(B,A),e(A,ze),e(B,Ce),e(B,V),e(V,Be),e(z,Ie),e(z,q),e(q,re),e(q,N),e(N,fe),g(y,K,F),g(y,I,F),e(I,ue),e(I,U),e(U,ke),e(I,me)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(se),y&&t(D),y&&t(ne),y&&t(z),y&&t(K),y&&t(I)}}}function dk(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function ck(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkRlYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function pk(J){let d,b;return d=new Xe({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWJlcnRhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIya2FtYWxrcmFqJTJGZGViZXJ0YS1iYXNlJTIyJTJDJTIwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdGYuY29uc3RhbnQoMSklMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3M=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on `num_labels` classes, you can pass `num_labels=num_labels` to `.from_pretrained(...)`</span>\n<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)\n<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>, num_labels=num_labels)\n\n<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)\n<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss'}}),{c(){w(d.$$.fragment)},l(f){k(d.$$.fragment,f)},m(f,u){v(d,f,u),b=!0},p:Se,i(f){b||(M(d.$$.fragment,f),b=!0)},o(f){$(d.$$.fragment,f),b=!1},d(f){E(d,f)}}}function hk(J){let d,b,f,u,T,l,h,j,ae,Q,x,oe,se,D,ve,L,Me,_e,Z,$e,de,Y,Ee,be,X,De,Te,P,Fe,ye,ne,z,C,ce,H,Je,we,W,je,pe,B,Re,A,ze,Ce,V,Be,Ie,q,re,N,fe,K,I,ue,U,ke,me;return{c(){d=a("p"),b=n("TensorFlow models and layers in "),f=a("code"),u=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),j=a("li"),ae=n("having all inputs as keyword arguments (like PyTorch models), or"),Q=c(),x=a("li"),oe=n("having all inputs as a list, tuple or dict in the first positional argument."),se=c(),D=a("p"),ve=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=a("code"),Me=n("model.fit()"),_e=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),$e=n("model.fit()"),de=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=a("code"),Ee=n("fit()"),be=n(" and "),X=a("code"),De=n("predict()"),Te=n(`, such as when creating your own layers or models with
the Keras `),P=a("code"),Fe=n("Functional"),ye=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),z=a("ul"),C=a("li"),ce=n("a single Tensor with "),H=a("code"),Je=n("input_ids"),we=n(" only and nothing else: "),W=a("code"),je=n("model(input_ids)"),pe=c(),B=a("li"),Re=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=a("code"),ze=n("model([input_ids, attention_mask])"),Ce=n(" or "),V=a("code"),Be=n("model([input_ids, attention_mask, token_type_ids])"),Ie=c(),q=a("li"),re=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=a("code"),fe=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=c(),I=a("p"),ue=n(`Note that when creating models and layers with
`),U=a("a"),ke=n("subclassing"),me=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=r(y,"P",{});var F=i(d);b=s(F,"TensorFlow models and layers in "),f=r(F,"CODE",{});var We=i(f);u=s(We,"transformers"),We.forEach(t),T=s(F," accept two formats as input:"),F.forEach(t),l=p(y),h=r(y,"UL",{});var ie=i(h);j=r(ie,"LI",{});var le=i(j);ae=s(le,"having all inputs as keyword arguments (like PyTorch models), or"),le.forEach(t),Q=p(ie),x=r(ie,"LI",{});var qe=i(x);oe=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ie.forEach(t),se=p(y),D=r(y,"P",{});var R=i(D);ve=s(R,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=r(R,"CODE",{});var Ze=i(L);Me=s(Ze,"model.fit()"),Ze.forEach(t),_e=s(R,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(R,"CODE",{});var Pe=i(Z);$e=s(Pe,"model.fit()"),Pe.forEach(t),de=s(R,` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=r(R,"CODE",{});var Le=i(Y);Ee=s(Le,"fit()"),Le.forEach(t),be=s(R," and "),X=r(R,"CODE",{});var Qe=i(X);De=s(Qe,"predict()"),Qe.forEach(t),Te=s(R,`, such as when creating your own layers or models with
the Keras `),P=r(R,"CODE",{});var Ne=i(P);Fe=s(Ne,"Functional"),Ne.forEach(t),ye=s(R,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),R.forEach(t),ne=p(y),z=r(y,"UL",{});var G=i(z);C=r(G,"LI",{});var S=i(C);ce=s(S,"a single Tensor with "),H=r(S,"CODE",{});var Ye=i(H);Je=s(Ye,"input_ids"),Ye.forEach(t),we=s(S," only and nothing else: "),W=r(S,"CODE",{});var He=i(W);je=s(He,"model(input_ids)"),He.forEach(t),S.forEach(t),pe=p(G),B=r(G,"LI",{});var O=i(B);Re=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=r(O,"CODE",{});var ge=i(A);ze=s(ge,"model([input_ids, attention_mask])"),ge.forEach(t),Ce=s(O," or "),V=r(O,"CODE",{});var Ae=i(V);Be=s(Ae,"model([input_ids, attention_mask, token_type_ids])"),Ae.forEach(t),O.forEach(t),Ie=p(G),q=r(G,"LI",{});var Ue=i(q);re=s(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=r(Ue,"CODE",{});var Oe=i(N);fe=s(Oe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Oe.forEach(t),Ue.forEach(t),G.forEach(t),K=p(y),I=r(y,"P",{});var ee=i(I);ue=s(ee,`Note that when creating models and layers with
`),U=r(ee,"A",{href:!0,rel:!0});var Ke=i(U);ke=s(Ke,"subclassing"),Ke.forEach(t),me=s(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){m(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(U,"rel","nofollow")},m(y,F){g(y,d,F),e(d,b),e(d,f),e(f,u),e(d,T),g(y,l,F),g(y,h,F),e(h,j),e(j,ae),e(h,Q),e(h,x),e(x,oe),g(y,se,F),g(y,D,F),e(D,ve),e(D,L),e(L,Me),e(D,_e),e(D,Z),e(Z,$e),e(D,de),e(D,Y),e(Y,Ee),e(D,be),e(D,X),e(X,De),e(D,Te),e(D,P),e(P,Fe),e(D,ye),g(y,ne,F),g(y,z,F),e(z,C),e(C,ce),e(C,H),e(H,Je),e(C,we),e(C,W),e(W,je),e(z,pe),e(z,B),e(B,Re),e(B,A),e(A,ze),e(B,Ce),e(B,V),e(V,Be),e(z,Ie),e(z,q),e(q,re),e(q,N),e(N,fe),g(y,K,F),g(y,I,F),e(I,ue),e(I,U),e(U,ke),e(I,me)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(se),y&&t(D),y&&t(ne),y&&t(z),y&&t(K),y&&t(I)}}}function mk(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function fk(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkRlYmVydGFGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIlMEEpJTBBJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQXByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMjAlM0QlMjB0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQlNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RC5udW1weSgpLnRvbGlzdCgpJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function uk(J){let d,b;return d=new Xe({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`}}),{c(){w(d.$$.fragment)},l(f){k(d.$$.fragment,f)},m(f,u){v(d,f,u),b=!0},p:Se,i(f){b||(M(d.$$.fragment,f),b=!0)},o(f){$(d.$$.fragment,f),b=!1},d(f){E(d,f)}}}function gk(J){let d,b,f,u,T,l,h,j,ae,Q,x,oe,se,D,ve,L,Me,_e,Z,$e,de,Y,Ee,be,X,De,Te,P,Fe,ye,ne,z,C,ce,H,Je,we,W,je,pe,B,Re,A,ze,Ce,V,Be,Ie,q,re,N,fe,K,I,ue,U,ke,me;return{c(){d=a("p"),b=n("TensorFlow models and layers in "),f=a("code"),u=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),j=a("li"),ae=n("having all inputs as keyword arguments (like PyTorch models), or"),Q=c(),x=a("li"),oe=n("having all inputs as a list, tuple or dict in the first positional argument."),se=c(),D=a("p"),ve=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=a("code"),Me=n("model.fit()"),_e=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),$e=n("model.fit()"),de=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=a("code"),Ee=n("fit()"),be=n(" and "),X=a("code"),De=n("predict()"),Te=n(`, such as when creating your own layers or models with
the Keras `),P=a("code"),Fe=n("Functional"),ye=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),z=a("ul"),C=a("li"),ce=n("a single Tensor with "),H=a("code"),Je=n("input_ids"),we=n(" only and nothing else: "),W=a("code"),je=n("model(input_ids)"),pe=c(),B=a("li"),Re=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=a("code"),ze=n("model([input_ids, attention_mask])"),Ce=n(" or "),V=a("code"),Be=n("model([input_ids, attention_mask, token_type_ids])"),Ie=c(),q=a("li"),re=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=a("code"),fe=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=c(),I=a("p"),ue=n(`Note that when creating models and layers with
`),U=a("a"),ke=n("subclassing"),me=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=r(y,"P",{});var F=i(d);b=s(F,"TensorFlow models and layers in "),f=r(F,"CODE",{});var We=i(f);u=s(We,"transformers"),We.forEach(t),T=s(F," accept two formats as input:"),F.forEach(t),l=p(y),h=r(y,"UL",{});var ie=i(h);j=r(ie,"LI",{});var le=i(j);ae=s(le,"having all inputs as keyword arguments (like PyTorch models), or"),le.forEach(t),Q=p(ie),x=r(ie,"LI",{});var qe=i(x);oe=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ie.forEach(t),se=p(y),D=r(y,"P",{});var R=i(D);ve=s(R,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),L=r(R,"CODE",{});var Ze=i(L);Me=s(Ze,"model.fit()"),Ze.forEach(t),_e=s(R,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(R,"CODE",{});var Pe=i(Z);$e=s(Pe,"model.fit()"),Pe.forEach(t),de=s(R,` supports! If, however, you want to use the second
format outside of Keras methods like `),Y=r(R,"CODE",{});var Le=i(Y);Ee=s(Le,"fit()"),Le.forEach(t),be=s(R," and "),X=r(R,"CODE",{});var Qe=i(X);De=s(Qe,"predict()"),Qe.forEach(t),Te=s(R,`, such as when creating your own layers or models with
the Keras `),P=r(R,"CODE",{});var Ne=i(P);Fe=s(Ne,"Functional"),Ne.forEach(t),ye=s(R,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),R.forEach(t),ne=p(y),z=r(y,"UL",{});var G=i(z);C=r(G,"LI",{});var S=i(C);ce=s(S,"a single Tensor with "),H=r(S,"CODE",{});var Ye=i(H);Je=s(Ye,"input_ids"),Ye.forEach(t),we=s(S," only and nothing else: "),W=r(S,"CODE",{});var He=i(W);je=s(He,"model(input_ids)"),He.forEach(t),S.forEach(t),pe=p(G),B=r(G,"LI",{});var O=i(B);Re=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),A=r(O,"CODE",{});var ge=i(A);ze=s(ge,"model([input_ids, attention_mask])"),ge.forEach(t),Ce=s(O," or "),V=r(O,"CODE",{});var Ae=i(V);Be=s(Ae,"model([input_ids, attention_mask, token_type_ids])"),Ae.forEach(t),O.forEach(t),Ie=p(G),q=r(G,"LI",{});var Ue=i(q);re=s(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),N=r(Ue,"CODE",{});var Oe=i(N);fe=s(Oe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Oe.forEach(t),Ue.forEach(t),G.forEach(t),K=p(y),I=r(y,"P",{});var ee=i(I);ue=s(ee,`Note that when creating models and layers with
`),U=r(ee,"A",{href:!0,rel:!0});var Ke=i(U);ke=s(Ke,"subclassing"),Ke.forEach(t),me=s(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){m(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(U,"rel","nofollow")},m(y,F){g(y,d,F),e(d,b),e(d,f),e(f,u),e(d,T),g(y,l,F),g(y,h,F),e(h,j),e(j,ae),e(h,Q),e(h,x),e(x,oe),g(y,se,F),g(y,D,F),e(D,ve),e(D,L),e(L,Me),e(D,_e),e(D,Z),e(Z,$e),e(D,de),e(D,Y),e(Y,Ee),e(D,be),e(D,X),e(X,De),e(D,Te),e(D,P),e(P,Fe),e(D,ye),g(y,ne,F),g(y,z,F),e(z,C),e(C,ce),e(C,H),e(H,Je),e(C,we),e(C,W),e(W,je),e(z,pe),e(z,B),e(B,Re),e(B,A),e(A,ze),e(B,Ce),e(B,V),e(V,Be),e(z,Ie),e(z,q),e(q,re),e(q,N),e(N,fe),g(y,K,F),g(y,I,F),e(I,ue),e(I,U),e(U,ke),e(I,me)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(se),y&&t(D),y&&t(ne),y&&t(z),y&&t(K),y&&t(I)}}}function _k(J){let d,b,f,u,T;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var j=i(f);u=s(j,"Module"),j.forEach(t),T=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,b),e(d,f),e(f,u),e(d,T)},d(l){l&&t(d)}}}function bk(J){let d,b,f,u,T;return u=new Xe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIya2FtYWxrcmFqJTJGZGViZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWJlcnRhRm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmthbWFsa3JhaiUyRmRlYmVydGEtYmFzZSUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgob3V0cHV0cy5zdGFydF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEFhbnN3ZXJfZW5kX2luZGV4JTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KG91dHB1dHMuZW5kX2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.start_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.end_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]`}}),{c(){d=a("p"),b=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);b=s(h,"Example:"),h.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,b),g(l,f,h),v(u,l,h),T=!0},p:Se,i(l){T||(M(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Tk(J){let d,b;return d=new Xe({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)`}}),{c(){w(d.$$.fragment)},l(f){k(d.$$.fragment,f)},m(f,u){v(d,f,u),b=!0},p:Se,i(f){b||(M(d.$$.fragment,f),b=!0)},o(f){$(d.$$.fragment,f),b=!1},d(f){E(d,f)}}}function yk(J){let d,b,f,u,T,l,h,j,ae,Q,x,oe,se,D,ve,L,Me,_e,Z,$e,de,Y,Ee,be,X,De,Te,P,Fe,ye,ne,z,C,ce,H,Je,we,W,je,pe,B,Re,A,ze,Ce,V,Be,Ie,q,re,N,fe,K,I,ue,U,ke,me,y,F,We,ie,le,qe,R,Ze,Pe,Le,Qe,Ne,G,S,Ye,He,O,ge,Ae,Ue,Oe,ee,Ke,Qc,os,Yc,Hc,Oc,Wt,vr,Kc,ep,ns,tp,op,ss,np,sp,ap,ki,Mr,rp,kd,as,vd,pt,qt,$r,ip,lp,rs,dp,cp,is,pp,hp,mp,Zt,Er,fp,up,ls,gp,_p,ds,bp,Tp,yp,Dr,cs,wp,kp,vp,Fr,ps,Mp,$p,Ep,vi,Jr,Dp,Md,hs,$d,kt,Nt,jr,Fp,Jp,ms,jp,Rp,fs,zp,Cp,Bp,Gt,Rr,Ip,Up,us,xp,Wp,gs,qp,Zp,Np,zr,_s,Gp,Ap,Vp,Mi,Cr,Sp,Ed,bs,Dd,vt,At,Br,Xp,Pp,Ts,Lp,Qp,ys,Yp,Hp,Op,Vt,Ir,Kp,eh,ws,th,oh,ks,nh,sh,ah,Ur,vs,rh,ih,lh,$i,xr,dh,Fd,io,Go,Ei,Ms,ch,Di,ph,Jd,_t,$s,hh,It,mh,Wr,fh,uh,qr,gh,_h,Es,bh,Th,yh,lo,wh,Zr,kh,vh,Nr,Mh,$h,Eh,Ao,jd,co,Vo,Fi,Ds,Dh,Ji,Fh,Rd,he,Fs,Jh,ji,jh,Rh,Ri,zh,Ch,So,Bh,Js,Ih,zi,Uh,xh,Wh,Xo,qh,js,Zh,Gr,Nh,Gh,Ah,St,Rs,Vh,Ci,Sh,Xh,zs,Bi,Ph,Lh,Ii,Qh,Yh,Po,Cs,Hh,po,Oh,Ui,Kh,em,xi,tm,om,nm,Mt,Bs,sm,Wi,am,rm,Lo,im,ho,lm,qi,dm,cm,Zi,pm,hm,mm,Ar,Is,zd,mo,Qo,Ni,Us,fm,Gi,um,Cd,xe,xs,gm,Ws,_m,Ai,bm,Tm,ym,Vi,wm,km,Yo,vm,qs,Mm,Si,$m,Em,Dm,Ho,Fm,Zs,Jm,Vr,jm,Rm,zm,Xt,Ns,Cm,Xi,Bm,Im,Gs,Pi,Um,xm,Li,Wm,qm,$t,As,Zm,Qi,Nm,Gm,Oo,Am,fo,Vm,Yi,Sm,Xm,Hi,Pm,Lm,Bd,uo,Ko,Oi,Vs,Qm,Ki,Ym,Id,bt,Ss,Hm,Xs,Om,Ps,Km,ef,tf,Ls,of,Qs,nf,sf,af,Et,Ys,rf,go,lf,Sr,df,cf,el,pf,hf,mf,en,ff,tn,Ud,_o,on,tl,Hs,uf,ol,gf,xd,bo,Os,_f,nl,bf,Wd,To,nn,sl,Ks,Tf,al,yf,qd,Tt,ea,wf,yo,kf,rl,vf,Mf,ta,$f,Ef,Df,oa,Ff,na,Jf,jf,Rf,Dt,sa,zf,wo,Cf,Xr,Bf,If,il,Uf,xf,Wf,sn,qf,an,Zd,ko,rn,ll,aa,Zf,dl,Nf,Nd,rt,ra,Gf,cl,Af,Vf,ia,Sf,la,Xf,Pf,Lf,da,Qf,ca,Yf,Hf,Of,ht,pa,Kf,vo,eu,Pr,tu,ou,pl,nu,su,au,ln,ru,dn,iu,cn,Gd,Mo,pn,hl,ha,lu,ml,du,Ad,it,ma,cu,fl,pu,hu,fa,mu,ua,fu,uu,gu,ga,_u,_a,bu,Tu,yu,Ft,ba,wu,$o,ku,Lr,vu,Mu,ul,$u,Eu,Du,hn,Fu,mn,Vd,Eo,fn,gl,Ta,Ju,_l,ju,Sd,lt,ya,Ru,Do,zu,bl,Cu,Bu,Tl,Iu,Uu,xu,wa,Wu,ka,qu,Zu,Nu,va,Gu,Ma,Au,Vu,Su,Jt,$a,Xu,Fo,Pu,Qr,Lu,Qu,yl,Yu,Hu,Ou,un,Ku,gn,Xd,Jo,_n,wl,Ea,eg,kl,tg,Pd,dt,Da,og,Fa,ng,Ja,sg,ag,rg,ja,ig,Ra,lg,dg,cg,bn,pg,jt,za,hg,jo,mg,Yr,fg,ug,vl,gg,_g,bg,Tn,Tg,yn,Ld,Ro,wn,Ml,Ca,yg,$l,wg,Qd,Ut,Ba,kg,El,vg,Mg,Rt,Ia,$g,Dl,Eg,Dg,Ua,Fg,Fl,Jg,jg,Rg,yt,zg,Jl,Cg,Bg,jl,Ig,Ug,Rl,xg,Wg,zl,qg,Zg,Yd,zo,kn,Cl,xa,Ng,Bl,Gg,Hd,ct,Wa,Ag,Co,Vg,Il,Sg,Xg,qa,Pg,Lg,Qg,Za,Yg,Na,Hg,Og,Kg,vn,e_,mt,Ga,t_,Bo,o_,Hr,n_,s_,Ul,a_,r_,i_,Mn,l_,$n,d_,En,Od,Io,Dn,xl,Aa,c_,Wl,p_,Kd,ot,Va,h_,ql,m_,f_,Sa,u_,Xa,g_,__,b_,Pa,T_,La,y_,w_,k_,Fn,v_,ft,Qa,M_,Uo,$_,Or,E_,D_,Zl,F_,J_,j_,Jn,R_,jn,z_,Rn,ec,xo,zn,Nl,Ya,C_,Gl,B_,tc,nt,Ha,I_,Al,U_,x_,Oa,W_,Ka,q_,Z_,N_,er,G_,tr,A_,V_,S_,Cn,X_,ut,or,P_,Wo,L_,Kr,Q_,Y_,Vl,H_,O_,K_,Bn,eb,In,tb,Un,oc,qo,xn,Sl,nr,ob,Xl,nb,nc,st,sr,sb,Zo,ab,Pl,rb,ib,Ll,lb,db,cb,ar,pb,rr,hb,mb,fb,ir,ub,lr,gb,_b,bb,Wn,Tb,gt,dr,yb,No,wb,ei,kb,vb,Ql,Mb,$b,Eb,qn,Db,Zn,Fb,Nn,sc;return l=new tt({}),D=new tt({}),K=new tt({}),We=new Lc({props:{pipeline:"text-classification"}}),as=new Lc({props:{pipeline:"token-classification"}}),hs=new Lc({props:{pipeline:"fill-mask"}}),bs=new Lc({props:{pipeline:"question-answering"}}),Ms=new tt({}),$s=new te({props:{name:"class transformers.DebertaConfig",anchor:"transformers.DebertaConfig",parameters:[{name:"vocab_size",val:" = 50265"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-07"},{name:"relative_attention",val:" = False"},{name:"max_relative_positions",val:" = -1"},{name:"pad_token_id",val:" = 0"},{name:"position_biased_input",val:" = True"},{name:"pos_att_type",val:" = None"},{name:"pooler_dropout",val:" = 0"},{name:"pooler_hidden_act",val:" = 'gelu'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DebertaConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the DeBERTa model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaModel">DebertaModel</a> or <a href="/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaModel">TFDebertaModel</a>.`,name:"vocab_size"},{anchor:"transformers.DebertaConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.DebertaConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.DebertaConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.DebertaConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.DebertaConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code>, <code>&quot;gelu&quot;</code>, <code>&quot;tanh&quot;</code>, <code>&quot;gelu_fast&quot;</code>, <code>&quot;mish&quot;</code>, <code>&quot;linear&quot;</code>, <code>&quot;sigmoid&quot;</code> and <code>&quot;gelu_new&quot;</code>
are supported.`,name:"hidden_act"},{anchor:"transformers.DebertaConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.DebertaConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.DebertaConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.DebertaConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaModel">DebertaModel</a> or <a href="/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaModel">TFDebertaModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.DebertaConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.DebertaConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.DebertaConfig.relative_attention",description:`<strong>relative_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether use relative position encoding.`,name:"relative_attention"},{anchor:"transformers.DebertaConfig.max_relative_positions",description:`<strong>max_relative_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The range of relative positions <code>[-max_position_embeddings, max_position_embeddings]</code>. Use the same value
as <code>max_position_embeddings</code>.`,name:"max_relative_positions"},{anchor:"transformers.DebertaConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The value used to pad input_ids.`,name:"pad_token_id"},{anchor:"transformers.DebertaConfig.position_biased_input",description:`<strong>position_biased_input</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether add absolute position embedding to content embedding.`,name:"position_biased_input"},{anchor:"transformers.DebertaConfig.pos_att_type",description:`<strong>pos_att_type</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The type of relative position attention, it can be a combination of <code>[&quot;p2c&quot;, &quot;c2p&quot;]</code>, e.g. <code>[&quot;p2c&quot;]</code>,
<code>[&quot;p2c&quot;, &quot;c2p&quot;]</code>.`,name:"pos_att_type"},{anchor:"transformers.DebertaConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, optional, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/configuration_deberta.py#L40"}}),Ao=new Ve({props:{anchor:"transformers.DebertaConfig.example",$$slots:{default:[xw]},$$scope:{ctx:J}}}),Ds=new tt({}),Fs=new te({props:{name:"class transformers.DebertaTokenizer",anchor:"transformers.DebertaTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"unk_token",val:" = '[UNK]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"add_prefix_space",val:" = False"},{name:"add_bos_token",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DebertaTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.DebertaTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.DebertaTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.DebertaTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.DebertaTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.DebertaTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.DebertaTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.DebertaTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.DebertaTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.DebertaTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.DebertaTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (Deberta tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.DebertaTokenizer.add_bos_token",description:`<strong>add_bos_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial &lt;|endoftext|&gt; to the input. This allows to treat the leading word just as
any other word.`,name:"add_bos_token"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/tokenization_deberta.py#L109"}}),So=new Ve({props:{anchor:"transformers.DebertaTokenizer.example",$$slots:{default:[Ww]},$$scope:{ctx:J}}}),Xo=new at({props:{$$slots:{default:[qw]},$$scope:{ctx:J}}}),Rs=new te({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.DebertaTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.DebertaTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.DebertaTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/tokenization_deberta.py#L288",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Cs=new te({props:{name:"get_special_tokens_mask",anchor:"transformers.DebertaTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.DebertaTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.DebertaTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.DebertaTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/tokenization_deberta.py#L313",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Bs=new te({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.DebertaTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.DebertaTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.DebertaTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/tokenization_deberta.py#L340",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Lo=new Ve({props:{anchor:"transformers.DebertaTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Zw]},$$scope:{ctx:J}}}),Is=new te({props:{name:"save_vocabulary",anchor:"transformers.DebertaTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/tokenization_deberta.py#L399"}}),Us=new tt({}),xs=new te({props:{name:"class transformers.DebertaTokenizerFast",anchor:"transformers.DebertaTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"unk_token",val:" = '[UNK]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"add_prefix_space",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DebertaTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.DebertaTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.DebertaTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The path to a tokenizer file to use instead of the vocab file.`,name:"tokenizer_file"},{anchor:"transformers.DebertaTokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.DebertaTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.DebertaTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.DebertaTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.DebertaTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.DebertaTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.DebertaTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.DebertaTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.DebertaTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (Deberta tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/tokenization_deberta_fast.py#L70"}}),Yo=new Ve({props:{anchor:"transformers.DebertaTokenizerFast.example",$$slots:{default:[Nw]},$$scope:{ctx:J}}}),Ho=new at({props:{$$slots:{default:[Gw]},$$scope:{ctx:J}}}),Ns=new te({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.DebertaTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.DebertaTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.DebertaTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/tokenization_deberta_fast.py#L207",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),As=new te({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.DebertaTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.DebertaTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.DebertaTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/tokenization_deberta_fast.py#L232",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Oo=new Ve({props:{anchor:"transformers.DebertaTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Aw]},$$scope:{ctx:J}}}),Vs=new tt({}),Ss=new te({props:{name:"class transformers.DebertaModel",anchor:"transformers.DebertaModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L912"}}),Ys=new te({props:{name:"forward",anchor:"transformers.DebertaModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.DebertaModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.DebertaModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.DebertaModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.DebertaModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.DebertaModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.DebertaModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.DebertaModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.DebertaModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L936",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),en=new at({props:{$$slots:{default:[Vw]},$$scope:{ctx:J}}}),tn=new Ve({props:{anchor:"transformers.DebertaModel.forward.example",$$slots:{default:[Sw]},$$scope:{ctx:J}}}),Hs=new tt({}),Os=new te({props:{name:"class transformers.DebertaPreTrainedModel",anchor:"transformers.DebertaPreTrainedModel",parameters:[{name:"config",val:": PretrainedConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L818"}}),Ks=new tt({}),ea=new te({props:{name:"class transformers.DebertaForMaskedLM",anchor:"transformers.DebertaForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L1024"}}),sa=new te({props:{name:"forward",anchor:"transformers.DebertaForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.DebertaForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.DebertaForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.DebertaForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.DebertaForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.DebertaForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.DebertaForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.DebertaForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.DebertaForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L1042",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),sn=new at({props:{$$slots:{default:[Xw]},$$scope:{ctx:J}}}),an=new Ve({props:{anchor:"transformers.DebertaForMaskedLM.forward.example",$$slots:{default:[Pw]},$$scope:{ctx:J}}}),aa=new tt({}),ra=new te({props:{name:"class transformers.DebertaForSequenceClassification",anchor:"transformers.DebertaForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L1161"}}),pa=new te({props:{name:"forward",anchor:"transformers.DebertaForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.DebertaForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.DebertaForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.DebertaForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.DebertaForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.DebertaForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.DebertaForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.DebertaForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.DebertaForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L1186",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ln=new at({props:{$$slots:{default:[Lw]},$$scope:{ctx:J}}}),dn=new Ve({props:{anchor:"transformers.DebertaForSequenceClassification.forward.example",$$slots:{default:[Qw]},$$scope:{ctx:J}}}),cn=new Ve({props:{anchor:"transformers.DebertaForSequenceClassification.forward.example-2",$$slots:{default:[Yw]},$$scope:{ctx:J}}}),ha=new tt({}),ma=new te({props:{name:"class transformers.DebertaForTokenClassification",anchor:"transformers.DebertaForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L1279"}}),ba=new te({props:{name:"forward",anchor:"transformers.DebertaForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.DebertaForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.DebertaForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.DebertaForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.DebertaForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.DebertaForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.DebertaForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.DebertaForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.DebertaForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L1291",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),hn=new at({props:{$$slots:{default:[Hw]},$$scope:{ctx:J}}}),mn=new Ve({props:{anchor:"transformers.DebertaForTokenClassification.forward.example",$$slots:{default:[Ow]},$$scope:{ctx:J}}}),Ta=new tt({}),ya=new te({props:{name:"class transformers.DebertaForQuestionAnswering",anchor:"transformers.DebertaForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L1352"}}),$a=new te({props:{name:"forward",anchor:"transformers.DebertaForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.DebertaForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.DebertaForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.DebertaForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.DebertaForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.DebertaForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.DebertaForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.DebertaForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.DebertaForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.DebertaForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L1363",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),un=new at({props:{$$slots:{default:[Kw]},$$scope:{ctx:J}}}),gn=new Ve({props:{anchor:"transformers.DebertaForQuestionAnswering.forward.example",$$slots:{default:[ek]},$$scope:{ctx:J}}}),Ea=new tt({}),Da=new te({props:{name:"class transformers.TFDebertaModel",anchor:"transformers.TFDebertaModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1088"}}),bn=new at({props:{$$slots:{default:[tk]},$$scope:{ctx:J}}}),za=new te({props:{name:"call",anchor:"transformers.TFDebertaModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFDebertaModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaModel.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1094",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Tn=new at({props:{$$slots:{default:[ok]},$$scope:{ctx:J}}}),yn=new Ve({props:{anchor:"transformers.TFDebertaModel.call.example",$$slots:{default:[nk]},$$scope:{ctx:J}}}),Ca=new tt({}),Ba=new te({props:{name:"class transformers.TFDebertaPreTrainedModel",anchor:"transformers.TFDebertaPreTrainedModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L988"}}),Ia=new te({props:{name:"call",anchor:"transformers.TFDebertaPreTrainedModel.call",parameters:[{name:"inputs",val:""},{name:"training",val:" = None"},{name:"mask",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/keras/src/engine/training.py#L571",returnDescription:`
<p>A tensor if there is a single output, or
a list of tensors if there are more than one outputs.</p>
`}}),xa=new tt({}),Wa=new te({props:{name:"class transformers.TFDebertaForMaskedLM",anchor:"transformers.TFDebertaForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1129"}}),vn=new at({props:{$$slots:{default:[sk]},$$scope:{ctx:J}}}),Ga=new te({props:{name:"call",anchor:"transformers.TFDebertaForMaskedLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFDebertaForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaForMaskedLM.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"},{anchor:"transformers.TFDebertaForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1145",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Mn=new at({props:{$$slots:{default:[ak]},$$scope:{ctx:J}}}),$n=new Ve({props:{anchor:"transformers.TFDebertaForMaskedLM.call.example",$$slots:{default:[rk]},$$scope:{ctx:J}}}),En=new Ve({props:{anchor:"transformers.TFDebertaForMaskedLM.call.example-2",$$slots:{default:[ik]},$$scope:{ctx:J}}}),Aa=new tt({}),Va=new te({props:{name:"class transformers.TFDebertaForSequenceClassification",anchor:"transformers.TFDebertaForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1205"}}),Fn=new at({props:{$$slots:{default:[lk]},$$scope:{ctx:J}}}),Qa=new te({props:{name:"call",anchor:"transformers.TFDebertaForSequenceClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFDebertaForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaForSequenceClassification.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"},{anchor:"transformers.TFDebertaForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1223",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Jn=new at({props:{$$slots:{default:[dk]},$$scope:{ctx:J}}}),jn=new Ve({props:{anchor:"transformers.TFDebertaForSequenceClassification.call.example",$$slots:{default:[ck]},$$scope:{ctx:J}}}),Rn=new Ve({props:{anchor:"transformers.TFDebertaForSequenceClassification.call.example-2",$$slots:{default:[pk]},$$scope:{ctx:J}}}),Ya=new tt({}),Ha=new te({props:{name:"class transformers.TFDebertaForTokenClassification",anchor:"transformers.TFDebertaForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1286"}}),Cn=new at({props:{$$slots:{default:[hk]},$$scope:{ctx:J}}}),or=new te({props:{name:"call",anchor:"transformers.TFDebertaForTokenClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFDebertaForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaForTokenClassification.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"},{anchor:"transformers.TFDebertaForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1298",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Bn=new at({props:{$$slots:{default:[mk]},$$scope:{ctx:J}}}),In=new Ve({props:{anchor:"transformers.TFDebertaForTokenClassification.call.example",$$slots:{default:[fk]},$$scope:{ctx:J}}}),Un=new Ve({props:{anchor:"transformers.TFDebertaForTokenClassification.call.example-2",$$slots:{default:[uk]},$$scope:{ctx:J}}}),nr=new tt({}),sr=new te({props:{name:"class transformers.TFDebertaForQuestionAnswering",anchor:"transformers.TFDebertaForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig">DebertaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1357"}}),Wn=new at({props:{$$slots:{default:[gk]},$$scope:{ctx:J}}}),dr=new te({props:{name:"call",anchor:"transformers.TFDebertaForQuestionAnswering.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"start_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"end_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFDebertaForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaForQuestionAnswering.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"},{anchor:"transformers.TFDebertaForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFDebertaForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_tf_deberta.py#L1368",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/deberta#transformers.DebertaConfig"
>DebertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),qn=new at({props:{$$slots:{default:[_k]},$$scope:{ctx:J}}}),Zn=new Ve({props:{anchor:"transformers.TFDebertaForQuestionAnswering.call.example",$$slots:{default:[bk]},$$scope:{ctx:J}}}),Nn=new Ve({props:{anchor:"transformers.TFDebertaForQuestionAnswering.call.example-2",$$slots:{default:[Tk]},$$scope:{ctx:J}}}),{c(){d=a("meta"),b=c(),f=a("h1"),u=a("a"),T=a("span"),w(l.$$.fragment),h=c(),j=a("span"),ae=n("DeBERTa"),Q=c(),x=a("h2"),oe=a("a"),se=a("span"),w(D.$$.fragment),ve=c(),L=a("span"),Me=n("Overview"),_e=c(),Z=a("p"),$e=n("The DeBERTa model was proposed in "),de=a("a"),Y=n("DeBERTa: Decoding-enhanced BERT with Disentangled Attention"),Ee=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen It is based on Google\u2019s
BERT model released in 2018 and Facebook\u2019s RoBERTa model released in 2019.`),be=c(),X=a("p"),De=n(`It builds on RoBERTa with disentangled attention and enhanced mask decoder training with half of the data used in
RoBERTa.`),Te=c(),P=a("p"),Fe=n("The abstract from the paper is the following:"),ye=c(),ne=a("p"),z=a("em"),C=n(`Recent progress in pre-trained neural language models has significantly improved the performance of many natural
language processing (NLP) tasks. In this paper we propose a new model architecture DeBERTa (Decoding-enhanced BERT with
disentangled attention) that improves the BERT and RoBERTa models using two novel techniques. The first is the
disentangled attention mechanism, where each word is represented using two vectors that encode its content and
position, respectively, and the attention weights among words are computed using disentangled matrices on their
contents and relative positions. Second, an enhanced mask decoder is used to replace the output softmax layer to
predict the masked tokens for model pretraining. We show that these two techniques significantly improve the efficiency
of model pretraining and performance of downstream tasks. Compared to RoBERTa-Large, a DeBERTa model trained on half of
the training data performs consistently better on a wide range of NLP tasks, achieving improvements on MNLI by +0.9%
(90.2% vs. 91.1%), on SQuAD v2.0 by +2.3% (88.4% vs. 90.7%) and RACE by +3.6% (83.2% vs. 86.8%). The DeBERTa code and
pre-trained models will be made publicly available at `),ce=a("a"),H=n("https://github.com/microsoft/DeBERTa"),Je=n("."),we=c(),W=a("p"),je=n("This model was contributed by "),pe=a("a"),B=n("DeBERTa"),Re=n(`. This model TF 2.0 implementation was
contributed by `),A=a("a"),ze=n("kamalkraj"),Ce=n(" . The original code can be found "),V=a("a"),Be=n("here"),Ie=n("."),q=c(),re=a("h2"),N=a("a"),fe=a("span"),w(K.$$.fragment),I=c(),ue=a("span"),U=n("Resources"),ke=c(),me=a("p"),y=n("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with DeBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),F=c(),w(We.$$.fragment),ie=c(),le=a("ul"),qe=a("li"),R=n("A blog post on how to "),Ze=a("a"),Pe=n("Accelerate Large Model Training using DeepSpeed"),Le=n(" with DeBERTa."),Qe=c(),Ne=a("li"),G=n("A blog post on "),S=a("a"),Ye=n("Supercharged Customer Service with Machine Learning"),He=n(" with DeBERTa."),O=c(),ge=a("li"),Ae=a("a"),Ue=n("DebertaForSequenceClassification"),Oe=n(" is supported by this "),ee=a("a"),Ke=n("example script"),Qc=n(" and "),os=a("a"),Yc=n("notebook"),Hc=n("."),Oc=c(),Wt=a("li"),vr=a("a"),Kc=n("TFDebertaForSequenceClassification"),ep=n(" is supported by this "),ns=a("a"),tp=n("example script"),op=n(" and "),ss=a("a"),np=n("notebook"),sp=n("."),ap=c(),ki=a("li"),Mr=a("a"),rp=n("Text classification task guide"),kd=c(),w(as.$$.fragment),vd=c(),pt=a("ul"),qt=a("li"),$r=a("a"),ip=n("DebertaForTokenClassification"),lp=n(" is supported by this "),rs=a("a"),dp=n("example script"),cp=n(" and "),is=a("a"),pp=n("notebook"),hp=n("."),mp=c(),Zt=a("li"),Er=a("a"),fp=n("TFDebertaForTokenClassification"),up=n(" is supported by this "),ls=a("a"),gp=n("example script"),_p=n(" and "),ds=a("a"),bp=n("notebook"),Tp=n("."),yp=c(),Dr=a("li"),cs=a("a"),wp=n("Token classification"),kp=n(" chapter of the \u{1F917} Hugging Face Course."),vp=c(),Fr=a("li"),ps=a("a"),Mp=n("Byte-Pair Encoding tokenization"),$p=n(" chapter of the \u{1F917} Hugging Face Course."),Ep=c(),vi=a("li"),Jr=a("a"),Dp=n("Token classification task guide"),Md=c(),w(hs.$$.fragment),$d=c(),kt=a("ul"),Nt=a("li"),jr=a("a"),Fp=n("DebertaForMaskedLM"),Jp=n(" is supported by this "),ms=a("a"),jp=n("example script"),Rp=n(" and "),fs=a("a"),zp=n("notebook"),Cp=n("."),Bp=c(),Gt=a("li"),Rr=a("a"),Ip=n("TFDebertaForMaskedLM"),Up=n(" is supported by this "),us=a("a"),xp=n("example script"),Wp=n(" and "),gs=a("a"),qp=n("notebook"),Zp=n("."),Np=c(),zr=a("li"),_s=a("a"),Gp=n("Masked language modeling"),Ap=n(" chapter of the \u{1F917} Hugging Face Course."),Vp=c(),Mi=a("li"),Cr=a("a"),Sp=n("Masked language modeling task guide"),Ed=c(),w(bs.$$.fragment),Dd=c(),vt=a("ul"),At=a("li"),Br=a("a"),Xp=n("DebertaForQuestionAnswering"),Pp=n(" is supported by this "),Ts=a("a"),Lp=n("example script"),Qp=n(" and "),ys=a("a"),Yp=n("notebook"),Hp=n("."),Op=c(),Vt=a("li"),Ir=a("a"),Kp=n("TFDebertaForQuestionAnswering"),eh=n(" is supported by this "),ws=a("a"),th=n("example script"),oh=n(" and "),ks=a("a"),nh=n("notebook"),sh=n("."),ah=c(),Ur=a("li"),vs=a("a"),rh=n("Question answering"),ih=n(" chapter of the \u{1F917} Hugging Face Course."),lh=c(),$i=a("li"),xr=a("a"),dh=n("Question answering task guide"),Fd=c(),io=a("h2"),Go=a("a"),Ei=a("span"),w(Ms.$$.fragment),ch=c(),Di=a("span"),ph=n("DebertaConfig"),Jd=c(),_t=a("div"),w($s.$$.fragment),hh=c(),It=a("p"),mh=n("This is the configuration class to store the configuration of a "),Wr=a("a"),fh=n("DebertaModel"),uh=n(" or a "),qr=a("a"),gh=n("TFDebertaModel"),_h=n(`. It is
used to instantiate a DeBERTa model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the DeBERTa
`),Es=a("a"),bh=n("microsoft/deberta-base"),Th=n(" architecture."),yh=c(),lo=a("p"),wh=n("Configuration objects inherit from "),Zr=a("a"),kh=n("PretrainedConfig"),vh=n(` and can be used to control the model outputs. Read the
documentation from `),Nr=a("a"),Mh=n("PretrainedConfig"),$h=n(" for more information."),Eh=c(),w(Ao.$$.fragment),jd=c(),co=a("h2"),Vo=a("a"),Fi=a("span"),w(Ds.$$.fragment),Dh=c(),Ji=a("span"),Fh=n("DebertaTokenizer"),Rd=c(),he=a("div"),w(Fs.$$.fragment),Jh=c(),ji=a("p"),jh=n("Construct a DeBERTa tokenizer. Based on byte-level Byte-Pair-Encoding."),Rh=c(),Ri=a("p"),zh=n("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Ch=c(),w(So.$$.fragment),Bh=c(),Js=a("p"),Ih=n("You can get around that behavior by passing "),zi=a("code"),Uh=n("add_prefix_space=True"),xh=n(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),Wh=c(),w(Xo.$$.fragment),qh=c(),js=a("p"),Zh=n("This tokenizer inherits from "),Gr=a("a"),Nh=n("PreTrainedTokenizer"),Gh=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ah=c(),St=a("div"),w(Rs.$$.fragment),Vh=c(),Ci=a("p"),Sh=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A DeBERTa sequence has the following format:`),Xh=c(),zs=a("ul"),Bi=a("li"),Ph=n("single sequence: [CLS] X [SEP]"),Lh=c(),Ii=a("li"),Qh=n("pair of sequences: [CLS] A [SEP] B [SEP]"),Yh=c(),Po=a("div"),w(Cs.$$.fragment),Hh=c(),po=a("p"),Oh=n(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ui=a("code"),Kh=n("prepare_for_model"),em=n(" or "),xi=a("code"),tm=n("encode_plus"),om=n(" methods."),nm=c(),Mt=a("div"),w(Bs.$$.fragment),sm=c(),Wi=a("p"),am=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),rm=c(),w(Lo.$$.fragment),im=c(),ho=a("p"),lm=n("If "),qi=a("code"),dm=n("token_ids_1"),cm=n(" is "),Zi=a("code"),pm=n("None"),hm=n(", this method only returns the first portion of the mask (0s)."),mm=c(),Ar=a("div"),w(Is.$$.fragment),zd=c(),mo=a("h2"),Qo=a("a"),Ni=a("span"),w(Us.$$.fragment),fm=c(),Gi=a("span"),um=n("DebertaTokenizerFast"),Cd=c(),xe=a("div"),w(xs.$$.fragment),gm=c(),Ws=a("p"),_m=n("Construct a \u201Cfast\u201D DeBERTa tokenizer (backed by HuggingFace\u2019s "),Ai=a("em"),bm=n("tokenizers"),Tm=n(` library). Based on byte-level
Byte-Pair-Encoding.`),ym=c(),Vi=a("p"),wm=n("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),km=c(),w(Yo.$$.fragment),vm=c(),qs=a("p"),Mm=n("You can get around that behavior by passing "),Si=a("code"),$m=n("add_prefix_space=True"),Em=n(` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),Dm=c(),w(Ho.$$.fragment),Fm=c(),Zs=a("p"),Jm=n("This tokenizer inherits from "),Vr=a("a"),jm=n("PreTrainedTokenizerFast"),Rm=n(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),zm=c(),Xt=a("div"),w(Ns.$$.fragment),Cm=c(),Xi=a("p"),Bm=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A DeBERTa sequence has the following format:`),Im=c(),Gs=a("ul"),Pi=a("li"),Um=n("single sequence: [CLS] X [SEP]"),xm=c(),Li=a("li"),Wm=n("pair of sequences: [CLS] A [SEP] B [SEP]"),qm=c(),$t=a("div"),w(As.$$.fragment),Zm=c(),Qi=a("p"),Nm=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),Gm=c(),w(Oo.$$.fragment),Am=c(),fo=a("p"),Vm=n("If "),Yi=a("code"),Sm=n("token_ids_1"),Xm=n(" is "),Hi=a("code"),Pm=n("None"),Lm=n(", this method only returns the first portion of the mask (0s)."),Bd=c(),uo=a("h2"),Ko=a("a"),Oi=a("span"),w(Vs.$$.fragment),Qm=c(),Ki=a("span"),Ym=n("DebertaModel"),Id=c(),bt=a("div"),w(Ss.$$.fragment),Hm=c(),Xs=a("p"),Om=n(`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),Ps=a("a"),Km=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),ef=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),tf=c(),Ls=a("p"),of=n("This model is also a PyTorch "),Qs=a("a"),nf=n("torch.nn.Module"),sf=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),af=c(),Et=a("div"),w(Ys.$$.fragment),rf=c(),go=a("p"),lf=n("The "),Sr=a("a"),df=n("DebertaModel"),cf=n(" forward method, overrides the "),el=a("code"),pf=n("__call__"),hf=n(" special method."),mf=c(),w(en.$$.fragment),ff=c(),w(tn.$$.fragment),Ud=c(),_o=a("h2"),on=a("a"),tl=a("span"),w(Hs.$$.fragment),uf=c(),ol=a("span"),gf=n("DebertaPreTrainedModel"),xd=c(),bo=a("div"),w(Os.$$.fragment),_f=c(),nl=a("p"),bf=n(`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),Wd=c(),To=a("h2"),nn=a("a"),sl=a("span"),w(Ks.$$.fragment),Tf=c(),al=a("span"),yf=n("DebertaForMaskedLM"),qd=c(),Tt=a("div"),w(ea.$$.fragment),wf=c(),yo=a("p"),kf=n("DeBERTa Model with a "),rl=a("code"),vf=n("language modeling"),Mf=n(` head on top.
The DeBERTa model was proposed in `),ta=a("a"),$f=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Ef=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Df=c(),oa=a("p"),Ff=n("This model is also a PyTorch "),na=a("a"),Jf=n("torch.nn.Module"),jf=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rf=c(),Dt=a("div"),w(sa.$$.fragment),zf=c(),wo=a("p"),Cf=n("The "),Xr=a("a"),Bf=n("DebertaForMaskedLM"),If=n(" forward method, overrides the "),il=a("code"),Uf=n("__call__"),xf=n(" special method."),Wf=c(),w(sn.$$.fragment),qf=c(),w(an.$$.fragment),Zd=c(),ko=a("h2"),rn=a("a"),ll=a("span"),w(aa.$$.fragment),Zf=c(),dl=a("span"),Nf=n("DebertaForSequenceClassification"),Nd=c(),rt=a("div"),w(ra.$$.fragment),Gf=c(),cl=a("p"),Af=n(`DeBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Vf=c(),ia=a("p"),Sf=n("The DeBERTa model was proposed in "),la=a("a"),Xf=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Pf=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Lf=c(),da=a("p"),Qf=n("This model is also a PyTorch "),ca=a("a"),Yf=n("torch.nn.Module"),Hf=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Of=c(),ht=a("div"),w(pa.$$.fragment),Kf=c(),vo=a("p"),eu=n("The "),Pr=a("a"),tu=n("DebertaForSequenceClassification"),ou=n(" forward method, overrides the "),pl=a("code"),nu=n("__call__"),su=n(" special method."),au=c(),w(ln.$$.fragment),ru=c(),w(dn.$$.fragment),iu=c(),w(cn.$$.fragment),Gd=c(),Mo=a("h2"),pn=a("a"),hl=a("span"),w(ha.$$.fragment),lu=c(),ml=a("span"),du=n("DebertaForTokenClassification"),Ad=c(),it=a("div"),w(ma.$$.fragment),cu=c(),fl=a("p"),pu=n(`DeBERTa Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),hu=c(),fa=a("p"),mu=n("The DeBERTa model was proposed in "),ua=a("a"),fu=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),uu=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),gu=c(),ga=a("p"),_u=n("This model is also a PyTorch "),_a=a("a"),bu=n("torch.nn.Module"),Tu=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),yu=c(),Ft=a("div"),w(ba.$$.fragment),wu=c(),$o=a("p"),ku=n("The "),Lr=a("a"),vu=n("DebertaForTokenClassification"),Mu=n(" forward method, overrides the "),ul=a("code"),$u=n("__call__"),Eu=n(" special method."),Du=c(),w(hn.$$.fragment),Fu=c(),w(mn.$$.fragment),Vd=c(),Eo=a("h2"),fn=a("a"),gl=a("span"),w(Ta.$$.fragment),Ju=c(),_l=a("span"),ju=n("DebertaForQuestionAnswering"),Sd=c(),lt=a("div"),w(ya.$$.fragment),Ru=c(),Do=a("p"),zu=n(`DeBERTa Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),bl=a("code"),Cu=n("span start logits"),Bu=n(" and "),Tl=a("code"),Iu=n("span end logits"),Uu=n(")."),xu=c(),wa=a("p"),Wu=n("The DeBERTa model was proposed in "),ka=a("a"),qu=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Zu=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Nu=c(),va=a("p"),Gu=n("This model is also a PyTorch "),Ma=a("a"),Au=n("torch.nn.Module"),Vu=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Su=c(),Jt=a("div"),w($a.$$.fragment),Xu=c(),Fo=a("p"),Pu=n("The "),Qr=a("a"),Lu=n("DebertaForQuestionAnswering"),Qu=n(" forward method, overrides the "),yl=a("code"),Yu=n("__call__"),Hu=n(" special method."),Ou=c(),w(un.$$.fragment),Ku=c(),w(gn.$$.fragment),Xd=c(),Jo=a("h2"),_n=a("a"),wl=a("span"),w(Ea.$$.fragment),eg=c(),kl=a("span"),tg=n("TFDebertaModel"),Pd=c(),dt=a("div"),w(Da.$$.fragment),og=c(),Fa=a("p"),ng=n(`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),Ja=a("a"),sg=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),ag=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),rg=c(),ja=a("p"),ig=n("This model is also a "),Ra=a("a"),lg=n("tf.keras.Model"),dg=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),cg=c(),w(bn.$$.fragment),pg=c(),jt=a("div"),w(za.$$.fragment),hg=c(),jo=a("p"),mg=n("The "),Yr=a("a"),fg=n("TFDebertaModel"),ug=n(" forward method, overrides the "),vl=a("code"),gg=n("__call__"),_g=n(" special method."),bg=c(),w(Tn.$$.fragment),Tg=c(),w(yn.$$.fragment),Ld=c(),Ro=a("h2"),wn=a("a"),Ml=a("span"),w(Ca.$$.fragment),yg=c(),$l=a("span"),wg=n("TFDebertaPreTrainedModel"),Qd=c(),Ut=a("div"),w(Ba.$$.fragment),kg=c(),El=a("p"),vg=n(`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),Mg=c(),Rt=a("div"),w(Ia.$$.fragment),$g=c(),Dl=a("p"),Eg=n("Calls the model on new inputs and returns the outputs as tensors."),Dg=c(),Ua=a("p"),Fg=n("In this case "),Fl=a("code"),Jg=n("call()"),jg=n(` just reapplies
all ops in the graph to the new inputs
(e.g. build a new computational graph from the provided inputs).`),Rg=c(),yt=a("p"),zg=n(`Note: This method should not be called directly. It is only meant to be
overridden when subclassing `),Jl=a("code"),Cg=n("tf.keras.Model"),Bg=n(`.
To call a model on an input, always use the `),jl=a("code"),Ig=n("__call__()"),Ug=n(` method,
i.e. `),Rl=a("code"),xg=n("model(inputs)"),Wg=n(", which relies on the underlying "),zl=a("code"),qg=n("call()"),Zg=n(" method."),Yd=c(),zo=a("h2"),kn=a("a"),Cl=a("span"),w(xa.$$.fragment),Ng=c(),Bl=a("span"),Gg=n("TFDebertaForMaskedLM"),Hd=c(),ct=a("div"),w(Wa.$$.fragment),Ag=c(),Co=a("p"),Vg=n("DeBERTa Model with a "),Il=a("code"),Sg=n("language modeling"),Xg=n(` head on top.
The DeBERTa model was proposed in `),qa=a("a"),Pg=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Lg=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Qg=c(),Za=a("p"),Yg=n("This model is also a "),Na=a("a"),Hg=n("tf.keras.Model"),Og=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Kg=c(),w(vn.$$.fragment),e_=c(),mt=a("div"),w(Ga.$$.fragment),t_=c(),Bo=a("p"),o_=n("The "),Hr=a("a"),n_=n("TFDebertaForMaskedLM"),s_=n(" forward method, overrides the "),Ul=a("code"),a_=n("__call__"),r_=n(" special method."),i_=c(),w(Mn.$$.fragment),l_=c(),w($n.$$.fragment),d_=c(),w(En.$$.fragment),Od=c(),Io=a("h2"),Dn=a("a"),xl=a("span"),w(Aa.$$.fragment),c_=c(),Wl=a("span"),p_=n("TFDebertaForSequenceClassification"),Kd=c(),ot=a("div"),w(Va.$$.fragment),h_=c(),ql=a("p"),m_=n(`DeBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),f_=c(),Sa=a("p"),u_=n("The DeBERTa model was proposed in "),Xa=a("a"),g_=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),__=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),b_=c(),Pa=a("p"),T_=n("This model is also a "),La=a("a"),y_=n("tf.keras.Model"),w_=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),k_=c(),w(Fn.$$.fragment),v_=c(),ft=a("div"),w(Qa.$$.fragment),M_=c(),Uo=a("p"),$_=n("The "),Or=a("a"),E_=n("TFDebertaForSequenceClassification"),D_=n(" forward method, overrides the "),Zl=a("code"),F_=n("__call__"),J_=n(" special method."),j_=c(),w(Jn.$$.fragment),R_=c(),w(jn.$$.fragment),z_=c(),w(Rn.$$.fragment),ec=c(),xo=a("h2"),zn=a("a"),Nl=a("span"),w(Ya.$$.fragment),C_=c(),Gl=a("span"),B_=n("TFDebertaForTokenClassification"),tc=c(),nt=a("div"),w(Ha.$$.fragment),I_=c(),Al=a("p"),U_=n(`DeBERTa Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),x_=c(),Oa=a("p"),W_=n("The DeBERTa model was proposed in "),Ka=a("a"),q_=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Z_=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),N_=c(),er=a("p"),G_=n("This model is also a "),tr=a("a"),A_=n("tf.keras.Model"),V_=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),S_=c(),w(Cn.$$.fragment),X_=c(),ut=a("div"),w(or.$$.fragment),P_=c(),Wo=a("p"),L_=n("The "),Kr=a("a"),Q_=n("TFDebertaForTokenClassification"),Y_=n(" forward method, overrides the "),Vl=a("code"),H_=n("__call__"),O_=n(" special method."),K_=c(),w(Bn.$$.fragment),eb=c(),w(In.$$.fragment),tb=c(),w(Un.$$.fragment),oc=c(),qo=a("h2"),xn=a("a"),Sl=a("span"),w(nr.$$.fragment),ob=c(),Xl=a("span"),nb=n("TFDebertaForQuestionAnswering"),nc=c(),st=a("div"),w(sr.$$.fragment),sb=c(),Zo=a("p"),ab=n(`DeBERTa Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Pl=a("code"),rb=n("span start logits"),ib=n(" and "),Ll=a("code"),lb=n("span end logits"),db=n(")."),cb=c(),ar=a("p"),pb=n("The DeBERTa model was proposed in "),rr=a("a"),hb=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),mb=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),fb=c(),ir=a("p"),ub=n("This model is also a "),lr=a("a"),gb=n("tf.keras.Model"),_b=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),bb=c(),w(Wn.$$.fragment),Tb=c(),gt=a("div"),w(dr.$$.fragment),yb=c(),No=a("p"),wb=n("The "),ei=a("a"),kb=n("TFDebertaForQuestionAnswering"),vb=n(" forward method, overrides the "),Ql=a("code"),Mb=n("__call__"),$b=n(" special method."),Eb=c(),w(qn.$$.fragment),Db=c(),w(Zn.$$.fragment),Fb=c(),w(Nn.$$.fragment),this.h()},l(o){const _=Iw('[data-svelte="svelte-1phssyn"]',document.head);d=r(_,"META",{name:!0,content:!0}),_.forEach(t),b=p(o),f=r(o,"H1",{class:!0});var cr=i(f);u=r(cr,"A",{id:!0,class:!0,href:!0});var Yl=i(u);T=r(Yl,"SPAN",{});var Hl=i(T);k(l.$$.fragment,Hl),Hl.forEach(t),Yl.forEach(t),h=p(cr),j=r(cr,"SPAN",{});var Ol=i(j);ae=s(Ol,"DeBERTa"),Ol.forEach(t),cr.forEach(t),Q=p(o),x=r(o,"H2",{class:!0});var pr=i(x);oe=r(pr,"A",{id:!0,class:!0,href:!0});var Kl=i(oe);se=r(Kl,"SPAN",{});var ed=i(se);k(D.$$.fragment,ed),ed.forEach(t),Kl.forEach(t),ve=p(pr),L=r(pr,"SPAN",{});var td=i(L);Me=s(td,"Overview"),td.forEach(t),pr.forEach(t),_e=p(o),Z=r(o,"P",{});var hr=i(Z);$e=s(hr,"The DeBERTa model was proposed in "),de=r(hr,"A",{href:!0,rel:!0});var od=i(de);Y=s(od,"DeBERTa: Decoding-enhanced BERT with Disentangled Attention"),od.forEach(t),Ee=s(hr,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen It is based on Google\u2019s
BERT model released in 2018 and Facebook\u2019s RoBERTa model released in 2019.`),hr.forEach(t),be=p(o),X=r(o,"P",{});var nd=i(X);De=s(nd,`It builds on RoBERTa with disentangled attention and enhanced mask decoder training with half of the data used in
RoBERTa.`),nd.forEach(t),Te=p(o),P=r(o,"P",{});var sd=i(P);Fe=s(sd,"The abstract from the paper is the following:"),sd.forEach(t),ye=p(o),ne=r(o,"P",{});var ad=i(ne);z=r(ad,"EM",{});var mr=i(z);C=s(mr,`Recent progress in pre-trained neural language models has significantly improved the performance of many natural
language processing (NLP) tasks. In this paper we propose a new model architecture DeBERTa (Decoding-enhanced BERT with
disentangled attention) that improves the BERT and RoBERTa models using two novel techniques. The first is the
disentangled attention mechanism, where each word is represented using two vectors that encode its content and
position, respectively, and the attention weights among words are computed using disentangled matrices on their
contents and relative positions. Second, an enhanced mask decoder is used to replace the output softmax layer to
predict the masked tokens for model pretraining. We show that these two techniques significantly improve the efficiency
of model pretraining and performance of downstream tasks. Compared to RoBERTa-Large, a DeBERTa model trained on half of
the training data performs consistently better on a wide range of NLP tasks, achieving improvements on MNLI by +0.9%
(90.2% vs. 91.1%), on SQuAD v2.0 by +2.3% (88.4% vs. 90.7%) and RACE by +3.6% (83.2% vs. 86.8%). The DeBERTa code and
pre-trained models will be made publicly available at `),ce=r(mr,"A",{href:!0,rel:!0});var rd=i(ce);H=s(rd,"https://github.com/microsoft/DeBERTa"),rd.forEach(t),Je=s(mr,"."),mr.forEach(t),ad.forEach(t),we=p(o),W=r(o,"P",{});var xt=i(W);je=s(xt,"This model was contributed by "),pe=r(xt,"A",{href:!0,rel:!0});var id=i(pe);B=s(id,"DeBERTa"),id.forEach(t),Re=s(xt,`. This model TF 2.0 implementation was
contributed by `),A=r(xt,"A",{href:!0,rel:!0});var ld=i(A);ze=s(ld,"kamalkraj"),ld.forEach(t),Ce=s(xt," . The original code can be found "),V=r(xt,"A",{href:!0,rel:!0});var dd=i(V);Be=s(dd,"here"),dd.forEach(t),Ie=s(xt,"."),xt.forEach(t),q=p(o),re=r(o,"H2",{class:!0});var fr=i(re);N=r(fr,"A",{id:!0,class:!0,href:!0});var cd=i(N);fe=r(cd,"SPAN",{});var pd=i(fe);k(K.$$.fragment,pd),pd.forEach(t),cd.forEach(t),I=p(fr),ue=r(fr,"SPAN",{});var hd=i(ue);U=s(hd,"Resources"),hd.forEach(t),fr.forEach(t),ke=p(o),me=r(o,"P",{});var md=i(me);y=s(md,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with DeBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),md.forEach(t),F=p(o),k(We.$$.fragment,o),ie=p(o),le=r(o,"UL",{});var wt=i(le);qe=r(wt,"LI",{});var ur=i(qe);R=s(ur,"A blog post on how to "),Ze=r(ur,"A",{href:!0,rel:!0});var fd=i(Ze);Pe=s(fd,"Accelerate Large Model Training using DeepSpeed"),fd.forEach(t),Le=s(ur," with DeBERTa."),ur.forEach(t),Qe=p(wt),Ne=r(wt,"LI",{});var gr=i(Ne);G=s(gr,"A blog post on "),S=r(gr,"A",{href:!0,rel:!0});var ud=i(S);Ye=s(ud,"Supercharged Customer Service with Machine Learning"),ud.forEach(t),He=s(gr," with DeBERTa."),gr.forEach(t),O=p(wt),ge=r(wt,"LI",{});var Pt=i(ge);Ae=r(Pt,"A",{href:!0});var gd=i(Ae);Ue=s(gd,"DebertaForSequenceClassification"),gd.forEach(t),Oe=s(Pt," is supported by this "),ee=r(Pt,"A",{href:!0,rel:!0});var _d=i(ee);Ke=s(_d,"example script"),_d.forEach(t),Qc=s(Pt," and "),os=r(Pt,"A",{href:!0,rel:!0});var bd=i(os);Yc=s(bd,"notebook"),bd.forEach(t),Hc=s(Pt,"."),Pt.forEach(t),Oc=p(wt),Wt=r(wt,"LI",{});var Lt=i(Wt);vr=r(Lt,"A",{href:!0});var Td=i(vr);Kc=s(Td,"TFDebertaForSequenceClassification"),Td.forEach(t),ep=s(Lt," is supported by this "),ns=r(Lt,"A",{href:!0,rel:!0});var yd=i(ns);tp=s(yd,"example script"),yd.forEach(t),op=s(Lt," and "),ss=r(Lt,"A",{href:!0,rel:!0});var wd=i(ss);np=s(wd,"notebook"),wd.forEach(t),sp=s(Lt,"."),Lt.forEach(t),ap=p(wt),ki=r(wt,"LI",{});var Cb=i(ki);Mr=r(Cb,"A",{href:!0});var Bb=i(Mr);rp=s(Bb,"Text classification task guide"),Bb.forEach(t),Cb.forEach(t),wt.forEach(t),kd=p(o),k(as.$$.fragment,o),vd=p(o),pt=r(o,"UL",{});var Qt=i(pt);qt=r(Qt,"LI",{});var _r=i(qt);$r=r(_r,"A",{href:!0});var Ib=i($r);ip=s(Ib,"DebertaForTokenClassification"),Ib.forEach(t),lp=s(_r," is supported by this "),rs=r(_r,"A",{href:!0,rel:!0});var Ub=i(rs);dp=s(Ub,"example script"),Ub.forEach(t),cp=s(_r," and "),is=r(_r,"A",{href:!0,rel:!0});var xb=i(is);pp=s(xb,"notebook"),xb.forEach(t),hp=s(_r,"."),_r.forEach(t),mp=p(Qt),Zt=r(Qt,"LI",{});var br=i(Zt);Er=r(br,"A",{href:!0});var Wb=i(Er);fp=s(Wb,"TFDebertaForTokenClassification"),Wb.forEach(t),up=s(br," is supported by this "),ls=r(br,"A",{href:!0,rel:!0});var qb=i(ls);gp=s(qb,"example script"),qb.forEach(t),_p=s(br," and "),ds=r(br,"A",{href:!0,rel:!0});var Zb=i(ds);bp=s(Zb,"notebook"),Zb.forEach(t),Tp=s(br,"."),br.forEach(t),yp=p(Qt),Dr=r(Qt,"LI",{});var Jb=i(Dr);cs=r(Jb,"A",{href:!0,rel:!0});var Nb=i(cs);wp=s(Nb,"Token classification"),Nb.forEach(t),kp=s(Jb," chapter of the \u{1F917} Hugging Face Course."),Jb.forEach(t),vp=p(Qt),Fr=r(Qt,"LI",{});var jb=i(Fr);ps=r(jb,"A",{href:!0,rel:!0});var Gb=i(ps);Mp=s(Gb,"Byte-Pair Encoding tokenization"),Gb.forEach(t),$p=s(jb," chapter of the \u{1F917} Hugging Face Course."),jb.forEach(t),Ep=p(Qt),vi=r(Qt,"LI",{});var Ab=i(vi);Jr=r(Ab,"A",{href:!0});var Vb=i(Jr);Dp=s(Vb,"Token classification task guide"),Vb.forEach(t),Ab.forEach(t),Qt.forEach(t),Md=p(o),k(hs.$$.fragment,o),$d=p(o),kt=r(o,"UL",{});var Gn=i(kt);Nt=r(Gn,"LI",{});var Tr=i(Nt);jr=r(Tr,"A",{href:!0});var Sb=i(jr);Fp=s(Sb,"DebertaForMaskedLM"),Sb.forEach(t),Jp=s(Tr," is supported by this "),ms=r(Tr,"A",{href:!0,rel:!0});var Xb=i(ms);jp=s(Xb,"example script"),Xb.forEach(t),Rp=s(Tr," and "),fs=r(Tr,"A",{href:!0,rel:!0});var Pb=i(fs);zp=s(Pb,"notebook"),Pb.forEach(t),Cp=s(Tr,"."),Tr.forEach(t),Bp=p(Gn),Gt=r(Gn,"LI",{});var yr=i(Gt);Rr=r(yr,"A",{href:!0});var Lb=i(Rr);Ip=s(Lb,"TFDebertaForMaskedLM"),Lb.forEach(t),Up=s(yr," is supported by this "),us=r(yr,"A",{href:!0,rel:!0});var Qb=i(us);xp=s(Qb,"example script"),Qb.forEach(t),Wp=s(yr," and "),gs=r(yr,"A",{href:!0,rel:!0});var Yb=i(gs);qp=s(Yb,"notebook"),Yb.forEach(t),Zp=s(yr,"."),yr.forEach(t),Np=p(Gn),zr=r(Gn,"LI",{});var Rb=i(zr);_s=r(Rb,"A",{href:!0,rel:!0});var Hb=i(_s);Gp=s(Hb,"Masked language modeling"),Hb.forEach(t),Ap=s(Rb," chapter of the \u{1F917} Hugging Face Course."),Rb.forEach(t),Vp=p(Gn),Mi=r(Gn,"LI",{});var Ob=i(Mi);Cr=r(Ob,"A",{href:!0});var Kb=i(Cr);Sp=s(Kb,"Masked language modeling task guide"),Kb.forEach(t),Ob.forEach(t),Gn.forEach(t),Ed=p(o),k(bs.$$.fragment,o),Dd=p(o),vt=r(o,"UL",{});var An=i(vt);At=r(An,"LI",{});var wr=i(At);Br=r(wr,"A",{href:!0});var eT=i(Br);Xp=s(eT,"DebertaForQuestionAnswering"),eT.forEach(t),Pp=s(wr," is supported by this "),Ts=r(wr,"A",{href:!0,rel:!0});var tT=i(Ts);Lp=s(tT,"example script"),tT.forEach(t),Qp=s(wr," and "),ys=r(wr,"A",{href:!0,rel:!0});var oT=i(ys);Yp=s(oT,"notebook"),oT.forEach(t),Hp=s(wr,"."),wr.forEach(t),Op=p(An),Vt=r(An,"LI",{});var kr=i(Vt);Ir=r(kr,"A",{href:!0});var nT=i(Ir);Kp=s(nT,"TFDebertaForQuestionAnswering"),nT.forEach(t),eh=s(kr," is supported by this "),ws=r(kr,"A",{href:!0,rel:!0});var sT=i(ws);th=s(sT,"example script"),sT.forEach(t),oh=s(kr," and "),ks=r(kr,"A",{href:!0,rel:!0});var aT=i(ks);nh=s(aT,"notebook"),aT.forEach(t),sh=s(kr,"."),kr.forEach(t),ah=p(An),Ur=r(An,"LI",{});var zb=i(Ur);vs=r(zb,"A",{href:!0,rel:!0});var rT=i(vs);rh=s(rT,"Question answering"),rT.forEach(t),ih=s(zb," chapter of the \u{1F917} Hugging Face Course."),zb.forEach(t),lh=p(An),$i=r(An,"LI",{});var iT=i($i);xr=r(iT,"A",{href:!0});var lT=i(xr);dh=s(lT,"Question answering task guide"),lT.forEach(t),iT.forEach(t),An.forEach(t),Fd=p(o),io=r(o,"H2",{class:!0});var ac=i(io);Go=r(ac,"A",{id:!0,class:!0,href:!0});var dT=i(Go);Ei=r(dT,"SPAN",{});var cT=i(Ei);k(Ms.$$.fragment,cT),cT.forEach(t),dT.forEach(t),ch=p(ac),Di=r(ac,"SPAN",{});var pT=i(Di);ph=s(pT,"DebertaConfig"),pT.forEach(t),ac.forEach(t),Jd=p(o),_t=r(o,"DIV",{class:!0});var Vn=i(_t);k($s.$$.fragment,Vn),hh=p(Vn),It=r(Vn,"P",{});var Sn=i(It);mh=s(Sn,"This is the configuration class to store the configuration of a "),Wr=r(Sn,"A",{href:!0});var hT=i(Wr);fh=s(hT,"DebertaModel"),hT.forEach(t),uh=s(Sn," or a "),qr=r(Sn,"A",{href:!0});var mT=i(qr);gh=s(mT,"TFDebertaModel"),mT.forEach(t),_h=s(Sn,`. It is
used to instantiate a DeBERTa model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the DeBERTa
`),Es=r(Sn,"A",{href:!0,rel:!0});var fT=i(Es);bh=s(fT,"microsoft/deberta-base"),fT.forEach(t),Th=s(Sn," architecture."),Sn.forEach(t),yh=p(Vn),lo=r(Vn,"P",{});var ti=i(lo);wh=s(ti,"Configuration objects inherit from "),Zr=r(ti,"A",{href:!0});var uT=i(Zr);kh=s(uT,"PretrainedConfig"),uT.forEach(t),vh=s(ti,` and can be used to control the model outputs. Read the
documentation from `),Nr=r(ti,"A",{href:!0});var gT=i(Nr);Mh=s(gT,"PretrainedConfig"),gT.forEach(t),$h=s(ti," for more information."),ti.forEach(t),Eh=p(Vn),k(Ao.$$.fragment,Vn),Vn.forEach(t),jd=p(o),co=r(o,"H2",{class:!0});var rc=i(co);Vo=r(rc,"A",{id:!0,class:!0,href:!0});var _T=i(Vo);Fi=r(_T,"SPAN",{});var bT=i(Fi);k(Ds.$$.fragment,bT),bT.forEach(t),_T.forEach(t),Dh=p(rc),Ji=r(rc,"SPAN",{});var TT=i(Ji);Fh=s(TT,"DebertaTokenizer"),TT.forEach(t),rc.forEach(t),Rd=p(o),he=r(o,"DIV",{class:!0});var Ge=i(he);k(Fs.$$.fragment,Ge),Jh=p(Ge),ji=r(Ge,"P",{});var yT=i(ji);jh=s(yT,"Construct a DeBERTa tokenizer. Based on byte-level Byte-Pair-Encoding."),yT.forEach(t),Rh=p(Ge),Ri=r(Ge,"P",{});var wT=i(Ri);zh=s(wT,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),wT.forEach(t),Ch=p(Ge),k(So.$$.fragment,Ge),Bh=p(Ge),Js=r(Ge,"P",{});var ic=i(Js);Ih=s(ic,"You can get around that behavior by passing "),zi=r(ic,"CODE",{});var kT=i(zi);Uh=s(kT,"add_prefix_space=True"),kT.forEach(t),xh=s(ic,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),ic.forEach(t),Wh=p(Ge),k(Xo.$$.fragment,Ge),qh=p(Ge),js=r(Ge,"P",{});var lc=i(js);Zh=s(lc,"This tokenizer inherits from "),Gr=r(lc,"A",{href:!0});var vT=i(Gr);Nh=s(vT,"PreTrainedTokenizer"),vT.forEach(t),Gh=s(lc,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),lc.forEach(t),Ah=p(Ge),St=r(Ge,"DIV",{class:!0});var oi=i(St);k(Rs.$$.fragment,oi),Vh=p(oi),Ci=r(oi,"P",{});var MT=i(Ci);Sh=s(MT,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A DeBERTa sequence has the following format:`),MT.forEach(t),Xh=p(oi),zs=r(oi,"UL",{});var dc=i(zs);Bi=r(dc,"LI",{});var $T=i(Bi);Ph=s($T,"single sequence: [CLS] X [SEP]"),$T.forEach(t),Lh=p(dc),Ii=r(dc,"LI",{});var ET=i(Ii);Qh=s(ET,"pair of sequences: [CLS] A [SEP] B [SEP]"),ET.forEach(t),dc.forEach(t),oi.forEach(t),Yh=p(Ge),Po=r(Ge,"DIV",{class:!0});var cc=i(Po);k(Cs.$$.fragment,cc),Hh=p(cc),po=r(cc,"P",{});var ni=i(po);Oh=s(ni,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ui=r(ni,"CODE",{});var DT=i(Ui);Kh=s(DT,"prepare_for_model"),DT.forEach(t),em=s(ni," or "),xi=r(ni,"CODE",{});var FT=i(xi);tm=s(FT,"encode_plus"),FT.forEach(t),om=s(ni," methods."),ni.forEach(t),cc.forEach(t),nm=p(Ge),Mt=r(Ge,"DIV",{class:!0});var Xn=i(Mt);k(Bs.$$.fragment,Xn),sm=p(Xn),Wi=r(Xn,"P",{});var JT=i(Wi);am=s(JT,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),JT.forEach(t),rm=p(Xn),k(Lo.$$.fragment,Xn),im=p(Xn),ho=r(Xn,"P",{});var si=i(ho);lm=s(si,"If "),qi=r(si,"CODE",{});var jT=i(qi);dm=s(jT,"token_ids_1"),jT.forEach(t),cm=s(si," is "),Zi=r(si,"CODE",{});var RT=i(Zi);pm=s(RT,"None"),RT.forEach(t),hm=s(si,", this method only returns the first portion of the mask (0s)."),si.forEach(t),Xn.forEach(t),mm=p(Ge),Ar=r(Ge,"DIV",{class:!0});var zT=i(Ar);k(Is.$$.fragment,zT),zT.forEach(t),Ge.forEach(t),zd=p(o),mo=r(o,"H2",{class:!0});var pc=i(mo);Qo=r(pc,"A",{id:!0,class:!0,href:!0});var CT=i(Qo);Ni=r(CT,"SPAN",{});var BT=i(Ni);k(Us.$$.fragment,BT),BT.forEach(t),CT.forEach(t),fm=p(pc),Gi=r(pc,"SPAN",{});var IT=i(Gi);um=s(IT,"DebertaTokenizerFast"),IT.forEach(t),pc.forEach(t),Cd=p(o),xe=r(o,"DIV",{class:!0});var et=i(xe);k(xs.$$.fragment,et),gm=p(et),Ws=r(et,"P",{});var hc=i(Ws);_m=s(hc,"Construct a \u201Cfast\u201D DeBERTa tokenizer (backed by HuggingFace\u2019s "),Ai=r(hc,"EM",{});var UT=i(Ai);bm=s(UT,"tokenizers"),UT.forEach(t),Tm=s(hc,` library). Based on byte-level
Byte-Pair-Encoding.`),hc.forEach(t),ym=p(et),Vi=r(et,"P",{});var xT=i(Vi);wm=s(xT,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),xT.forEach(t),km=p(et),k(Yo.$$.fragment,et),vm=p(et),qs=r(et,"P",{});var mc=i(qs);Mm=s(mc,"You can get around that behavior by passing "),Si=r(mc,"CODE",{});var WT=i(Si);$m=s(WT,"add_prefix_space=True"),WT.forEach(t),Em=s(mc,` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),mc.forEach(t),Dm=p(et),k(Ho.$$.fragment,et),Fm=p(et),Zs=r(et,"P",{});var fc=i(Zs);Jm=s(fc,"This tokenizer inherits from "),Vr=r(fc,"A",{href:!0});var qT=i(Vr);jm=s(qT,"PreTrainedTokenizerFast"),qT.forEach(t),Rm=s(fc,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),fc.forEach(t),zm=p(et),Xt=r(et,"DIV",{class:!0});var ai=i(Xt);k(Ns.$$.fragment,ai),Cm=p(ai),Xi=r(ai,"P",{});var ZT=i(Xi);Bm=s(ZT,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A DeBERTa sequence has the following format:`),ZT.forEach(t),Im=p(ai),Gs=r(ai,"UL",{});var uc=i(Gs);Pi=r(uc,"LI",{});var NT=i(Pi);Um=s(NT,"single sequence: [CLS] X [SEP]"),NT.forEach(t),xm=p(uc),Li=r(uc,"LI",{});var GT=i(Li);Wm=s(GT,"pair of sequences: [CLS] A [SEP] B [SEP]"),GT.forEach(t),uc.forEach(t),ai.forEach(t),qm=p(et),$t=r(et,"DIV",{class:!0});var Pn=i($t);k(As.$$.fragment,Pn),Zm=p(Pn),Qi=r(Pn,"P",{});var AT=i(Qi);Nm=s(AT,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),AT.forEach(t),Gm=p(Pn),k(Oo.$$.fragment,Pn),Am=p(Pn),fo=r(Pn,"P",{});var ri=i(fo);Vm=s(ri,"If "),Yi=r(ri,"CODE",{});var VT=i(Yi);Sm=s(VT,"token_ids_1"),VT.forEach(t),Xm=s(ri," is "),Hi=r(ri,"CODE",{});var ST=i(Hi);Pm=s(ST,"None"),ST.forEach(t),Lm=s(ri,", this method only returns the first portion of the mask (0s)."),ri.forEach(t),Pn.forEach(t),et.forEach(t),Bd=p(o),uo=r(o,"H2",{class:!0});var gc=i(uo);Ko=r(gc,"A",{id:!0,class:!0,href:!0});var XT=i(Ko);Oi=r(XT,"SPAN",{});var PT=i(Oi);k(Vs.$$.fragment,PT),PT.forEach(t),XT.forEach(t),Qm=p(gc),Ki=r(gc,"SPAN",{});var LT=i(Ki);Ym=s(LT,"DebertaModel"),LT.forEach(t),gc.forEach(t),Id=p(o),bt=r(o,"DIV",{class:!0});var Ln=i(bt);k(Ss.$$.fragment,Ln),Hm=p(Ln),Xs=r(Ln,"P",{});var _c=i(Xs);Om=s(_c,`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),Ps=r(_c,"A",{href:!0,rel:!0});var QT=i(Ps);Km=s(QT,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),QT.forEach(t),ef=s(_c,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),_c.forEach(t),tf=p(Ln),Ls=r(Ln,"P",{});var bc=i(Ls);of=s(bc,"This model is also a PyTorch "),Qs=r(bc,"A",{href:!0,rel:!0});var YT=i(Qs);nf=s(YT,"torch.nn.Module"),YT.forEach(t),sf=s(bc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),bc.forEach(t),af=p(Ln),Et=r(Ln,"DIV",{class:!0});var Qn=i(Et);k(Ys.$$.fragment,Qn),rf=p(Qn),go=r(Qn,"P",{});var ii=i(go);lf=s(ii,"The "),Sr=r(ii,"A",{href:!0});var HT=i(Sr);df=s(HT,"DebertaModel"),HT.forEach(t),cf=s(ii," forward method, overrides the "),el=r(ii,"CODE",{});var OT=i(el);pf=s(OT,"__call__"),OT.forEach(t),hf=s(ii," special method."),ii.forEach(t),mf=p(Qn),k(en.$$.fragment,Qn),ff=p(Qn),k(tn.$$.fragment,Qn),Qn.forEach(t),Ln.forEach(t),Ud=p(o),_o=r(o,"H2",{class:!0});var Tc=i(_o);on=r(Tc,"A",{id:!0,class:!0,href:!0});var KT=i(on);tl=r(KT,"SPAN",{});var ey=i(tl);k(Hs.$$.fragment,ey),ey.forEach(t),KT.forEach(t),uf=p(Tc),ol=r(Tc,"SPAN",{});var ty=i(ol);gf=s(ty,"DebertaPreTrainedModel"),ty.forEach(t),Tc.forEach(t),xd=p(o),bo=r(o,"DIV",{class:!0});var yc=i(bo);k(Os.$$.fragment,yc),_f=p(yc),nl=r(yc,"P",{});var oy=i(nl);bf=s(oy,`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),oy.forEach(t),yc.forEach(t),Wd=p(o),To=r(o,"H2",{class:!0});var wc=i(To);nn=r(wc,"A",{id:!0,class:!0,href:!0});var ny=i(nn);sl=r(ny,"SPAN",{});var sy=i(sl);k(Ks.$$.fragment,sy),sy.forEach(t),ny.forEach(t),Tf=p(wc),al=r(wc,"SPAN",{});var ay=i(al);yf=s(ay,"DebertaForMaskedLM"),ay.forEach(t),wc.forEach(t),qd=p(o),Tt=r(o,"DIV",{class:!0});var Yn=i(Tt);k(ea.$$.fragment,Yn),wf=p(Yn),yo=r(Yn,"P",{});var li=i(yo);kf=s(li,"DeBERTa Model with a "),rl=r(li,"CODE",{});var ry=i(rl);vf=s(ry,"language modeling"),ry.forEach(t),Mf=s(li,` head on top.
The DeBERTa model was proposed in `),ta=r(li,"A",{href:!0,rel:!0});var iy=i(ta);$f=s(iy,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),iy.forEach(t),Ef=s(li,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),li.forEach(t),Df=p(Yn),oa=r(Yn,"P",{});var kc=i(oa);Ff=s(kc,"This model is also a PyTorch "),na=r(kc,"A",{href:!0,rel:!0});var ly=i(na);Jf=s(ly,"torch.nn.Module"),ly.forEach(t),jf=s(kc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),kc.forEach(t),Rf=p(Yn),Dt=r(Yn,"DIV",{class:!0});var Hn=i(Dt);k(sa.$$.fragment,Hn),zf=p(Hn),wo=r(Hn,"P",{});var di=i(wo);Cf=s(di,"The "),Xr=r(di,"A",{href:!0});var dy=i(Xr);Bf=s(dy,"DebertaForMaskedLM"),dy.forEach(t),If=s(di," forward method, overrides the "),il=r(di,"CODE",{});var cy=i(il);Uf=s(cy,"__call__"),cy.forEach(t),xf=s(di," special method."),di.forEach(t),Wf=p(Hn),k(sn.$$.fragment,Hn),qf=p(Hn),k(an.$$.fragment,Hn),Hn.forEach(t),Yn.forEach(t),Zd=p(o),ko=r(o,"H2",{class:!0});var vc=i(ko);rn=r(vc,"A",{id:!0,class:!0,href:!0});var py=i(rn);ll=r(py,"SPAN",{});var hy=i(ll);k(aa.$$.fragment,hy),hy.forEach(t),py.forEach(t),Zf=p(vc),dl=r(vc,"SPAN",{});var my=i(dl);Nf=s(my,"DebertaForSequenceClassification"),my.forEach(t),vc.forEach(t),Nd=p(o),rt=r(o,"DIV",{class:!0});var Yt=i(rt);k(ra.$$.fragment,Yt),Gf=p(Yt),cl=r(Yt,"P",{});var fy=i(cl);Af=s(fy,`DeBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),fy.forEach(t),Vf=p(Yt),ia=r(Yt,"P",{});var Mc=i(ia);Sf=s(Mc,"The DeBERTa model was proposed in "),la=r(Mc,"A",{href:!0,rel:!0});var uy=i(la);Xf=s(uy,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),uy.forEach(t),Pf=s(Mc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Mc.forEach(t),Lf=p(Yt),da=r(Yt,"P",{});var $c=i(da);Qf=s($c,"This model is also a PyTorch "),ca=r($c,"A",{href:!0,rel:!0});var gy=i(ca);Yf=s(gy,"torch.nn.Module"),gy.forEach(t),Hf=s($c,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$c.forEach(t),Of=p(Yt),ht=r(Yt,"DIV",{class:!0});var Ht=i(ht);k(pa.$$.fragment,Ht),Kf=p(Ht),vo=r(Ht,"P",{});var ci=i(vo);eu=s(ci,"The "),Pr=r(ci,"A",{href:!0});var _y=i(Pr);tu=s(_y,"DebertaForSequenceClassification"),_y.forEach(t),ou=s(ci," forward method, overrides the "),pl=r(ci,"CODE",{});var by=i(pl);nu=s(by,"__call__"),by.forEach(t),su=s(ci," special method."),ci.forEach(t),au=p(Ht),k(ln.$$.fragment,Ht),ru=p(Ht),k(dn.$$.fragment,Ht),iu=p(Ht),k(cn.$$.fragment,Ht),Ht.forEach(t),Yt.forEach(t),Gd=p(o),Mo=r(o,"H2",{class:!0});var Ec=i(Mo);pn=r(Ec,"A",{id:!0,class:!0,href:!0});var Ty=i(pn);hl=r(Ty,"SPAN",{});var yy=i(hl);k(ha.$$.fragment,yy),yy.forEach(t),Ty.forEach(t),lu=p(Ec),ml=r(Ec,"SPAN",{});var wy=i(ml);du=s(wy,"DebertaForTokenClassification"),wy.forEach(t),Ec.forEach(t),Ad=p(o),it=r(o,"DIV",{class:!0});var Ot=i(it);k(ma.$$.fragment,Ot),cu=p(Ot),fl=r(Ot,"P",{});var ky=i(fl);pu=s(ky,`DeBERTa Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),ky.forEach(t),hu=p(Ot),fa=r(Ot,"P",{});var Dc=i(fa);mu=s(Dc,"The DeBERTa model was proposed in "),ua=r(Dc,"A",{href:!0,rel:!0});var vy=i(ua);fu=s(vy,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),vy.forEach(t),uu=s(Dc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Dc.forEach(t),gu=p(Ot),ga=r(Ot,"P",{});var Fc=i(ga);_u=s(Fc,"This model is also a PyTorch "),_a=r(Fc,"A",{href:!0,rel:!0});var My=i(_a);bu=s(My,"torch.nn.Module"),My.forEach(t),Tu=s(Fc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fc.forEach(t),yu=p(Ot),Ft=r(Ot,"DIV",{class:!0});var On=i(Ft);k(ba.$$.fragment,On),wu=p(On),$o=r(On,"P",{});var pi=i($o);ku=s(pi,"The "),Lr=r(pi,"A",{href:!0});var $y=i(Lr);vu=s($y,"DebertaForTokenClassification"),$y.forEach(t),Mu=s(pi," forward method, overrides the "),ul=r(pi,"CODE",{});var Ey=i(ul);$u=s(Ey,"__call__"),Ey.forEach(t),Eu=s(pi," special method."),pi.forEach(t),Du=p(On),k(hn.$$.fragment,On),Fu=p(On),k(mn.$$.fragment,On),On.forEach(t),Ot.forEach(t),Vd=p(o),Eo=r(o,"H2",{class:!0});var Jc=i(Eo);fn=r(Jc,"A",{id:!0,class:!0,href:!0});var Dy=i(fn);gl=r(Dy,"SPAN",{});var Fy=i(gl);k(Ta.$$.fragment,Fy),Fy.forEach(t),Dy.forEach(t),Ju=p(Jc),_l=r(Jc,"SPAN",{});var Jy=i(_l);ju=s(Jy,"DebertaForQuestionAnswering"),Jy.forEach(t),Jc.forEach(t),Sd=p(o),lt=r(o,"DIV",{class:!0});var Kt=i(lt);k(ya.$$.fragment,Kt),Ru=p(Kt),Do=r(Kt,"P",{});var hi=i(Do);zu=s(hi,`DeBERTa Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),bl=r(hi,"CODE",{});var jy=i(bl);Cu=s(jy,"span start logits"),jy.forEach(t),Bu=s(hi," and "),Tl=r(hi,"CODE",{});var Ry=i(Tl);Iu=s(Ry,"span end logits"),Ry.forEach(t),Uu=s(hi,")."),hi.forEach(t),xu=p(Kt),wa=r(Kt,"P",{});var jc=i(wa);Wu=s(jc,"The DeBERTa model was proposed in "),ka=r(jc,"A",{href:!0,rel:!0});var zy=i(ka);qu=s(zy,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),zy.forEach(t),Zu=s(jc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),jc.forEach(t),Nu=p(Kt),va=r(Kt,"P",{});var Rc=i(va);Gu=s(Rc,"This model is also a PyTorch "),Ma=r(Rc,"A",{href:!0,rel:!0});var Cy=i(Ma);Au=s(Cy,"torch.nn.Module"),Cy.forEach(t),Vu=s(Rc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rc.forEach(t),Su=p(Kt),Jt=r(Kt,"DIV",{class:!0});var Kn=i(Jt);k($a.$$.fragment,Kn),Xu=p(Kn),Fo=r(Kn,"P",{});var mi=i(Fo);Pu=s(mi,"The "),Qr=r(mi,"A",{href:!0});var By=i(Qr);Lu=s(By,"DebertaForQuestionAnswering"),By.forEach(t),Qu=s(mi," forward method, overrides the "),yl=r(mi,"CODE",{});var Iy=i(yl);Yu=s(Iy,"__call__"),Iy.forEach(t),Hu=s(mi," special method."),mi.forEach(t),Ou=p(Kn),k(un.$$.fragment,Kn),Ku=p(Kn),k(gn.$$.fragment,Kn),Kn.forEach(t),Kt.forEach(t),Xd=p(o),Jo=r(o,"H2",{class:!0});var zc=i(Jo);_n=r(zc,"A",{id:!0,class:!0,href:!0});var Uy=i(_n);wl=r(Uy,"SPAN",{});var xy=i(wl);k(Ea.$$.fragment,xy),xy.forEach(t),Uy.forEach(t),eg=p(zc),kl=r(zc,"SPAN",{});var Wy=i(kl);tg=s(Wy,"TFDebertaModel"),Wy.forEach(t),zc.forEach(t),Pd=p(o),dt=r(o,"DIV",{class:!0});var eo=i(dt);k(Da.$$.fragment,eo),og=p(eo),Fa=r(eo,"P",{});var Cc=i(Fa);ng=s(Cc,`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),Ja=r(Cc,"A",{href:!0,rel:!0});var qy=i(Ja);sg=s(qy,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),qy.forEach(t),ag=s(Cc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Cc.forEach(t),rg=p(eo),ja=r(eo,"P",{});var Bc=i(ja);ig=s(Bc,"This model is also a "),Ra=r(Bc,"A",{href:!0,rel:!0});var Zy=i(Ra);lg=s(Zy,"tf.keras.Model"),Zy.forEach(t),dg=s(Bc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Bc.forEach(t),cg=p(eo),k(bn.$$.fragment,eo),pg=p(eo),jt=r(eo,"DIV",{class:!0});var es=i(jt);k(za.$$.fragment,es),hg=p(es),jo=r(es,"P",{});var fi=i(jo);mg=s(fi,"The "),Yr=r(fi,"A",{href:!0});var Ny=i(Yr);fg=s(Ny,"TFDebertaModel"),Ny.forEach(t),ug=s(fi," forward method, overrides the "),vl=r(fi,"CODE",{});var Gy=i(vl);gg=s(Gy,"__call__"),Gy.forEach(t),_g=s(fi," special method."),fi.forEach(t),bg=p(es),k(Tn.$$.fragment,es),Tg=p(es),k(yn.$$.fragment,es),es.forEach(t),eo.forEach(t),Ld=p(o),Ro=r(o,"H2",{class:!0});var Ic=i(Ro);wn=r(Ic,"A",{id:!0,class:!0,href:!0});var Ay=i(wn);Ml=r(Ay,"SPAN",{});var Vy=i(Ml);k(Ca.$$.fragment,Vy),Vy.forEach(t),Ay.forEach(t),yg=p(Ic),$l=r(Ic,"SPAN",{});var Sy=i($l);wg=s(Sy,"TFDebertaPreTrainedModel"),Sy.forEach(t),Ic.forEach(t),Qd=p(o),Ut=r(o,"DIV",{class:!0});var ui=i(Ut);k(Ba.$$.fragment,ui),kg=p(ui),El=r(ui,"P",{});var Xy=i(El);vg=s(Xy,`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),Xy.forEach(t),Mg=p(ui),Rt=r(ui,"DIV",{class:!0});var ts=i(Rt);k(Ia.$$.fragment,ts),$g=p(ts),Dl=r(ts,"P",{});var Py=i(Dl);Eg=s(Py,"Calls the model on new inputs and returns the outputs as tensors."),Py.forEach(t),Dg=p(ts),Ua=r(ts,"P",{});var Uc=i(Ua);Fg=s(Uc,"In this case "),Fl=r(Uc,"CODE",{});var Ly=i(Fl);Jg=s(Ly,"call()"),Ly.forEach(t),jg=s(Uc,` just reapplies
all ops in the graph to the new inputs
(e.g. build a new computational graph from the provided inputs).`),Uc.forEach(t),Rg=p(ts),yt=r(ts,"P",{});var to=i(yt);zg=s(to,`Note: This method should not be called directly. It is only meant to be
overridden when subclassing `),Jl=r(to,"CODE",{});var Qy=i(Jl);Cg=s(Qy,"tf.keras.Model"),Qy.forEach(t),Bg=s(to,`.
To call a model on an input, always use the `),jl=r(to,"CODE",{});var Yy=i(jl);Ig=s(Yy,"__call__()"),Yy.forEach(t),Ug=s(to,` method,
i.e. `),Rl=r(to,"CODE",{});var Hy=i(Rl);xg=s(Hy,"model(inputs)"),Hy.forEach(t),Wg=s(to,", which relies on the underlying "),zl=r(to,"CODE",{});var Oy=i(zl);qg=s(Oy,"call()"),Oy.forEach(t),Zg=s(to," method."),to.forEach(t),ts.forEach(t),ui.forEach(t),Yd=p(o),zo=r(o,"H2",{class:!0});var xc=i(zo);kn=r(xc,"A",{id:!0,class:!0,href:!0});var Ky=i(kn);Cl=r(Ky,"SPAN",{});var ew=i(Cl);k(xa.$$.fragment,ew),ew.forEach(t),Ky.forEach(t),Ng=p(xc),Bl=r(xc,"SPAN",{});var tw=i(Bl);Gg=s(tw,"TFDebertaForMaskedLM"),tw.forEach(t),xc.forEach(t),Hd=p(o),ct=r(o,"DIV",{class:!0});var oo=i(ct);k(Wa.$$.fragment,oo),Ag=p(oo),Co=r(oo,"P",{});var gi=i(Co);Vg=s(gi,"DeBERTa Model with a "),Il=r(gi,"CODE",{});var ow=i(Il);Sg=s(ow,"language modeling"),ow.forEach(t),Xg=s(gi,` head on top.
The DeBERTa model was proposed in `),qa=r(gi,"A",{href:!0,rel:!0});var nw=i(qa);Pg=s(nw,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),nw.forEach(t),Lg=s(gi,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),gi.forEach(t),Qg=p(oo),Za=r(oo,"P",{});var Wc=i(Za);Yg=s(Wc,"This model is also a "),Na=r(Wc,"A",{href:!0,rel:!0});var sw=i(Na);Hg=s(sw,"tf.keras.Model"),sw.forEach(t),Og=s(Wc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Wc.forEach(t),Kg=p(oo),k(vn.$$.fragment,oo),e_=p(oo),mt=r(oo,"DIV",{class:!0});var no=i(mt);k(Ga.$$.fragment,no),t_=p(no),Bo=r(no,"P",{});var _i=i(Bo);o_=s(_i,"The "),Hr=r(_i,"A",{href:!0});var aw=i(Hr);n_=s(aw,"TFDebertaForMaskedLM"),aw.forEach(t),s_=s(_i," forward method, overrides the "),Ul=r(_i,"CODE",{});var rw=i(Ul);a_=s(rw,"__call__"),rw.forEach(t),r_=s(_i," special method."),_i.forEach(t),i_=p(no),k(Mn.$$.fragment,no),l_=p(no),k($n.$$.fragment,no),d_=p(no),k(En.$$.fragment,no),no.forEach(t),oo.forEach(t),Od=p(o),Io=r(o,"H2",{class:!0});var qc=i(Io);Dn=r(qc,"A",{id:!0,class:!0,href:!0});var iw=i(Dn);xl=r(iw,"SPAN",{});var lw=i(xl);k(Aa.$$.fragment,lw),lw.forEach(t),iw.forEach(t),c_=p(qc),Wl=r(qc,"SPAN",{});var dw=i(Wl);p_=s(dw,"TFDebertaForSequenceClassification"),dw.forEach(t),qc.forEach(t),Kd=p(o),ot=r(o,"DIV",{class:!0});var zt=i(ot);k(Va.$$.fragment,zt),h_=p(zt),ql=r(zt,"P",{});var cw=i(ql);m_=s(cw,`DeBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),cw.forEach(t),f_=p(zt),Sa=r(zt,"P",{});var Zc=i(Sa);u_=s(Zc,"The DeBERTa model was proposed in "),Xa=r(Zc,"A",{href:!0,rel:!0});var pw=i(Xa);g_=s(pw,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),pw.forEach(t),__=s(Zc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Zc.forEach(t),b_=p(zt),Pa=r(zt,"P",{});var Nc=i(Pa);T_=s(Nc,"This model is also a "),La=r(Nc,"A",{href:!0,rel:!0});var hw=i(La);y_=s(hw,"tf.keras.Model"),hw.forEach(t),w_=s(Nc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Nc.forEach(t),k_=p(zt),k(Fn.$$.fragment,zt),v_=p(zt),ft=r(zt,"DIV",{class:!0});var so=i(ft);k(Qa.$$.fragment,so),M_=p(so),Uo=r(so,"P",{});var bi=i(Uo);$_=s(bi,"The "),Or=r(bi,"A",{href:!0});var mw=i(Or);E_=s(mw,"TFDebertaForSequenceClassification"),mw.forEach(t),D_=s(bi," forward method, overrides the "),Zl=r(bi,"CODE",{});var fw=i(Zl);F_=s(fw,"__call__"),fw.forEach(t),J_=s(bi," special method."),bi.forEach(t),j_=p(so),k(Jn.$$.fragment,so),R_=p(so),k(jn.$$.fragment,so),z_=p(so),k(Rn.$$.fragment,so),so.forEach(t),zt.forEach(t),ec=p(o),xo=r(o,"H2",{class:!0});var Gc=i(xo);zn=r(Gc,"A",{id:!0,class:!0,href:!0});var uw=i(zn);Nl=r(uw,"SPAN",{});var gw=i(Nl);k(Ya.$$.fragment,gw),gw.forEach(t),uw.forEach(t),C_=p(Gc),Gl=r(Gc,"SPAN",{});var _w=i(Gl);B_=s(_w,"TFDebertaForTokenClassification"),_w.forEach(t),Gc.forEach(t),tc=p(o),nt=r(o,"DIV",{class:!0});var Ct=i(nt);k(Ha.$$.fragment,Ct),I_=p(Ct),Al=r(Ct,"P",{});var bw=i(Al);U_=s(bw,`DeBERTa Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),bw.forEach(t),x_=p(Ct),Oa=r(Ct,"P",{});var Ac=i(Oa);W_=s(Ac,"The DeBERTa model was proposed in "),Ka=r(Ac,"A",{href:!0,rel:!0});var Tw=i(Ka);q_=s(Tw,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Tw.forEach(t),Z_=s(Ac,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Ac.forEach(t),N_=p(Ct),er=r(Ct,"P",{});var Vc=i(er);G_=s(Vc,"This model is also a "),tr=r(Vc,"A",{href:!0,rel:!0});var yw=i(tr);A_=s(yw,"tf.keras.Model"),yw.forEach(t),V_=s(Vc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Vc.forEach(t),S_=p(Ct),k(Cn.$$.fragment,Ct),X_=p(Ct),ut=r(Ct,"DIV",{class:!0});var ao=i(ut);k(or.$$.fragment,ao),P_=p(ao),Wo=r(ao,"P",{});var Ti=i(Wo);L_=s(Ti,"The "),Kr=r(Ti,"A",{href:!0});var ww=i(Kr);Q_=s(ww,"TFDebertaForTokenClassification"),ww.forEach(t),Y_=s(Ti," forward method, overrides the "),Vl=r(Ti,"CODE",{});var kw=i(Vl);H_=s(kw,"__call__"),kw.forEach(t),O_=s(Ti," special method."),Ti.forEach(t),K_=p(ao),k(Bn.$$.fragment,ao),eb=p(ao),k(In.$$.fragment,ao),tb=p(ao),k(Un.$$.fragment,ao),ao.forEach(t),Ct.forEach(t),oc=p(o),qo=r(o,"H2",{class:!0});var Sc=i(qo);xn=r(Sc,"A",{id:!0,class:!0,href:!0});var vw=i(xn);Sl=r(vw,"SPAN",{});var Mw=i(Sl);k(nr.$$.fragment,Mw),Mw.forEach(t),vw.forEach(t),ob=p(Sc),Xl=r(Sc,"SPAN",{});var $w=i(Xl);nb=s($w,"TFDebertaForQuestionAnswering"),$w.forEach(t),Sc.forEach(t),nc=p(o),st=r(o,"DIV",{class:!0});var Bt=i(st);k(sr.$$.fragment,Bt),sb=p(Bt),Zo=r(Bt,"P",{});var yi=i(Zo);ab=s(yi,`DeBERTa Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Pl=r(yi,"CODE",{});var Ew=i(Pl);rb=s(Ew,"span start logits"),Ew.forEach(t),ib=s(yi," and "),Ll=r(yi,"CODE",{});var Dw=i(Ll);lb=s(Dw,"span end logits"),Dw.forEach(t),db=s(yi,")."),yi.forEach(t),cb=p(Bt),ar=r(Bt,"P",{});var Xc=i(ar);pb=s(Xc,"The DeBERTa model was proposed in "),rr=r(Xc,"A",{href:!0,rel:!0});var Fw=i(rr);hb=s(Fw,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Fw.forEach(t),mb=s(Xc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Xc.forEach(t),fb=p(Bt),ir=r(Bt,"P",{});var Pc=i(ir);ub=s(Pc,"This model is also a "),lr=r(Pc,"A",{href:!0,rel:!0});var Jw=i(lr);gb=s(Jw,"tf.keras.Model"),Jw.forEach(t),_b=s(Pc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Pc.forEach(t),bb=p(Bt),k(Wn.$$.fragment,Bt),Tb=p(Bt),gt=r(Bt,"DIV",{class:!0});var ro=i(gt);k(dr.$$.fragment,ro),yb=p(ro),No=r(ro,"P",{});var wi=i(No);wb=s(wi,"The "),ei=r(wi,"A",{href:!0});var jw=i(ei);kb=s(jw,"TFDebertaForQuestionAnswering"),jw.forEach(t),vb=s(wi," forward method, overrides the "),Ql=r(wi,"CODE",{});var Rw=i(Ql);Mb=s(Rw,"__call__"),Rw.forEach(t),$b=s(wi," special method."),wi.forEach(t),Eb=p(ro),k(qn.$$.fragment,ro),Db=p(ro),k(Zn.$$.fragment,ro),Fb=p(ro),k(Nn.$$.fragment,ro),ro.forEach(t),Bt.forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(wk)),m(u,"id","deberta"),m(u,"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"),m(u,"href","#deberta"),m(f,"class","relative group"),m(oe,"id","overview"),m(oe,"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"),m(oe,"href","#overview"),m(x,"class","relative group"),m(de,"href","https://arxiv.org/abs/2006.03654"),m(de,"rel","nofollow"),m(ce,"href","https://github.com/microsoft/DeBERTa"),m(ce,"rel","nofollow"),m(pe,"href","https://huggingface.co/DeBERTa"),m(pe,"rel","nofollow"),m(A,"href","https://huggingface.co/kamalkraj"),m(A,"rel","nofollow"),m(V,"href","https://github.com/microsoft/DeBERTa"),m(V,"rel","nofollow"),m(N,"id","resources"),m(N,"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"),m(N,"href","#resources"),m(re,"class","relative group"),m(Ze,"href","https://huggingface.co/blog/accelerate-deepspeed"),m(Ze,"rel","nofollow"),m(S,"href","https://huggingface.co/blog/supercharge-customer-service-with-machine-learning"),m(S,"rel","nofollow"),m(Ae,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaForSequenceClassification"),m(ee,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification"),m(ee,"rel","nofollow"),m(os,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb"),m(os,"rel","nofollow"),m(vr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaForSequenceClassification"),m(ns,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification"),m(ns,"rel","nofollow"),m(ss,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb"),m(ss,"rel","nofollow"),m(Mr,"href","../tasks/sequence_classification"),m($r,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaForTokenClassification"),m(rs,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification"),m(rs,"rel","nofollow"),m(is,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb"),m(is,"rel","nofollow"),m(Er,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaForTokenClassification"),m(ls,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification"),m(ls,"rel","nofollow"),m(ds,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb"),m(ds,"rel","nofollow"),m(cs,"href","https://huggingface.co/course/chapter7/2?fw=pt"),m(cs,"rel","nofollow"),m(ps,"href","https://huggingface.co/course/chapter6/5?fw=pt"),m(ps,"rel","nofollow"),m(Jr,"href","../tasks/token_classification"),m(jr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaForMaskedLM"),m(ms,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling"),m(ms,"rel","nofollow"),m(fs,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),m(fs,"rel","nofollow"),m(Rr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaForMaskedLM"),m(us,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy"),m(us,"rel","nofollow"),m(gs,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb"),m(gs,"rel","nofollow"),m(_s,"href","https://huggingface.co/course/chapter7/3?fw=pt"),m(_s,"rel","nofollow"),m(Cr,"href","../tasks/masked_language_modeling"),m(Br,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaForQuestionAnswering"),m(Ts,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),m(Ts,"rel","nofollow"),m(ys,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),m(ys,"rel","nofollow"),m(Ir,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaForQuestionAnswering"),m(ws,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering"),m(ws,"rel","nofollow"),m(ks,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb"),m(ks,"rel","nofollow"),m(vs,"href","https://huggingface.co/course/chapter7/7?fw=pt"),m(vs,"rel","nofollow"),m(xr,"href","../tasks/question_answering"),m(Go,"id","transformers.DebertaConfig"),m(Go,"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"),m(Go,"href","#transformers.DebertaConfig"),m(io,"class","relative group"),m(Wr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaModel"),m(qr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaModel"),m(Es,"href","https://huggingface.co/microsoft/deberta-base"),m(Es,"rel","nofollow"),m(Zr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(Nr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Vo,"id","transformers.DebertaTokenizer"),m(Vo,"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"),m(Vo,"href","#transformers.DebertaTokenizer"),m(co,"class","relative group"),m(Gr,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ar,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Qo,"id","transformers.DebertaTokenizerFast"),m(Qo,"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"),m(Qo,"href","#transformers.DebertaTokenizerFast"),m(mo,"class","relative group"),m(Vr,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ko,"id","transformers.DebertaModel"),m(Ko,"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"),m(Ko,"href","#transformers.DebertaModel"),m(uo,"class","relative group"),m(Ps,"href","https://arxiv.org/abs/2006.03654"),m(Ps,"rel","nofollow"),m(Qs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Qs,"rel","nofollow"),m(Sr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaModel"),m(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(on,"id","transformers.DebertaPreTrainedModel"),m(on,"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"),m(on,"href","#transformers.DebertaPreTrainedModel"),m(_o,"class","relative group"),m(bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nn,"id","transformers.DebertaForMaskedLM"),m(nn,"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"),m(nn,"href","#transformers.DebertaForMaskedLM"),m(To,"class","relative group"),m(ta,"href","https://arxiv.org/abs/2006.03654"),m(ta,"rel","nofollow"),m(na,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(na,"rel","nofollow"),m(Xr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaForMaskedLM"),m(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(rn,"id","transformers.DebertaForSequenceClassification"),m(rn,"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"),m(rn,"href","#transformers.DebertaForSequenceClassification"),m(ko,"class","relative group"),m(la,"href","https://arxiv.org/abs/2006.03654"),m(la,"rel","nofollow"),m(ca,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(ca,"rel","nofollow"),m(Pr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaForSequenceClassification"),m(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pn,"id","transformers.DebertaForTokenClassification"),m(pn,"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"),m(pn,"href","#transformers.DebertaForTokenClassification"),m(Mo,"class","relative group"),m(ua,"href","https://arxiv.org/abs/2006.03654"),m(ua,"rel","nofollow"),m(_a,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(_a,"rel","nofollow"),m(Lr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaForTokenClassification"),m(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fn,"id","transformers.DebertaForQuestionAnswering"),m(fn,"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"),m(fn,"href","#transformers.DebertaForQuestionAnswering"),m(Eo,"class","relative group"),m(ka,"href","https://arxiv.org/abs/2006.03654"),m(ka,"rel","nofollow"),m(Ma,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Ma,"rel","nofollow"),m(Qr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.DebertaForQuestionAnswering"),m(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_n,"id","transformers.TFDebertaModel"),m(_n,"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"),m(_n,"href","#transformers.TFDebertaModel"),m(Jo,"class","relative group"),m(Ja,"href","https://arxiv.org/abs/2006.03654"),m(Ja,"rel","nofollow"),m(Ra,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Ra,"rel","nofollow"),m(Yr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaModel"),m(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wn,"id","transformers.TFDebertaPreTrainedModel"),m(wn,"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"),m(wn,"href","#transformers.TFDebertaPreTrainedModel"),m(Ro,"class","relative group"),m(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(kn,"id","transformers.TFDebertaForMaskedLM"),m(kn,"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"),m(kn,"href","#transformers.TFDebertaForMaskedLM"),m(zo,"class","relative group"),m(qa,"href","https://arxiv.org/abs/2006.03654"),m(qa,"rel","nofollow"),m(Na,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Na,"rel","nofollow"),m(Hr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaForMaskedLM"),m(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Dn,"id","transformers.TFDebertaForSequenceClassification"),m(Dn,"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"),m(Dn,"href","#transformers.TFDebertaForSequenceClassification"),m(Io,"class","relative group"),m(Xa,"href","https://arxiv.org/abs/2006.03654"),m(Xa,"rel","nofollow"),m(La,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(La,"rel","nofollow"),m(Or,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaForSequenceClassification"),m(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(zn,"id","transformers.TFDebertaForTokenClassification"),m(zn,"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"),m(zn,"href","#transformers.TFDebertaForTokenClassification"),m(xo,"class","relative group"),m(Ka,"href","https://arxiv.org/abs/2006.03654"),m(Ka,"rel","nofollow"),m(tr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(tr,"rel","nofollow"),m(Kr,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaForTokenClassification"),m(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(xn,"id","transformers.TFDebertaForQuestionAnswering"),m(xn,"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"),m(xn,"href","#transformers.TFDebertaForQuestionAnswering"),m(qo,"class","relative group"),m(rr,"href","https://arxiv.org/abs/2006.03654"),m(rr,"rel","nofollow"),m(lr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(lr,"rel","nofollow"),m(ei,"href","/docs/transformers/main/en/model_doc/deberta#transformers.TFDebertaForQuestionAnswering"),m(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,_){e(document.head,d),g(o,b,_),g(o,f,_),e(f,u),e(u,T),v(l,T,null),e(f,h),e(f,j),e(j,ae),g(o,Q,_),g(o,x,_),e(x,oe),e(oe,se),v(D,se,null),e(x,ve),e(x,L),e(L,Me),g(o,_e,_),g(o,Z,_),e(Z,$e),e(Z,de),e(de,Y),e(Z,Ee),g(o,be,_),g(o,X,_),e(X,De),g(o,Te,_),g(o,P,_),e(P,Fe),g(o,ye,_),g(o,ne,_),e(ne,z),e(z,C),e(z,ce),e(ce,H),e(z,Je),g(o,we,_),g(o,W,_),e(W,je),e(W,pe),e(pe,B),e(W,Re),e(W,A),e(A,ze),e(W,Ce),e(W,V),e(V,Be),e(W,Ie),g(o,q,_),g(o,re,_),e(re,N),e(N,fe),v(K,fe,null),e(re,I),e(re,ue),e(ue,U),g(o,ke,_),g(o,me,_),e(me,y),g(o,F,_),v(We,o,_),g(o,ie,_),g(o,le,_),e(le,qe),e(qe,R),e(qe,Ze),e(Ze,Pe),e(qe,Le),e(le,Qe),e(le,Ne),e(Ne,G),e(Ne,S),e(S,Ye),e(Ne,He),e(le,O),e(le,ge),e(ge,Ae),e(Ae,Ue),e(ge,Oe),e(ge,ee),e(ee,Ke),e(ge,Qc),e(ge,os),e(os,Yc),e(ge,Hc),e(le,Oc),e(le,Wt),e(Wt,vr),e(vr,Kc),e(Wt,ep),e(Wt,ns),e(ns,tp),e(Wt,op),e(Wt,ss),e(ss,np),e(Wt,sp),e(le,ap),e(le,ki),e(ki,Mr),e(Mr,rp),g(o,kd,_),v(as,o,_),g(o,vd,_),g(o,pt,_),e(pt,qt),e(qt,$r),e($r,ip),e(qt,lp),e(qt,rs),e(rs,dp),e(qt,cp),e(qt,is),e(is,pp),e(qt,hp),e(pt,mp),e(pt,Zt),e(Zt,Er),e(Er,fp),e(Zt,up),e(Zt,ls),e(ls,gp),e(Zt,_p),e(Zt,ds),e(ds,bp),e(Zt,Tp),e(pt,yp),e(pt,Dr),e(Dr,cs),e(cs,wp),e(Dr,kp),e(pt,vp),e(pt,Fr),e(Fr,ps),e(ps,Mp),e(Fr,$p),e(pt,Ep),e(pt,vi),e(vi,Jr),e(Jr,Dp),g(o,Md,_),v(hs,o,_),g(o,$d,_),g(o,kt,_),e(kt,Nt),e(Nt,jr),e(jr,Fp),e(Nt,Jp),e(Nt,ms),e(ms,jp),e(Nt,Rp),e(Nt,fs),e(fs,zp),e(Nt,Cp),e(kt,Bp),e(kt,Gt),e(Gt,Rr),e(Rr,Ip),e(Gt,Up),e(Gt,us),e(us,xp),e(Gt,Wp),e(Gt,gs),e(gs,qp),e(Gt,Zp),e(kt,Np),e(kt,zr),e(zr,_s),e(_s,Gp),e(zr,Ap),e(kt,Vp),e(kt,Mi),e(Mi,Cr),e(Cr,Sp),g(o,Ed,_),v(bs,o,_),g(o,Dd,_),g(o,vt,_),e(vt,At),e(At,Br),e(Br,Xp),e(At,Pp),e(At,Ts),e(Ts,Lp),e(At,Qp),e(At,ys),e(ys,Yp),e(At,Hp),e(vt,Op),e(vt,Vt),e(Vt,Ir),e(Ir,Kp),e(Vt,eh),e(Vt,ws),e(ws,th),e(Vt,oh),e(Vt,ks),e(ks,nh),e(Vt,sh),e(vt,ah),e(vt,Ur),e(Ur,vs),e(vs,rh),e(Ur,ih),e(vt,lh),e(vt,$i),e($i,xr),e(xr,dh),g(o,Fd,_),g(o,io,_),e(io,Go),e(Go,Ei),v(Ms,Ei,null),e(io,ch),e(io,Di),e(Di,ph),g(o,Jd,_),g(o,_t,_),v($s,_t,null),e(_t,hh),e(_t,It),e(It,mh),e(It,Wr),e(Wr,fh),e(It,uh),e(It,qr),e(qr,gh),e(It,_h),e(It,Es),e(Es,bh),e(It,Th),e(_t,yh),e(_t,lo),e(lo,wh),e(lo,Zr),e(Zr,kh),e(lo,vh),e(lo,Nr),e(Nr,Mh),e(lo,$h),e(_t,Eh),v(Ao,_t,null),g(o,jd,_),g(o,co,_),e(co,Vo),e(Vo,Fi),v(Ds,Fi,null),e(co,Dh),e(co,Ji),e(Ji,Fh),g(o,Rd,_),g(o,he,_),v(Fs,he,null),e(he,Jh),e(he,ji),e(ji,jh),e(he,Rh),e(he,Ri),e(Ri,zh),e(he,Ch),v(So,he,null),e(he,Bh),e(he,Js),e(Js,Ih),e(Js,zi),e(zi,Uh),e(Js,xh),e(he,Wh),v(Xo,he,null),e(he,qh),e(he,js),e(js,Zh),e(js,Gr),e(Gr,Nh),e(js,Gh),e(he,Ah),e(he,St),v(Rs,St,null),e(St,Vh),e(St,Ci),e(Ci,Sh),e(St,Xh),e(St,zs),e(zs,Bi),e(Bi,Ph),e(zs,Lh),e(zs,Ii),e(Ii,Qh),e(he,Yh),e(he,Po),v(Cs,Po,null),e(Po,Hh),e(Po,po),e(po,Oh),e(po,Ui),e(Ui,Kh),e(po,em),e(po,xi),e(xi,tm),e(po,om),e(he,nm),e(he,Mt),v(Bs,Mt,null),e(Mt,sm),e(Mt,Wi),e(Wi,am),e(Mt,rm),v(Lo,Mt,null),e(Mt,im),e(Mt,ho),e(ho,lm),e(ho,qi),e(qi,dm),e(ho,cm),e(ho,Zi),e(Zi,pm),e(ho,hm),e(he,mm),e(he,Ar),v(Is,Ar,null),g(o,zd,_),g(o,mo,_),e(mo,Qo),e(Qo,Ni),v(Us,Ni,null),e(mo,fm),e(mo,Gi),e(Gi,um),g(o,Cd,_),g(o,xe,_),v(xs,xe,null),e(xe,gm),e(xe,Ws),e(Ws,_m),e(Ws,Ai),e(Ai,bm),e(Ws,Tm),e(xe,ym),e(xe,Vi),e(Vi,wm),e(xe,km),v(Yo,xe,null),e(xe,vm),e(xe,qs),e(qs,Mm),e(qs,Si),e(Si,$m),e(qs,Em),e(xe,Dm),v(Ho,xe,null),e(xe,Fm),e(xe,Zs),e(Zs,Jm),e(Zs,Vr),e(Vr,jm),e(Zs,Rm),e(xe,zm),e(xe,Xt),v(Ns,Xt,null),e(Xt,Cm),e(Xt,Xi),e(Xi,Bm),e(Xt,Im),e(Xt,Gs),e(Gs,Pi),e(Pi,Um),e(Gs,xm),e(Gs,Li),e(Li,Wm),e(xe,qm),e(xe,$t),v(As,$t,null),e($t,Zm),e($t,Qi),e(Qi,Nm),e($t,Gm),v(Oo,$t,null),e($t,Am),e($t,fo),e(fo,Vm),e(fo,Yi),e(Yi,Sm),e(fo,Xm),e(fo,Hi),e(Hi,Pm),e(fo,Lm),g(o,Bd,_),g(o,uo,_),e(uo,Ko),e(Ko,Oi),v(Vs,Oi,null),e(uo,Qm),e(uo,Ki),e(Ki,Ym),g(o,Id,_),g(o,bt,_),v(Ss,bt,null),e(bt,Hm),e(bt,Xs),e(Xs,Om),e(Xs,Ps),e(Ps,Km),e(Xs,ef),e(bt,tf),e(bt,Ls),e(Ls,of),e(Ls,Qs),e(Qs,nf),e(Ls,sf),e(bt,af),e(bt,Et),v(Ys,Et,null),e(Et,rf),e(Et,go),e(go,lf),e(go,Sr),e(Sr,df),e(go,cf),e(go,el),e(el,pf),e(go,hf),e(Et,mf),v(en,Et,null),e(Et,ff),v(tn,Et,null),g(o,Ud,_),g(o,_o,_),e(_o,on),e(on,tl),v(Hs,tl,null),e(_o,uf),e(_o,ol),e(ol,gf),g(o,xd,_),g(o,bo,_),v(Os,bo,null),e(bo,_f),e(bo,nl),e(nl,bf),g(o,Wd,_),g(o,To,_),e(To,nn),e(nn,sl),v(Ks,sl,null),e(To,Tf),e(To,al),e(al,yf),g(o,qd,_),g(o,Tt,_),v(ea,Tt,null),e(Tt,wf),e(Tt,yo),e(yo,kf),e(yo,rl),e(rl,vf),e(yo,Mf),e(yo,ta),e(ta,$f),e(yo,Ef),e(Tt,Df),e(Tt,oa),e(oa,Ff),e(oa,na),e(na,Jf),e(oa,jf),e(Tt,Rf),e(Tt,Dt),v(sa,Dt,null),e(Dt,zf),e(Dt,wo),e(wo,Cf),e(wo,Xr),e(Xr,Bf),e(wo,If),e(wo,il),e(il,Uf),e(wo,xf),e(Dt,Wf),v(sn,Dt,null),e(Dt,qf),v(an,Dt,null),g(o,Zd,_),g(o,ko,_),e(ko,rn),e(rn,ll),v(aa,ll,null),e(ko,Zf),e(ko,dl),e(dl,Nf),g(o,Nd,_),g(o,rt,_),v(ra,rt,null),e(rt,Gf),e(rt,cl),e(cl,Af),e(rt,Vf),e(rt,ia),e(ia,Sf),e(ia,la),e(la,Xf),e(ia,Pf),e(rt,Lf),e(rt,da),e(da,Qf),e(da,ca),e(ca,Yf),e(da,Hf),e(rt,Of),e(rt,ht),v(pa,ht,null),e(ht,Kf),e(ht,vo),e(vo,eu),e(vo,Pr),e(Pr,tu),e(vo,ou),e(vo,pl),e(pl,nu),e(vo,su),e(ht,au),v(ln,ht,null),e(ht,ru),v(dn,ht,null),e(ht,iu),v(cn,ht,null),g(o,Gd,_),g(o,Mo,_),e(Mo,pn),e(pn,hl),v(ha,hl,null),e(Mo,lu),e(Mo,ml),e(ml,du),g(o,Ad,_),g(o,it,_),v(ma,it,null),e(it,cu),e(it,fl),e(fl,pu),e(it,hu),e(it,fa),e(fa,mu),e(fa,ua),e(ua,fu),e(fa,uu),e(it,gu),e(it,ga),e(ga,_u),e(ga,_a),e(_a,bu),e(ga,Tu),e(it,yu),e(it,Ft),v(ba,Ft,null),e(Ft,wu),e(Ft,$o),e($o,ku),e($o,Lr),e(Lr,vu),e($o,Mu),e($o,ul),e(ul,$u),e($o,Eu),e(Ft,Du),v(hn,Ft,null),e(Ft,Fu),v(mn,Ft,null),g(o,Vd,_),g(o,Eo,_),e(Eo,fn),e(fn,gl),v(Ta,gl,null),e(Eo,Ju),e(Eo,_l),e(_l,ju),g(o,Sd,_),g(o,lt,_),v(ya,lt,null),e(lt,Ru),e(lt,Do),e(Do,zu),e(Do,bl),e(bl,Cu),e(Do,Bu),e(Do,Tl),e(Tl,Iu),e(Do,Uu),e(lt,xu),e(lt,wa),e(wa,Wu),e(wa,ka),e(ka,qu),e(wa,Zu),e(lt,Nu),e(lt,va),e(va,Gu),e(va,Ma),e(Ma,Au),e(va,Vu),e(lt,Su),e(lt,Jt),v($a,Jt,null),e(Jt,Xu),e(Jt,Fo),e(Fo,Pu),e(Fo,Qr),e(Qr,Lu),e(Fo,Qu),e(Fo,yl),e(yl,Yu),e(Fo,Hu),e(Jt,Ou),v(un,Jt,null),e(Jt,Ku),v(gn,Jt,null),g(o,Xd,_),g(o,Jo,_),e(Jo,_n),e(_n,wl),v(Ea,wl,null),e(Jo,eg),e(Jo,kl),e(kl,tg),g(o,Pd,_),g(o,dt,_),v(Da,dt,null),e(dt,og),e(dt,Fa),e(Fa,ng),e(Fa,Ja),e(Ja,sg),e(Fa,ag),e(dt,rg),e(dt,ja),e(ja,ig),e(ja,Ra),e(Ra,lg),e(ja,dg),e(dt,cg),v(bn,dt,null),e(dt,pg),e(dt,jt),v(za,jt,null),e(jt,hg),e(jt,jo),e(jo,mg),e(jo,Yr),e(Yr,fg),e(jo,ug),e(jo,vl),e(vl,gg),e(jo,_g),e(jt,bg),v(Tn,jt,null),e(jt,Tg),v(yn,jt,null),g(o,Ld,_),g(o,Ro,_),e(Ro,wn),e(wn,Ml),v(Ca,Ml,null),e(Ro,yg),e(Ro,$l),e($l,wg),g(o,Qd,_),g(o,Ut,_),v(Ba,Ut,null),e(Ut,kg),e(Ut,El),e(El,vg),e(Ut,Mg),e(Ut,Rt),v(Ia,Rt,null),e(Rt,$g),e(Rt,Dl),e(Dl,Eg),e(Rt,Dg),e(Rt,Ua),e(Ua,Fg),e(Ua,Fl),e(Fl,Jg),e(Ua,jg),e(Rt,Rg),e(Rt,yt),e(yt,zg),e(yt,Jl),e(Jl,Cg),e(yt,Bg),e(yt,jl),e(jl,Ig),e(yt,Ug),e(yt,Rl),e(Rl,xg),e(yt,Wg),e(yt,zl),e(zl,qg),e(yt,Zg),g(o,Yd,_),g(o,zo,_),e(zo,kn),e(kn,Cl),v(xa,Cl,null),e(zo,Ng),e(zo,Bl),e(Bl,Gg),g(o,Hd,_),g(o,ct,_),v(Wa,ct,null),e(ct,Ag),e(ct,Co),e(Co,Vg),e(Co,Il),e(Il,Sg),e(Co,Xg),e(Co,qa),e(qa,Pg),e(Co,Lg),e(ct,Qg),e(ct,Za),e(Za,Yg),e(Za,Na),e(Na,Hg),e(Za,Og),e(ct,Kg),v(vn,ct,null),e(ct,e_),e(ct,mt),v(Ga,mt,null),e(mt,t_),e(mt,Bo),e(Bo,o_),e(Bo,Hr),e(Hr,n_),e(Bo,s_),e(Bo,Ul),e(Ul,a_),e(Bo,r_),e(mt,i_),v(Mn,mt,null),e(mt,l_),v($n,mt,null),e(mt,d_),v(En,mt,null),g(o,Od,_),g(o,Io,_),e(Io,Dn),e(Dn,xl),v(Aa,xl,null),e(Io,c_),e(Io,Wl),e(Wl,p_),g(o,Kd,_),g(o,ot,_),v(Va,ot,null),e(ot,h_),e(ot,ql),e(ql,m_),e(ot,f_),e(ot,Sa),e(Sa,u_),e(Sa,Xa),e(Xa,g_),e(Sa,__),e(ot,b_),e(ot,Pa),e(Pa,T_),e(Pa,La),e(La,y_),e(Pa,w_),e(ot,k_),v(Fn,ot,null),e(ot,v_),e(ot,ft),v(Qa,ft,null),e(ft,M_),e(ft,Uo),e(Uo,$_),e(Uo,Or),e(Or,E_),e(Uo,D_),e(Uo,Zl),e(Zl,F_),e(Uo,J_),e(ft,j_),v(Jn,ft,null),e(ft,R_),v(jn,ft,null),e(ft,z_),v(Rn,ft,null),g(o,ec,_),g(o,xo,_),e(xo,zn),e(zn,Nl),v(Ya,Nl,null),e(xo,C_),e(xo,Gl),e(Gl,B_),g(o,tc,_),g(o,nt,_),v(Ha,nt,null),e(nt,I_),e(nt,Al),e(Al,U_),e(nt,x_),e(nt,Oa),e(Oa,W_),e(Oa,Ka),e(Ka,q_),e(Oa,Z_),e(nt,N_),e(nt,er),e(er,G_),e(er,tr),e(tr,A_),e(er,V_),e(nt,S_),v(Cn,nt,null),e(nt,X_),e(nt,ut),v(or,ut,null),e(ut,P_),e(ut,Wo),e(Wo,L_),e(Wo,Kr),e(Kr,Q_),e(Wo,Y_),e(Wo,Vl),e(Vl,H_),e(Wo,O_),e(ut,K_),v(Bn,ut,null),e(ut,eb),v(In,ut,null),e(ut,tb),v(Un,ut,null),g(o,oc,_),g(o,qo,_),e(qo,xn),e(xn,Sl),v(nr,Sl,null),e(qo,ob),e(qo,Xl),e(Xl,nb),g(o,nc,_),g(o,st,_),v(sr,st,null),e(st,sb),e(st,Zo),e(Zo,ab),e(Zo,Pl),e(Pl,rb),e(Zo,ib),e(Zo,Ll),e(Ll,lb),e(Zo,db),e(st,cb),e(st,ar),e(ar,pb),e(ar,rr),e(rr,hb),e(ar,mb),e(st,fb),e(st,ir),e(ir,ub),e(ir,lr),e(lr,gb),e(ir,_b),e(st,bb),v(Wn,st,null),e(st,Tb),e(st,gt),v(dr,gt,null),e(gt,yb),e(gt,No),e(No,wb),e(No,ei),e(ei,kb),e(No,vb),e(No,Ql),e(Ql,Mb),e(No,$b),e(gt,Eb),v(qn,gt,null),e(gt,Db),v(Zn,gt,null),e(gt,Fb),v(Nn,gt,null),sc=!0},p(o,[_]){const cr={};_&2&&(cr.$$scope={dirty:_,ctx:o}),Ao.$set(cr);const Yl={};_&2&&(Yl.$$scope={dirty:_,ctx:o}),So.$set(Yl);const Hl={};_&2&&(Hl.$$scope={dirty:_,ctx:o}),Xo.$set(Hl);const Ol={};_&2&&(Ol.$$scope={dirty:_,ctx:o}),Lo.$set(Ol);const pr={};_&2&&(pr.$$scope={dirty:_,ctx:o}),Yo.$set(pr);const Kl={};_&2&&(Kl.$$scope={dirty:_,ctx:o}),Ho.$set(Kl);const ed={};_&2&&(ed.$$scope={dirty:_,ctx:o}),Oo.$set(ed);const td={};_&2&&(td.$$scope={dirty:_,ctx:o}),en.$set(td);const hr={};_&2&&(hr.$$scope={dirty:_,ctx:o}),tn.$set(hr);const od={};_&2&&(od.$$scope={dirty:_,ctx:o}),sn.$set(od);const nd={};_&2&&(nd.$$scope={dirty:_,ctx:o}),an.$set(nd);const sd={};_&2&&(sd.$$scope={dirty:_,ctx:o}),ln.$set(sd);const ad={};_&2&&(ad.$$scope={dirty:_,ctx:o}),dn.$set(ad);const mr={};_&2&&(mr.$$scope={dirty:_,ctx:o}),cn.$set(mr);const rd={};_&2&&(rd.$$scope={dirty:_,ctx:o}),hn.$set(rd);const xt={};_&2&&(xt.$$scope={dirty:_,ctx:o}),mn.$set(xt);const id={};_&2&&(id.$$scope={dirty:_,ctx:o}),un.$set(id);const ld={};_&2&&(ld.$$scope={dirty:_,ctx:o}),gn.$set(ld);const dd={};_&2&&(dd.$$scope={dirty:_,ctx:o}),bn.$set(dd);const fr={};_&2&&(fr.$$scope={dirty:_,ctx:o}),Tn.$set(fr);const cd={};_&2&&(cd.$$scope={dirty:_,ctx:o}),yn.$set(cd);const pd={};_&2&&(pd.$$scope={dirty:_,ctx:o}),vn.$set(pd);const hd={};_&2&&(hd.$$scope={dirty:_,ctx:o}),Mn.$set(hd);const md={};_&2&&(md.$$scope={dirty:_,ctx:o}),$n.$set(md);const wt={};_&2&&(wt.$$scope={dirty:_,ctx:o}),En.$set(wt);const ur={};_&2&&(ur.$$scope={dirty:_,ctx:o}),Fn.$set(ur);const fd={};_&2&&(fd.$$scope={dirty:_,ctx:o}),Jn.$set(fd);const gr={};_&2&&(gr.$$scope={dirty:_,ctx:o}),jn.$set(gr);const ud={};_&2&&(ud.$$scope={dirty:_,ctx:o}),Rn.$set(ud);const Pt={};_&2&&(Pt.$$scope={dirty:_,ctx:o}),Cn.$set(Pt);const gd={};_&2&&(gd.$$scope={dirty:_,ctx:o}),Bn.$set(gd);const _d={};_&2&&(_d.$$scope={dirty:_,ctx:o}),In.$set(_d);const bd={};_&2&&(bd.$$scope={dirty:_,ctx:o}),Un.$set(bd);const Lt={};_&2&&(Lt.$$scope={dirty:_,ctx:o}),Wn.$set(Lt);const Td={};_&2&&(Td.$$scope={dirty:_,ctx:o}),qn.$set(Td);const yd={};_&2&&(yd.$$scope={dirty:_,ctx:o}),Zn.$set(yd);const wd={};_&2&&(wd.$$scope={dirty:_,ctx:o}),Nn.$set(wd)},i(o){sc||(M(l.$$.fragment,o),M(D.$$.fragment,o),M(K.$$.fragment,o),M(We.$$.fragment,o),M(as.$$.fragment,o),M(hs.$$.fragment,o),M(bs.$$.fragment,o),M(Ms.$$.fragment,o),M($s.$$.fragment,o),M(Ao.$$.fragment,o),M(Ds.$$.fragment,o),M(Fs.$$.fragment,o),M(So.$$.fragment,o),M(Xo.$$.fragment,o),M(Rs.$$.fragment,o),M(Cs.$$.fragment,o),M(Bs.$$.fragment,o),M(Lo.$$.fragment,o),M(Is.$$.fragment,o),M(Us.$$.fragment,o),M(xs.$$.fragment,o),M(Yo.$$.fragment,o),M(Ho.$$.fragment,o),M(Ns.$$.fragment,o),M(As.$$.fragment,o),M(Oo.$$.fragment,o),M(Vs.$$.fragment,o),M(Ss.$$.fragment,o),M(Ys.$$.fragment,o),M(en.$$.fragment,o),M(tn.$$.fragment,o),M(Hs.$$.fragment,o),M(Os.$$.fragment,o),M(Ks.$$.fragment,o),M(ea.$$.fragment,o),M(sa.$$.fragment,o),M(sn.$$.fragment,o),M(an.$$.fragment,o),M(aa.$$.fragment,o),M(ra.$$.fragment,o),M(pa.$$.fragment,o),M(ln.$$.fragment,o),M(dn.$$.fragment,o),M(cn.$$.fragment,o),M(ha.$$.fragment,o),M(ma.$$.fragment,o),M(ba.$$.fragment,o),M(hn.$$.fragment,o),M(mn.$$.fragment,o),M(Ta.$$.fragment,o),M(ya.$$.fragment,o),M($a.$$.fragment,o),M(un.$$.fragment,o),M(gn.$$.fragment,o),M(Ea.$$.fragment,o),M(Da.$$.fragment,o),M(bn.$$.fragment,o),M(za.$$.fragment,o),M(Tn.$$.fragment,o),M(yn.$$.fragment,o),M(Ca.$$.fragment,o),M(Ba.$$.fragment,o),M(Ia.$$.fragment,o),M(xa.$$.fragment,o),M(Wa.$$.fragment,o),M(vn.$$.fragment,o),M(Ga.$$.fragment,o),M(Mn.$$.fragment,o),M($n.$$.fragment,o),M(En.$$.fragment,o),M(Aa.$$.fragment,o),M(Va.$$.fragment,o),M(Fn.$$.fragment,o),M(Qa.$$.fragment,o),M(Jn.$$.fragment,o),M(jn.$$.fragment,o),M(Rn.$$.fragment,o),M(Ya.$$.fragment,o),M(Ha.$$.fragment,o),M(Cn.$$.fragment,o),M(or.$$.fragment,o),M(Bn.$$.fragment,o),M(In.$$.fragment,o),M(Un.$$.fragment,o),M(nr.$$.fragment,o),M(sr.$$.fragment,o),M(Wn.$$.fragment,o),M(dr.$$.fragment,o),M(qn.$$.fragment,o),M(Zn.$$.fragment,o),M(Nn.$$.fragment,o),sc=!0)},o(o){$(l.$$.fragment,o),$(D.$$.fragment,o),$(K.$$.fragment,o),$(We.$$.fragment,o),$(as.$$.fragment,o),$(hs.$$.fragment,o),$(bs.$$.fragment,o),$(Ms.$$.fragment,o),$($s.$$.fragment,o),$(Ao.$$.fragment,o),$(Ds.$$.fragment,o),$(Fs.$$.fragment,o),$(So.$$.fragment,o),$(Xo.$$.fragment,o),$(Rs.$$.fragment,o),$(Cs.$$.fragment,o),$(Bs.$$.fragment,o),$(Lo.$$.fragment,o),$(Is.$$.fragment,o),$(Us.$$.fragment,o),$(xs.$$.fragment,o),$(Yo.$$.fragment,o),$(Ho.$$.fragment,o),$(Ns.$$.fragment,o),$(As.$$.fragment,o),$(Oo.$$.fragment,o),$(Vs.$$.fragment,o),$(Ss.$$.fragment,o),$(Ys.$$.fragment,o),$(en.$$.fragment,o),$(tn.$$.fragment,o),$(Hs.$$.fragment,o),$(Os.$$.fragment,o),$(Ks.$$.fragment,o),$(ea.$$.fragment,o),$(sa.$$.fragment,o),$(sn.$$.fragment,o),$(an.$$.fragment,o),$(aa.$$.fragment,o),$(ra.$$.fragment,o),$(pa.$$.fragment,o),$(ln.$$.fragment,o),$(dn.$$.fragment,o),$(cn.$$.fragment,o),$(ha.$$.fragment,o),$(ma.$$.fragment,o),$(ba.$$.fragment,o),$(hn.$$.fragment,o),$(mn.$$.fragment,o),$(Ta.$$.fragment,o),$(ya.$$.fragment,o),$($a.$$.fragment,o),$(un.$$.fragment,o),$(gn.$$.fragment,o),$(Ea.$$.fragment,o),$(Da.$$.fragment,o),$(bn.$$.fragment,o),$(za.$$.fragment,o),$(Tn.$$.fragment,o),$(yn.$$.fragment,o),$(Ca.$$.fragment,o),$(Ba.$$.fragment,o),$(Ia.$$.fragment,o),$(xa.$$.fragment,o),$(Wa.$$.fragment,o),$(vn.$$.fragment,o),$(Ga.$$.fragment,o),$(Mn.$$.fragment,o),$($n.$$.fragment,o),$(En.$$.fragment,o),$(Aa.$$.fragment,o),$(Va.$$.fragment,o),$(Fn.$$.fragment,o),$(Qa.$$.fragment,o),$(Jn.$$.fragment,o),$(jn.$$.fragment,o),$(Rn.$$.fragment,o),$(Ya.$$.fragment,o),$(Ha.$$.fragment,o),$(Cn.$$.fragment,o),$(or.$$.fragment,o),$(Bn.$$.fragment,o),$(In.$$.fragment,o),$(Un.$$.fragment,o),$(nr.$$.fragment,o),$(sr.$$.fragment,o),$(Wn.$$.fragment,o),$(dr.$$.fragment,o),$(qn.$$.fragment,o),$(Zn.$$.fragment,o),$(Nn.$$.fragment,o),sc=!1},d(o){t(d),o&&t(b),o&&t(f),E(l),o&&t(Q),o&&t(x),E(D),o&&t(_e),o&&t(Z),o&&t(be),o&&t(X),o&&t(Te),o&&t(P),o&&t(ye),o&&t(ne),o&&t(we),o&&t(W),o&&t(q),o&&t(re),E(K),o&&t(ke),o&&t(me),o&&t(F),E(We,o),o&&t(ie),o&&t(le),o&&t(kd),E(as,o),o&&t(vd),o&&t(pt),o&&t(Md),E(hs,o),o&&t($d),o&&t(kt),o&&t(Ed),E(bs,o),o&&t(Dd),o&&t(vt),o&&t(Fd),o&&t(io),E(Ms),o&&t(Jd),o&&t(_t),E($s),E(Ao),o&&t(jd),o&&t(co),E(Ds),o&&t(Rd),o&&t(he),E(Fs),E(So),E(Xo),E(Rs),E(Cs),E(Bs),E(Lo),E(Is),o&&t(zd),o&&t(mo),E(Us),o&&t(Cd),o&&t(xe),E(xs),E(Yo),E(Ho),E(Ns),E(As),E(Oo),o&&t(Bd),o&&t(uo),E(Vs),o&&t(Id),o&&t(bt),E(Ss),E(Ys),E(en),E(tn),o&&t(Ud),o&&t(_o),E(Hs),o&&t(xd),o&&t(bo),E(Os),o&&t(Wd),o&&t(To),E(Ks),o&&t(qd),o&&t(Tt),E(ea),E(sa),E(sn),E(an),o&&t(Zd),o&&t(ko),E(aa),o&&t(Nd),o&&t(rt),E(ra),E(pa),E(ln),E(dn),E(cn),o&&t(Gd),o&&t(Mo),E(ha),o&&t(Ad),o&&t(it),E(ma),E(ba),E(hn),E(mn),o&&t(Vd),o&&t(Eo),E(Ta),o&&t(Sd),o&&t(lt),E(ya),E($a),E(un),E(gn),o&&t(Xd),o&&t(Jo),E(Ea),o&&t(Pd),o&&t(dt),E(Da),E(bn),E(za),E(Tn),E(yn),o&&t(Ld),o&&t(Ro),E(Ca),o&&t(Qd),o&&t(Ut),E(Ba),E(Ia),o&&t(Yd),o&&t(zo),E(xa),o&&t(Hd),o&&t(ct),E(Wa),E(vn),E(Ga),E(Mn),E($n),E(En),o&&t(Od),o&&t(Io),E(Aa),o&&t(Kd),o&&t(ot),E(Va),E(Fn),E(Qa),E(Jn),E(jn),E(Rn),o&&t(ec),o&&t(xo),E(Ya),o&&t(tc),o&&t(nt),E(Ha),E(Cn),E(or),E(Bn),E(In),E(Un),o&&t(oc),o&&t(qo),E(nr),o&&t(nc),o&&t(st),E(sr),E(Wn),E(dr),E(qn),E(Zn),E(Nn)}}}const wk={local:"deberta",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.DebertaConfig",title:"DebertaConfig"},{local:"transformers.DebertaTokenizer",title:"DebertaTokenizer"},{local:"transformers.DebertaTokenizerFast",title:"DebertaTokenizerFast"},{local:"transformers.DebertaModel",title:"DebertaModel"},{local:"transformers.DebertaPreTrainedModel",title:"DebertaPreTrainedModel"},{local:"transformers.DebertaForMaskedLM",title:"DebertaForMaskedLM"},{local:"transformers.DebertaForSequenceClassification",title:"DebertaForSequenceClassification"},{local:"transformers.DebertaForTokenClassification",title:"DebertaForTokenClassification"},{local:"transformers.DebertaForQuestionAnswering",title:"DebertaForQuestionAnswering"},{local:"transformers.TFDebertaModel",title:"TFDebertaModel"},{local:"transformers.TFDebertaPreTrainedModel",title:"TFDebertaPreTrainedModel"},{local:"transformers.TFDebertaForMaskedLM",title:"TFDebertaForMaskedLM"},{local:"transformers.TFDebertaForSequenceClassification",title:"TFDebertaForSequenceClassification"},{local:"transformers.TFDebertaForTokenClassification",title:"TFDebertaForTokenClassification"},{local:"transformers.TFDebertaForQuestionAnswering",title:"TFDebertaForQuestionAnswering"}],title:"DeBERTa"};function kk(J){return Uw(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class jk extends zw{constructor(d){super();Cw(this,d,kk,yk,Bw,{})}}export{jk as default,wk as metadata};
