import{S as q2,i as G2,s as N2,e as a,k as c,w as v,t as n,M as A2,c as r,d as t,m as p,a as i,x as w,h as s,b as u,G as e,g,y as k,q as M,o as $,B as E,v as S2,L as Ne}from"../../chunks/vendor-hf-doc-builder.js";import{T as ot}from"../../chunks/Tip-hf-doc-builder.js";import{D as L}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ae}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as qe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ge}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function X2(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERlYmVydGFWMkNvbmZpZyUyQyUyMERlYmVydGFWMk1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMERlQkVSVGEtdjIlMjBtaWNyb3NvZnQlMkZkZWJlcnRhLXYyLXhsYXJnZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBEZWJlcnRhVjJDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwbWljcm9zb2Z0JTJGZGViZXJ0YS12Mi14bGFyZ2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMERlYmVydGFWMk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DebertaV2Config, DebertaV2Model

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the microsoft/deberta-v2-xlarge style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2Model(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"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function P2(j){let d,y,m,f,T;return f=new Ae({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"),y=n("sequence pair mask has the following format:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"sequence pair mask has the following format:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function L2(j){let d,y,m,f,T;return f=new Ae({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"),y=n("sequence pair mask has the following format:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"sequence pair mask has the following format:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function Q2(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function Y2(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBEZWJlcnRhVjJNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS12Mi14bGFyZ2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBEZWJlcnRhVjJNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS12Mi14bGFyZ2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaV2Model
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2Model.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function H2(j){let d,y,m,f,T;return{c(){d=a("p"),y=n(`Although the recipe for forward pass needs to be defined within
this function, one should call the `),m=a("code"),f=n("Module"),T=n(` instance afterwards
instead of this since the former takes care of running the
registered hooks while the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,`Although the recipe for forward pass needs to be defined within
this function, one should call the `),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.forEach(t),T=s(h,` instance afterwards
instead of this since the former takes care of running the
registered hooks while the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function O2(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function K2(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBEZWJlcnRhVjJGb3JNYXNrZWRMTSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS12Mi14bGFyZ2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBEZWJlcnRhVjJGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS12Mi14bGFyZ2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTVCTUFTSyU1RCUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjAoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQubm9uemVybyhhc190dXBsZSUzRFRydWUpJTVCMCU1RCUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMGxvZ2l0cyU1QjAlMkMlMjBtYXNrX3Rva2VuX2luZGV4JTVELmFyZ21heChheGlzJTNELTEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaV2ForMaskedLM
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForMaskedLM.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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>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)`}}),{c(){d=a("p"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function ey(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function ty(j){let d,y,m,f,T;return f=new Ae({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMERlYmVydGFWMkZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMERlYmVydGFWMkZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtdjIteGxhcmdlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoKS5pdGVtKCklMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBEZWJlcnRhVjJGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, DebertaV2ForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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 = DebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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"),y=n("Example of single-label classification:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example of single-label classification:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function oy(j){let d,y,m,f,T;return f=new Ae({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMERlYmVydGFWMkZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMERlYmVydGFWMkZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtdjIteGxhcmdlJTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBEZWJlcnRhVjJGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJtaWNyb3NvZnQlMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, DebertaV2ForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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 = DebertaV2ForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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"),y=n("Example of multi-label classification:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example of multi-label classification:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function ny(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function sy(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBEZWJlcnRhVjJGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMERlYmVydGFWMkZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmRlYmVydGEtdjIteGxhcmdlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQuaXRlbSgpJTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQlNUQlMEElMEFsYWJlbHMlMjAlM0QlMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaV2ForTokenClassification
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForTokenClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function ay(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function ry(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBEZWJlcnRhVjJGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS12Mi14bGFyZ2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBEZWJlcnRhVjJGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS12Mi14bGFyZ2UlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEElMEElMjMlMjB0YXJnZXQlMjBpcyUyMCUyMm5pY2UlMjBwdXBwZXQlMjIlMEF0YXJnZXRfc3RhcnRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMiU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjklNUQpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwc3RhcnRfcG9zaXRpb25zJTNEdGFyZ2V0X3N0YXJ0X2luZGV4JTJDJTIwZW5kX3Bvc2l0aW9ucyUzRHRhcmdldF9lbmRfaW5kZXgpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaV2ForQuestionAnswering
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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><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">2</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">9</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`}}),{c(){d=a("p"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function iy(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function ly(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBEZWJlcnRhVjJGb3JNdWx0aXBsZUNob2ljZSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS12Mi14bGFyZ2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBEZWJlcnRhVjJGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGZGViZXJ0YS12Mi14bGFyZ2UlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEFsYWJlbHMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoMCkudW5zcXVlZXplKDApJTIwJTIwJTIzJTIwY2hvaWNlMCUyMGlzJTIwY29ycmVjdCUyMChhY2NvcmRpbmclMjB0byUyMFdpa2lwZWRpYSUyMCUzQikpJTJDJTIwYmF0Y2glMjBzaXplJTIwMSUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKiU3QmslM0ElMjB2LnVuc3F1ZWV6ZSgwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUyMCUyMCUyMyUyMGJhdGNoJTIwc2l6ZSUyMGlzJTIwMSUwQSUwQSUyMyUyMHRoZSUyMGxpbmVhciUyMGNsYXNzaWZpZXIlMjBzdGlsbCUyMG5lZWRzJTIwdG8lMjBiZSUyMHRyYWluZWQlMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, DebertaV2ForMultipleChoice
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}, labels=labels)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function dy(j){let d,y,m,f,T,l,h,F,ye,pe,x,ne,oe,D,Te,X,ve,he,Z,we,ie,Q,ke,me,N,Me,ue,A,$e,fe,te,R,z,le,Y,Ee,ge,W,De,de,U,Ve,G,je,_e,S,Fe,be,C,se,P,Je,ae,B,Re,I,Be,ce;return{c(){d=a("p"),y=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),F=a("li"),ye=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=c(),x=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),D=a("p"),Te=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 `),X=a("code"),ve=n("model.fit()"),he=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),we=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=a("code"),ke=n("fit()"),me=n(" and "),N=a("code"),Me=n("predict()"),ue=n(`, such as when creating your own layers or models with
the Keras `),A=a("code"),$e=n("Functional"),fe=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=c(),R=a("ul"),z=a("li"),le=n("a single Tensor with "),Y=a("code"),Ee=n("input_ids"),ge=n(" only and nothing else: "),W=a("code"),De=n("model(input_ids)"),de=c(),U=a("li"),Ve=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),_e=n(" or "),S=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),be=c(),C=a("li"),se=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Je=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ae=c(),B=a("p"),Re=n(`Note that when creating models and layers with
`),I=a("a"),Be=n("subclassing"),ce=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(b){d=r(b,"P",{});var V=i(d);y=s(V,"TensorFlow models and layers in "),m=r(V,"CODE",{});var Se=i(m);f=s(Se,"transformers"),Se.forEach(t),T=s(V," accept two formats as input:"),V.forEach(t),l=p(b),h=r(b,"UL",{});var re=i(h);F=r(re,"LI",{});var Ce=i(F);ye=s(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),pe=p(re),x=r(re,"LI",{});var Ie=i(x);ne=s(Ie,"having all inputs as a list, tuple or dict in the first positional argument."),Ie.forEach(t),re.forEach(t),oe=p(b),D=r(b,"P",{});var J=i(D);Te=s(J,`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 `),X=r(J,"CODE",{});var Xe=i(X);ve=s(Xe,"model.fit()"),Xe.forEach(t),he=s(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(J,"CODE",{});var Pe=i(Z);we=s(Pe,"model.fit()"),Pe.forEach(t),ie=s(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(J,"CODE",{});var ze=i(Q);ke=s(ze,"fit()"),ze.forEach(t),me=s(J," and "),N=r(J,"CODE",{});var xe=i(N);Me=s(xe,"predict()"),xe.forEach(t),ue=s(J,`, such as when creating your own layers or models with
the Keras `),A=r(J,"CODE",{});var Le=i(A);$e=s(Le,"Functional"),Le.forEach(t),fe=s(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),te=p(b),R=r(b,"UL",{});var q=i(R);z=r(q,"LI",{});var H=i(z);le=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ue=i(Y);Ee=s(Ue,"input_ids"),Ue.forEach(t),ge=s(H," only and nothing else: "),W=r(H,"CODE",{});var We=i(W);De=s(We,"model(input_ids)"),We.forEach(t),H.forEach(t),de=p(q),U=r(q,"LI",{});var O=i(U);Ve=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Qe=i(G);je=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),_e=s(O," or "),S=r(O,"CODE",{});var Ze=i(S);Fe=s(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),O.forEach(t),be=p(q),C=r(q,"LI",{});var K=i(C);se=s(K,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(K,"CODE",{});var Ye=i(P);Je=s(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),K.forEach(t),q.forEach(t),ae=p(b),B=r(b,"P",{});var ee=i(B);Re=s(ee,`Note that when creating models and layers with
`),I=r(ee,"A",{href:!0,rel:!0});var He=i(I);Be=s(He,"subclassing"),He.forEach(t),ce=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(){u(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(I,"rel","nofollow")},m(b,V){g(b,d,V),e(d,y),e(d,m),e(m,f),e(d,T),g(b,l,V),g(b,h,V),e(h,F),e(F,ye),e(h,pe),e(h,x),e(x,ne),g(b,oe,V),g(b,D,V),e(D,Te),e(D,X),e(X,ve),e(D,he),e(D,Z),e(Z,we),e(D,ie),e(D,Q),e(Q,ke),e(D,me),e(D,N),e(N,Me),e(D,ue),e(D,A),e(A,$e),e(D,fe),g(b,te,V),g(b,R,V),e(R,z),e(z,le),e(z,Y),e(Y,Ee),e(z,ge),e(z,W),e(W,De),e(R,de),e(R,U),e(U,Ve),e(U,G),e(G,je),e(U,_e),e(U,S),e(S,Fe),e(R,be),e(R,C),e(C,se),e(C,P),e(P,Je),g(b,ae,V),g(b,B,V),e(B,Re),e(B,I),e(I,Be),e(B,ce)},d(b){b&&t(d),b&&t(l),b&&t(h),b&&t(oe),b&&t(D),b&&t(te),b&&t(R),b&&t(ae),b&&t(B)}}}function cy(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function py(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFWMk1vZGVsJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRGViZXJ0YVYyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmthbWFsa3JhaiUyRmRlYmVydGEtdjIteGxhcmdlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaV2Model
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2Model.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&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"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function hy(j){let d,y,m,f,T,l,h,F,ye,pe,x,ne,oe,D,Te,X,ve,he,Z,we,ie,Q,ke,me,N,Me,ue,A,$e,fe,te,R,z,le,Y,Ee,ge,W,De,de,U,Ve,G,je,_e,S,Fe,be,C,se,P,Je,ae,B,Re,I,Be,ce;return{c(){d=a("p"),y=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),F=a("li"),ye=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=c(),x=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),D=a("p"),Te=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 `),X=a("code"),ve=n("model.fit()"),he=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),we=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=a("code"),ke=n("fit()"),me=n(" and "),N=a("code"),Me=n("predict()"),ue=n(`, such as when creating your own layers or models with
the Keras `),A=a("code"),$e=n("Functional"),fe=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=c(),R=a("ul"),z=a("li"),le=n("a single Tensor with "),Y=a("code"),Ee=n("input_ids"),ge=n(" only and nothing else: "),W=a("code"),De=n("model(input_ids)"),de=c(),U=a("li"),Ve=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),_e=n(" or "),S=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),be=c(),C=a("li"),se=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Je=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ae=c(),B=a("p"),Re=n(`Note that when creating models and layers with
`),I=a("a"),Be=n("subclassing"),ce=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(b){d=r(b,"P",{});var V=i(d);y=s(V,"TensorFlow models and layers in "),m=r(V,"CODE",{});var Se=i(m);f=s(Se,"transformers"),Se.forEach(t),T=s(V," accept two formats as input:"),V.forEach(t),l=p(b),h=r(b,"UL",{});var re=i(h);F=r(re,"LI",{});var Ce=i(F);ye=s(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),pe=p(re),x=r(re,"LI",{});var Ie=i(x);ne=s(Ie,"having all inputs as a list, tuple or dict in the first positional argument."),Ie.forEach(t),re.forEach(t),oe=p(b),D=r(b,"P",{});var J=i(D);Te=s(J,`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 `),X=r(J,"CODE",{});var Xe=i(X);ve=s(Xe,"model.fit()"),Xe.forEach(t),he=s(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(J,"CODE",{});var Pe=i(Z);we=s(Pe,"model.fit()"),Pe.forEach(t),ie=s(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(J,"CODE",{});var ze=i(Q);ke=s(ze,"fit()"),ze.forEach(t),me=s(J," and "),N=r(J,"CODE",{});var xe=i(N);Me=s(xe,"predict()"),xe.forEach(t),ue=s(J,`, such as when creating your own layers or models with
the Keras `),A=r(J,"CODE",{});var Le=i(A);$e=s(Le,"Functional"),Le.forEach(t),fe=s(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),te=p(b),R=r(b,"UL",{});var q=i(R);z=r(q,"LI",{});var H=i(z);le=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ue=i(Y);Ee=s(Ue,"input_ids"),Ue.forEach(t),ge=s(H," only and nothing else: "),W=r(H,"CODE",{});var We=i(W);De=s(We,"model(input_ids)"),We.forEach(t),H.forEach(t),de=p(q),U=r(q,"LI",{});var O=i(U);Ve=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Qe=i(G);je=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),_e=s(O," or "),S=r(O,"CODE",{});var Ze=i(S);Fe=s(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),O.forEach(t),be=p(q),C=r(q,"LI",{});var K=i(C);se=s(K,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(K,"CODE",{});var Ye=i(P);Je=s(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),K.forEach(t),q.forEach(t),ae=p(b),B=r(b,"P",{});var ee=i(B);Re=s(ee,`Note that when creating models and layers with
`),I=r(ee,"A",{href:!0,rel:!0});var He=i(I);Be=s(He,"subclassing"),He.forEach(t),ce=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(){u(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(I,"rel","nofollow")},m(b,V){g(b,d,V),e(d,y),e(d,m),e(m,f),e(d,T),g(b,l,V),g(b,h,V),e(h,F),e(F,ye),e(h,pe),e(h,x),e(x,ne),g(b,oe,V),g(b,D,V),e(D,Te),e(D,X),e(X,ve),e(D,he),e(D,Z),e(Z,we),e(D,ie),e(D,Q),e(Q,ke),e(D,me),e(D,N),e(N,Me),e(D,ue),e(D,A),e(A,$e),e(D,fe),g(b,te,V),g(b,R,V),e(R,z),e(z,le),e(z,Y),e(Y,Ee),e(z,ge),e(z,W),e(W,De),e(R,de),e(R,U),e(U,Ve),e(U,G),e(G,je),e(U,_e),e(U,S),e(S,Fe),e(R,be),e(R,C),e(C,se),e(C,P),e(P,Je),g(b,ae,V),g(b,B,V),e(B,Re),e(B,I),e(I,Be),e(B,ce)},d(b){b&&t(d),b&&t(l),b&&t(h),b&&t(oe),b&&t(D),b&&t(te),b&&t(R),b&&t(ae),b&&t(B)}}}function my(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function uy(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFWMkZvck1hc2tlZExNJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRGViZXJ0YVYyRm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmthbWFsa3JhaiUyRmRlYmVydGEtdjIteGxhcmdlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMCU1Qk1BU0slNUQuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTVCTUFTSyU1RCUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjB0Zi53aGVyZSgoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQpJTBBc2VsZWN0ZWRfbG9naXRzJTIwJTNEJTIwdGYuZ2F0aGVyX25kKGxvZ2l0cyU1QjAlNUQlMkMlMjBpbmRpY2VzJTNEbWFza190b2tlbl9pbmRleCklMEElMEFwcmVkaWN0ZWRfdG9rZW5faWQlMjAlM0QlMjB0Zi5tYXRoLmFyZ21heChzZWxlY3RlZF9sb2dpdHMlMkMlMjBheGlzJTNELTEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaV2ForMaskedLM
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2ForMaskedLM.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&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"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function fy(j){let d,y;return d=new Ae({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(){v(d.$$.fragment)},l(m){w(d.$$.fragment,m)},m(m,f){k(d,m,f),y=!0},p:Ne,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){E(d,m)}}}function gy(j){let d,y,m,f,T,l,h,F,ye,pe,x,ne,oe,D,Te,X,ve,he,Z,we,ie,Q,ke,me,N,Me,ue,A,$e,fe,te,R,z,le,Y,Ee,ge,W,De,de,U,Ve,G,je,_e,S,Fe,be,C,se,P,Je,ae,B,Re,I,Be,ce;return{c(){d=a("p"),y=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),F=a("li"),ye=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=c(),x=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),D=a("p"),Te=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 `),X=a("code"),ve=n("model.fit()"),he=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),we=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=a("code"),ke=n("fit()"),me=n(" and "),N=a("code"),Me=n("predict()"),ue=n(`, such as when creating your own layers or models with
the Keras `),A=a("code"),$e=n("Functional"),fe=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=c(),R=a("ul"),z=a("li"),le=n("a single Tensor with "),Y=a("code"),Ee=n("input_ids"),ge=n(" only and nothing else: "),W=a("code"),De=n("model(input_ids)"),de=c(),U=a("li"),Ve=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),_e=n(" or "),S=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),be=c(),C=a("li"),se=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Je=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ae=c(),B=a("p"),Re=n(`Note that when creating models and layers with
`),I=a("a"),Be=n("subclassing"),ce=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(b){d=r(b,"P",{});var V=i(d);y=s(V,"TensorFlow models and layers in "),m=r(V,"CODE",{});var Se=i(m);f=s(Se,"transformers"),Se.forEach(t),T=s(V," accept two formats as input:"),V.forEach(t),l=p(b),h=r(b,"UL",{});var re=i(h);F=r(re,"LI",{});var Ce=i(F);ye=s(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),pe=p(re),x=r(re,"LI",{});var Ie=i(x);ne=s(Ie,"having all inputs as a list, tuple or dict in the first positional argument."),Ie.forEach(t),re.forEach(t),oe=p(b),D=r(b,"P",{});var J=i(D);Te=s(J,`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 `),X=r(J,"CODE",{});var Xe=i(X);ve=s(Xe,"model.fit()"),Xe.forEach(t),he=s(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(J,"CODE",{});var Pe=i(Z);we=s(Pe,"model.fit()"),Pe.forEach(t),ie=s(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(J,"CODE",{});var ze=i(Q);ke=s(ze,"fit()"),ze.forEach(t),me=s(J," and "),N=r(J,"CODE",{});var xe=i(N);Me=s(xe,"predict()"),xe.forEach(t),ue=s(J,`, such as when creating your own layers or models with
the Keras `),A=r(J,"CODE",{});var Le=i(A);$e=s(Le,"Functional"),Le.forEach(t),fe=s(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),te=p(b),R=r(b,"UL",{});var q=i(R);z=r(q,"LI",{});var H=i(z);le=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ue=i(Y);Ee=s(Ue,"input_ids"),Ue.forEach(t),ge=s(H," only and nothing else: "),W=r(H,"CODE",{});var We=i(W);De=s(We,"model(input_ids)"),We.forEach(t),H.forEach(t),de=p(q),U=r(q,"LI",{});var O=i(U);Ve=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Qe=i(G);je=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),_e=s(O," or "),S=r(O,"CODE",{});var Ze=i(S);Fe=s(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),O.forEach(t),be=p(q),C=r(q,"LI",{});var K=i(C);se=s(K,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(K,"CODE",{});var Ye=i(P);Je=s(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),K.forEach(t),q.forEach(t),ae=p(b),B=r(b,"P",{});var ee=i(B);Re=s(ee,`Note that when creating models and layers with
`),I=r(ee,"A",{href:!0,rel:!0});var He=i(I);Be=s(He,"subclassing"),He.forEach(t),ce=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(){u(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(I,"rel","nofollow")},m(b,V){g(b,d,V),e(d,y),e(d,m),e(m,f),e(d,T),g(b,l,V),g(b,h,V),e(h,F),e(F,ye),e(h,pe),e(h,x),e(x,ne),g(b,oe,V),g(b,D,V),e(D,Te),e(D,X),e(X,ve),e(D,he),e(D,Z),e(Z,we),e(D,ie),e(D,Q),e(Q,ke),e(D,me),e(D,N),e(N,Me),e(D,ue),e(D,A),e(A,$e),e(D,fe),g(b,te,V),g(b,R,V),e(R,z),e(z,le),e(z,Y),e(Y,Ee),e(z,ge),e(z,W),e(W,De),e(R,de),e(R,U),e(U,Ve),e(U,G),e(G,je),e(U,_e),e(U,S),e(S,Fe),e(R,be),e(R,C),e(C,se),e(C,P),e(P,Je),g(b,ae,V),g(b,B,V),e(B,Re),e(B,I),e(I,Be),e(B,ce)},d(b){b&&t(d),b&&t(l),b&&t(h),b&&t(oe),b&&t(D),b&&t(te),b&&t(R),b&&t(ae),b&&t(B)}}}function _y(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function by(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFWMkZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmthbWFsa3JhaiUyRmRlYmVydGEtdjIteGxhcmdlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWJlcnRhVjJGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaV2ForSequenceClassification
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&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"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function yy(j){let d,y;return d=new Ae({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWJlcnRhVjJGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRmLmNvbnN0YW50KDEpJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3Nz",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 = TFDebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&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(){v(d.$$.fragment)},l(m){w(d.$$.fragment,m)},m(m,f){k(d,m,f),y=!0},p:Ne,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){E(d,m)}}}function Ty(j){let d,y,m,f,T,l,h,F,ye,pe,x,ne,oe,D,Te,X,ve,he,Z,we,ie,Q,ke,me,N,Me,ue,A,$e,fe,te,R,z,le,Y,Ee,ge,W,De,de,U,Ve,G,je,_e,S,Fe,be,C,se,P,Je,ae,B,Re,I,Be,ce;return{c(){d=a("p"),y=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),F=a("li"),ye=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=c(),x=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),D=a("p"),Te=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 `),X=a("code"),ve=n("model.fit()"),he=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),we=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=a("code"),ke=n("fit()"),me=n(" and "),N=a("code"),Me=n("predict()"),ue=n(`, such as when creating your own layers or models with
the Keras `),A=a("code"),$e=n("Functional"),fe=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=c(),R=a("ul"),z=a("li"),le=n("a single Tensor with "),Y=a("code"),Ee=n("input_ids"),ge=n(" only and nothing else: "),W=a("code"),De=n("model(input_ids)"),de=c(),U=a("li"),Ve=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),_e=n(" or "),S=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),be=c(),C=a("li"),se=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Je=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ae=c(),B=a("p"),Re=n(`Note that when creating models and layers with
`),I=a("a"),Be=n("subclassing"),ce=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(b){d=r(b,"P",{});var V=i(d);y=s(V,"TensorFlow models and layers in "),m=r(V,"CODE",{});var Se=i(m);f=s(Se,"transformers"),Se.forEach(t),T=s(V," accept two formats as input:"),V.forEach(t),l=p(b),h=r(b,"UL",{});var re=i(h);F=r(re,"LI",{});var Ce=i(F);ye=s(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),pe=p(re),x=r(re,"LI",{});var Ie=i(x);ne=s(Ie,"having all inputs as a list, tuple or dict in the first positional argument."),Ie.forEach(t),re.forEach(t),oe=p(b),D=r(b,"P",{});var J=i(D);Te=s(J,`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 `),X=r(J,"CODE",{});var Xe=i(X);ve=s(Xe,"model.fit()"),Xe.forEach(t),he=s(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(J,"CODE",{});var Pe=i(Z);we=s(Pe,"model.fit()"),Pe.forEach(t),ie=s(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(J,"CODE",{});var ze=i(Q);ke=s(ze,"fit()"),ze.forEach(t),me=s(J," and "),N=r(J,"CODE",{});var xe=i(N);Me=s(xe,"predict()"),xe.forEach(t),ue=s(J,`, such as when creating your own layers or models with
the Keras `),A=r(J,"CODE",{});var Le=i(A);$e=s(Le,"Functional"),Le.forEach(t),fe=s(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),te=p(b),R=r(b,"UL",{});var q=i(R);z=r(q,"LI",{});var H=i(z);le=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ue=i(Y);Ee=s(Ue,"input_ids"),Ue.forEach(t),ge=s(H," only and nothing else: "),W=r(H,"CODE",{});var We=i(W);De=s(We,"model(input_ids)"),We.forEach(t),H.forEach(t),de=p(q),U=r(q,"LI",{});var O=i(U);Ve=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Qe=i(G);je=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),_e=s(O," or "),S=r(O,"CODE",{});var Ze=i(S);Fe=s(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),O.forEach(t),be=p(q),C=r(q,"LI",{});var K=i(C);se=s(K,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(K,"CODE",{});var Ye=i(P);Je=s(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),K.forEach(t),q.forEach(t),ae=p(b),B=r(b,"P",{});var ee=i(B);Re=s(ee,`Note that when creating models and layers with
`),I=r(ee,"A",{href:!0,rel:!0});var He=i(I);Be=s(He,"subclassing"),He.forEach(t),ce=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(){u(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(I,"rel","nofollow")},m(b,V){g(b,d,V),e(d,y),e(d,m),e(m,f),e(d,T),g(b,l,V),g(b,h,V),e(h,F),e(F,ye),e(h,pe),e(h,x),e(x,ne),g(b,oe,V),g(b,D,V),e(D,Te),e(D,X),e(X,ve),e(D,he),e(D,Z),e(Z,we),e(D,ie),e(D,Q),e(Q,ke),e(D,me),e(D,N),e(N,Me),e(D,ue),e(D,A),e(A,$e),e(D,fe),g(b,te,V),g(b,R,V),e(R,z),e(z,le),e(z,Y),e(Y,Ee),e(z,ge),e(z,W),e(W,De),e(R,de),e(R,U),e(U,Ve),e(U,G),e(G,je),e(U,_e),e(U,S),e(S,Fe),e(R,be),e(R,C),e(C,se),e(C,P),e(P,Je),g(b,ae,V),g(b,B,V),e(B,Re),e(B,I),e(I,Be),e(B,ce)},d(b){b&&t(d),b&&t(l),b&&t(h),b&&t(oe),b&&t(D),b&&t(te),b&&t(R),b&&t(ae),b&&t(B)}}}function vy(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function wy(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFWMkZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmthbWFsa3JhaiUyRmRlYmVydGEtdjIteGxhcmdlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWJlcnRhVjJGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUwQSklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdCU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVELm51bXB5KCkudG9saXN0KCklNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaV2ForTokenClassification
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2ForTokenClassification.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&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"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function ky(j){let d,y;return d=new Ae({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(){v(d.$$.fragment)},l(m){w(d.$$.fragment,m)},m(m,f){k(d,m,f),y=!0},p:Ne,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){E(d,m)}}}function My(j){let d,y,m,f,T,l,h,F,ye,pe,x,ne,oe,D,Te,X,ve,he,Z,we,ie,Q,ke,me,N,Me,ue,A,$e,fe,te,R,z,le,Y,Ee,ge,W,De,de,U,Ve,G,je,_e,S,Fe,be,C,se,P,Je,ae,B,Re,I,Be,ce;return{c(){d=a("p"),y=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),T=n(" accept two formats as input:"),l=c(),h=a("ul"),F=a("li"),ye=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=c(),x=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),D=a("p"),Te=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 `),X=a("code"),ve=n("model.fit()"),he=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=a("code"),we=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=a("code"),ke=n("fit()"),me=n(" and "),N=a("code"),Me=n("predict()"),ue=n(`, such as when creating your own layers or models with
the Keras `),A=a("code"),$e=n("Functional"),fe=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=c(),R=a("ul"),z=a("li"),le=n("a single Tensor with "),Y=a("code"),Ee=n("input_ids"),ge=n(" only and nothing else: "),W=a("code"),De=n("model(input_ids)"),de=c(),U=a("li"),Ve=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),_e=n(" or "),S=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),be=c(),C=a("li"),se=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Je=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ae=c(),B=a("p"),Re=n(`Note that when creating models and layers with
`),I=a("a"),Be=n("subclassing"),ce=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(b){d=r(b,"P",{});var V=i(d);y=s(V,"TensorFlow models and layers in "),m=r(V,"CODE",{});var Se=i(m);f=s(Se,"transformers"),Se.forEach(t),T=s(V," accept two formats as input:"),V.forEach(t),l=p(b),h=r(b,"UL",{});var re=i(h);F=r(re,"LI",{});var Ce=i(F);ye=s(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),pe=p(re),x=r(re,"LI",{});var Ie=i(x);ne=s(Ie,"having all inputs as a list, tuple or dict in the first positional argument."),Ie.forEach(t),re.forEach(t),oe=p(b),D=r(b,"P",{});var J=i(D);Te=s(J,`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 `),X=r(J,"CODE",{});var Xe=i(X);ve=s(Xe,"model.fit()"),Xe.forEach(t),he=s(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Z=r(J,"CODE",{});var Pe=i(Z);we=s(Pe,"model.fit()"),Pe.forEach(t),ie=s(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(J,"CODE",{});var ze=i(Q);ke=s(ze,"fit()"),ze.forEach(t),me=s(J," and "),N=r(J,"CODE",{});var xe=i(N);Me=s(xe,"predict()"),xe.forEach(t),ue=s(J,`, such as when creating your own layers or models with
the Keras `),A=r(J,"CODE",{});var Le=i(A);$e=s(Le,"Functional"),Le.forEach(t),fe=s(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),te=p(b),R=r(b,"UL",{});var q=i(R);z=r(q,"LI",{});var H=i(z);le=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ue=i(Y);Ee=s(Ue,"input_ids"),Ue.forEach(t),ge=s(H," only and nothing else: "),W=r(H,"CODE",{});var We=i(W);De=s(We,"model(input_ids)"),We.forEach(t),H.forEach(t),de=p(q),U=r(q,"LI",{});var O=i(U);Ve=s(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Qe=i(G);je=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),_e=s(O," or "),S=r(O,"CODE",{});var Ze=i(S);Fe=s(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),O.forEach(t),be=p(q),C=r(q,"LI",{});var K=i(C);se=s(K,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(K,"CODE",{});var Ye=i(P);Je=s(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),K.forEach(t),q.forEach(t),ae=p(b),B=r(b,"P",{});var ee=i(B);Re=s(ee,`Note that when creating models and layers with
`),I=r(ee,"A",{href:!0,rel:!0});var He=i(I);Be=s(He,"subclassing"),He.forEach(t),ce=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(){u(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(I,"rel","nofollow")},m(b,V){g(b,d,V),e(d,y),e(d,m),e(m,f),e(d,T),g(b,l,V),g(b,h,V),e(h,F),e(F,ye),e(h,pe),e(h,x),e(x,ne),g(b,oe,V),g(b,D,V),e(D,Te),e(D,X),e(X,ve),e(D,he),e(D,Z),e(Z,we),e(D,ie),e(D,Q),e(Q,ke),e(D,me),e(D,N),e(N,Me),e(D,ue),e(D,A),e(A,$e),e(D,fe),g(b,te,V),g(b,R,V),e(R,z),e(z,le),e(z,Y),e(Y,Ee),e(z,ge),e(z,W),e(W,De),e(R,de),e(R,U),e(U,Ve),e(U,G),e(G,je),e(U,_e),e(U,S),e(S,Fe),e(R,be),e(R,C),e(C,se),e(C,P),e(P,Je),g(b,ae,V),g(b,B,V),e(B,Re),e(B,I),e(I,Be),e(B,ce)},d(b){b&&t(d),b&&t(l),b&&t(h),b&&t(oe),b&&t(D),b&&t(te),b&&t(R),b&&t(ae),b&&t(B)}}}function $y(j){let d,y,m,f,T;return{c(){d=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=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);y=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var F=i(m);f=s(F,"Module"),F.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,y),e(d,m),e(m,f),e(d,T)},d(l){l&&t(d)}}}function Ey(j){let d,y,m,f,T;return f=new Ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkRlYmVydGFWMkZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJrYW1hbGtyYWolMkZkZWJlcnRhLXYyLXhsYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRGViZXJ0YVYyRm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmthbWFsa3JhaiUyRmRlYmVydGEtdjIteGxhcmdlJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLnN0YXJ0X2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgob3V0cHV0cy5lbmRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaV2ForQuestionAnswering
<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-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2ForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&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"),y=n("Example:"),m=c(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);y=s(h,"Example:"),h.forEach(t),m=p(l),w(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,y),g(l,m,h),k(f,l,h),T=!0},p:Ne,i(l){T||(M(f.$$.fragment,l),T=!0)},o(l){$(f.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function Dy(j){let d,y;return d=new Ae({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(){v(d.$$.fragment)},l(m){w(d.$$.fragment,m)},m(m,f){k(d,m,f),y=!0},p:Ne,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){E(d,m)}}}function Vy(j){let d,y,m,f,T,l,h,F,ye,pe,x,ne,oe,D,Te,X,ve,he,Z,we,ie,Q,ke,me,N,Me,ue,A,$e,fe,te,R,z,le,Y,Ee,ge,W,De,de,U,Ve,G,je,_e,S,Fe,be,C,se,P,Je,ae,B,Re,I,Be,ce,b,V,Se,re,Ce,Ie,J,Xe,Pe,ze,xe,Le,q,H,Ue,We,O,Qe,Ze,K,Ye,ee,He,bc,es,yc,Tc,ts,vc,wc,Ql,Kt,Io,Qr,os,kc,Yr,Mc,Yl,dt,Hr,tr,$c,Ec,Or,or,Dc,Vc,Kr,nr,jc,Fc,ei,sr,Jc,Rc,ti,ar,Bc,Hl,eo,xo,oi,ns,Cc,ni,zc,Ol,ft,ss,Uc,to,Ic,rr,xc,Wc,as,Zc,qc,Gc,oo,Nc,ir,Ac,Sc,lr,Xc,Pc,Lc,Wo,Kl,no,Zo,si,rs,Qc,ai,Yc,ed,Oe,is,Hc,ls,Oc,ds,Kc,ep,tp,xt,cs,op,ri,np,sp,ps,ii,ap,rp,li,ip,lp,qo,hs,dp,so,cp,di,pp,hp,ci,mp,up,fp,vt,ms,gp,pi,_p,bp,Go,yp,ao,Tp,hi,vp,wp,mi,kp,Mp,$p,dr,us,td,ro,No,ui,fs,Ep,fi,Dp,od,gt,gs,Vp,_s,jp,bs,Fp,Jp,Rp,Wt,ys,Bp,gi,Cp,zp,Ts,_i,Up,Ip,bi,xp,Wp,wt,vs,Zp,yi,qp,Gp,Ao,Np,io,Ap,Ti,Sp,Xp,vi,Pp,Lp,nd,lo,So,wi,ws,Qp,ki,Yp,sd,_t,ks,Hp,Ms,Op,$s,Kp,eh,th,Es,oh,Ds,nh,sh,ah,kt,Vs,rh,co,ih,cr,lh,dh,Mi,ch,ph,hh,Xo,mh,Po,ad,po,Lo,$i,js,uh,Ei,fh,rd,zt,Fs,gh,Di,_h,bh,Mt,Js,yh,Vi,Th,vh,ji,wh,kh,Qo,id,ho,Yo,Fi,Rs,Mh,Ji,$h,ld,bt,Bs,Eh,mo,Dh,Ri,Vh,jh,Cs,Fh,Jh,Rh,zs,Bh,Us,Ch,zh,Uh,$t,Is,Ih,uo,xh,pr,Wh,Zh,Bi,qh,Gh,Nh,Ho,Ah,Oo,dd,fo,Ko,Ci,xs,Sh,zi,Xh,cd,nt,Ws,Ph,Ui,Lh,Qh,Zs,Yh,qs,Hh,Oh,Kh,Gs,em,Ns,tm,om,nm,ct,As,sm,go,am,hr,rm,im,Ii,lm,dm,cm,en,pm,tn,hm,on,pd,_o,nn,xi,Ss,mm,Wi,um,hd,st,Xs,fm,Zi,gm,_m,Ps,bm,Ls,ym,Tm,vm,Qs,wm,Ys,km,Mm,$m,Et,Hs,Em,bo,Dm,mr,Vm,jm,qi,Fm,Jm,Rm,sn,Bm,an,md,yo,rn,Gi,Os,Cm,Ni,zm,ud,at,Ks,Um,To,Im,Ai,xm,Wm,Si,Zm,qm,Gm,ea,Nm,ta,Am,Sm,Xm,oa,Pm,na,Lm,Qm,Ym,Dt,sa,Hm,vo,Om,ur,Km,eu,Xi,tu,ou,nu,ln,su,dn,fd,wo,cn,Pi,aa,au,Li,ru,gd,rt,ra,iu,Qi,lu,du,ia,cu,la,pu,hu,mu,da,uu,ca,fu,gu,_u,Vt,pa,bu,ko,yu,fr,Tu,vu,Yi,wu,ku,Mu,pn,$u,hn,_d,Mo,mn,Hi,ha,Eu,Oi,Du,bd,it,ma,Vu,ua,ju,fa,Fu,Ju,Ru,ga,Bu,_a,Cu,zu,Uu,un,Iu,jt,ba,xu,$o,Wu,gr,Zu,qu,Ki,Gu,Nu,Au,fn,Su,gn,yd,Eo,_n,el,ya,Xu,tl,Pu,Td,Ut,Ta,Lu,ol,Qu,Yu,Ft,va,Hu,nl,Ou,Ku,wa,ef,sl,tf,of,nf,yt,sf,al,af,rf,rl,lf,df,il,cf,pf,ll,hf,mf,vd,Do,bn,dl,ka,uf,cl,ff,wd,lt,Ma,gf,Vo,_f,pl,bf,yf,$a,Tf,vf,wf,Ea,kf,Da,Mf,$f,Ef,yn,Df,pt,Va,Vf,jo,jf,_r,Ff,Jf,hl,Rf,Bf,Cf,Tn,zf,vn,Uf,wn,kd,Fo,kn,ml,ja,If,ul,xf,Md,Ke,Fa,Wf,fl,Zf,qf,Ja,Gf,Ra,Nf,Af,Sf,Ba,Xf,Ca,Pf,Lf,Qf,Mn,Yf,ht,za,Hf,Jo,Of,br,Kf,eg,gl,tg,og,ng,$n,sg,En,ag,Dn,$d,Ro,Vn,_l,Ua,rg,bl,ig,Ed,et,Ia,lg,yl,dg,cg,xa,pg,Wa,hg,mg,ug,Za,fg,qa,gg,_g,bg,jn,yg,mt,Ga,Tg,Bo,vg,yr,wg,kg,Tl,Mg,$g,Eg,Fn,Dg,Jn,Vg,Rn,Dd,Co,Bn,vl,Na,jg,wl,Fg,Vd,tt,Aa,Jg,zo,Rg,kl,Bg,Cg,Ml,zg,Ug,Ig,Sa,xg,Xa,Wg,Zg,qg,Pa,Gg,La,Ng,Ag,Sg,Cn,Xg,ut,Qa,Pg,Uo,Lg,Tr,Qg,Yg,$l,Hg,Og,Kg,zn,e_,Un,t_,In,jd;return l=new qe({}),D=new qe({}),os=new qe({}),ns=new qe({}),ss=new L({props:{name:"class transformers.DebertaV2Config",anchor:"transformers.DebertaV2Config",parameters:[{name:"vocab_size",val:" = 128100"},{name:"hidden_size",val:" = 1536"},{name:"num_hidden_layers",val:" = 24"},{name:"num_attention_heads",val:" = 24"},{name:"intermediate_size",val:" = 6144"},{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.DebertaV2Config.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128100) &#x2014;
Vocabulary size of the DeBERTa-v2 model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Model">DebertaV2Model</a>.`,name:"vocab_size"},{anchor:"transformers.DebertaV2Config.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.DebertaV2Config.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.DebertaV2Config.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.DebertaV2Config.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 6144) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.DebertaV2Config.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.DebertaV2Config.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.DebertaV2Config.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.DebertaV2Config.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.DebertaV2Config.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.33.0/en/model_doc/deberta#transformers.DebertaModel">DebertaModel</a> or <a href="/docs/transformers/v4.33.0/en/model_doc/deberta#transformers.TFDebertaModel">TFDebertaModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.DebertaV2Config.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.DebertaV2Config.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-7) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.DebertaV2Config.relative_attention",description:`<strong>relative_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether use relative position encoding.`,name:"relative_attention"},{anchor:"transformers.DebertaV2Config.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.DebertaV2Config.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.DebertaV2Config.position_biased_input",description:`<strong>position_biased_input</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether add absolute position embedding to content embedding.`,name:"position_biased_input"},{anchor:"transformers.DebertaV2Config.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>, <code>[&quot;p2c&quot;, &quot;c2p&quot;]</code>.`,name:"pos_att_type"},{anchor:"transformers.DebertaV2Config.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/v4.33.0/src/transformers/models/deberta_v2/configuration_deberta_v2.py#L42"}}),Wo=new Ge({props:{anchor:"transformers.DebertaV2Config.example",$$slots:{default:[X2]},$$scope:{ctx:j}}}),rs=new qe({}),is=new L({props:{name:"class transformers.DebertaV2Tokenizer",anchor:"transformers.DebertaV2Tokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = False"},{name:"split_by_punct",val:" = False"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2Tokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.DebertaV2Tokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.DebertaV2Tokenizer.bos_token",description:`<strong>bos_token</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pre-training. Can be used a sequence classifier token.
When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.`,name:"bos_token"},{anchor:"transformers.DebertaV2Tokenizer.eos_token",description:`<strong>eos_token</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token. When building a sequence using special tokens, this is not the token that is
used for the end of sequence. The token used is the <code>sep_token</code>.`,name:"eos_token"},{anchor:"transformers.DebertaV2Tokenizer.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.DebertaV2Tokenizer.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.DebertaV2Tokenizer.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.DebertaV2Tokenizer.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.DebertaV2Tokenizer.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.DebertaV2Tokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L56"}}),cs=new L({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.DebertaV2Tokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.DebertaV2Tokenizer.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.DebertaV2Tokenizer.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/v4.33.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L184",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>
`}}),hs=new L({props:{name:"get_special_tokens_mask",anchor:"transformers.DebertaV2Tokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"},{name:"already_has_special_tokens",val:" = False"}],parametersDescription:[{anchor:"transformers.DebertaV2Tokenizer.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.DebertaV2Tokenizer.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.DebertaV2Tokenizer.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/v4.33.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L208",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>
`}}),ms=new L({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.DebertaV2Tokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.DebertaV2Tokenizer.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.DebertaV2Tokenizer.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/v4.33.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L234",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>
`}}),Go=new Ge({props:{anchor:"transformers.DebertaV2Tokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[P2]},$$scope:{ctx:j}}}),us=new L({props:{name:"save_vocabulary",anchor:"transformers.DebertaV2Tokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L267"}}),fs=new qe({}),gs=new L({props:{name:"class transformers.DebertaV2TokenizerFast",anchor:"transformers.DebertaV2TokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = False"},{name:"split_by_punct",val:" = False"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2TokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.DebertaV2TokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.DebertaV2TokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pre-training. Can be used a sequence classifier token.
When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.`,name:"bos_token"},{anchor:"transformers.DebertaV2TokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token. When building a sequence using special tokens, this is not the token that is
used for the end of sequence. The token used is the <code>sep_token</code>.`,name:"eos_token"},{anchor:"transformers.DebertaV2TokenizerFast.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.DebertaV2TokenizerFast.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.DebertaV2TokenizerFast.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.DebertaV2TokenizerFast.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.DebertaV2TokenizerFast.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.DebertaV2TokenizerFast.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py#L63"}}),ys=new L({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.DebertaV2TokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.DebertaV2TokenizerFast.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.DebertaV2TokenizerFast.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/v4.33.0/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py#L156",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>
`}}),vs=new L({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.DebertaV2TokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.DebertaV2TokenizerFast.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.DebertaV2TokenizerFast.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/v4.33.0/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py#L206",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>
`}}),Ao=new Ge({props:{anchor:"transformers.DebertaV2TokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[L2]},$$scope:{ctx:j}}}),ws=new qe({}),ks=new L({props:{name:"class transformers.DebertaV2Model",anchor:"transformers.DebertaV2Model",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1012"}}),Vs=new L({props:{name:"forward",anchor:"transformers.DebertaV2Model.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.DebertaV2Model.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.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/v4.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1036",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xo=new ot({props:{$$slots:{default:[Q2]},$$scope:{ctx:j}}}),Po=new Ge({props:{anchor:"transformers.DebertaV2Model.forward.example",$$slots:{default:[Y2]},$$scope:{ctx:j}}}),js=new qe({}),Fs=new L({props:{name:"class transformers.DebertaV2PreTrainedModel",anchor:"transformers.DebertaV2PreTrainedModel",parameters:[{name:"config",val:": PretrainedConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L917"}}),Js=new L({props:{name:"_forward_unimplemented",anchor:"transformers.DebertaV2PreTrainedModel.forward",parameters:[{name:"*input",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/torch/nn/modules/module.py#L352"}}),Qo=new ot({props:{$$slots:{default:[H2]},$$scope:{ctx:j}}}),Rs=new qe({}),Bs=new L({props:{name:"class transformers.DebertaV2ForMaskedLM",anchor:"transformers.DebertaV2ForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1124"}}),Is=new L({props:{name:"forward",anchor:"transformers.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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/v4.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForMaskedLM.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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1142",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ho=new ot({props:{$$slots:{default:[O2]},$$scope:{ctx:j}}}),Oo=new Ge({props:{anchor:"transformers.DebertaV2ForMaskedLM.forward.example",$$slots:{default:[K2]},$$scope:{ctx:j}}}),xs=new qe({}),Ws=new L({props:{name:"class transformers.DebertaV2ForSequenceClassification",anchor:"transformers.DebertaV2ForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1262"}}),As=new L({props:{name:"forward",anchor:"transformers.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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/v4.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForSequenceClassification.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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1287",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),en=new ot({props:{$$slots:{default:[ey]},$$scope:{ctx:j}}}),tn=new Ge({props:{anchor:"transformers.DebertaV2ForSequenceClassification.forward.example",$$slots:{default:[ty]},$$scope:{ctx:j}}}),on=new Ge({props:{anchor:"transformers.DebertaV2ForSequenceClassification.forward.example-2",$$slots:{default:[oy]},$$scope:{ctx:j}}}),Ss=new qe({}),Xs=new L({props:{name:"class transformers.DebertaV2ForTokenClassification",anchor:"transformers.DebertaV2ForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1382"}}),Hs=new L({props:{name:"forward",anchor:"transformers.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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/v4.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForTokenClassification.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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1394",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),sn=new ot({props:{$$slots:{default:[ny]},$$scope:{ctx:j}}}),an=new Ge({props:{anchor:"transformers.DebertaV2ForTokenClassification.forward.example",$$slots:{default:[sy]},$$scope:{ctx:j}}}),Os=new qe({}),Ks=new L({props:{name:"class transformers.DebertaV2ForQuestionAnswering",anchor:"transformers.DebertaV2ForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1455"}}),sa=new L({props:{name:"forward",anchor:"transformers.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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/v4.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1466",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ln=new ot({props:{$$slots:{default:[ay]},$$scope:{ctx:j}}}),dn=new Ge({props:{anchor:"transformers.DebertaV2ForQuestionAnswering.forward.example",$$slots:{default:[ry]},$$scope:{ctx:j}}}),aa=new qe({}),ra=new L({props:{name:"class transformers.DebertaV2ForMultipleChoice",anchor:"transformers.DebertaV2ForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1555"}}),pa=new L({props:{name:"forward",anchor:"transformers.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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/v4.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1579",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <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, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>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/v4.33.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pn=new ot({props:{$$slots:{default:[iy]},$$scope:{ctx:j}}}),hn=new Ge({props:{anchor:"transformers.DebertaV2ForMultipleChoice.forward.example",$$slots:{default:[ly]},$$scope:{ctx:j}}}),ha=new qe({}),ma=new L({props:{name:"class transformers.TFDebertaV2Model",anchor:"transformers.TFDebertaV2Model",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1183"}}),un=new ot({props:{$$slots:{default:[dy]},$$scope:{ctx:j}}}),ba=new L({props:{name:"call",anchor:"transformers.TFDebertaV2Model.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.TFDebertaV2Model.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.TFDebertaV2Model.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.TFDebertaV2Model.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.TFDebertaV2Model.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.TFDebertaV2Model.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.TFDebertaV2Model.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.TFDebertaV2Model.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.TFDebertaV2Model.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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1189",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),fn=new ot({props:{$$slots:{default:[cy]},$$scope:{ctx:j}}}),gn=new Ge({props:{anchor:"transformers.TFDebertaV2Model.call.example",$$slots:{default:[py]},$$scope:{ctx:j}}}),ya=new qe({}),Ta=new L({props:{name:"class transformers.TFDebertaV2PreTrainedModel",anchor:"transformers.TFDebertaV2PreTrainedModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1082"}}),va=new L({props:{name:"call",anchor:"transformers.TFDebertaV2PreTrainedModel.call",parameters:[{name:"inputs",val:""},{name:"training",val:" = None"},{name:"mask",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/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>
`}}),ka=new qe({}),Ma=new L({props:{name:"class transformers.TFDebertaV2ForMaskedLM",anchor:"transformers.TFDebertaV2ForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1225"}}),yn=new ot({props:{$$slots:{default:[hy]},$$scope:{ctx:j}}}),Va=new L({props:{name:"call",anchor:"transformers.TFDebertaV2ForMaskedLM.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.TFDebertaV2ForMaskedLM.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.TFDebertaV2ForMaskedLM.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.TFDebertaV2ForMaskedLM.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.TFDebertaV2ForMaskedLM.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.TFDebertaV2ForMaskedLM.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.TFDebertaV2ForMaskedLM.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.TFDebertaV2ForMaskedLM.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.TFDebertaV2ForMaskedLM.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.TFDebertaV2ForMaskedLM.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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1241",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Tn=new ot({props:{$$slots:{default:[my]},$$scope:{ctx:j}}}),vn=new Ge({props:{anchor:"transformers.TFDebertaV2ForMaskedLM.call.example",$$slots:{default:[uy]},$$scope:{ctx:j}}}),wn=new Ge({props:{anchor:"transformers.TFDebertaV2ForMaskedLM.call.example-2",$$slots:{default:[fy]},$$scope:{ctx:j}}}),ja=new qe({}),Fa=new L({props:{name:"class transformers.TFDebertaV2ForSequenceClassification",anchor:"transformers.TFDebertaV2ForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1302"}}),Mn=new ot({props:{$$slots:{default:[gy]},$$scope:{ctx:j}}}),za=new L({props:{name:"call",anchor:"transformers.TFDebertaV2ForSequenceClassification.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.TFDebertaV2ForSequenceClassification.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.TFDebertaV2ForSequenceClassification.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.TFDebertaV2ForSequenceClassification.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.TFDebertaV2ForSequenceClassification.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.TFDebertaV2ForSequenceClassification.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.TFDebertaV2ForSequenceClassification.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.TFDebertaV2ForSequenceClassification.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.TFDebertaV2ForSequenceClassification.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.TFDebertaV2ForSequenceClassification.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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1320",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),$n=new ot({props:{$$slots:{default:[_y]},$$scope:{ctx:j}}}),En=new Ge({props:{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.example",$$slots:{default:[by]},$$scope:{ctx:j}}}),Dn=new Ge({props:{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.example-2",$$slots:{default:[yy]},$$scope:{ctx:j}}}),Ua=new qe({}),Ia=new L({props:{name:"class transformers.TFDebertaV2ForTokenClassification",anchor:"transformers.TFDebertaV2ForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1384"}}),jn=new ot({props:{$$slots:{default:[Ty]},$$scope:{ctx:j}}}),Ga=new L({props:{name:"call",anchor:"transformers.TFDebertaV2ForTokenClassification.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.TFDebertaV2ForTokenClassification.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.TFDebertaV2ForTokenClassification.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.TFDebertaV2ForTokenClassification.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.TFDebertaV2ForTokenClassification.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.TFDebertaV2ForTokenClassification.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.TFDebertaV2ForTokenClassification.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.TFDebertaV2ForTokenClassification.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.TFDebertaV2ForTokenClassification.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.TFDebertaV2ForTokenClassification.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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1396",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Fn=new ot({props:{$$slots:{default:[vy]},$$scope:{ctx:j}}}),Jn=new Ge({props:{anchor:"transformers.TFDebertaV2ForTokenClassification.call.example",$$slots:{default:[wy]},$$scope:{ctx:j}}}),Rn=new Ge({props:{anchor:"transformers.TFDebertaV2ForTokenClassification.call.example-2",$$slots:{default:[ky]},$$scope:{ctx:j}}}),Na=new qe({}),Aa=new L({props:{name:"class transformers.TFDebertaV2ForQuestionAnswering",anchor:"transformers.TFDebertaV2ForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</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/v4.33.0/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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1456"}}),Cn=new ot({props:{$$slots:{default:[My]},$$scope:{ctx:j}}}),Qa=new L({props:{name:"call",anchor:"transformers.TFDebertaV2ForQuestionAnswering.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.TFDebertaV2ForQuestionAnswering.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/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.TFDebertaV2ForQuestionAnswering.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.TFDebertaV2ForQuestionAnswering.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.TFDebertaV2ForQuestionAnswering.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.TFDebertaV2ForQuestionAnswering.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.TFDebertaV2ForQuestionAnswering.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.TFDebertaV2ForQuestionAnswering.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.TFDebertaV2ForQuestionAnswering.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.TFDebertaV2ForQuestionAnswering.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.TFDebertaV2ForQuestionAnswering.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/v4.33.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1467",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/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/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</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/v4.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),zn=new ot({props:{$$slots:{default:[$y]},$$scope:{ctx:j}}}),Un=new Ge({props:{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.example",$$slots:{default:[Ey]},$$scope:{ctx:j}}}),In=new Ge({props:{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.example-2",$$slots:{default:[Dy]},$$scope:{ctx:j}}}),{c(){d=a("meta"),y=c(),m=a("h1"),f=a("a"),T=a("span"),v(l.$$.fragment),h=c(),F=a("span"),ye=n("DeBERTa-v2"),pe=c(),x=a("h2"),ne=a("a"),oe=a("span"),v(D.$$.fragment),Te=c(),X=a("span"),ve=n("Overview"),he=c(),Z=a("p"),we=n("The DeBERTa model was proposed in "),ie=a("a"),Q=n("DeBERTa: Decoding-enhanced BERT with Disentangled Attention"),ke=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.`),me=c(),N=a("p"),Me=n(`It builds on RoBERTa with disentangled attention and enhanced mask decoder training with half of the data used in
RoBERTa.`),ue=c(),A=a("p"),$e=n("The abstract from the paper is the following:"),fe=c(),te=a("p"),R=a("em"),z=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 `),le=a("a"),Y=n("https://github.com/microsoft/DeBERTa"),Ee=n("."),ge=c(),W=a("p"),De=n("The following information is visible directly on the "),de=a("a"),U=n(`original implementation
repository`),Ve=n(`. DeBERTa v2 is the second version of the DeBERTa model. It includes
the 1.5B model used for the SuperGLUE single-model submission and achieving 89.9, versus human baseline 89.8. You can
find more details about this submission in the authors\u2019
`),G=a("a"),je=n("blog"),_e=c(),S=a("p"),Fe=n("New in v2:"),be=c(),C=a("ul"),se=a("li"),P=a("strong"),Je=n("Vocabulary"),ae=n(` In v2 the tokenizer is changed to use a new vocabulary of size 128K built from the training data.
Instead of a GPT2-based tokenizer, the tokenizer is now
`),B=a("a"),Re=n("sentencepiece-based"),I=n(" tokenizer."),Be=c(),ce=a("li"),b=a("strong"),V=n("nGiE(nGram Induced Input Encoding)"),Se=n(` The DeBERTa-v2 model uses an additional convolution layer aside with the first
transformer layer to better learn the local dependency of input tokens.`),re=c(),Ce=a("li"),Ie=a("strong"),J=n("Sharing position projection matrix with content projection matrix in attention layer"),Xe=n(` Based on previous
experiments, this can save parameters without affecting the performance.`),Pe=c(),ze=a("li"),xe=a("strong"),Le=n("Apply bucket to encode relative positions"),q=n(` The DeBERTa-v2 model uses log bucket to encode relative positions
similar to T5.`),H=c(),Ue=a("li"),We=a("strong"),O=n("900M model & 1.5B model"),Qe=n(` Two additional model sizes are available: 900M and 1.5B, which significantly improves the
performance of downstream tasks.`),Ze=c(),K=a("p"),Ye=n("This model was contributed by "),ee=a("a"),He=n("DeBERTa"),bc=n(`. This model TF 2.0 implementation was
contributed by `),es=a("a"),yc=n("kamalkraj"),Tc=n(". The original code can be found "),ts=a("a"),vc=n("here"),wc=n("."),Ql=c(),Kt=a("h2"),Io=a("a"),Qr=a("span"),v(os.$$.fragment),kc=c(),Yr=a("span"),Mc=n("Documentation resources"),Yl=c(),dt=a("ul"),Hr=a("li"),tr=a("a"),$c=n("Text classification task guide"),Ec=c(),Or=a("li"),or=a("a"),Dc=n("Token classification task guide"),Vc=c(),Kr=a("li"),nr=a("a"),jc=n("Question answering task guide"),Fc=c(),ei=a("li"),sr=a("a"),Jc=n("Masked language modeling task guide"),Rc=c(),ti=a("li"),ar=a("a"),Bc=n("Multiple choice task guide"),Hl=c(),eo=a("h2"),xo=a("a"),oi=a("span"),v(ns.$$.fragment),Cc=c(),ni=a("span"),zc=n("DebertaV2Config"),Ol=c(),ft=a("div"),v(ss.$$.fragment),Uc=c(),to=a("p"),Ic=n("This is the configuration class to store the configuration of a "),rr=a("a"),xc=n("DebertaV2Model"),Wc=n(`. It is used to instantiate a
DeBERTa-v2 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
`),as=a("a"),Zc=n("microsoft/deberta-v2-xlarge"),qc=n(" architecture."),Gc=c(),oo=a("p"),Nc=n("Configuration objects inherit from "),ir=a("a"),Ac=n("PretrainedConfig"),Sc=n(` and can be used to control the model outputs. Read the
documentation from `),lr=a("a"),Xc=n("PretrainedConfig"),Pc=n(" for more information."),Lc=c(),v(Wo.$$.fragment),Kl=c(),no=a("h2"),Zo=a("a"),si=a("span"),v(rs.$$.fragment),Qc=c(),ai=a("span"),Yc=n("DebertaV2Tokenizer"),ed=c(),Oe=a("div"),v(is.$$.fragment),Hc=c(),ls=a("p"),Oc=n("Constructs a DeBERTa-v2 tokenizer. Based on "),ds=a("a"),Kc=n("SentencePiece"),ep=n("."),tp=c(),xt=a("div"),v(cs.$$.fragment),op=c(),ri=a("p"),np=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:`),sp=c(),ps=a("ul"),ii=a("li"),ap=n("single sequence: [CLS] X [SEP]"),rp=c(),li=a("li"),ip=n("pair of sequences: [CLS] A [SEP] B [SEP]"),lp=c(),qo=a("div"),v(hs.$$.fragment),dp=c(),so=a("p"),cp=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 `),di=a("code"),pp=n("prepare_for_model"),hp=n(" or "),ci=a("code"),mp=n("encode_plus"),up=n(" methods."),fp=c(),vt=a("div"),v(ms.$$.fragment),gp=c(),pi=a("p"),_p=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),bp=c(),v(Go.$$.fragment),yp=c(),ao=a("p"),Tp=n("If "),hi=a("code"),vp=n("token_ids_1"),wp=n(" is "),mi=a("code"),kp=n("None"),Mp=n(", this method only returns the first portion of the mask (0s)."),$p=c(),dr=a("div"),v(us.$$.fragment),td=c(),ro=a("h2"),No=a("a"),ui=a("span"),v(fs.$$.fragment),Ep=c(),fi=a("span"),Dp=n("DebertaV2TokenizerFast"),od=c(),gt=a("div"),v(gs.$$.fragment),Vp=c(),_s=a("p"),jp=n("Constructs a DeBERTa-v2 fast tokenizer. Based on "),bs=a("a"),Fp=n("SentencePiece"),Jp=n("."),Rp=c(),Wt=a("div"),v(ys.$$.fragment),Bp=c(),gi=a("p"),Cp=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:`),zp=c(),Ts=a("ul"),_i=a("li"),Up=n("single sequence: [CLS] X [SEP]"),Ip=c(),bi=a("li"),xp=n("pair of sequences: [CLS] A [SEP] B [SEP]"),Wp=c(),wt=a("div"),v(vs.$$.fragment),Zp=c(),yi=a("p"),qp=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),Gp=c(),v(Ao.$$.fragment),Np=c(),io=a("p"),Ap=n("If "),Ti=a("code"),Sp=n("token_ids_1"),Xp=n(" is "),vi=a("code"),Pp=n("None"),Lp=n(", this method only returns the first portion of the mask (0s)."),nd=c(),lo=a("h2"),So=a("a"),wi=a("span"),v(ws.$$.fragment),Qp=c(),ki=a("span"),Yp=n("DebertaV2Model"),sd=c(),_t=a("div"),v(ks.$$.fragment),Hp=c(),Ms=a("p"),Op=n(`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),$s=a("a"),Kp=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),eh=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.`),th=c(),Es=a("p"),oh=n("This model is also a PyTorch "),Ds=a("a"),nh=n("torch.nn.Module"),sh=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ah=c(),kt=a("div"),v(Vs.$$.fragment),rh=c(),co=a("p"),ih=n("The "),cr=a("a"),lh=n("DebertaV2Model"),dh=n(" forward method, overrides the "),Mi=a("code"),ch=n("__call__"),ph=n(" special method."),hh=c(),v(Xo.$$.fragment),mh=c(),v(Po.$$.fragment),ad=c(),po=a("h2"),Lo=a("a"),$i=a("span"),v(js.$$.fragment),uh=c(),Ei=a("span"),fh=n("DebertaV2PreTrainedModel"),rd=c(),zt=a("div"),v(Fs.$$.fragment),gh=c(),Di=a("p"),_h=n(`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),bh=c(),Mt=a("div"),v(Js.$$.fragment),yh=c(),Vi=a("p"),Th=n("Defines the computation performed at every call."),vh=c(),ji=a("p"),wh=n("Should be overridden by all subclasses."),kh=c(),v(Qo.$$.fragment),id=c(),ho=a("h2"),Yo=a("a"),Fi=a("span"),v(Rs.$$.fragment),Mh=c(),Ji=a("span"),$h=n("DebertaV2ForMaskedLM"),ld=c(),bt=a("div"),v(Bs.$$.fragment),Eh=c(),mo=a("p"),Dh=n("DeBERTa Model with a "),Ri=a("code"),Vh=n("language modeling"),jh=n(` head on top.
The DeBERTa model was proposed in `),Cs=a("a"),Fh=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Jh=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.`),Rh=c(),zs=a("p"),Bh=n("This model is also a PyTorch "),Us=a("a"),Ch=n("torch.nn.Module"),zh=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Uh=c(),$t=a("div"),v(Is.$$.fragment),Ih=c(),uo=a("p"),xh=n("The "),pr=a("a"),Wh=n("DebertaV2ForMaskedLM"),Zh=n(" forward method, overrides the "),Bi=a("code"),qh=n("__call__"),Gh=n(" special method."),Nh=c(),v(Ho.$$.fragment),Ah=c(),v(Oo.$$.fragment),dd=c(),fo=a("h2"),Ko=a("a"),Ci=a("span"),v(xs.$$.fragment),Sh=c(),zi=a("span"),Xh=n("DebertaV2ForSequenceClassification"),cd=c(),nt=a("div"),v(Ws.$$.fragment),Ph=c(),Ui=a("p"),Lh=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.`),Qh=c(),Zs=a("p"),Yh=n("The DeBERTa model was proposed in "),qs=a("a"),Hh=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Oh=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.`),Kh=c(),Gs=a("p"),em=n("This model is also a PyTorch "),Ns=a("a"),tm=n("torch.nn.Module"),om=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nm=c(),ct=a("div"),v(As.$$.fragment),sm=c(),go=a("p"),am=n("The "),hr=a("a"),rm=n("DebertaV2ForSequenceClassification"),im=n(" forward method, overrides the "),Ii=a("code"),lm=n("__call__"),dm=n(" special method."),cm=c(),v(en.$$.fragment),pm=c(),v(tn.$$.fragment),hm=c(),v(on.$$.fragment),pd=c(),_o=a("h2"),nn=a("a"),xi=a("span"),v(Ss.$$.fragment),mm=c(),Wi=a("span"),um=n("DebertaV2ForTokenClassification"),hd=c(),st=a("div"),v(Xs.$$.fragment),fm=c(),Zi=a("p"),gm=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.`),_m=c(),Ps=a("p"),bm=n("The DeBERTa model was proposed in "),Ls=a("a"),ym=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Tm=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.`),vm=c(),Qs=a("p"),wm=n("This model is also a PyTorch "),Ys=a("a"),km=n("torch.nn.Module"),Mm=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$m=c(),Et=a("div"),v(Hs.$$.fragment),Em=c(),bo=a("p"),Dm=n("The "),mr=a("a"),Vm=n("DebertaV2ForTokenClassification"),jm=n(" forward method, overrides the "),qi=a("code"),Fm=n("__call__"),Jm=n(" special method."),Rm=c(),v(sn.$$.fragment),Bm=c(),v(an.$$.fragment),md=c(),yo=a("h2"),rn=a("a"),Gi=a("span"),v(Os.$$.fragment),Cm=c(),Ni=a("span"),zm=n("DebertaV2ForQuestionAnswering"),ud=c(),at=a("div"),v(Ks.$$.fragment),Um=c(),To=a("p"),Im=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 `),Ai=a("code"),xm=n("span start logits"),Wm=n(" and "),Si=a("code"),Zm=n("span end logits"),qm=n(")."),Gm=c(),ea=a("p"),Nm=n("The DeBERTa model was proposed in "),ta=a("a"),Am=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Sm=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.`),Xm=c(),oa=a("p"),Pm=n("This model is also a PyTorch "),na=a("a"),Lm=n("torch.nn.Module"),Qm=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ym=c(),Dt=a("div"),v(sa.$$.fragment),Hm=c(),vo=a("p"),Om=n("The "),ur=a("a"),Km=n("DebertaV2ForQuestionAnswering"),eu=n(" forward method, overrides the "),Xi=a("code"),tu=n("__call__"),ou=n(" special method."),nu=c(),v(ln.$$.fragment),su=c(),v(dn.$$.fragment),fd=c(),wo=a("h2"),cn=a("a"),Pi=a("span"),v(aa.$$.fragment),au=c(),Li=a("span"),ru=n("DebertaV2ForMultipleChoice"),gd=c(),rt=a("div"),v(ra.$$.fragment),iu=c(),Qi=a("p"),lu=n(`DeBERTa Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),du=c(),ia=a("p"),cu=n("The DeBERTa model was proposed in "),la=a("a"),pu=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),hu=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.`),mu=c(),da=a("p"),uu=n("This model is also a PyTorch "),ca=a("a"),fu=n("torch.nn.Module"),gu=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_u=c(),Vt=a("div"),v(pa.$$.fragment),bu=c(),ko=a("p"),yu=n("The "),fr=a("a"),Tu=n("DebertaV2ForMultipleChoice"),vu=n(" forward method, overrides the "),Yi=a("code"),wu=n("__call__"),ku=n(" special method."),Mu=c(),v(pn.$$.fragment),$u=c(),v(hn.$$.fragment),_d=c(),Mo=a("h2"),mn=a("a"),Hi=a("span"),v(ha.$$.fragment),Eu=c(),Oi=a("span"),Du=n("TFDebertaV2Model"),bd=c(),it=a("div"),v(ma.$$.fragment),Vu=c(),ua=a("p"),ju=n(`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),fa=a("a"),Fu=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Ju=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.`),Ru=c(),ga=a("p"),Bu=n("This model is also a "),_a=a("a"),Cu=n("tf.keras.Model"),zu=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.`),Uu=c(),v(un.$$.fragment),Iu=c(),jt=a("div"),v(ba.$$.fragment),xu=c(),$o=a("p"),Wu=n("The "),gr=a("a"),Zu=n("TFDebertaV2Model"),qu=n(" forward method, overrides the "),Ki=a("code"),Gu=n("__call__"),Nu=n(" special method."),Au=c(),v(fn.$$.fragment),Su=c(),v(gn.$$.fragment),yd=c(),Eo=a("h2"),_n=a("a"),el=a("span"),v(ya.$$.fragment),Xu=c(),tl=a("span"),Pu=n("TFDebertaV2PreTrainedModel"),Td=c(),Ut=a("div"),v(Ta.$$.fragment),Lu=c(),ol=a("p"),Qu=n(`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),Yu=c(),Ft=a("div"),v(va.$$.fragment),Hu=c(),nl=a("p"),Ou=n("Calls the model on new inputs and returns the outputs as tensors."),Ku=c(),wa=a("p"),ef=n("In this case "),sl=a("code"),tf=n("call()"),of=n(` just reapplies
all ops in the graph to the new inputs
(e.g. build a new computational graph from the provided inputs).`),nf=c(),yt=a("p"),sf=n(`Note: This method should not be called directly. It is only meant to be
overridden when subclassing `),al=a("code"),af=n("tf.keras.Model"),rf=n(`.
To call a model on an input, always use the `),rl=a("code"),lf=n("__call__()"),df=n(` method,
i.e. `),il=a("code"),cf=n("model(inputs)"),pf=n(", which relies on the underlying "),ll=a("code"),hf=n("call()"),mf=n(" method."),vd=c(),Do=a("h2"),bn=a("a"),dl=a("span"),v(ka.$$.fragment),uf=c(),cl=a("span"),ff=n("TFDebertaV2ForMaskedLM"),wd=c(),lt=a("div"),v(Ma.$$.fragment),gf=c(),Vo=a("p"),_f=n("DeBERTa Model with a "),pl=a("code"),bf=n("language modeling"),yf=n(` head on top.
The DeBERTa model was proposed in `),$a=a("a"),Tf=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),vf=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.`),wf=c(),Ea=a("p"),kf=n("This model is also a "),Da=a("a"),Mf=n("tf.keras.Model"),$f=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.`),Ef=c(),v(yn.$$.fragment),Df=c(),pt=a("div"),v(Va.$$.fragment),Vf=c(),jo=a("p"),jf=n("The "),_r=a("a"),Ff=n("TFDebertaV2ForMaskedLM"),Jf=n(" forward method, overrides the "),hl=a("code"),Rf=n("__call__"),Bf=n(" special method."),Cf=c(),v(Tn.$$.fragment),zf=c(),v(vn.$$.fragment),Uf=c(),v(wn.$$.fragment),kd=c(),Fo=a("h2"),kn=a("a"),ml=a("span"),v(ja.$$.fragment),If=c(),ul=a("span"),xf=n("TFDebertaV2ForSequenceClassification"),Md=c(),Ke=a("div"),v(Fa.$$.fragment),Wf=c(),fl=a("p"),Zf=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.`),qf=c(),Ja=a("p"),Gf=n("The DeBERTa model was proposed in "),Ra=a("a"),Nf=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Af=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.`),Sf=c(),Ba=a("p"),Xf=n("This model is also a "),Ca=a("a"),Pf=n("tf.keras.Model"),Lf=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.`),Qf=c(),v(Mn.$$.fragment),Yf=c(),ht=a("div"),v(za.$$.fragment),Hf=c(),Jo=a("p"),Of=n("The "),br=a("a"),Kf=n("TFDebertaV2ForSequenceClassification"),eg=n(" forward method, overrides the "),gl=a("code"),tg=n("__call__"),og=n(" special method."),ng=c(),v($n.$$.fragment),sg=c(),v(En.$$.fragment),ag=c(),v(Dn.$$.fragment),$d=c(),Ro=a("h2"),Vn=a("a"),_l=a("span"),v(Ua.$$.fragment),rg=c(),bl=a("span"),ig=n("TFDebertaV2ForTokenClassification"),Ed=c(),et=a("div"),v(Ia.$$.fragment),lg=c(),yl=a("p"),dg=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.`),cg=c(),xa=a("p"),pg=n("The DeBERTa model was proposed in "),Wa=a("a"),hg=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),mg=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.`),ug=c(),Za=a("p"),fg=n("This model is also a "),qa=a("a"),gg=n("tf.keras.Model"),_g=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.`),bg=c(),v(jn.$$.fragment),yg=c(),mt=a("div"),v(Ga.$$.fragment),Tg=c(),Bo=a("p"),vg=n("The "),yr=a("a"),wg=n("TFDebertaV2ForTokenClassification"),kg=n(" forward method, overrides the "),Tl=a("code"),Mg=n("__call__"),$g=n(" special method."),Eg=c(),v(Fn.$$.fragment),Dg=c(),v(Jn.$$.fragment),Vg=c(),v(Rn.$$.fragment),Dd=c(),Co=a("h2"),Bn=a("a"),vl=a("span"),v(Na.$$.fragment),jg=c(),wl=a("span"),Fg=n("TFDebertaV2ForQuestionAnswering"),Vd=c(),tt=a("div"),v(Aa.$$.fragment),Jg=c(),zo=a("p"),Rg=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 `),kl=a("code"),Bg=n("span start logits"),Cg=n(" and "),Ml=a("code"),zg=n("span end logits"),Ug=n(")."),Ig=c(),Sa=a("p"),xg=n("The DeBERTa model was proposed in "),Xa=a("a"),Wg=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Zg=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(),Pa=a("p"),Gg=n("This model is also a "),La=a("a"),Ng=n("tf.keras.Model"),Ag=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.`),Sg=c(),v(Cn.$$.fragment),Xg=c(),ut=a("div"),v(Qa.$$.fragment),Pg=c(),Uo=a("p"),Lg=n("The "),Tr=a("a"),Qg=n("TFDebertaV2ForQuestionAnswering"),Yg=n(" forward method, overrides the "),$l=a("code"),Hg=n("__call__"),Og=n(" special method."),Kg=c(),v(zn.$$.fragment),e_=c(),v(Un.$$.fragment),t_=c(),v(In.$$.fragment),this.h()},l(o){const _=A2('[data-svelte="svelte-1phssyn"]',document.head);d=r(_,"META",{name:!0,content:!0}),_.forEach(t),y=p(o),m=r(o,"H1",{class:!0});var Ya=i(m);f=r(Ya,"A",{id:!0,class:!0,href:!0});var El=i(f);T=r(El,"SPAN",{});var Dl=i(T);w(l.$$.fragment,Dl),Dl.forEach(t),El.forEach(t),h=p(Ya),F=r(Ya,"SPAN",{});var Vl=i(F);ye=s(Vl,"DeBERTa-v2"),Vl.forEach(t),Ya.forEach(t),pe=p(o),x=r(o,"H2",{class:!0});var Ha=i(x);ne=r(Ha,"A",{id:!0,class:!0,href:!0});var jl=i(ne);oe=r(jl,"SPAN",{});var Fl=i(oe);w(D.$$.fragment,Fl),Fl.forEach(t),jl.forEach(t),Te=p(Ha),X=r(Ha,"SPAN",{});var Jl=i(X);ve=s(Jl,"Overview"),Jl.forEach(t),Ha.forEach(t),he=p(o),Z=r(o,"P",{});var Oa=i(Z);we=s(Oa,"The DeBERTa model was proposed in "),ie=r(Oa,"A",{href:!0,rel:!0});var Rl=i(ie);Q=s(Rl,"DeBERTa: Decoding-enhanced BERT with Disentangled Attention"),Rl.forEach(t),ke=s(Oa,` 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.`),Oa.forEach(t),me=p(o),N=r(o,"P",{});var Bl=i(N);Me=s(Bl,`It builds on RoBERTa with disentangled attention and enhanced mask decoder training with half of the data used in
RoBERTa.`),Bl.forEach(t),ue=p(o),A=r(o,"P",{});var Cl=i(A);$e=s(Cl,"The abstract from the paper is the following:"),Cl.forEach(t),fe=p(o),te=r(o,"P",{});var zl=i(te);R=r(zl,"EM",{});var Ka=i(R);z=s(Ka,`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 `),le=r(Ka,"A",{href:!0,rel:!0});var Ul=i(le);Y=s(Ul,"https://github.com/microsoft/DeBERTa"),Ul.forEach(t),Ee=s(Ka,"."),Ka.forEach(t),zl.forEach(t),ge=p(o),W=r(o,"P",{});var xn=i(W);De=s(xn,"The following information is visible directly on the "),de=r(xn,"A",{href:!0,rel:!0});var Il=i(de);U=s(Il,`original implementation
repository`),Il.forEach(t),Ve=s(xn,`. DeBERTa v2 is the second version of the DeBERTa model. It includes
the 1.5B model used for the SuperGLUE single-model submission and achieving 89.9, versus human baseline 89.8. You can
find more details about this submission in the authors\u2019
`),G=r(xn,"A",{href:!0,rel:!0});var xl=i(G);je=s(xl,"blog"),xl.forEach(t),xn.forEach(t),_e=p(o),S=r(o,"P",{});var Wl=i(S);Fe=s(Wl,"New in v2:"),Wl.forEach(t),be=p(o),C=r(o,"UL",{});var Tt=i(C);se=r(Tt,"LI",{});var Wn=i(se);P=r(Wn,"STRONG",{});var Zl=i(P);Je=s(Zl,"Vocabulary"),Zl.forEach(t),ae=s(Wn,` In v2 the tokenizer is changed to use a new vocabulary of size 128K built from the training data.
Instead of a GPT2-based tokenizer, the tokenizer is now
`),B=r(Wn,"A",{href:!0,rel:!0});var ql=i(B);Re=s(ql,"sentencepiece-based"),ql.forEach(t),I=s(Wn," tokenizer."),Wn.forEach(t),Be=p(Tt),ce=r(Tt,"LI",{});var vr=i(ce);b=r(vr,"STRONG",{});var Gl=i(b);V=s(Gl,"nGiE(nGram Induced Input Encoding)"),Gl.forEach(t),Se=s(vr,` The DeBERTa-v2 model uses an additional convolution layer aside with the first
transformer layer to better learn the local dependency of input tokens.`),vr.forEach(t),re=p(Tt),Ce=r(Tt,"LI",{});var wr=i(Ce);Ie=r(wr,"STRONG",{});var Nl=i(Ie);J=s(Nl,"Sharing position projection matrix with content projection matrix in attention layer"),Nl.forEach(t),Xe=s(wr,` Based on previous
experiments, this can save parameters without affecting the performance.`),wr.forEach(t),Pe=p(Tt),ze=r(Tt,"LI",{});var kr=i(ze);xe=r(kr,"STRONG",{});var Al=i(xe);Le=s(Al,"Apply bucket to encode relative positions"),Al.forEach(t),q=s(kr,` The DeBERTa-v2 model uses log bucket to encode relative positions
similar to T5.`),kr.forEach(t),H=p(Tt),Ue=r(Tt,"LI",{});var Mr=i(Ue);We=r(Mr,"STRONG",{});var Sl=i(We);O=s(Sl,"900M model & 1.5B model"),Sl.forEach(t),Qe=s(Mr,` Two additional model sizes are available: 900M and 1.5B, which significantly improves the
performance of downstream tasks.`),Mr.forEach(t),Tt.forEach(t),Ze=p(o),K=r(o,"P",{});var It=i(K);Ye=s(It,"This model was contributed by "),ee=r(It,"A",{href:!0,rel:!0});var Xl=i(ee);He=s(Xl,"DeBERTa"),Xl.forEach(t),bc=s(It,`. This model TF 2.0 implementation was
contributed by `),es=r(It,"A",{href:!0,rel:!0});var Pl=i(es);yc=s(Pl,"kamalkraj"),Pl.forEach(t),Tc=s(It,". The original code can be found "),ts=r(It,"A",{href:!0,rel:!0});var Ll=i(ts);vc=s(Ll,"here"),Ll.forEach(t),wc=s(It,"."),It.forEach(t),Ql=p(o),Kt=r(o,"H2",{class:!0});var er=i(Kt);Io=r(er,"A",{id:!0,class:!0,href:!0});var o_=i(Io);Qr=r(o_,"SPAN",{});var n_=i(Qr);w(os.$$.fragment,n_),n_.forEach(t),o_.forEach(t),kc=p(er),Yr=r(er,"SPAN",{});var s_=i(Yr);Mc=s(s_,"Documentation resources"),s_.forEach(t),er.forEach(t),Yl=p(o),dt=r(o,"UL",{});var Zt=i(dt);Hr=r(Zt,"LI",{});var a_=i(Hr);tr=r(a_,"A",{href:!0});var r_=i(tr);$c=s(r_,"Text classification task guide"),r_.forEach(t),a_.forEach(t),Ec=p(Zt),Or=r(Zt,"LI",{});var i_=i(Or);or=r(i_,"A",{href:!0});var l_=i(or);Dc=s(l_,"Token classification task guide"),l_.forEach(t),i_.forEach(t),Vc=p(Zt),Kr=r(Zt,"LI",{});var d_=i(Kr);nr=r(d_,"A",{href:!0});var c_=i(nr);jc=s(c_,"Question answering task guide"),c_.forEach(t),d_.forEach(t),Fc=p(Zt),ei=r(Zt,"LI",{});var p_=i(ei);sr=r(p_,"A",{href:!0});var h_=i(sr);Jc=s(h_,"Masked language modeling task guide"),h_.forEach(t),p_.forEach(t),Rc=p(Zt),ti=r(Zt,"LI",{});var m_=i(ti);ar=r(m_,"A",{href:!0});var u_=i(ar);Bc=s(u_,"Multiple choice task guide"),u_.forEach(t),m_.forEach(t),Zt.forEach(t),Hl=p(o),eo=r(o,"H2",{class:!0});var Fd=i(eo);xo=r(Fd,"A",{id:!0,class:!0,href:!0});var f_=i(xo);oi=r(f_,"SPAN",{});var g_=i(oi);w(ns.$$.fragment,g_),g_.forEach(t),f_.forEach(t),Cc=p(Fd),ni=r(Fd,"SPAN",{});var __=i(ni);zc=s(__,"DebertaV2Config"),__.forEach(t),Fd.forEach(t),Ol=p(o),ft=r(o,"DIV",{class:!0});var Zn=i(ft);w(ss.$$.fragment,Zn),Uc=p(Zn),to=r(Zn,"P",{});var $r=i(to);Ic=s($r,"This is the configuration class to store the configuration of a "),rr=r($r,"A",{href:!0});var b_=i(rr);xc=s(b_,"DebertaV2Model"),b_.forEach(t),Wc=s($r,`. It is used to instantiate a
DeBERTa-v2 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
`),as=r($r,"A",{href:!0,rel:!0});var y_=i(as);Zc=s(y_,"microsoft/deberta-v2-xlarge"),y_.forEach(t),qc=s($r," architecture."),$r.forEach(t),Gc=p(Zn),oo=r(Zn,"P",{});var Er=i(oo);Nc=s(Er,"Configuration objects inherit from "),ir=r(Er,"A",{href:!0});var T_=i(ir);Ac=s(T_,"PretrainedConfig"),T_.forEach(t),Sc=s(Er,` and can be used to control the model outputs. Read the
documentation from `),lr=r(Er,"A",{href:!0});var v_=i(lr);Xc=s(v_,"PretrainedConfig"),v_.forEach(t),Pc=s(Er," for more information."),Er.forEach(t),Lc=p(Zn),w(Wo.$$.fragment,Zn),Zn.forEach(t),Kl=p(o),no=r(o,"H2",{class:!0});var Jd=i(no);Zo=r(Jd,"A",{id:!0,class:!0,href:!0});var w_=i(Zo);si=r(w_,"SPAN",{});var k_=i(si);w(rs.$$.fragment,k_),k_.forEach(t),w_.forEach(t),Qc=p(Jd),ai=r(Jd,"SPAN",{});var M_=i(ai);Yc=s(M_,"DebertaV2Tokenizer"),M_.forEach(t),Jd.forEach(t),ed=p(o),Oe=r(o,"DIV",{class:!0});var Jt=i(Oe);w(is.$$.fragment,Jt),Hc=p(Jt),ls=r(Jt,"P",{});var Rd=i(ls);Oc=s(Rd,"Constructs a DeBERTa-v2 tokenizer. Based on "),ds=r(Rd,"A",{href:!0,rel:!0});var $_=i(ds);Kc=s($_,"SentencePiece"),$_.forEach(t),ep=s(Rd,"."),Rd.forEach(t),tp=p(Jt),xt=r(Jt,"DIV",{class:!0});var Dr=i(xt);w(cs.$$.fragment,Dr),op=p(Dr),ri=r(Dr,"P",{});var E_=i(ri);np=s(E_,`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:`),E_.forEach(t),sp=p(Dr),ps=r(Dr,"UL",{});var Bd=i(ps);ii=r(Bd,"LI",{});var D_=i(ii);ap=s(D_,"single sequence: [CLS] X [SEP]"),D_.forEach(t),rp=p(Bd),li=r(Bd,"LI",{});var V_=i(li);ip=s(V_,"pair of sequences: [CLS] A [SEP] B [SEP]"),V_.forEach(t),Bd.forEach(t),Dr.forEach(t),lp=p(Jt),qo=r(Jt,"DIV",{class:!0});var Cd=i(qo);w(hs.$$.fragment,Cd),dp=p(Cd),so=r(Cd,"P",{});var Vr=i(so);cp=s(Vr,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),di=r(Vr,"CODE",{});var j_=i(di);pp=s(j_,"prepare_for_model"),j_.forEach(t),hp=s(Vr," or "),ci=r(Vr,"CODE",{});var F_=i(ci);mp=s(F_,"encode_plus"),F_.forEach(t),up=s(Vr," methods."),Vr.forEach(t),Cd.forEach(t),fp=p(Jt),vt=r(Jt,"DIV",{class:!0});var qn=i(vt);w(ms.$$.fragment,qn),gp=p(qn),pi=r(qn,"P",{});var J_=i(pi);_p=s(J_,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),J_.forEach(t),bp=p(qn),w(Go.$$.fragment,qn),yp=p(qn),ao=r(qn,"P",{});var jr=i(ao);Tp=s(jr,"If "),hi=r(jr,"CODE",{});var R_=i(hi);vp=s(R_,"token_ids_1"),R_.forEach(t),wp=s(jr," is "),mi=r(jr,"CODE",{});var B_=i(mi);kp=s(B_,"None"),B_.forEach(t),Mp=s(jr,", this method only returns the first portion of the mask (0s)."),jr.forEach(t),qn.forEach(t),$p=p(Jt),dr=r(Jt,"DIV",{class:!0});var C_=i(dr);w(us.$$.fragment,C_),C_.forEach(t),Jt.forEach(t),td=p(o),ro=r(o,"H2",{class:!0});var zd=i(ro);No=r(zd,"A",{id:!0,class:!0,href:!0});var z_=i(No);ui=r(z_,"SPAN",{});var U_=i(ui);w(fs.$$.fragment,U_),U_.forEach(t),z_.forEach(t),Ep=p(zd),fi=r(zd,"SPAN",{});var I_=i(fi);Dp=s(I_,"DebertaV2TokenizerFast"),I_.forEach(t),zd.forEach(t),od=p(o),gt=r(o,"DIV",{class:!0});var Gn=i(gt);w(gs.$$.fragment,Gn),Vp=p(Gn),_s=r(Gn,"P",{});var Ud=i(_s);jp=s(Ud,"Constructs a DeBERTa-v2 fast tokenizer. Based on "),bs=r(Ud,"A",{href:!0,rel:!0});var x_=i(bs);Fp=s(x_,"SentencePiece"),x_.forEach(t),Jp=s(Ud,"."),Ud.forEach(t),Rp=p(Gn),Wt=r(Gn,"DIV",{class:!0});var Fr=i(Wt);w(ys.$$.fragment,Fr),Bp=p(Fr),gi=r(Fr,"P",{});var W_=i(gi);Cp=s(W_,`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:`),W_.forEach(t),zp=p(Fr),Ts=r(Fr,"UL",{});var Id=i(Ts);_i=r(Id,"LI",{});var Z_=i(_i);Up=s(Z_,"single sequence: [CLS] X [SEP]"),Z_.forEach(t),Ip=p(Id),bi=r(Id,"LI",{});var q_=i(bi);xp=s(q_,"pair of sequences: [CLS] A [SEP] B [SEP]"),q_.forEach(t),Id.forEach(t),Fr.forEach(t),Wp=p(Gn),wt=r(Gn,"DIV",{class:!0});var Nn=i(wt);w(vs.$$.fragment,Nn),Zp=p(Nn),yi=r(Nn,"P",{});var G_=i(yi);qp=s(G_,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),G_.forEach(t),Gp=p(Nn),w(Ao.$$.fragment,Nn),Np=p(Nn),io=r(Nn,"P",{});var Jr=i(io);Ap=s(Jr,"If "),Ti=r(Jr,"CODE",{});var N_=i(Ti);Sp=s(N_,"token_ids_1"),N_.forEach(t),Xp=s(Jr," is "),vi=r(Jr,"CODE",{});var A_=i(vi);Pp=s(A_,"None"),A_.forEach(t),Lp=s(Jr,", this method only returns the first portion of the mask (0s)."),Jr.forEach(t),Nn.forEach(t),Gn.forEach(t),nd=p(o),lo=r(o,"H2",{class:!0});var xd=i(lo);So=r(xd,"A",{id:!0,class:!0,href:!0});var S_=i(So);wi=r(S_,"SPAN",{});var X_=i(wi);w(ws.$$.fragment,X_),X_.forEach(t),S_.forEach(t),Qp=p(xd),ki=r(xd,"SPAN",{});var P_=i(ki);Yp=s(P_,"DebertaV2Model"),P_.forEach(t),xd.forEach(t),sd=p(o),_t=r(o,"DIV",{class:!0});var An=i(_t);w(ks.$$.fragment,An),Hp=p(An),Ms=r(An,"P",{});var Wd=i(Ms);Op=s(Wd,`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),$s=r(Wd,"A",{href:!0,rel:!0});var L_=i($s);Kp=s(L_,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),L_.forEach(t),eh=s(Wd,` 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.`),Wd.forEach(t),th=p(An),Es=r(An,"P",{});var Zd=i(Es);oh=s(Zd,"This model is also a PyTorch "),Ds=r(Zd,"A",{href:!0,rel:!0});var Q_=i(Ds);nh=s(Q_,"torch.nn.Module"),Q_.forEach(t),sh=s(Zd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zd.forEach(t),ah=p(An),kt=r(An,"DIV",{class:!0});var Sn=i(kt);w(Vs.$$.fragment,Sn),rh=p(Sn),co=r(Sn,"P",{});var Rr=i(co);ih=s(Rr,"The "),cr=r(Rr,"A",{href:!0});var Y_=i(cr);lh=s(Y_,"DebertaV2Model"),Y_.forEach(t),dh=s(Rr," forward method, overrides the "),Mi=r(Rr,"CODE",{});var H_=i(Mi);ch=s(H_,"__call__"),H_.forEach(t),ph=s(Rr," special method."),Rr.forEach(t),hh=p(Sn),w(Xo.$$.fragment,Sn),mh=p(Sn),w(Po.$$.fragment,Sn),Sn.forEach(t),An.forEach(t),ad=p(o),po=r(o,"H2",{class:!0});var qd=i(po);Lo=r(qd,"A",{id:!0,class:!0,href:!0});var O_=i(Lo);$i=r(O_,"SPAN",{});var K_=i($i);w(js.$$.fragment,K_),K_.forEach(t),O_.forEach(t),uh=p(qd),Ei=r(qd,"SPAN",{});var eb=i(Ei);fh=s(eb,"DebertaV2PreTrainedModel"),eb.forEach(t),qd.forEach(t),rd=p(o),zt=r(o,"DIV",{class:!0});var Br=i(zt);w(Fs.$$.fragment,Br),gh=p(Br),Di=r(Br,"P",{});var tb=i(Di);_h=s(tb,`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),tb.forEach(t),bh=p(Br),Mt=r(Br,"DIV",{class:!0});var Xn=i(Mt);w(Js.$$.fragment,Xn),yh=p(Xn),Vi=r(Xn,"P",{});var ob=i(Vi);Th=s(ob,"Defines the computation performed at every call."),ob.forEach(t),vh=p(Xn),ji=r(Xn,"P",{});var nb=i(ji);wh=s(nb,"Should be overridden by all subclasses."),nb.forEach(t),kh=p(Xn),w(Qo.$$.fragment,Xn),Xn.forEach(t),Br.forEach(t),id=p(o),ho=r(o,"H2",{class:!0});var Gd=i(ho);Yo=r(Gd,"A",{id:!0,class:!0,href:!0});var sb=i(Yo);Fi=r(sb,"SPAN",{});var ab=i(Fi);w(Rs.$$.fragment,ab),ab.forEach(t),sb.forEach(t),Mh=p(Gd),Ji=r(Gd,"SPAN",{});var rb=i(Ji);$h=s(rb,"DebertaV2ForMaskedLM"),rb.forEach(t),Gd.forEach(t),ld=p(o),bt=r(o,"DIV",{class:!0});var Pn=i(bt);w(Bs.$$.fragment,Pn),Eh=p(Pn),mo=r(Pn,"P",{});var Cr=i(mo);Dh=s(Cr,"DeBERTa Model with a "),Ri=r(Cr,"CODE",{});var ib=i(Ri);Vh=s(ib,"language modeling"),ib.forEach(t),jh=s(Cr,` head on top.
The DeBERTa model was proposed in `),Cs=r(Cr,"A",{href:!0,rel:!0});var lb=i(Cs);Fh=s(lb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),lb.forEach(t),Jh=s(Cr,` 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.`),Cr.forEach(t),Rh=p(Pn),zs=r(Pn,"P",{});var Nd=i(zs);Bh=s(Nd,"This model is also a PyTorch "),Us=r(Nd,"A",{href:!0,rel:!0});var db=i(Us);Ch=s(db,"torch.nn.Module"),db.forEach(t),zh=s(Nd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nd.forEach(t),Uh=p(Pn),$t=r(Pn,"DIV",{class:!0});var Ln=i($t);w(Is.$$.fragment,Ln),Ih=p(Ln),uo=r(Ln,"P",{});var zr=i(uo);xh=s(zr,"The "),pr=r(zr,"A",{href:!0});var cb=i(pr);Wh=s(cb,"DebertaV2ForMaskedLM"),cb.forEach(t),Zh=s(zr," forward method, overrides the "),Bi=r(zr,"CODE",{});var pb=i(Bi);qh=s(pb,"__call__"),pb.forEach(t),Gh=s(zr," special method."),zr.forEach(t),Nh=p(Ln),w(Ho.$$.fragment,Ln),Ah=p(Ln),w(Oo.$$.fragment,Ln),Ln.forEach(t),Pn.forEach(t),dd=p(o),fo=r(o,"H2",{class:!0});var Ad=i(fo);Ko=r(Ad,"A",{id:!0,class:!0,href:!0});var hb=i(Ko);Ci=r(hb,"SPAN",{});var mb=i(Ci);w(xs.$$.fragment,mb),mb.forEach(t),hb.forEach(t),Sh=p(Ad),zi=r(Ad,"SPAN",{});var ub=i(zi);Xh=s(ub,"DebertaV2ForSequenceClassification"),ub.forEach(t),Ad.forEach(t),cd=p(o),nt=r(o,"DIV",{class:!0});var qt=i(nt);w(Ws.$$.fragment,qt),Ph=p(qt),Ui=r(qt,"P",{});var fb=i(Ui);Lh=s(fb,`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.`),fb.forEach(t),Qh=p(qt),Zs=r(qt,"P",{});var Sd=i(Zs);Yh=s(Sd,"The DeBERTa model was proposed in "),qs=r(Sd,"A",{href:!0,rel:!0});var gb=i(qs);Hh=s(gb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),gb.forEach(t),Oh=s(Sd,` 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.`),Sd.forEach(t),Kh=p(qt),Gs=r(qt,"P",{});var Xd=i(Gs);em=s(Xd,"This model is also a PyTorch "),Ns=r(Xd,"A",{href:!0,rel:!0});var _b=i(Ns);tm=s(_b,"torch.nn.Module"),_b.forEach(t),om=s(Xd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xd.forEach(t),nm=p(qt),ct=r(qt,"DIV",{class:!0});var Gt=i(ct);w(As.$$.fragment,Gt),sm=p(Gt),go=r(Gt,"P",{});var Ur=i(go);am=s(Ur,"The "),hr=r(Ur,"A",{href:!0});var bb=i(hr);rm=s(bb,"DebertaV2ForSequenceClassification"),bb.forEach(t),im=s(Ur," forward method, overrides the "),Ii=r(Ur,"CODE",{});var yb=i(Ii);lm=s(yb,"__call__"),yb.forEach(t),dm=s(Ur," special method."),Ur.forEach(t),cm=p(Gt),w(en.$$.fragment,Gt),pm=p(Gt),w(tn.$$.fragment,Gt),hm=p(Gt),w(on.$$.fragment,Gt),Gt.forEach(t),qt.forEach(t),pd=p(o),_o=r(o,"H2",{class:!0});var Pd=i(_o);nn=r(Pd,"A",{id:!0,class:!0,href:!0});var Tb=i(nn);xi=r(Tb,"SPAN",{});var vb=i(xi);w(Ss.$$.fragment,vb),vb.forEach(t),Tb.forEach(t),mm=p(Pd),Wi=r(Pd,"SPAN",{});var wb=i(Wi);um=s(wb,"DebertaV2ForTokenClassification"),wb.forEach(t),Pd.forEach(t),hd=p(o),st=r(o,"DIV",{class:!0});var Nt=i(st);w(Xs.$$.fragment,Nt),fm=p(Nt),Zi=r(Nt,"P",{});var kb=i(Zi);gm=s(kb,`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.`),kb.forEach(t),_m=p(Nt),Ps=r(Nt,"P",{});var Ld=i(Ps);bm=s(Ld,"The DeBERTa model was proposed in "),Ls=r(Ld,"A",{href:!0,rel:!0});var Mb=i(Ls);ym=s(Mb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Mb.forEach(t),Tm=s(Ld,` 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.`),Ld.forEach(t),vm=p(Nt),Qs=r(Nt,"P",{});var Qd=i(Qs);wm=s(Qd,"This model is also a PyTorch "),Ys=r(Qd,"A",{href:!0,rel:!0});var $b=i(Ys);km=s($b,"torch.nn.Module"),$b.forEach(t),Mm=s(Qd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qd.forEach(t),$m=p(Nt),Et=r(Nt,"DIV",{class:!0});var Qn=i(Et);w(Hs.$$.fragment,Qn),Em=p(Qn),bo=r(Qn,"P",{});var Ir=i(bo);Dm=s(Ir,"The "),mr=r(Ir,"A",{href:!0});var Eb=i(mr);Vm=s(Eb,"DebertaV2ForTokenClassification"),Eb.forEach(t),jm=s(Ir," forward method, overrides the "),qi=r(Ir,"CODE",{});var Db=i(qi);Fm=s(Db,"__call__"),Db.forEach(t),Jm=s(Ir," special method."),Ir.forEach(t),Rm=p(Qn),w(sn.$$.fragment,Qn),Bm=p(Qn),w(an.$$.fragment,Qn),Qn.forEach(t),Nt.forEach(t),md=p(o),yo=r(o,"H2",{class:!0});var Yd=i(yo);rn=r(Yd,"A",{id:!0,class:!0,href:!0});var Vb=i(rn);Gi=r(Vb,"SPAN",{});var jb=i(Gi);w(Os.$$.fragment,jb),jb.forEach(t),Vb.forEach(t),Cm=p(Yd),Ni=r(Yd,"SPAN",{});var Fb=i(Ni);zm=s(Fb,"DebertaV2ForQuestionAnswering"),Fb.forEach(t),Yd.forEach(t),ud=p(o),at=r(o,"DIV",{class:!0});var At=i(at);w(Ks.$$.fragment,At),Um=p(At),To=r(At,"P",{});var xr=i(To);Im=s(xr,`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 `),Ai=r(xr,"CODE",{});var Jb=i(Ai);xm=s(Jb,"span start logits"),Jb.forEach(t),Wm=s(xr," and "),Si=r(xr,"CODE",{});var Rb=i(Si);Zm=s(Rb,"span end logits"),Rb.forEach(t),qm=s(xr,")."),xr.forEach(t),Gm=p(At),ea=r(At,"P",{});var Hd=i(ea);Nm=s(Hd,"The DeBERTa model was proposed in "),ta=r(Hd,"A",{href:!0,rel:!0});var Bb=i(ta);Am=s(Bb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Bb.forEach(t),Sm=s(Hd,` 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.`),Hd.forEach(t),Xm=p(At),oa=r(At,"P",{});var Od=i(oa);Pm=s(Od,"This model is also a PyTorch "),na=r(Od,"A",{href:!0,rel:!0});var Cb=i(na);Lm=s(Cb,"torch.nn.Module"),Cb.forEach(t),Qm=s(Od,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Od.forEach(t),Ym=p(At),Dt=r(At,"DIV",{class:!0});var Yn=i(Dt);w(sa.$$.fragment,Yn),Hm=p(Yn),vo=r(Yn,"P",{});var Wr=i(vo);Om=s(Wr,"The "),ur=r(Wr,"A",{href:!0});var zb=i(ur);Km=s(zb,"DebertaV2ForQuestionAnswering"),zb.forEach(t),eu=s(Wr," forward method, overrides the "),Xi=r(Wr,"CODE",{});var Ub=i(Xi);tu=s(Ub,"__call__"),Ub.forEach(t),ou=s(Wr," special method."),Wr.forEach(t),nu=p(Yn),w(ln.$$.fragment,Yn),su=p(Yn),w(dn.$$.fragment,Yn),Yn.forEach(t),At.forEach(t),fd=p(o),wo=r(o,"H2",{class:!0});var Kd=i(wo);cn=r(Kd,"A",{id:!0,class:!0,href:!0});var Ib=i(cn);Pi=r(Ib,"SPAN",{});var xb=i(Pi);w(aa.$$.fragment,xb),xb.forEach(t),Ib.forEach(t),au=p(Kd),Li=r(Kd,"SPAN",{});var Wb=i(Li);ru=s(Wb,"DebertaV2ForMultipleChoice"),Wb.forEach(t),Kd.forEach(t),gd=p(o),rt=r(o,"DIV",{class:!0});var St=i(rt);w(ra.$$.fragment,St),iu=p(St),Qi=r(St,"P",{});var Zb=i(Qi);lu=s(Zb,`DeBERTa Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),Zb.forEach(t),du=p(St),ia=r(St,"P",{});var ec=i(ia);cu=s(ec,"The DeBERTa model was proposed in "),la=r(ec,"A",{href:!0,rel:!0});var qb=i(la);pu=s(qb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),qb.forEach(t),hu=s(ec,` 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.`),ec.forEach(t),mu=p(St),da=r(St,"P",{});var tc=i(da);uu=s(tc,"This model is also a PyTorch "),ca=r(tc,"A",{href:!0,rel:!0});var Gb=i(ca);fu=s(Gb,"torch.nn.Module"),Gb.forEach(t),gu=s(tc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),tc.forEach(t),_u=p(St),Vt=r(St,"DIV",{class:!0});var Hn=i(Vt);w(pa.$$.fragment,Hn),bu=p(Hn),ko=r(Hn,"P",{});var Zr=i(ko);yu=s(Zr,"The "),fr=r(Zr,"A",{href:!0});var Nb=i(fr);Tu=s(Nb,"DebertaV2ForMultipleChoice"),Nb.forEach(t),vu=s(Zr," forward method, overrides the "),Yi=r(Zr,"CODE",{});var Ab=i(Yi);wu=s(Ab,"__call__"),Ab.forEach(t),ku=s(Zr," special method."),Zr.forEach(t),Mu=p(Hn),w(pn.$$.fragment,Hn),$u=p(Hn),w(hn.$$.fragment,Hn),Hn.forEach(t),St.forEach(t),_d=p(o),Mo=r(o,"H2",{class:!0});var oc=i(Mo);mn=r(oc,"A",{id:!0,class:!0,href:!0});var Sb=i(mn);Hi=r(Sb,"SPAN",{});var Xb=i(Hi);w(ha.$$.fragment,Xb),Xb.forEach(t),Sb.forEach(t),Eu=p(oc),Oi=r(oc,"SPAN",{});var Pb=i(Oi);Du=s(Pb,"TFDebertaV2Model"),Pb.forEach(t),oc.forEach(t),bd=p(o),it=r(o,"DIV",{class:!0});var Xt=i(it);w(ma.$$.fragment,Xt),Vu=p(Xt),ua=r(Xt,"P",{});var nc=i(ua);ju=s(nc,`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),fa=r(nc,"A",{href:!0,rel:!0});var Lb=i(fa);Fu=s(Lb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Lb.forEach(t),Ju=s(nc,` 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.`),nc.forEach(t),Ru=p(Xt),ga=r(Xt,"P",{});var sc=i(ga);Bu=s(sc,"This model is also a "),_a=r(sc,"A",{href:!0,rel:!0});var Qb=i(_a);Cu=s(Qb,"tf.keras.Model"),Qb.forEach(t),zu=s(sc,` 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.`),sc.forEach(t),Uu=p(Xt),w(un.$$.fragment,Xt),Iu=p(Xt),jt=r(Xt,"DIV",{class:!0});var On=i(jt);w(ba.$$.fragment,On),xu=p(On),$o=r(On,"P",{});var qr=i($o);Wu=s(qr,"The "),gr=r(qr,"A",{href:!0});var Yb=i(gr);Zu=s(Yb,"TFDebertaV2Model"),Yb.forEach(t),qu=s(qr," forward method, overrides the "),Ki=r(qr,"CODE",{});var Hb=i(Ki);Gu=s(Hb,"__call__"),Hb.forEach(t),Nu=s(qr," special method."),qr.forEach(t),Au=p(On),w(fn.$$.fragment,On),Su=p(On),w(gn.$$.fragment,On),On.forEach(t),Xt.forEach(t),yd=p(o),Eo=r(o,"H2",{class:!0});var ac=i(Eo);_n=r(ac,"A",{id:!0,class:!0,href:!0});var Ob=i(_n);el=r(Ob,"SPAN",{});var Kb=i(el);w(ya.$$.fragment,Kb),Kb.forEach(t),Ob.forEach(t),Xu=p(ac),tl=r(ac,"SPAN",{});var e2=i(tl);Pu=s(e2,"TFDebertaV2PreTrainedModel"),e2.forEach(t),ac.forEach(t),Td=p(o),Ut=r(o,"DIV",{class:!0});var Gr=i(Ut);w(Ta.$$.fragment,Gr),Lu=p(Gr),ol=r(Gr,"P",{});var t2=i(ol);Qu=s(t2,`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),t2.forEach(t),Yu=p(Gr),Ft=r(Gr,"DIV",{class:!0});var Kn=i(Ft);w(va.$$.fragment,Kn),Hu=p(Kn),nl=r(Kn,"P",{});var o2=i(nl);Ou=s(o2,"Calls the model on new inputs and returns the outputs as tensors."),o2.forEach(t),Ku=p(Kn),wa=r(Kn,"P",{});var rc=i(wa);ef=s(rc,"In this case "),sl=r(rc,"CODE",{});var n2=i(sl);tf=s(n2,"call()"),n2.forEach(t),of=s(rc,` just reapplies
all ops in the graph to the new inputs
(e.g. build a new computational graph from the provided inputs).`),rc.forEach(t),nf=p(Kn),yt=r(Kn,"P",{});var Pt=i(yt);sf=s(Pt,`Note: This method should not be called directly. It is only meant to be
overridden when subclassing `),al=r(Pt,"CODE",{});var s2=i(al);af=s(s2,"tf.keras.Model"),s2.forEach(t),rf=s(Pt,`.
To call a model on an input, always use the `),rl=r(Pt,"CODE",{});var a2=i(rl);lf=s(a2,"__call__()"),a2.forEach(t),df=s(Pt,` method,
i.e. `),il=r(Pt,"CODE",{});var r2=i(il);cf=s(r2,"model(inputs)"),r2.forEach(t),pf=s(Pt,", which relies on the underlying "),ll=r(Pt,"CODE",{});var i2=i(ll);hf=s(i2,"call()"),i2.forEach(t),mf=s(Pt," method."),Pt.forEach(t),Kn.forEach(t),Gr.forEach(t),vd=p(o),Do=r(o,"H2",{class:!0});var ic=i(Do);bn=r(ic,"A",{id:!0,class:!0,href:!0});var l2=i(bn);dl=r(l2,"SPAN",{});var d2=i(dl);w(ka.$$.fragment,d2),d2.forEach(t),l2.forEach(t),uf=p(ic),cl=r(ic,"SPAN",{});var c2=i(cl);ff=s(c2,"TFDebertaV2ForMaskedLM"),c2.forEach(t),ic.forEach(t),wd=p(o),lt=r(o,"DIV",{class:!0});var Lt=i(lt);w(Ma.$$.fragment,Lt),gf=p(Lt),Vo=r(Lt,"P",{});var Nr=i(Vo);_f=s(Nr,"DeBERTa Model with a "),pl=r(Nr,"CODE",{});var p2=i(pl);bf=s(p2,"language modeling"),p2.forEach(t),yf=s(Nr,` head on top.
The DeBERTa model was proposed in `),$a=r(Nr,"A",{href:!0,rel:!0});var h2=i($a);Tf=s(h2,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),h2.forEach(t),vf=s(Nr,` 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.`),Nr.forEach(t),wf=p(Lt),Ea=r(Lt,"P",{});var lc=i(Ea);kf=s(lc,"This model is also a "),Da=r(lc,"A",{href:!0,rel:!0});var m2=i(Da);Mf=s(m2,"tf.keras.Model"),m2.forEach(t),$f=s(lc,` 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.`),lc.forEach(t),Ef=p(Lt),w(yn.$$.fragment,Lt),Df=p(Lt),pt=r(Lt,"DIV",{class:!0});var Qt=i(pt);w(Va.$$.fragment,Qt),Vf=p(Qt),jo=r(Qt,"P",{});var Ar=i(jo);jf=s(Ar,"The "),_r=r(Ar,"A",{href:!0});var u2=i(_r);Ff=s(u2,"TFDebertaV2ForMaskedLM"),u2.forEach(t),Jf=s(Ar," forward method, overrides the "),hl=r(Ar,"CODE",{});var f2=i(hl);Rf=s(f2,"__call__"),f2.forEach(t),Bf=s(Ar," special method."),Ar.forEach(t),Cf=p(Qt),w(Tn.$$.fragment,Qt),zf=p(Qt),w(vn.$$.fragment,Qt),Uf=p(Qt),w(wn.$$.fragment,Qt),Qt.forEach(t),Lt.forEach(t),kd=p(o),Fo=r(o,"H2",{class:!0});var dc=i(Fo);kn=r(dc,"A",{id:!0,class:!0,href:!0});var g2=i(kn);ml=r(g2,"SPAN",{});var _2=i(ml);w(ja.$$.fragment,_2),_2.forEach(t),g2.forEach(t),If=p(dc),ul=r(dc,"SPAN",{});var b2=i(ul);xf=s(b2,"TFDebertaV2ForSequenceClassification"),b2.forEach(t),dc.forEach(t),Md=p(o),Ke=r(o,"DIV",{class:!0});var Rt=i(Ke);w(Fa.$$.fragment,Rt),Wf=p(Rt),fl=r(Rt,"P",{});var y2=i(fl);Zf=s(y2,`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.`),y2.forEach(t),qf=p(Rt),Ja=r(Rt,"P",{});var cc=i(Ja);Gf=s(cc,"The DeBERTa model was proposed in "),Ra=r(cc,"A",{href:!0,rel:!0});var T2=i(Ra);Nf=s(T2,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),T2.forEach(t),Af=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),Sf=p(Rt),Ba=r(Rt,"P",{});var pc=i(Ba);Xf=s(pc,"This model is also a "),Ca=r(pc,"A",{href:!0,rel:!0});var v2=i(Ca);Pf=s(v2,"tf.keras.Model"),v2.forEach(t),Lf=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),Qf=p(Rt),w(Mn.$$.fragment,Rt),Yf=p(Rt),ht=r(Rt,"DIV",{class:!0});var Yt=i(ht);w(za.$$.fragment,Yt),Hf=p(Yt),Jo=r(Yt,"P",{});var Sr=i(Jo);Of=s(Sr,"The "),br=r(Sr,"A",{href:!0});var w2=i(br);Kf=s(w2,"TFDebertaV2ForSequenceClassification"),w2.forEach(t),eg=s(Sr," forward method, overrides the "),gl=r(Sr,"CODE",{});var k2=i(gl);tg=s(k2,"__call__"),k2.forEach(t),og=s(Sr," special method."),Sr.forEach(t),ng=p(Yt),w($n.$$.fragment,Yt),sg=p(Yt),w(En.$$.fragment,Yt),ag=p(Yt),w(Dn.$$.fragment,Yt),Yt.forEach(t),Rt.forEach(t),$d=p(o),Ro=r(o,"H2",{class:!0});var hc=i(Ro);Vn=r(hc,"A",{id:!0,class:!0,href:!0});var M2=i(Vn);_l=r(M2,"SPAN",{});var $2=i(_l);w(Ua.$$.fragment,$2),$2.forEach(t),M2.forEach(t),rg=p(hc),bl=r(hc,"SPAN",{});var E2=i(bl);ig=s(E2,"TFDebertaV2ForTokenClassification"),E2.forEach(t),hc.forEach(t),Ed=p(o),et=r(o,"DIV",{class:!0});var Bt=i(et);w(Ia.$$.fragment,Bt),lg=p(Bt),yl=r(Bt,"P",{});var D2=i(yl);dg=s(D2,`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.`),D2.forEach(t),cg=p(Bt),xa=r(Bt,"P",{});var mc=i(xa);pg=s(mc,"The DeBERTa model was proposed in "),Wa=r(mc,"A",{href:!0,rel:!0});var V2=i(Wa);hg=s(V2,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),V2.forEach(t),mg=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),ug=p(Bt),Za=r(Bt,"P",{});var uc=i(Za);fg=s(uc,"This model is also a "),qa=r(uc,"A",{href:!0,rel:!0});var j2=i(qa);gg=s(j2,"tf.keras.Model"),j2.forEach(t),_g=s(uc,` 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.`),uc.forEach(t),bg=p(Bt),w(jn.$$.fragment,Bt),yg=p(Bt),mt=r(Bt,"DIV",{class:!0});var Ht=i(mt);w(Ga.$$.fragment,Ht),Tg=p(Ht),Bo=r(Ht,"P",{});var Xr=i(Bo);vg=s(Xr,"The "),yr=r(Xr,"A",{href:!0});var F2=i(yr);wg=s(F2,"TFDebertaV2ForTokenClassification"),F2.forEach(t),kg=s(Xr," forward method, overrides the "),Tl=r(Xr,"CODE",{});var J2=i(Tl);Mg=s(J2,"__call__"),J2.forEach(t),$g=s(Xr," special method."),Xr.forEach(t),Eg=p(Ht),w(Fn.$$.fragment,Ht),Dg=p(Ht),w(Jn.$$.fragment,Ht),Vg=p(Ht),w(Rn.$$.fragment,Ht),Ht.forEach(t),Bt.forEach(t),Dd=p(o),Co=r(o,"H2",{class:!0});var fc=i(Co);Bn=r(fc,"A",{id:!0,class:!0,href:!0});var R2=i(Bn);vl=r(R2,"SPAN",{});var B2=i(vl);w(Na.$$.fragment,B2),B2.forEach(t),R2.forEach(t),jg=p(fc),wl=r(fc,"SPAN",{});var C2=i(wl);Fg=s(C2,"TFDebertaV2ForQuestionAnswering"),C2.forEach(t),fc.forEach(t),Vd=p(o),tt=r(o,"DIV",{class:!0});var Ct=i(tt);w(Aa.$$.fragment,Ct),Jg=p(Ct),zo=r(Ct,"P",{});var Pr=i(zo);Rg=s(Pr,`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 `),kl=r(Pr,"CODE",{});var z2=i(kl);Bg=s(z2,"span start logits"),z2.forEach(t),Cg=s(Pr," and "),Ml=r(Pr,"CODE",{});var U2=i(Ml);zg=s(U2,"span end logits"),U2.forEach(t),Ug=s(Pr,")."),Pr.forEach(t),Ig=p(Ct),Sa=r(Ct,"P",{});var gc=i(Sa);xg=s(gc,"The DeBERTa model was proposed in "),Xa=r(gc,"A",{href:!0,rel:!0});var I2=i(Xa);Wg=s(I2,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),I2.forEach(t),Zg=s(gc,` 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.`),gc.forEach(t),qg=p(Ct),Pa=r(Ct,"P",{});var _c=i(Pa);Gg=s(_c,"This model is also a "),La=r(_c,"A",{href:!0,rel:!0});var x2=i(La);Ng=s(x2,"tf.keras.Model"),x2.forEach(t),Ag=s(_c,` 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.`),_c.forEach(t),Sg=p(Ct),w(Cn.$$.fragment,Ct),Xg=p(Ct),ut=r(Ct,"DIV",{class:!0});var Ot=i(ut);w(Qa.$$.fragment,Ot),Pg=p(Ot),Uo=r(Ot,"P",{});var Lr=i(Uo);Lg=s(Lr,"The "),Tr=r(Lr,"A",{href:!0});var W2=i(Tr);Qg=s(W2,"TFDebertaV2ForQuestionAnswering"),W2.forEach(t),Yg=s(Lr," forward method, overrides the "),$l=r(Lr,"CODE",{});var Z2=i($l);Hg=s(Z2,"__call__"),Z2.forEach(t),Og=s(Lr," special method."),Lr.forEach(t),Kg=p(Ot),w(zn.$$.fragment,Ot),e_=p(Ot),w(Un.$$.fragment,Ot),t_=p(Ot),w(In.$$.fragment,Ot),Ot.forEach(t),Ct.forEach(t),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(jy)),u(f,"id","debertav2"),u(f,"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"),u(f,"href","#debertav2"),u(m,"class","relative group"),u(ne,"id","overview"),u(ne,"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"),u(ne,"href","#overview"),u(x,"class","relative group"),u(ie,"href","https://arxiv.org/abs/2006.03654"),u(ie,"rel","nofollow"),u(le,"href","https://github.com/microsoft/DeBERTa"),u(le,"rel","nofollow"),u(de,"href","https://github.com/microsoft/DeBERTa"),u(de,"rel","nofollow"),u(G,"href","https://www.microsoft.com/en-us/research/blog/microsoft-deberta-surpasses-human-performance-on-the-superglue-benchmark/"),u(G,"rel","nofollow"),u(B,"href","https://github.com/google/sentencepiece"),u(B,"rel","nofollow"),u(ee,"href","https://huggingface.co/DeBERTa"),u(ee,"rel","nofollow"),u(es,"href","https://huggingface.co/kamalkraj"),u(es,"rel","nofollow"),u(ts,"href","https://github.com/microsoft/DeBERTa"),u(ts,"rel","nofollow"),u(Io,"id","documentation-resources"),u(Io,"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"),u(Io,"href","#documentation-resources"),u(Kt,"class","relative group"),u(tr,"href","../tasks/sequence_classification"),u(or,"href","../tasks/token_classification"),u(nr,"href","../tasks/question_answering"),u(sr,"href","../tasks/masked_language_modeling"),u(ar,"href","../tasks/multiple_choice"),u(xo,"id","transformers.DebertaV2Config"),u(xo,"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"),u(xo,"href","#transformers.DebertaV2Config"),u(eo,"class","relative group"),u(rr,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Model"),u(as,"href","https://huggingface.co/microsoft/deberta-v2-xlarge"),u(as,"rel","nofollow"),u(ir,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(lr,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Zo,"id","transformers.DebertaV2Tokenizer"),u(Zo,"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"),u(Zo,"href","#transformers.DebertaV2Tokenizer"),u(no,"class","relative group"),u(ds,"href","https://github.com/google/sentencepiece"),u(ds,"rel","nofollow"),u(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(dr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(No,"id","transformers.DebertaV2TokenizerFast"),u(No,"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"),u(No,"href","#transformers.DebertaV2TokenizerFast"),u(ro,"class","relative group"),u(bs,"href","https://github.com/google/sentencepiece"),u(bs,"rel","nofollow"),u(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(So,"id","transformers.DebertaV2Model"),u(So,"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"),u(So,"href","#transformers.DebertaV2Model"),u(lo,"class","relative group"),u($s,"href","https://arxiv.org/abs/2006.03654"),u($s,"rel","nofollow"),u(Ds,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ds,"rel","nofollow"),u(cr,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2Model"),u(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Lo,"id","transformers.DebertaV2PreTrainedModel"),u(Lo,"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"),u(Lo,"href","#transformers.DebertaV2PreTrainedModel"),u(po,"class","relative group"),u(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Yo,"id","transformers.DebertaV2ForMaskedLM"),u(Yo,"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"),u(Yo,"href","#transformers.DebertaV2ForMaskedLM"),u(ho,"class","relative group"),u(Cs,"href","https://arxiv.org/abs/2006.03654"),u(Cs,"rel","nofollow"),u(Us,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Us,"rel","nofollow"),u(pr,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2ForMaskedLM"),u($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ko,"id","transformers.DebertaV2ForSequenceClassification"),u(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"),u(Ko,"href","#transformers.DebertaV2ForSequenceClassification"),u(fo,"class","relative group"),u(qs,"href","https://arxiv.org/abs/2006.03654"),u(qs,"rel","nofollow"),u(Ns,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ns,"rel","nofollow"),u(hr,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2ForSequenceClassification"),u(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(nn,"id","transformers.DebertaV2ForTokenClassification"),u(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"),u(nn,"href","#transformers.DebertaV2ForTokenClassification"),u(_o,"class","relative group"),u(Ls,"href","https://arxiv.org/abs/2006.03654"),u(Ls,"rel","nofollow"),u(Ys,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ys,"rel","nofollow"),u(mr,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2ForTokenClassification"),u(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(rn,"id","transformers.DebertaV2ForQuestionAnswering"),u(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"),u(rn,"href","#transformers.DebertaV2ForQuestionAnswering"),u(yo,"class","relative group"),u(ta,"href","https://arxiv.org/abs/2006.03654"),u(ta,"rel","nofollow"),u(na,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(na,"rel","nofollow"),u(ur,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2ForQuestionAnswering"),u(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(cn,"id","transformers.DebertaV2ForMultipleChoice"),u(cn,"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"),u(cn,"href","#transformers.DebertaV2ForMultipleChoice"),u(wo,"class","relative group"),u(la,"href","https://arxiv.org/abs/2006.03654"),u(la,"rel","nofollow"),u(ca,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(ca,"rel","nofollow"),u(fr,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.DebertaV2ForMultipleChoice"),u(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(mn,"id","transformers.TFDebertaV2Model"),u(mn,"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"),u(mn,"href","#transformers.TFDebertaV2Model"),u(Mo,"class","relative group"),u(fa,"href","https://arxiv.org/abs/2006.03654"),u(fa,"rel","nofollow"),u(_a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(_a,"rel","nofollow"),u(gr,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.TFDebertaV2Model"),u(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(_n,"id","transformers.TFDebertaV2PreTrainedModel"),u(_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"),u(_n,"href","#transformers.TFDebertaV2PreTrainedModel"),u(Eo,"class","relative group"),u(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(bn,"id","transformers.TFDebertaV2ForMaskedLM"),u(bn,"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"),u(bn,"href","#transformers.TFDebertaV2ForMaskedLM"),u(Do,"class","relative group"),u($a,"href","https://arxiv.org/abs/2006.03654"),u($a,"rel","nofollow"),u(Da,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Da,"rel","nofollow"),u(_r,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.TFDebertaV2ForMaskedLM"),u(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(kn,"id","transformers.TFDebertaV2ForSequenceClassification"),u(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"),u(kn,"href","#transformers.TFDebertaV2ForSequenceClassification"),u(Fo,"class","relative group"),u(Ra,"href","https://arxiv.org/abs/2006.03654"),u(Ra,"rel","nofollow"),u(Ca,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Ca,"rel","nofollow"),u(br,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.TFDebertaV2ForSequenceClassification"),u(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Vn,"id","transformers.TFDebertaV2ForTokenClassification"),u(Vn,"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"),u(Vn,"href","#transformers.TFDebertaV2ForTokenClassification"),u(Ro,"class","relative group"),u(Wa,"href","https://arxiv.org/abs/2006.03654"),u(Wa,"rel","nofollow"),u(qa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(qa,"rel","nofollow"),u(yr,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.TFDebertaV2ForTokenClassification"),u(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Bn,"id","transformers.TFDebertaV2ForQuestionAnswering"),u(Bn,"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"),u(Bn,"href","#transformers.TFDebertaV2ForQuestionAnswering"),u(Co,"class","relative group"),u(Xa,"href","https://arxiv.org/abs/2006.03654"),u(Xa,"rel","nofollow"),u(La,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(La,"rel","nofollow"),u(Tr,"href","/docs/transformers/v4.33.0/en/model_doc/deberta-v2#transformers.TFDebertaV2ForQuestionAnswering"),u(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(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(o,_){e(document.head,d),g(o,y,_),g(o,m,_),e(m,f),e(f,T),k(l,T,null),e(m,h),e(m,F),e(F,ye),g(o,pe,_),g(o,x,_),e(x,ne),e(ne,oe),k(D,oe,null),e(x,Te),e(x,X),e(X,ve),g(o,he,_),g(o,Z,_),e(Z,we),e(Z,ie),e(ie,Q),e(Z,ke),g(o,me,_),g(o,N,_),e(N,Me),g(o,ue,_),g(o,A,_),e(A,$e),g(o,fe,_),g(o,te,_),e(te,R),e(R,z),e(R,le),e(le,Y),e(R,Ee),g(o,ge,_),g(o,W,_),e(W,De),e(W,de),e(de,U),e(W,Ve),e(W,G),e(G,je),g(o,_e,_),g(o,S,_),e(S,Fe),g(o,be,_),g(o,C,_),e(C,se),e(se,P),e(P,Je),e(se,ae),e(se,B),e(B,Re),e(se,I),e(C,Be),e(C,ce),e(ce,b),e(b,V),e(ce,Se),e(C,re),e(C,Ce),e(Ce,Ie),e(Ie,J),e(Ce,Xe),e(C,Pe),e(C,ze),e(ze,xe),e(xe,Le),e(ze,q),e(C,H),e(C,Ue),e(Ue,We),e(We,O),e(Ue,Qe),g(o,Ze,_),g(o,K,_),e(K,Ye),e(K,ee),e(ee,He),e(K,bc),e(K,es),e(es,yc),e(K,Tc),e(K,ts),e(ts,vc),e(K,wc),g(o,Ql,_),g(o,Kt,_),e(Kt,Io),e(Io,Qr),k(os,Qr,null),e(Kt,kc),e(Kt,Yr),e(Yr,Mc),g(o,Yl,_),g(o,dt,_),e(dt,Hr),e(Hr,tr),e(tr,$c),e(dt,Ec),e(dt,Or),e(Or,or),e(or,Dc),e(dt,Vc),e(dt,Kr),e(Kr,nr),e(nr,jc),e(dt,Fc),e(dt,ei),e(ei,sr),e(sr,Jc),e(dt,Rc),e(dt,ti),e(ti,ar),e(ar,Bc),g(o,Hl,_),g(o,eo,_),e(eo,xo),e(xo,oi),k(ns,oi,null),e(eo,Cc),e(eo,ni),e(ni,zc),g(o,Ol,_),g(o,ft,_),k(ss,ft,null),e(ft,Uc),e(ft,to),e(to,Ic),e(to,rr),e(rr,xc),e(to,Wc),e(to,as),e(as,Zc),e(to,qc),e(ft,Gc),e(ft,oo),e(oo,Nc),e(oo,ir),e(ir,Ac),e(oo,Sc),e(oo,lr),e(lr,Xc),e(oo,Pc),e(ft,Lc),k(Wo,ft,null),g(o,Kl,_),g(o,no,_),e(no,Zo),e(Zo,si),k(rs,si,null),e(no,Qc),e(no,ai),e(ai,Yc),g(o,ed,_),g(o,Oe,_),k(is,Oe,null),e(Oe,Hc),e(Oe,ls),e(ls,Oc),e(ls,ds),e(ds,Kc),e(ls,ep),e(Oe,tp),e(Oe,xt),k(cs,xt,null),e(xt,op),e(xt,ri),e(ri,np),e(xt,sp),e(xt,ps),e(ps,ii),e(ii,ap),e(ps,rp),e(ps,li),e(li,ip),e(Oe,lp),e(Oe,qo),k(hs,qo,null),e(qo,dp),e(qo,so),e(so,cp),e(so,di),e(di,pp),e(so,hp),e(so,ci),e(ci,mp),e(so,up),e(Oe,fp),e(Oe,vt),k(ms,vt,null),e(vt,gp),e(vt,pi),e(pi,_p),e(vt,bp),k(Go,vt,null),e(vt,yp),e(vt,ao),e(ao,Tp),e(ao,hi),e(hi,vp),e(ao,wp),e(ao,mi),e(mi,kp),e(ao,Mp),e(Oe,$p),e(Oe,dr),k(us,dr,null),g(o,td,_),g(o,ro,_),e(ro,No),e(No,ui),k(fs,ui,null),e(ro,Ep),e(ro,fi),e(fi,Dp),g(o,od,_),g(o,gt,_),k(gs,gt,null),e(gt,Vp),e(gt,_s),e(_s,jp),e(_s,bs),e(bs,Fp),e(_s,Jp),e(gt,Rp),e(gt,Wt),k(ys,Wt,null),e(Wt,Bp),e(Wt,gi),e(gi,Cp),e(Wt,zp),e(Wt,Ts),e(Ts,_i),e(_i,Up),e(Ts,Ip),e(Ts,bi),e(bi,xp),e(gt,Wp),e(gt,wt),k(vs,wt,null),e(wt,Zp),e(wt,yi),e(yi,qp),e(wt,Gp),k(Ao,wt,null),e(wt,Np),e(wt,io),e(io,Ap),e(io,Ti),e(Ti,Sp),e(io,Xp),e(io,vi),e(vi,Pp),e(io,Lp),g(o,nd,_),g(o,lo,_),e(lo,So),e(So,wi),k(ws,wi,null),e(lo,Qp),e(lo,ki),e(ki,Yp),g(o,sd,_),g(o,_t,_),k(ks,_t,null),e(_t,Hp),e(_t,Ms),e(Ms,Op),e(Ms,$s),e($s,Kp),e(Ms,eh),e(_t,th),e(_t,Es),e(Es,oh),e(Es,Ds),e(Ds,nh),e(Es,sh),e(_t,ah),e(_t,kt),k(Vs,kt,null),e(kt,rh),e(kt,co),e(co,ih),e(co,cr),e(cr,lh),e(co,dh),e(co,Mi),e(Mi,ch),e(co,ph),e(kt,hh),k(Xo,kt,null),e(kt,mh),k(Po,kt,null),g(o,ad,_),g(o,po,_),e(po,Lo),e(Lo,$i),k(js,$i,null),e(po,uh),e(po,Ei),e(Ei,fh),g(o,rd,_),g(o,zt,_),k(Fs,zt,null),e(zt,gh),e(zt,Di),e(Di,_h),e(zt,bh),e(zt,Mt),k(Js,Mt,null),e(Mt,yh),e(Mt,Vi),e(Vi,Th),e(Mt,vh),e(Mt,ji),e(ji,wh),e(Mt,kh),k(Qo,Mt,null),g(o,id,_),g(o,ho,_),e(ho,Yo),e(Yo,Fi),k(Rs,Fi,null),e(ho,Mh),e(ho,Ji),e(Ji,$h),g(o,ld,_),g(o,bt,_),k(Bs,bt,null),e(bt,Eh),e(bt,mo),e(mo,Dh),e(mo,Ri),e(Ri,Vh),e(mo,jh),e(mo,Cs),e(Cs,Fh),e(mo,Jh),e(bt,Rh),e(bt,zs),e(zs,Bh),e(zs,Us),e(Us,Ch),e(zs,zh),e(bt,Uh),e(bt,$t),k(Is,$t,null),e($t,Ih),e($t,uo),e(uo,xh),e(uo,pr),e(pr,Wh),e(uo,Zh),e(uo,Bi),e(Bi,qh),e(uo,Gh),e($t,Nh),k(Ho,$t,null),e($t,Ah),k(Oo,$t,null),g(o,dd,_),g(o,fo,_),e(fo,Ko),e(Ko,Ci),k(xs,Ci,null),e(fo,Sh),e(fo,zi),e(zi,Xh),g(o,cd,_),g(o,nt,_),k(Ws,nt,null),e(nt,Ph),e(nt,Ui),e(Ui,Lh),e(nt,Qh),e(nt,Zs),e(Zs,Yh),e(Zs,qs),e(qs,Hh),e(Zs,Oh),e(nt,Kh),e(nt,Gs),e(Gs,em),e(Gs,Ns),e(Ns,tm),e(Gs,om),e(nt,nm),e(nt,ct),k(As,ct,null),e(ct,sm),e(ct,go),e(go,am),e(go,hr),e(hr,rm),e(go,im),e(go,Ii),e(Ii,lm),e(go,dm),e(ct,cm),k(en,ct,null),e(ct,pm),k(tn,ct,null),e(ct,hm),k(on,ct,null),g(o,pd,_),g(o,_o,_),e(_o,nn),e(nn,xi),k(Ss,xi,null),e(_o,mm),e(_o,Wi),e(Wi,um),g(o,hd,_),g(o,st,_),k(Xs,st,null),e(st,fm),e(st,Zi),e(Zi,gm),e(st,_m),e(st,Ps),e(Ps,bm),e(Ps,Ls),e(Ls,ym),e(Ps,Tm),e(st,vm),e(st,Qs),e(Qs,wm),e(Qs,Ys),e(Ys,km),e(Qs,Mm),e(st,$m),e(st,Et),k(Hs,Et,null),e(Et,Em),e(Et,bo),e(bo,Dm),e(bo,mr),e(mr,Vm),e(bo,jm),e(bo,qi),e(qi,Fm),e(bo,Jm),e(Et,Rm),k(sn,Et,null),e(Et,Bm),k(an,Et,null),g(o,md,_),g(o,yo,_),e(yo,rn),e(rn,Gi),k(Os,Gi,null),e(yo,Cm),e(yo,Ni),e(Ni,zm),g(o,ud,_),g(o,at,_),k(Ks,at,null),e(at,Um),e(at,To),e(To,Im),e(To,Ai),e(Ai,xm),e(To,Wm),e(To,Si),e(Si,Zm),e(To,qm),e(at,Gm),e(at,ea),e(ea,Nm),e(ea,ta),e(ta,Am),e(ea,Sm),e(at,Xm),e(at,oa),e(oa,Pm),e(oa,na),e(na,Lm),e(oa,Qm),e(at,Ym),e(at,Dt),k(sa,Dt,null),e(Dt,Hm),e(Dt,vo),e(vo,Om),e(vo,ur),e(ur,Km),e(vo,eu),e(vo,Xi),e(Xi,tu),e(vo,ou),e(Dt,nu),k(ln,Dt,null),e(Dt,su),k(dn,Dt,null),g(o,fd,_),g(o,wo,_),e(wo,cn),e(cn,Pi),k(aa,Pi,null),e(wo,au),e(wo,Li),e(Li,ru),g(o,gd,_),g(o,rt,_),k(ra,rt,null),e(rt,iu),e(rt,Qi),e(Qi,lu),e(rt,du),e(rt,ia),e(ia,cu),e(ia,la),e(la,pu),e(ia,hu),e(rt,mu),e(rt,da),e(da,uu),e(da,ca),e(ca,fu),e(da,gu),e(rt,_u),e(rt,Vt),k(pa,Vt,null),e(Vt,bu),e(Vt,ko),e(ko,yu),e(ko,fr),e(fr,Tu),e(ko,vu),e(ko,Yi),e(Yi,wu),e(ko,ku),e(Vt,Mu),k(pn,Vt,null),e(Vt,$u),k(hn,Vt,null),g(o,_d,_),g(o,Mo,_),e(Mo,mn),e(mn,Hi),k(ha,Hi,null),e(Mo,Eu),e(Mo,Oi),e(Oi,Du),g(o,bd,_),g(o,it,_),k(ma,it,null),e(it,Vu),e(it,ua),e(ua,ju),e(ua,fa),e(fa,Fu),e(ua,Ju),e(it,Ru),e(it,ga),e(ga,Bu),e(ga,_a),e(_a,Cu),e(ga,zu),e(it,Uu),k(un,it,null),e(it,Iu),e(it,jt),k(ba,jt,null),e(jt,xu),e(jt,$o),e($o,Wu),e($o,gr),e(gr,Zu),e($o,qu),e($o,Ki),e(Ki,Gu),e($o,Nu),e(jt,Au),k(fn,jt,null),e(jt,Su),k(gn,jt,null),g(o,yd,_),g(o,Eo,_),e(Eo,_n),e(_n,el),k(ya,el,null),e(Eo,Xu),e(Eo,tl),e(tl,Pu),g(o,Td,_),g(o,Ut,_),k(Ta,Ut,null),e(Ut,Lu),e(Ut,ol),e(ol,Qu),e(Ut,Yu),e(Ut,Ft),k(va,Ft,null),e(Ft,Hu),e(Ft,nl),e(nl,Ou),e(Ft,Ku),e(Ft,wa),e(wa,ef),e(wa,sl),e(sl,tf),e(wa,of),e(Ft,nf),e(Ft,yt),e(yt,sf),e(yt,al),e(al,af),e(yt,rf),e(yt,rl),e(rl,lf),e(yt,df),e(yt,il),e(il,cf),e(yt,pf),e(yt,ll),e(ll,hf),e(yt,mf),g(o,vd,_),g(o,Do,_),e(Do,bn),e(bn,dl),k(ka,dl,null),e(Do,uf),e(Do,cl),e(cl,ff),g(o,wd,_),g(o,lt,_),k(Ma,lt,null),e(lt,gf),e(lt,Vo),e(Vo,_f),e(Vo,pl),e(pl,bf),e(Vo,yf),e(Vo,$a),e($a,Tf),e(Vo,vf),e(lt,wf),e(lt,Ea),e(Ea,kf),e(Ea,Da),e(Da,Mf),e(Ea,$f),e(lt,Ef),k(yn,lt,null),e(lt,Df),e(lt,pt),k(Va,pt,null),e(pt,Vf),e(pt,jo),e(jo,jf),e(jo,_r),e(_r,Ff),e(jo,Jf),e(jo,hl),e(hl,Rf),e(jo,Bf),e(pt,Cf),k(Tn,pt,null),e(pt,zf),k(vn,pt,null),e(pt,Uf),k(wn,pt,null),g(o,kd,_),g(o,Fo,_),e(Fo,kn),e(kn,ml),k(ja,ml,null),e(Fo,If),e(Fo,ul),e(ul,xf),g(o,Md,_),g(o,Ke,_),k(Fa,Ke,null),e(Ke,Wf),e(Ke,fl),e(fl,Zf),e(Ke,qf),e(Ke,Ja),e(Ja,Gf),e(Ja,Ra),e(Ra,Nf),e(Ja,Af),e(Ke,Sf),e(Ke,Ba),e(Ba,Xf),e(Ba,Ca),e(Ca,Pf),e(Ba,Lf),e(Ke,Qf),k(Mn,Ke,null),e(Ke,Yf),e(Ke,ht),k(za,ht,null),e(ht,Hf),e(ht,Jo),e(Jo,Of),e(Jo,br),e(br,Kf),e(Jo,eg),e(Jo,gl),e(gl,tg),e(Jo,og),e(ht,ng),k($n,ht,null),e(ht,sg),k(En,ht,null),e(ht,ag),k(Dn,ht,null),g(o,$d,_),g(o,Ro,_),e(Ro,Vn),e(Vn,_l),k(Ua,_l,null),e(Ro,rg),e(Ro,bl),e(bl,ig),g(o,Ed,_),g(o,et,_),k(Ia,et,null),e(et,lg),e(et,yl),e(yl,dg),e(et,cg),e(et,xa),e(xa,pg),e(xa,Wa),e(Wa,hg),e(xa,mg),e(et,ug),e(et,Za),e(Za,fg),e(Za,qa),e(qa,gg),e(Za,_g),e(et,bg),k(jn,et,null),e(et,yg),e(et,mt),k(Ga,mt,null),e(mt,Tg),e(mt,Bo),e(Bo,vg),e(Bo,yr),e(yr,wg),e(Bo,kg),e(Bo,Tl),e(Tl,Mg),e(Bo,$g),e(mt,Eg),k(Fn,mt,null),e(mt,Dg),k(Jn,mt,null),e(mt,Vg),k(Rn,mt,null),g(o,Dd,_),g(o,Co,_),e(Co,Bn),e(Bn,vl),k(Na,vl,null),e(Co,jg),e(Co,wl),e(wl,Fg),g(o,Vd,_),g(o,tt,_),k(Aa,tt,null),e(tt,Jg),e(tt,zo),e(zo,Rg),e(zo,kl),e(kl,Bg),e(zo,Cg),e(zo,Ml),e(Ml,zg),e(zo,Ug),e(tt,Ig),e(tt,Sa),e(Sa,xg),e(Sa,Xa),e(Xa,Wg),e(Sa,Zg),e(tt,qg),e(tt,Pa),e(Pa,Gg),e(Pa,La),e(La,Ng),e(Pa,Ag),e(tt,Sg),k(Cn,tt,null),e(tt,Xg),e(tt,ut),k(Qa,ut,null),e(ut,Pg),e(ut,Uo),e(Uo,Lg),e(Uo,Tr),e(Tr,Qg),e(Uo,Yg),e(Uo,$l),e($l,Hg),e(Uo,Og),e(ut,Kg),k(zn,ut,null),e(ut,e_),k(Un,ut,null),e(ut,t_),k(In,ut,null),jd=!0},p(o,[_]){const Ya={};_&2&&(Ya.$$scope={dirty:_,ctx:o}),Wo.$set(Ya);const El={};_&2&&(El.$$scope={dirty:_,ctx:o}),Go.$set(El);const Dl={};_&2&&(Dl.$$scope={dirty:_,ctx:o}),Ao.$set(Dl);const Vl={};_&2&&(Vl.$$scope={dirty:_,ctx:o}),Xo.$set(Vl);const Ha={};_&2&&(Ha.$$scope={dirty:_,ctx:o}),Po.$set(Ha);const jl={};_&2&&(jl.$$scope={dirty:_,ctx:o}),Qo.$set(jl);const Fl={};_&2&&(Fl.$$scope={dirty:_,ctx:o}),Ho.$set(Fl);const Jl={};_&2&&(Jl.$$scope={dirty:_,ctx:o}),Oo.$set(Jl);const Oa={};_&2&&(Oa.$$scope={dirty:_,ctx:o}),en.$set(Oa);const Rl={};_&2&&(Rl.$$scope={dirty:_,ctx:o}),tn.$set(Rl);const Bl={};_&2&&(Bl.$$scope={dirty:_,ctx:o}),on.$set(Bl);const Cl={};_&2&&(Cl.$$scope={dirty:_,ctx:o}),sn.$set(Cl);const zl={};_&2&&(zl.$$scope={dirty:_,ctx:o}),an.$set(zl);const Ka={};_&2&&(Ka.$$scope={dirty:_,ctx:o}),ln.$set(Ka);const Ul={};_&2&&(Ul.$$scope={dirty:_,ctx:o}),dn.$set(Ul);const xn={};_&2&&(xn.$$scope={dirty:_,ctx:o}),pn.$set(xn);const Il={};_&2&&(Il.$$scope={dirty:_,ctx:o}),hn.$set(Il);const xl={};_&2&&(xl.$$scope={dirty:_,ctx:o}),un.$set(xl);const Wl={};_&2&&(Wl.$$scope={dirty:_,ctx:o}),fn.$set(Wl);const Tt={};_&2&&(Tt.$$scope={dirty:_,ctx:o}),gn.$set(Tt);const Wn={};_&2&&(Wn.$$scope={dirty:_,ctx:o}),yn.$set(Wn);const Zl={};_&2&&(Zl.$$scope={dirty:_,ctx:o}),Tn.$set(Zl);const ql={};_&2&&(ql.$$scope={dirty:_,ctx:o}),vn.$set(ql);const vr={};_&2&&(vr.$$scope={dirty:_,ctx:o}),wn.$set(vr);const Gl={};_&2&&(Gl.$$scope={dirty:_,ctx:o}),Mn.$set(Gl);const wr={};_&2&&(wr.$$scope={dirty:_,ctx:o}),$n.$set(wr);const Nl={};_&2&&(Nl.$$scope={dirty:_,ctx:o}),En.$set(Nl);const kr={};_&2&&(kr.$$scope={dirty:_,ctx:o}),Dn.$set(kr);const Al={};_&2&&(Al.$$scope={dirty:_,ctx:o}),jn.$set(Al);const Mr={};_&2&&(Mr.$$scope={dirty:_,ctx:o}),Fn.$set(Mr);const Sl={};_&2&&(Sl.$$scope={dirty:_,ctx:o}),Jn.$set(Sl);const It={};_&2&&(It.$$scope={dirty:_,ctx:o}),Rn.$set(It);const Xl={};_&2&&(Xl.$$scope={dirty:_,ctx:o}),Cn.$set(Xl);const Pl={};_&2&&(Pl.$$scope={dirty:_,ctx:o}),zn.$set(Pl);const Ll={};_&2&&(Ll.$$scope={dirty:_,ctx:o}),Un.$set(Ll);const er={};_&2&&(er.$$scope={dirty:_,ctx:o}),In.$set(er)},i(o){jd||(M(l.$$.fragment,o),M(D.$$.fragment,o),M(os.$$.fragment,o),M(ns.$$.fragment,o),M(ss.$$.fragment,o),M(Wo.$$.fragment,o),M(rs.$$.fragment,o),M(is.$$.fragment,o),M(cs.$$.fragment,o),M(hs.$$.fragment,o),M(ms.$$.fragment,o),M(Go.$$.fragment,o),M(us.$$.fragment,o),M(fs.$$.fragment,o),M(gs.$$.fragment,o),M(ys.$$.fragment,o),M(vs.$$.fragment,o),M(Ao.$$.fragment,o),M(ws.$$.fragment,o),M(ks.$$.fragment,o),M(Vs.$$.fragment,o),M(Xo.$$.fragment,o),M(Po.$$.fragment,o),M(js.$$.fragment,o),M(Fs.$$.fragment,o),M(Js.$$.fragment,o),M(Qo.$$.fragment,o),M(Rs.$$.fragment,o),M(Bs.$$.fragment,o),M(Is.$$.fragment,o),M(Ho.$$.fragment,o),M(Oo.$$.fragment,o),M(xs.$$.fragment,o),M(Ws.$$.fragment,o),M(As.$$.fragment,o),M(en.$$.fragment,o),M(tn.$$.fragment,o),M(on.$$.fragment,o),M(Ss.$$.fragment,o),M(Xs.$$.fragment,o),M(Hs.$$.fragment,o),M(sn.$$.fragment,o),M(an.$$.fragment,o),M(Os.$$.fragment,o),M(Ks.$$.fragment,o),M(sa.$$.fragment,o),M(ln.$$.fragment,o),M(dn.$$.fragment,o),M(aa.$$.fragment,o),M(ra.$$.fragment,o),M(pa.$$.fragment,o),M(pn.$$.fragment,o),M(hn.$$.fragment,o),M(ha.$$.fragment,o),M(ma.$$.fragment,o),M(un.$$.fragment,o),M(ba.$$.fragment,o),M(fn.$$.fragment,o),M(gn.$$.fragment,o),M(ya.$$.fragment,o),M(Ta.$$.fragment,o),M(va.$$.fragment,o),M(ka.$$.fragment,o),M(Ma.$$.fragment,o),M(yn.$$.fragment,o),M(Va.$$.fragment,o),M(Tn.$$.fragment,o),M(vn.$$.fragment,o),M(wn.$$.fragment,o),M(ja.$$.fragment,o),M(Fa.$$.fragment,o),M(Mn.$$.fragment,o),M(za.$$.fragment,o),M($n.$$.fragment,o),M(En.$$.fragment,o),M(Dn.$$.fragment,o),M(Ua.$$.fragment,o),M(Ia.$$.fragment,o),M(jn.$$.fragment,o),M(Ga.$$.fragment,o),M(Fn.$$.fragment,o),M(Jn.$$.fragment,o),M(Rn.$$.fragment,o),M(Na.$$.fragment,o),M(Aa.$$.fragment,o),M(Cn.$$.fragment,o),M(Qa.$$.fragment,o),M(zn.$$.fragment,o),M(Un.$$.fragment,o),M(In.$$.fragment,o),jd=!0)},o(o){$(l.$$.fragment,o),$(D.$$.fragment,o),$(os.$$.fragment,o),$(ns.$$.fragment,o),$(ss.$$.fragment,o),$(Wo.$$.fragment,o),$(rs.$$.fragment,o),$(is.$$.fragment,o),$(cs.$$.fragment,o),$(hs.$$.fragment,o),$(ms.$$.fragment,o),$(Go.$$.fragment,o),$(us.$$.fragment,o),$(fs.$$.fragment,o),$(gs.$$.fragment,o),$(ys.$$.fragment,o),$(vs.$$.fragment,o),$(Ao.$$.fragment,o),$(ws.$$.fragment,o),$(ks.$$.fragment,o),$(Vs.$$.fragment,o),$(Xo.$$.fragment,o),$(Po.$$.fragment,o),$(js.$$.fragment,o),$(Fs.$$.fragment,o),$(Js.$$.fragment,o),$(Qo.$$.fragment,o),$(Rs.$$.fragment,o),$(Bs.$$.fragment,o),$(Is.$$.fragment,o),$(Ho.$$.fragment,o),$(Oo.$$.fragment,o),$(xs.$$.fragment,o),$(Ws.$$.fragment,o),$(As.$$.fragment,o),$(en.$$.fragment,o),$(tn.$$.fragment,o),$(on.$$.fragment,o),$(Ss.$$.fragment,o),$(Xs.$$.fragment,o),$(Hs.$$.fragment,o),$(sn.$$.fragment,o),$(an.$$.fragment,o),$(Os.$$.fragment,o),$(Ks.$$.fragment,o),$(sa.$$.fragment,o),$(ln.$$.fragment,o),$(dn.$$.fragment,o),$(aa.$$.fragment,o),$(ra.$$.fragment,o),$(pa.$$.fragment,o),$(pn.$$.fragment,o),$(hn.$$.fragment,o),$(ha.$$.fragment,o),$(ma.$$.fragment,o),$(un.$$.fragment,o),$(ba.$$.fragment,o),$(fn.$$.fragment,o),$(gn.$$.fragment,o),$(ya.$$.fragment,o),$(Ta.$$.fragment,o),$(va.$$.fragment,o),$(ka.$$.fragment,o),$(Ma.$$.fragment,o),$(yn.$$.fragment,o),$(Va.$$.fragment,o),$(Tn.$$.fragment,o),$(vn.$$.fragment,o),$(wn.$$.fragment,o),$(ja.$$.fragment,o),$(Fa.$$.fragment,o),$(Mn.$$.fragment,o),$(za.$$.fragment,o),$($n.$$.fragment,o),$(En.$$.fragment,o),$(Dn.$$.fragment,o),$(Ua.$$.fragment,o),$(Ia.$$.fragment,o),$(jn.$$.fragment,o),$(Ga.$$.fragment,o),$(Fn.$$.fragment,o),$(Jn.$$.fragment,o),$(Rn.$$.fragment,o),$(Na.$$.fragment,o),$(Aa.$$.fragment,o),$(Cn.$$.fragment,o),$(Qa.$$.fragment,o),$(zn.$$.fragment,o),$(Un.$$.fragment,o),$(In.$$.fragment,o),jd=!1},d(o){t(d),o&&t(y),o&&t(m),E(l),o&&t(pe),o&&t(x),E(D),o&&t(he),o&&t(Z),o&&t(me),o&&t(N),o&&t(ue),o&&t(A),o&&t(fe),o&&t(te),o&&t(ge),o&&t(W),o&&t(_e),o&&t(S),o&&t(be),o&&t(C),o&&t(Ze),o&&t(K),o&&t(Ql),o&&t(Kt),E(os),o&&t(Yl),o&&t(dt),o&&t(Hl),o&&t(eo),E(ns),o&&t(Ol),o&&t(ft),E(ss),E(Wo),o&&t(Kl),o&&t(no),E(rs),o&&t(ed),o&&t(Oe),E(is),E(cs),E(hs),E(ms),E(Go),E(us),o&&t(td),o&&t(ro),E(fs),o&&t(od),o&&t(gt),E(gs),E(ys),E(vs),E(Ao),o&&t(nd),o&&t(lo),E(ws),o&&t(sd),o&&t(_t),E(ks),E(Vs),E(Xo),E(Po),o&&t(ad),o&&t(po),E(js),o&&t(rd),o&&t(zt),E(Fs),E(Js),E(Qo),o&&t(id),o&&t(ho),E(Rs),o&&t(ld),o&&t(bt),E(Bs),E(Is),E(Ho),E(Oo),o&&t(dd),o&&t(fo),E(xs),o&&t(cd),o&&t(nt),E(Ws),E(As),E(en),E(tn),E(on),o&&t(pd),o&&t(_o),E(Ss),o&&t(hd),o&&t(st),E(Xs),E(Hs),E(sn),E(an),o&&t(md),o&&t(yo),E(Os),o&&t(ud),o&&t(at),E(Ks),E(sa),E(ln),E(dn),o&&t(fd),o&&t(wo),E(aa),o&&t(gd),o&&t(rt),E(ra),E(pa),E(pn),E(hn),o&&t(_d),o&&t(Mo),E(ha),o&&t(bd),o&&t(it),E(ma),E(un),E(ba),E(fn),E(gn),o&&t(yd),o&&t(Eo),E(ya),o&&t(Td),o&&t(Ut),E(Ta),E(va),o&&t(vd),o&&t(Do),E(ka),o&&t(wd),o&&t(lt),E(Ma),E(yn),E(Va),E(Tn),E(vn),E(wn),o&&t(kd),o&&t(Fo),E(ja),o&&t(Md),o&&t(Ke),E(Fa),E(Mn),E(za),E($n),E(En),E(Dn),o&&t($d),o&&t(Ro),E(Ua),o&&t(Ed),o&&t(et),E(Ia),E(jn),E(Ga),E(Fn),E(Jn),E(Rn),o&&t(Dd),o&&t(Co),E(Na),o&&t(Vd),o&&t(tt),E(Aa),E(Cn),E(Qa),E(zn),E(Un),E(In)}}}const jy={local:"debertav2",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.DebertaV2Config",title:"DebertaV2Config"},{local:"transformers.DebertaV2Tokenizer",title:"DebertaV2Tokenizer"},{local:"transformers.DebertaV2TokenizerFast",title:"DebertaV2TokenizerFast"},{local:"transformers.DebertaV2Model",title:"DebertaV2Model"},{local:"transformers.DebertaV2PreTrainedModel",title:"DebertaV2PreTrainedModel"},{local:"transformers.DebertaV2ForMaskedLM",title:"DebertaV2ForMaskedLM"},{local:"transformers.DebertaV2ForSequenceClassification",title:"DebertaV2ForSequenceClassification"},{local:"transformers.DebertaV2ForTokenClassification",title:"DebertaV2ForTokenClassification"},{local:"transformers.DebertaV2ForQuestionAnswering",title:"DebertaV2ForQuestionAnswering"},{local:"transformers.DebertaV2ForMultipleChoice",title:"DebertaV2ForMultipleChoice"},{local:"transformers.TFDebertaV2Model",title:"TFDebertaV2Model"},{local:"transformers.TFDebertaV2PreTrainedModel",title:"TFDebertaV2PreTrainedModel"},{local:"transformers.TFDebertaV2ForMaskedLM",title:"TFDebertaV2ForMaskedLM"},{local:"transformers.TFDebertaV2ForSequenceClassification",title:"TFDebertaV2ForSequenceClassification"},{local:"transformers.TFDebertaV2ForTokenClassification",title:"TFDebertaV2ForTokenClassification"},{local:"transformers.TFDebertaV2ForQuestionAnswering",title:"TFDebertaV2ForQuestionAnswering"}],title:"DeBERTa-v2"};function Fy(j){return S2(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Iy extends q2{constructor(d){super();G2(this,d,Fy,Vy,N2,{})}}export{Iy as default,jy as metadata};
