import{S as Dz,i as Yz,s as Hz,e as o,k as c,w as T,t as r,M as Kz,c as n,d as t,m as p,a,x as k,h as l,b as m,N as Qz,G as e,g,y as w,q as M,o as E,B as $,v as eJ,L as We}from"../../chunks/vendor-hf-doc-builder.js";import{T as qe}from"../../chunks/Tip-hf-doc-builder.js";import{D as Z}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ne}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ae}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ie}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function tJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEVsZWN0cmFDb25maWclMkMlMjBFbGVjdHJhTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwRUxFQ1RSQSUyMGVsZWN0cmEtYmFzZS11bmNhc2VkJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEVsZWN0cmFDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwZWxlY3RyYS1iYXNlLXVuY2FzZWQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEVsZWN0cmFNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ElectraConfig, ElectraModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ELECTRA electra-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ElectraConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the electra-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraModel(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=o("p"),b=r("Examples:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Examples:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function oJ(F){let d,b,u,f,_;return f=new Ne({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=o("p"),b=r("sequence pair mask has the following format:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"sequence pair mask has the following format:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function nJ(F){let d,b,u,f,_;return f=new Ne({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=o("p"),b=r("sequence pair mask has the following format:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"sequence pair mask has the following format:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function sJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function aJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBFbGVjdHJhTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtc21hbGwtZGlzY3JpbWluYXRvciUyMiklMEFtb2RlbCUyMCUzRCUyMEVsZWN0cmFNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ElectraModel
<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;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraModel.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function rJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function lJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEVsZWN0cmFGb3JQcmVUcmFpbmluZyUyQyUyMEF1dG9Ub2tlbml6ZXIlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQWRpc2NyaW1pbmF0b3IlMjAlM0QlMjBFbGVjdHJhRm9yUHJlVHJhaW5pbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtYmFzZS1kaXNjcmltaW5hdG9yJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtYmFzZS1kaXNjcmltaW5hdG9yJTIyKSUwQSUwQXNlbnRlbmNlJTIwJTNEJTIwJTIyVGhlJTIwcXVpY2slMjBicm93biUyMGZveCUyMGp1bXBzJTIwb3ZlciUyMHRoZSUyMGxhenklMjBkb2clMjIlMEFmYWtlX3NlbnRlbmNlJTIwJTNEJTIwJTIyVGhlJTIwcXVpY2slMjBicm93biUyMGZveCUyMGZha2UlMjBvdmVyJTIwdGhlJTIwbGF6eSUyMGRvZyUyMiUwQSUwQWZha2VfdG9rZW5zJTIwJTNEJTIwdG9rZW5pemVyLnRva2VuaXplKGZha2Vfc2VudGVuY2UlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQWZha2VfaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyLmVuY29kZShmYWtlX3NlbnRlbmNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFkaXNjcmltaW5hdG9yX291dHB1dHMlMjAlM0QlMjBkaXNjcmltaW5hdG9yKGZha2VfaW5wdXRzKSUwQXByZWRpY3Rpb25zJTIwJTNEJTIwdG9yY2gucm91bmQoKHRvcmNoLnNpZ24oZGlzY3JpbWluYXRvcl9vdXRwdXRzJTVCMCU1RCklMjAlMkIlMjAxKSUyMCUyRiUyMDIpJTBBJTBBZmFrZV90b2tlbnMlMEElMEFwcmVkaWN0aW9ucy5zcXVlZXplKCkudG9saXN0KCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ElectraForPreTraining, AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>discriminator = ElectraForPreTraining.from_pretrained(<span class="hljs-string">&quot;google/electra-base-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-base-discriminator&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>sentence = <span class="hljs-string">&quot;The quick brown fox jumps over the lazy dog&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>fake_sentence = <span class="hljs-string">&quot;The quick brown fox fake over the lazy dog&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>fake_tokens = tokenizer.tokenize(fake_sentence, add_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>fake_inputs = tokenizer.encode(fake_sentence, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>discriminator_outputs = discriminator(fake_inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>predictions = torch.<span class="hljs-built_in">round</span>((torch.sign(discriminator_outputs[<span class="hljs-number">0</span>]) + <span class="hljs-number">1</span>) / <span class="hljs-number">2</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>fake_tokens
[<span class="hljs-string">&#x27;[CLS]&#x27;</span>, <span class="hljs-string">&#x27;the&#x27;</span>, <span class="hljs-string">&#x27;quick&#x27;</span>, <span class="hljs-string">&#x27;brown&#x27;</span>, <span class="hljs-string">&#x27;fox&#x27;</span>, <span class="hljs-string">&#x27;fake&#x27;</span>, <span class="hljs-string">&#x27;over&#x27;</span>, <span class="hljs-string">&#x27;the&#x27;</span>, <span class="hljs-string">&#x27;lazy&#x27;</span>, <span class="hljs-string">&#x27;dog&#x27;</span>, <span class="hljs-string">&#x27;[SEP]&#x27;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predictions.squeeze().tolist()
[<span class="hljs-number">0.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">1.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">0.0</span>]`}}),{c(){d=o("p"),b=r("Examples:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Examples:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function iJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function dJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBFbGVjdHJhRm9yQ2F1c2FsTE0lMkMlMjBFbGVjdHJhQ29uZmlnJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZlbGVjdHJhLWJhc2UtZ2VuZXJhdG9yJTIyKSUwQWNvbmZpZyUyMCUzRCUyMEVsZWN0cmFDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtYmFzZS1nZW5lcmF0b3IlMjIpJTBBY29uZmlnLmlzX2RlY29kZXIlMjAlM0QlMjBUcnVlJTBBbW9kZWwlMjAlM0QlMjBFbGVjdHJhRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtYmFzZS1nZW5lcmF0b3IlMjIlMkMlMjBjb25maWclM0Rjb25maWcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFwcmVkaWN0aW9uX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ElectraForCausalLM, ElectraConfig
<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;google/electra-base-generator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = ElectraConfig.from_pretrained(<span class="hljs-string">&quot;google/electra-base-generator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config.is_decoder = <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/electra-base-generator&quot;</span>, config=config)

<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>prediction_logits = outputs.logits`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function cJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function pJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBFbGVjdHJhRm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtc21hbGwtZ2VuZXJhdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwRWxlY3RyYUZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZlbGVjdHJhLXNtYWxsLWdlbmVyYXRvciUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlNUJNQVNLJTVEJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RC5ub256ZXJvKGFzX3R1cGxlJTNEVHJ1ZSklNUIwJTVEJTBBJTBBcHJlZGljdGVkX3Rva2VuX2lkJTIwJTNEJTIwbG9naXRzJTVCMCUyQyUyMG1hc2tfdG9rZW5faW5kZXglNUQuYXJnbWF4KGF4aXMlM0QtMSklMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RlZF90b2tlbl9pZCklMEElMEFsYWJlbHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjBQYXJpcy4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUyMyUyMG1hc2slMjBsYWJlbHMlMjBvZiUyMG5vbi0lNUJNQVNLJTVEJTIwdG9rZW5zJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gud2hlcmUoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkJTJDJTIwbGFiZWxzJTJDJTIwLTEwMCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTBBcm91bmQob3V0cHV0cy5sb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ElectraForMaskedLM
<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;google/electra-small-generator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/electra-small-generator&quot;</span>)

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">1.22</span>`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function hJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function mJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEVsZWN0cmFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmhhZHJlc2gtc2F2YW5pJTJGZWxlY3RyYS1iYXNlLWVtb3Rpb24lMjIpJTBBbW9kZWwlMjAlM0QlMjBFbGVjdHJhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmhhZHJlc2gtc2F2YW5pJTJGZWxlY3RyYS1iYXNlLWVtb3Rpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEVsZWN0cmFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJiaGFkcmVzaC1zYXZhbmklMkZlbGVjdHJhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",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, ElectraForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-emotion&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>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;joy&#x27;</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 = ElectraForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-emotion&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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.06</span>`}}),{c(){d=o("p"),b=r("Example of single-label classification:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example of single-label classification:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function uJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEVsZWN0cmFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmhhZHJlc2gtc2F2YW5pJTJGZWxlY3RyYS1iYXNlLWVtb3Rpb24lMjIpJTBBbW9kZWwlMjAlM0QlMjBFbGVjdHJhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmhhZHJlc2gtc2F2YW5pJTJGZWxlY3RyYS1iYXNlLWVtb3Rpb24lMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEVsZWN0cmFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJiaGFkcmVzaC1zYXZhbmklMkZlbGVjdHJhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, ElectraForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-emotion&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 = ElectraForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;bhadresh-savani/electra-base-emotion&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=o("p"),b=r("Example of multi-label classification:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example of multi-label classification:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function fJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function gJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBFbGVjdHJhRm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtc21hbGwtZGlzY3JpbWluYXRvciUyMiklMEFtb2RlbCUyMCUzRCUyMEVsZWN0cmFGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gudGVuc29yKDApLnVuc3F1ZWV6ZSgwKSUyMCUyMCUyMyUyMGNob2ljZTAlMjBpcyUyMGNvcnJlY3QlMjAoYWNjb3JkaW5nJTIwdG8lMjBXaWtpcGVkaWElMjAlM0IpKSUyQyUyMGJhdGNoJTIwc2l6ZSUyMDElMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiolN0JrJTNBJTIwdi51bnNxdWVlemUoMCklMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwZW5jb2RpbmcuaXRlbXMoKSU3RCUyQyUyMGxhYmVscyUzRGxhYmVscyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ElectraForMultipleChoice
<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;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function _J(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function yJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBFbGVjdHJhRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmhhZHJlc2gtc2F2YW5pJTJGZWxlY3RyYS1iYXNlLWRpc2NyaW1pbmF0b3ItZmluZXR1bmVkLWNvbmxsMDMtZW5nbGlzaCUyMiklMEFtb2RlbCUyMCUzRCUyMEVsZWN0cmFGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJiaGFkcmVzaC1zYXZhbmklMkZlbGVjdHJhLWJhc2UtZGlzY3JpbWluYXRvci1maW5ldHVuZWQtY29ubGwwMy1lbmdsaXNoJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQuaXRlbSgpJTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQlNUQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMEElMEFsYWJlbHMlMjAlM0QlMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzJTBBcm91bmQobG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ElectraForTokenClassification
<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;bhadresh-savani/electra-base-discriminator-finetuned-conll03-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForTokenClassification.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-discriminator-finetuned-conll03-english&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>predicted_tokens_classes
[<span class="hljs-string">&#x27;B-LOC&#x27;</span>, <span class="hljs-string">&#x27;B-ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;B-LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;B-LOC&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.11</span>`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function bJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function vJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBFbGVjdHJhRm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJoYWRyZXNoLXNhdmFuaSUyRmVsZWN0cmEtYmFzZS1zcXVhZDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBFbGVjdHJhRm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmJoYWRyZXNoLXNhdmFuaSUyRmVsZWN0cmEtYmFzZS1zcXVhZDIlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RfYW5zd2VyX3Rva2VucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQSUwQSUyMyUyMHRhcmdldCUyMGlzJTIwJTIybmljZSUyMHB1cHBldCUyMiUwQXRhcmdldF9zdGFydF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxMSU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjEyJTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ElectraForQuestionAnswering
<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;bhadresh-savani/electra-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-squad2&quot;</span>)

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">2.64</span>`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function TJ(F){let d,b,u,f,_,i,h,x,be,fe,R,de,te,j,ve,X,ce,Ze,D,ae,re,L,le,Te,O,ke,ge,B,we,ie,ne,J,I,pe,H,_e,he,Q,Me,ye,U,Ee,Y,se,me,K,$e,ue,G,Fe,q,je,ee,W,xe,N,Ce,ze;return{c(){d=o("p"),b=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),i=c(),h=o("ul"),x=o("li"),be=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),R=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),j=o("p"),ve=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=o("code"),ce=r("model.fit()"),Ze=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),L=o("code"),le=r("fit()"),Te=r(" and "),O=o("code"),ke=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),B=o("code"),we=r("Functional"),ie=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),J=o("ul"),I=o("li"),pe=r("a single Tensor with "),H=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),Q=o("code"),Me=r("model(input_ids)"),ye=c(),U=o("li"),Ee=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),K=o("code"),$e=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),G=o("li"),Fe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=o("code"),je=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=o("p"),xe=r(`Note that when creating models and layers with
`),N=o("a"),Ce=r("subclassing"),ze=r(` 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(v){d=n(v,"P",{});var C=a(d);b=l(C,"TensorFlow models and layers in "),u=n(C,"CODE",{});var Xe=a(u);f=l(Xe,"transformers"),Xe.forEach(t),_=l(C," accept two formats as input:"),C.forEach(t),i=p(v),h=n(v,"UL",{});var oe=a(h);x=n(oe,"LI",{});var Je=a(x);be=l(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),fe=p(oe),R=n(oe,"LI",{});var Le=a(R);de=l(Le,"having all inputs as a list, tuple or dict in the first positional argument."),Le.forEach(t),oe.forEach(t),te=p(v),j=n(v,"P",{});var z=a(j);ve=l(z,`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=n(z,"CODE",{});var Oe=a(X);ce=l(Oe,"model.fit()"),Oe.forEach(t),Ze=l(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n(z,"CODE",{});var Qe=a(D);ae=l(Qe,"model.fit()"),Qe.forEach(t),re=l(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),L=n(z,"CODE",{});var Re=a(L);le=l(Re,"fit()"),Re.forEach(t),Te=l(z," and "),O=n(z,"CODE",{});var De=a(O);ke=l(De,"predict()"),De.forEach(t),ge=l(z,`, such as when creating your own layers or models with
the Keras `),B=n(z,"CODE",{});var Ye=a(B);we=l(Ye,"Functional"),Ye.forEach(t),ie=l(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=p(v),J=n(v,"UL",{});var A=a(J);I=n(A,"LI",{});var P=a(I);pe=l(P,"a single Tensor with "),H=n(P,"CODE",{});var Ge=a(H);_e=l(Ge,"input_ids"),Ge.forEach(t),he=l(P," only and nothing else: "),Q=n(P,"CODE",{});var Pe=a(Q);Me=l(Pe,"model(input_ids)"),Pe.forEach(t),P.forEach(t),ye=p(A),U=n(A,"LI",{});var S=a(U);Ee=l(S,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=n(S,"CODE",{});var He=a(Y);se=l(He,"model([input_ids, attention_mask])"),He.forEach(t),me=l(S," or "),K=n(S,"CODE",{});var Ve=a(K);$e=l(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),S.forEach(t),ue=p(A),G=n(A,"LI",{});var Ue=a(G);Fe=l(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=n(Ue,"CODE",{});var Se=a(q);je=l(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),Ue.forEach(t),A.forEach(t),ee=p(v),W=n(v,"P",{});var V=a(W);xe=l(V,`Note that when creating models and layers with
`),N=n(V,"A",{href:!0,rel:!0});var Be=a(N);Ce=l(Be,"subclassing"),Be.forEach(t),ze=l(V,` 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!`),V.forEach(t),this.h()},h(){m(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(N,"rel","nofollow")},m(v,C){g(v,d,C),e(d,b),e(d,u),e(u,f),e(d,_),g(v,i,C),g(v,h,C),e(h,x),e(x,be),e(h,fe),e(h,R),e(R,de),g(v,te,C),g(v,j,C),e(j,ve),e(j,X),e(X,ce),e(j,Ze),e(j,D),e(D,ae),e(j,re),e(j,L),e(L,le),e(j,Te),e(j,O),e(O,ke),e(j,ge),e(j,B),e(B,we),e(j,ie),g(v,ne,C),g(v,J,C),e(J,I),e(I,pe),e(I,H),e(H,_e),e(I,he),e(I,Q),e(Q,Me),e(J,ye),e(J,U),e(U,Ee),e(U,Y),e(Y,se),e(U,me),e(U,K),e(K,$e),e(J,ue),e(J,G),e(G,Fe),e(G,q),e(q,je),g(v,ee,C),g(v,W,C),e(W,xe),e(W,N),e(N,Ce),e(W,ze)},d(v){v&&t(d),v&&t(i),v&&t(h),v&&t(te),v&&t(j),v&&t(ne),v&&t(J),v&&t(ee),v&&t(W)}}}function kJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function wJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkVsZWN0cmFNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZFbGVjdHJhTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtc21hbGwtZGlzY3JpbWluYXRvciUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFElectraModel
<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;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraModel.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function MJ(F){let d,b,u,f,_,i,h,x,be,fe,R,de,te,j,ve,X,ce,Ze,D,ae,re,L,le,Te,O,ke,ge,B,we,ie,ne,J,I,pe,H,_e,he,Q,Me,ye,U,Ee,Y,se,me,K,$e,ue,G,Fe,q,je,ee,W,xe,N,Ce,ze;return{c(){d=o("p"),b=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),i=c(),h=o("ul"),x=o("li"),be=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),R=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),j=o("p"),ve=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=o("code"),ce=r("model.fit()"),Ze=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),L=o("code"),le=r("fit()"),Te=r(" and "),O=o("code"),ke=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),B=o("code"),we=r("Functional"),ie=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),J=o("ul"),I=o("li"),pe=r("a single Tensor with "),H=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),Q=o("code"),Me=r("model(input_ids)"),ye=c(),U=o("li"),Ee=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),K=o("code"),$e=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),G=o("li"),Fe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=o("code"),je=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=o("p"),xe=r(`Note that when creating models and layers with
`),N=o("a"),Ce=r("subclassing"),ze=r(` 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(v){d=n(v,"P",{});var C=a(d);b=l(C,"TensorFlow models and layers in "),u=n(C,"CODE",{});var Xe=a(u);f=l(Xe,"transformers"),Xe.forEach(t),_=l(C," accept two formats as input:"),C.forEach(t),i=p(v),h=n(v,"UL",{});var oe=a(h);x=n(oe,"LI",{});var Je=a(x);be=l(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),fe=p(oe),R=n(oe,"LI",{});var Le=a(R);de=l(Le,"having all inputs as a list, tuple or dict in the first positional argument."),Le.forEach(t),oe.forEach(t),te=p(v),j=n(v,"P",{});var z=a(j);ve=l(z,`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=n(z,"CODE",{});var Oe=a(X);ce=l(Oe,"model.fit()"),Oe.forEach(t),Ze=l(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n(z,"CODE",{});var Qe=a(D);ae=l(Qe,"model.fit()"),Qe.forEach(t),re=l(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),L=n(z,"CODE",{});var Re=a(L);le=l(Re,"fit()"),Re.forEach(t),Te=l(z," and "),O=n(z,"CODE",{});var De=a(O);ke=l(De,"predict()"),De.forEach(t),ge=l(z,`, such as when creating your own layers or models with
the Keras `),B=n(z,"CODE",{});var Ye=a(B);we=l(Ye,"Functional"),Ye.forEach(t),ie=l(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=p(v),J=n(v,"UL",{});var A=a(J);I=n(A,"LI",{});var P=a(I);pe=l(P,"a single Tensor with "),H=n(P,"CODE",{});var Ge=a(H);_e=l(Ge,"input_ids"),Ge.forEach(t),he=l(P," only and nothing else: "),Q=n(P,"CODE",{});var Pe=a(Q);Me=l(Pe,"model(input_ids)"),Pe.forEach(t),P.forEach(t),ye=p(A),U=n(A,"LI",{});var S=a(U);Ee=l(S,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=n(S,"CODE",{});var He=a(Y);se=l(He,"model([input_ids, attention_mask])"),He.forEach(t),me=l(S," or "),K=n(S,"CODE",{});var Ve=a(K);$e=l(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),S.forEach(t),ue=p(A),G=n(A,"LI",{});var Ue=a(G);Fe=l(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=n(Ue,"CODE",{});var Se=a(q);je=l(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),Ue.forEach(t),A.forEach(t),ee=p(v),W=n(v,"P",{});var V=a(W);xe=l(V,`Note that when creating models and layers with
`),N=n(V,"A",{href:!0,rel:!0});var Be=a(N);Ce=l(Be,"subclassing"),Be.forEach(t),ze=l(V,` 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!`),V.forEach(t),this.h()},h(){m(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(N,"rel","nofollow")},m(v,C){g(v,d,C),e(d,b),e(d,u),e(u,f),e(d,_),g(v,i,C),g(v,h,C),e(h,x),e(x,be),e(h,fe),e(h,R),e(R,de),g(v,te,C),g(v,j,C),e(j,ve),e(j,X),e(X,ce),e(j,Ze),e(j,D),e(D,ae),e(j,re),e(j,L),e(L,le),e(j,Te),e(j,O),e(O,ke),e(j,ge),e(j,B),e(B,we),e(j,ie),g(v,ne,C),g(v,J,C),e(J,I),e(I,pe),e(I,H),e(H,_e),e(I,he),e(I,Q),e(Q,Me),e(J,ye),e(J,U),e(U,Ee),e(U,Y),e(Y,se),e(U,me),e(U,K),e(K,$e),e(J,ue),e(J,G),e(G,Fe),e(G,q),e(q,je),g(v,ee,C),g(v,W,C),e(W,xe),e(W,N),e(N,Ce),e(W,ze)},d(v){v&&t(d),v&&t(i),v&&t(h),v&&t(te),v&&t(j),v&&t(ne),v&&t(J),v&&t(ee),v&&t(W)}}}function EJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function $J(F){let d,b,u,f,_;return f=new Ne({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFRGRWxlY3RyYUZvclByZVRyYWluaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZFbGVjdHJhRm9yUHJlVHJhaW5pbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtc21hbGwtZGlzY3JpbWluYXRvciUyMiklMEFpbnB1dF9pZHMlMjAlM0QlMjB0Zi5jb25zdGFudCh0b2tlbml6ZXIuZW5jb2RlKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIpKSU1Qk5vbmUlMkMlMjAlM0ElNUQlMjAlMjAlMjMlMjBCYXRjaCUyMHNpemUlMjAxJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyklMEFzY29yZXMlMjAlM0QlMjBvdXRwdXRzJTVCMCU1RA==",highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFElectraForPreTraining

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForPreTraining.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tf.constant(tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>))[<span class="hljs-literal">None</span>, :]  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>scores = outputs[<span class="hljs-number">0</span>]`}}),{c(){d=o("p"),b=r("Examples:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Examples:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function FJ(F){let d,b,u,f,_,i,h,x,be,fe,R,de,te,j,ve,X,ce,Ze,D,ae,re,L,le,Te,O,ke,ge,B,we,ie,ne,J,I,pe,H,_e,he,Q,Me,ye,U,Ee,Y,se,me,K,$e,ue,G,Fe,q,je,ee,W,xe,N,Ce,ze;return{c(){d=o("p"),b=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),i=c(),h=o("ul"),x=o("li"),be=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),R=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),j=o("p"),ve=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=o("code"),ce=r("model.fit()"),Ze=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),L=o("code"),le=r("fit()"),Te=r(" and "),O=o("code"),ke=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),B=o("code"),we=r("Functional"),ie=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),J=o("ul"),I=o("li"),pe=r("a single Tensor with "),H=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),Q=o("code"),Me=r("model(input_ids)"),ye=c(),U=o("li"),Ee=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),K=o("code"),$e=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),G=o("li"),Fe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=o("code"),je=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=o("p"),xe=r(`Note that when creating models and layers with
`),N=o("a"),Ce=r("subclassing"),ze=r(` 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(v){d=n(v,"P",{});var C=a(d);b=l(C,"TensorFlow models and layers in "),u=n(C,"CODE",{});var Xe=a(u);f=l(Xe,"transformers"),Xe.forEach(t),_=l(C," accept two formats as input:"),C.forEach(t),i=p(v),h=n(v,"UL",{});var oe=a(h);x=n(oe,"LI",{});var Je=a(x);be=l(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),fe=p(oe),R=n(oe,"LI",{});var Le=a(R);de=l(Le,"having all inputs as a list, tuple or dict in the first positional argument."),Le.forEach(t),oe.forEach(t),te=p(v),j=n(v,"P",{});var z=a(j);ve=l(z,`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=n(z,"CODE",{});var Oe=a(X);ce=l(Oe,"model.fit()"),Oe.forEach(t),Ze=l(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n(z,"CODE",{});var Qe=a(D);ae=l(Qe,"model.fit()"),Qe.forEach(t),re=l(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),L=n(z,"CODE",{});var Re=a(L);le=l(Re,"fit()"),Re.forEach(t),Te=l(z," and "),O=n(z,"CODE",{});var De=a(O);ke=l(De,"predict()"),De.forEach(t),ge=l(z,`, such as when creating your own layers or models with
the Keras `),B=n(z,"CODE",{});var Ye=a(B);we=l(Ye,"Functional"),Ye.forEach(t),ie=l(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=p(v),J=n(v,"UL",{});var A=a(J);I=n(A,"LI",{});var P=a(I);pe=l(P,"a single Tensor with "),H=n(P,"CODE",{});var Ge=a(H);_e=l(Ge,"input_ids"),Ge.forEach(t),he=l(P," only and nothing else: "),Q=n(P,"CODE",{});var Pe=a(Q);Me=l(Pe,"model(input_ids)"),Pe.forEach(t),P.forEach(t),ye=p(A),U=n(A,"LI",{});var S=a(U);Ee=l(S,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=n(S,"CODE",{});var He=a(Y);se=l(He,"model([input_ids, attention_mask])"),He.forEach(t),me=l(S," or "),K=n(S,"CODE",{});var Ve=a(K);$e=l(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),S.forEach(t),ue=p(A),G=n(A,"LI",{});var Ue=a(G);Fe=l(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=n(Ue,"CODE",{});var Se=a(q);je=l(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),Ue.forEach(t),A.forEach(t),ee=p(v),W=n(v,"P",{});var V=a(W);xe=l(V,`Note that when creating models and layers with
`),N=n(V,"A",{href:!0,rel:!0});var Be=a(N);Ce=l(Be,"subclassing"),Be.forEach(t),ze=l(V,` 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!`),V.forEach(t),this.h()},h(){m(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(N,"rel","nofollow")},m(v,C){g(v,d,C),e(d,b),e(d,u),e(u,f),e(d,_),g(v,i,C),g(v,h,C),e(h,x),e(x,be),e(h,fe),e(h,R),e(R,de),g(v,te,C),g(v,j,C),e(j,ve),e(j,X),e(X,ce),e(j,Ze),e(j,D),e(D,ae),e(j,re),e(j,L),e(L,le),e(j,Te),e(j,O),e(O,ke),e(j,ge),e(j,B),e(B,we),e(j,ie),g(v,ne,C),g(v,J,C),e(J,I),e(I,pe),e(I,H),e(H,_e),e(I,he),e(I,Q),e(Q,Me),e(J,ye),e(J,U),e(U,Ee),e(U,Y),e(Y,se),e(U,me),e(U,K),e(K,$e),e(J,ue),e(J,G),e(G,Fe),e(G,q),e(q,je),g(v,ee,C),g(v,W,C),e(W,xe),e(W,N),e(N,Ce),e(W,ze)},d(v){v&&t(d),v&&t(i),v&&t(h),v&&t(te),v&&t(j),v&&t(ne),v&&t(J),v&&t(ee),v&&t(W)}}}function jJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function xJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkVsZWN0cmFGb3JNYXNrZWRMTSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1nZW5lcmF0b3IlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkVsZWN0cmFGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1nZW5lcmF0b3IlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlNUJNQVNLJTVEJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMHRmLndoZXJlKChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RCklMEFzZWxlY3RlZF9sb2dpdHMlMjAlM0QlMjB0Zi5nYXRoZXJfbmQobG9naXRzJTVCMCU1RCUyQyUyMGluZGljZXMlM0RtYXNrX3Rva2VuX2luZGV4KSUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KHNlbGVjdGVkX2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RlZF90b2tlbl9pZCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFElectraForMaskedLM
<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;google/electra-small-generator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/electra-small-generator&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>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27;paris&#x27;</span>`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function CJ(F){let d,b;return d=new Ne({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRmLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUwQXJvdW5kKGZsb2F0KG91dHB1dHMubG9zcyklMkMlMjAyKQ==",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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(outputs.loss), <span class="hljs-number">2</span>)
<span class="hljs-number">1.22</span>`}}),{c(){T(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){w(d,u,f),b=!0},p:We,i(u){b||(M(d.$$.fragment,u),b=!0)},o(u){E(d.$$.fragment,u),b=!1},d(u){$(d,u)}}}function zJ(F){let d,b,u,f,_,i,h,x,be,fe,R,de,te,j,ve,X,ce,Ze,D,ae,re,L,le,Te,O,ke,ge,B,we,ie,ne,J,I,pe,H,_e,he,Q,Me,ye,U,Ee,Y,se,me,K,$e,ue,G,Fe,q,je,ee,W,xe,N,Ce,ze;return{c(){d=o("p"),b=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),i=c(),h=o("ul"),x=o("li"),be=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),R=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),j=o("p"),ve=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=o("code"),ce=r("model.fit()"),Ze=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),L=o("code"),le=r("fit()"),Te=r(" and "),O=o("code"),ke=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),B=o("code"),we=r("Functional"),ie=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),J=o("ul"),I=o("li"),pe=r("a single Tensor with "),H=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),Q=o("code"),Me=r("model(input_ids)"),ye=c(),U=o("li"),Ee=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),K=o("code"),$e=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),G=o("li"),Fe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=o("code"),je=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=o("p"),xe=r(`Note that when creating models and layers with
`),N=o("a"),Ce=r("subclassing"),ze=r(` 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(v){d=n(v,"P",{});var C=a(d);b=l(C,"TensorFlow models and layers in "),u=n(C,"CODE",{});var Xe=a(u);f=l(Xe,"transformers"),Xe.forEach(t),_=l(C," accept two formats as input:"),C.forEach(t),i=p(v),h=n(v,"UL",{});var oe=a(h);x=n(oe,"LI",{});var Je=a(x);be=l(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),fe=p(oe),R=n(oe,"LI",{});var Le=a(R);de=l(Le,"having all inputs as a list, tuple or dict in the first positional argument."),Le.forEach(t),oe.forEach(t),te=p(v),j=n(v,"P",{});var z=a(j);ve=l(z,`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=n(z,"CODE",{});var Oe=a(X);ce=l(Oe,"model.fit()"),Oe.forEach(t),Ze=l(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n(z,"CODE",{});var Qe=a(D);ae=l(Qe,"model.fit()"),Qe.forEach(t),re=l(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),L=n(z,"CODE",{});var Re=a(L);le=l(Re,"fit()"),Re.forEach(t),Te=l(z," and "),O=n(z,"CODE",{});var De=a(O);ke=l(De,"predict()"),De.forEach(t),ge=l(z,`, such as when creating your own layers or models with
the Keras `),B=n(z,"CODE",{});var Ye=a(B);we=l(Ye,"Functional"),Ye.forEach(t),ie=l(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=p(v),J=n(v,"UL",{});var A=a(J);I=n(A,"LI",{});var P=a(I);pe=l(P,"a single Tensor with "),H=n(P,"CODE",{});var Ge=a(H);_e=l(Ge,"input_ids"),Ge.forEach(t),he=l(P," only and nothing else: "),Q=n(P,"CODE",{});var Pe=a(Q);Me=l(Pe,"model(input_ids)"),Pe.forEach(t),P.forEach(t),ye=p(A),U=n(A,"LI",{});var S=a(U);Ee=l(S,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=n(S,"CODE",{});var He=a(Y);se=l(He,"model([input_ids, attention_mask])"),He.forEach(t),me=l(S," or "),K=n(S,"CODE",{});var Ve=a(K);$e=l(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),S.forEach(t),ue=p(A),G=n(A,"LI",{});var Ue=a(G);Fe=l(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=n(Ue,"CODE",{});var Se=a(q);je=l(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),Ue.forEach(t),A.forEach(t),ee=p(v),W=n(v,"P",{});var V=a(W);xe=l(V,`Note that when creating models and layers with
`),N=n(V,"A",{href:!0,rel:!0});var Be=a(N);Ce=l(Be,"subclassing"),Be.forEach(t),ze=l(V,` 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!`),V.forEach(t),this.h()},h(){m(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(N,"rel","nofollow")},m(v,C){g(v,d,C),e(d,b),e(d,u),e(u,f),e(d,_),g(v,i,C),g(v,h,C),e(h,x),e(x,be),e(h,fe),e(h,R),e(R,de),g(v,te,C),g(v,j,C),e(j,ve),e(j,X),e(X,ce),e(j,Ze),e(j,D),e(D,ae),e(j,re),e(j,L),e(L,le),e(j,Te),e(j,O),e(O,ke),e(j,ge),e(j,B),e(B,we),e(j,ie),g(v,ne,C),g(v,J,C),e(J,I),e(I,pe),e(I,H),e(H,_e),e(I,he),e(I,Q),e(Q,Me),e(J,ye),e(J,U),e(U,Ee),e(U,Y),e(Y,se),e(U,me),e(U,K),e(K,$e),e(J,ue),e(J,G),e(G,Fe),e(G,q),e(q,je),g(v,ee,C),g(v,W,C),e(W,xe),e(W,N),e(N,Ce),e(W,ze)},d(v){v&&t(d),v&&t(i),v&&t(h),v&&t(te),v&&t(j),v&&t(ne),v&&t(J),v&&t(ee),v&&t(W)}}}function JJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function UJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkVsZWN0cmFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiaGFkcmVzaC1zYXZhbmklMkZlbGVjdHJhLWJhc2UtZW1vdGlvbiUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRWxlY3RyYUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmJoYWRyZXNoLXNhdmFuaSUyRmVsZWN0cmEtYmFzZS1lbW90aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFElectraForSequenceClassification
<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;bhadresh-savani/electra-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-emotion&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>])
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;joy&#x27;</span>`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function IJ(F){let d,b;return d=new Ne({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZFbGVjdHJhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmhhZHJlc2gtc2F2YW5pJTJGZWxlY3RyYS1iYXNlLWVtb3Rpb24lMjIlMkMlMjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyklMEElMEFsYWJlbHMlMjAlM0QlMjB0Zi5jb25zdGFudCgxKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",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>
<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 = TFElectraForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-emotion&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.06</span>`}}),{c(){T(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){w(d,u,f),b=!0},p:We,i(u){b||(M(d.$$.fragment,u),b=!0)},o(u){E(d.$$.fragment,u),b=!1},d(u){$(d,u)}}}function WJ(F){let d,b,u,f,_,i,h,x,be,fe,R,de,te,j,ve,X,ce,Ze,D,ae,re,L,le,Te,O,ke,ge,B,we,ie,ne,J,I,pe,H,_e,he,Q,Me,ye,U,Ee,Y,se,me,K,$e,ue,G,Fe,q,je,ee,W,xe,N,Ce,ze;return{c(){d=o("p"),b=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),i=c(),h=o("ul"),x=o("li"),be=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),R=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),j=o("p"),ve=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=o("code"),ce=r("model.fit()"),Ze=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),L=o("code"),le=r("fit()"),Te=r(" and "),O=o("code"),ke=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),B=o("code"),we=r("Functional"),ie=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),J=o("ul"),I=o("li"),pe=r("a single Tensor with "),H=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),Q=o("code"),Me=r("model(input_ids)"),ye=c(),U=o("li"),Ee=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),K=o("code"),$e=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),G=o("li"),Fe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=o("code"),je=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=o("p"),xe=r(`Note that when creating models and layers with
`),N=o("a"),Ce=r("subclassing"),ze=r(` 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(v){d=n(v,"P",{});var C=a(d);b=l(C,"TensorFlow models and layers in "),u=n(C,"CODE",{});var Xe=a(u);f=l(Xe,"transformers"),Xe.forEach(t),_=l(C," accept two formats as input:"),C.forEach(t),i=p(v),h=n(v,"UL",{});var oe=a(h);x=n(oe,"LI",{});var Je=a(x);be=l(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),fe=p(oe),R=n(oe,"LI",{});var Le=a(R);de=l(Le,"having all inputs as a list, tuple or dict in the first positional argument."),Le.forEach(t),oe.forEach(t),te=p(v),j=n(v,"P",{});var z=a(j);ve=l(z,`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=n(z,"CODE",{});var Oe=a(X);ce=l(Oe,"model.fit()"),Oe.forEach(t),Ze=l(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n(z,"CODE",{});var Qe=a(D);ae=l(Qe,"model.fit()"),Qe.forEach(t),re=l(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),L=n(z,"CODE",{});var Re=a(L);le=l(Re,"fit()"),Re.forEach(t),Te=l(z," and "),O=n(z,"CODE",{});var De=a(O);ke=l(De,"predict()"),De.forEach(t),ge=l(z,`, such as when creating your own layers or models with
the Keras `),B=n(z,"CODE",{});var Ye=a(B);we=l(Ye,"Functional"),Ye.forEach(t),ie=l(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=p(v),J=n(v,"UL",{});var A=a(J);I=n(A,"LI",{});var P=a(I);pe=l(P,"a single Tensor with "),H=n(P,"CODE",{});var Ge=a(H);_e=l(Ge,"input_ids"),Ge.forEach(t),he=l(P," only and nothing else: "),Q=n(P,"CODE",{});var Pe=a(Q);Me=l(Pe,"model(input_ids)"),Pe.forEach(t),P.forEach(t),ye=p(A),U=n(A,"LI",{});var S=a(U);Ee=l(S,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=n(S,"CODE",{});var He=a(Y);se=l(He,"model([input_ids, attention_mask])"),He.forEach(t),me=l(S," or "),K=n(S,"CODE",{});var Ve=a(K);$e=l(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),S.forEach(t),ue=p(A),G=n(A,"LI",{});var Ue=a(G);Fe=l(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=n(Ue,"CODE",{});var Se=a(q);je=l(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),Ue.forEach(t),A.forEach(t),ee=p(v),W=n(v,"P",{});var V=a(W);xe=l(V,`Note that when creating models and layers with
`),N=n(V,"A",{href:!0,rel:!0});var Be=a(N);Ce=l(Be,"subclassing"),Be.forEach(t),ze=l(V,` 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!`),V.forEach(t),this.h()},h(){m(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(N,"rel","nofollow")},m(v,C){g(v,d,C),e(d,b),e(d,u),e(u,f),e(d,_),g(v,i,C),g(v,h,C),e(h,x),e(x,be),e(h,fe),e(h,R),e(R,de),g(v,te,C),g(v,j,C),e(j,ve),e(j,X),e(X,ce),e(j,Ze),e(j,D),e(D,ae),e(j,re),e(j,L),e(L,le),e(j,Te),e(j,O),e(O,ke),e(j,ge),e(j,B),e(B,we),e(j,ie),g(v,ne,C),g(v,J,C),e(J,I),e(I,pe),e(I,H),e(H,_e),e(I,he),e(I,Q),e(Q,Me),e(J,ye),e(J,U),e(U,Ee),e(U,Y),e(Y,se),e(U,me),e(U,K),e(K,$e),e(J,ue),e(J,G),e(G,Fe),e(G,q),e(q,je),g(v,ee,C),g(v,W,C),e(W,xe),e(W,N),e(N,Ce),e(W,ze)},d(v){v&&t(d),v&&t(i),v&&t(h),v&&t(te),v&&t(j),v&&t(ne),v&&t(J),v&&t(ee),v&&t(W)}}}function NJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function ZJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkVsZWN0cmFGb3JNdWx0aXBsZUNob2ljZSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZFbGVjdHJhRm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtc21hbGwtZGlzY3JpbWluYXRvciUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQWlucHV0cyUyMCUzRCUyMCU3QmslM0ElMjB0Zi5leHBhbmRfZGltcyh2JTJDJTIwMCklMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwZW5jb2RpbmcuaXRlbXMoKSU3RCUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTIwJTIwJTIzJTIwYmF0Y2glMjBzaXplJTIwaXMlMjAxJTBBJTBBJTIzJTIwdGhlJTIwbGluZWFyJTIwY2xhc3NpZmllciUyMHN0aWxsJTIwbmVlZHMlMjB0byUyMGJlJTIwdHJhaW5lZCUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFElectraForMultipleChoice
<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;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = {k: tf.expand_dims(v, <span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)  <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>logits = outputs.logits`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function qJ(F){let d,b,u,f,_,i,h,x,be,fe,R,de,te,j,ve,X,ce,Ze,D,ae,re,L,le,Te,O,ke,ge,B,we,ie,ne,J,I,pe,H,_e,he,Q,Me,ye,U,Ee,Y,se,me,K,$e,ue,G,Fe,q,je,ee,W,xe,N,Ce,ze;return{c(){d=o("p"),b=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),i=c(),h=o("ul"),x=o("li"),be=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),R=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),j=o("p"),ve=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=o("code"),ce=r("model.fit()"),Ze=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),L=o("code"),le=r("fit()"),Te=r(" and "),O=o("code"),ke=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),B=o("code"),we=r("Functional"),ie=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),J=o("ul"),I=o("li"),pe=r("a single Tensor with "),H=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),Q=o("code"),Me=r("model(input_ids)"),ye=c(),U=o("li"),Ee=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),K=o("code"),$e=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),G=o("li"),Fe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=o("code"),je=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=o("p"),xe=r(`Note that when creating models and layers with
`),N=o("a"),Ce=r("subclassing"),ze=r(` 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(v){d=n(v,"P",{});var C=a(d);b=l(C,"TensorFlow models and layers in "),u=n(C,"CODE",{});var Xe=a(u);f=l(Xe,"transformers"),Xe.forEach(t),_=l(C," accept two formats as input:"),C.forEach(t),i=p(v),h=n(v,"UL",{});var oe=a(h);x=n(oe,"LI",{});var Je=a(x);be=l(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),fe=p(oe),R=n(oe,"LI",{});var Le=a(R);de=l(Le,"having all inputs as a list, tuple or dict in the first positional argument."),Le.forEach(t),oe.forEach(t),te=p(v),j=n(v,"P",{});var z=a(j);ve=l(z,`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=n(z,"CODE",{});var Oe=a(X);ce=l(Oe,"model.fit()"),Oe.forEach(t),Ze=l(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n(z,"CODE",{});var Qe=a(D);ae=l(Qe,"model.fit()"),Qe.forEach(t),re=l(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),L=n(z,"CODE",{});var Re=a(L);le=l(Re,"fit()"),Re.forEach(t),Te=l(z," and "),O=n(z,"CODE",{});var De=a(O);ke=l(De,"predict()"),De.forEach(t),ge=l(z,`, such as when creating your own layers or models with
the Keras `),B=n(z,"CODE",{});var Ye=a(B);we=l(Ye,"Functional"),Ye.forEach(t),ie=l(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=p(v),J=n(v,"UL",{});var A=a(J);I=n(A,"LI",{});var P=a(I);pe=l(P,"a single Tensor with "),H=n(P,"CODE",{});var Ge=a(H);_e=l(Ge,"input_ids"),Ge.forEach(t),he=l(P," only and nothing else: "),Q=n(P,"CODE",{});var Pe=a(Q);Me=l(Pe,"model(input_ids)"),Pe.forEach(t),P.forEach(t),ye=p(A),U=n(A,"LI",{});var S=a(U);Ee=l(S,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=n(S,"CODE",{});var He=a(Y);se=l(He,"model([input_ids, attention_mask])"),He.forEach(t),me=l(S," or "),K=n(S,"CODE",{});var Ve=a(K);$e=l(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),S.forEach(t),ue=p(A),G=n(A,"LI",{});var Ue=a(G);Fe=l(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=n(Ue,"CODE",{});var Se=a(q);je=l(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),Ue.forEach(t),A.forEach(t),ee=p(v),W=n(v,"P",{});var V=a(W);xe=l(V,`Note that when creating models and layers with
`),N=n(V,"A",{href:!0,rel:!0});var Be=a(N);Ce=l(Be,"subclassing"),Be.forEach(t),ze=l(V,` 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!`),V.forEach(t),this.h()},h(){m(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(N,"rel","nofollow")},m(v,C){g(v,d,C),e(d,b),e(d,u),e(u,f),e(d,_),g(v,i,C),g(v,h,C),e(h,x),e(x,be),e(h,fe),e(h,R),e(R,de),g(v,te,C),g(v,j,C),e(j,ve),e(j,X),e(X,ce),e(j,Ze),e(j,D),e(D,ae),e(j,re),e(j,L),e(L,le),e(j,Te),e(j,O),e(O,ke),e(j,ge),e(j,B),e(B,we),e(j,ie),g(v,ne,C),g(v,J,C),e(J,I),e(I,pe),e(I,H),e(H,_e),e(I,he),e(I,Q),e(Q,Me),e(J,ye),e(J,U),e(U,Ee),e(U,Y),e(Y,se),e(U,me),e(U,K),e(K,$e),e(J,ue),e(J,G),e(G,Fe),e(G,q),e(q,je),g(v,ee,C),g(v,W,C),e(W,xe),e(W,N),e(N,Ce),e(W,ze)},d(v){v&&t(d),v&&t(i),v&&t(h),v&&t(te),v&&t(j),v&&t(ne),v&&t(J),v&&t(ee),v&&t(W)}}}function AJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function GJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkVsZWN0cmFGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiaGFkcmVzaC1zYXZhbmklMkZlbGVjdHJhLWJhc2UtZGlzY3JpbWluYXRvci1maW5ldHVuZWQtY29ubGwwMy1lbmdsaXNoJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZFbGVjdHJhRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmhhZHJlc2gtc2F2YW5pJTJGZWxlY3RyYS1iYXNlLWRpc2NyaW1pbmF0b3ItZmluZXR1bmVkLWNvbmxsMDMtZW5nbGlzaCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUwQSklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdCU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVELm51bXB5KCkudG9saXN0KCklNUQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFElectraForTokenClassification
<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;bhadresh-savani/electra-base-discriminator-finetuned-conll03-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForTokenClassification.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-discriminator-finetuned-conll03-english&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()]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes
[<span class="hljs-string">&#x27;B-LOC&#x27;</span>, <span class="hljs-string">&#x27;B-ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;B-LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;B-LOC&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>]`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function RJ(F){let d,b;return d=new Ne({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKSUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.11</span>`}}),{c(){T(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){w(d,u,f),b=!0},p:We,i(u){b||(M(d.$$.fragment,u),b=!0)},o(u){E(d.$$.fragment,u),b=!1},d(u){$(d,u)}}}function PJ(F){let d,b,u,f,_,i,h,x,be,fe,R,de,te,j,ve,X,ce,Ze,D,ae,re,L,le,Te,O,ke,ge,B,we,ie,ne,J,I,pe,H,_e,he,Q,Me,ye,U,Ee,Y,se,me,K,$e,ue,G,Fe,q,je,ee,W,xe,N,Ce,ze;return{c(){d=o("p"),b=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),i=c(),h=o("ul"),x=o("li"),be=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),R=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),j=o("p"),ve=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=o("code"),ce=r("model.fit()"),Ze=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),L=o("code"),le=r("fit()"),Te=r(" and "),O=o("code"),ke=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),B=o("code"),we=r("Functional"),ie=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),J=o("ul"),I=o("li"),pe=r("a single Tensor with "),H=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),Q=o("code"),Me=r("model(input_ids)"),ye=c(),U=o("li"),Ee=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),K=o("code"),$e=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),G=o("li"),Fe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=o("code"),je=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=o("p"),xe=r(`Note that when creating models and layers with
`),N=o("a"),Ce=r("subclassing"),ze=r(` 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(v){d=n(v,"P",{});var C=a(d);b=l(C,"TensorFlow models and layers in "),u=n(C,"CODE",{});var Xe=a(u);f=l(Xe,"transformers"),Xe.forEach(t),_=l(C," accept two formats as input:"),C.forEach(t),i=p(v),h=n(v,"UL",{});var oe=a(h);x=n(oe,"LI",{});var Je=a(x);be=l(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),fe=p(oe),R=n(oe,"LI",{});var Le=a(R);de=l(Le,"having all inputs as a list, tuple or dict in the first positional argument."),Le.forEach(t),oe.forEach(t),te=p(v),j=n(v,"P",{});var z=a(j);ve=l(z,`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=n(z,"CODE",{});var Oe=a(X);ce=l(Oe,"model.fit()"),Oe.forEach(t),Ze=l(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),D=n(z,"CODE",{});var Qe=a(D);ae=l(Qe,"model.fit()"),Qe.forEach(t),re=l(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),L=n(z,"CODE",{});var Re=a(L);le=l(Re,"fit()"),Re.forEach(t),Te=l(z," and "),O=n(z,"CODE",{});var De=a(O);ke=l(De,"predict()"),De.forEach(t),ge=l(z,`, such as when creating your own layers or models with
the Keras `),B=n(z,"CODE",{});var Ye=a(B);we=l(Ye,"Functional"),Ye.forEach(t),ie=l(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=p(v),J=n(v,"UL",{});var A=a(J);I=n(A,"LI",{});var P=a(I);pe=l(P,"a single Tensor with "),H=n(P,"CODE",{});var Ge=a(H);_e=l(Ge,"input_ids"),Ge.forEach(t),he=l(P," only and nothing else: "),Q=n(P,"CODE",{});var Pe=a(Q);Me=l(Pe,"model(input_ids)"),Pe.forEach(t),P.forEach(t),ye=p(A),U=n(A,"LI",{});var S=a(U);Ee=l(S,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Y=n(S,"CODE",{});var He=a(Y);se=l(He,"model([input_ids, attention_mask])"),He.forEach(t),me=l(S," or "),K=n(S,"CODE",{});var Ve=a(K);$e=l(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),S.forEach(t),ue=p(A),G=n(A,"LI",{});var Ue=a(G);Fe=l(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=n(Ue,"CODE",{});var Se=a(q);je=l(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),Ue.forEach(t),A.forEach(t),ee=p(v),W=n(v,"P",{});var V=a(W);xe=l(V,`Note that when creating models and layers with
`),N=n(V,"A",{href:!0,rel:!0});var Be=a(N);Ce=l(Be,"subclassing"),Be.forEach(t),ze=l(V,` 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!`),V.forEach(t),this.h()},h(){m(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(N,"rel","nofollow")},m(v,C){g(v,d,C),e(d,b),e(d,u),e(u,f),e(d,_),g(v,i,C),g(v,h,C),e(h,x),e(x,be),e(h,fe),e(h,R),e(R,de),g(v,te,C),g(v,j,C),e(j,ve),e(j,X),e(X,ce),e(j,Ze),e(j,D),e(D,ae),e(j,re),e(j,L),e(L,le),e(j,Te),e(j,O),e(O,ke),e(j,ge),e(j,B),e(B,we),e(j,ie),g(v,ne,C),g(v,J,C),e(J,I),e(I,pe),e(I,H),e(H,_e),e(I,he),e(I,Q),e(Q,Me),e(J,ye),e(J,U),e(U,Ee),e(U,Y),e(Y,se),e(U,me),e(U,K),e(K,$e),e(J,ue),e(J,G),e(G,Fe),e(G,q),e(q,je),g(v,ee,C),g(v,W,C),e(W,xe),e(W,N),e(N,Ce),e(W,ze)},d(v){v&&t(d),v&&t(i),v&&t(h),v&&t(te),v&&t(j),v&&t(ne),v&&t(J),v&&t(ee),v&&t(W)}}}function VJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function BJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkVsZWN0cmFGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmhhZHJlc2gtc2F2YW5pJTJGZWxlY3RyYS1iYXNlLXNxdWFkMiUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRWxlY3RyYUZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJiaGFkcmVzaC1zYXZhbmklMkZlbGVjdHJhLWJhc2Utc3F1YWQyJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLnN0YXJ0X2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgob3V0cHV0cy5lbmRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQXRva2VuaXplci5kZWNvZGUocHJlZGljdF9hbnN3ZXJfdG9rZW5zKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFElectraForQuestionAnswering
<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;bhadresh-savani/electra-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;bhadresh-savani/electra-base-squad2&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>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens)
<span class="hljs-string">&#x27;a nice puppet&#x27;</span>`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function SJ(F){let d,b;return d=new Ne({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTElNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjEyJTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyklMEFyb3VuZChmbG9hdChsb3NzKSUyQyUyMDIp",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">11</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">12</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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">2.64</span>`}}),{c(){T(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){w(d,u,f),b=!0},p:We,i(u){b||(M(d.$$.fragment,u),b=!0)},o(u){E(d.$$.fragment,u),b=!1},d(u){$(d,u)}}}function XJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function LJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4RWxlY3RyYU1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheEVsZWN0cmFNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxElectraModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxElectraModel.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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;jax&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=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function OJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function QJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4RWxlY3RyYUZvclByZVRyYWluaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheEVsZWN0cmFGb3JQcmVUcmFpbmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBcHJlZGljdGlvbl9sb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxElectraForPreTraining

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxElectraForPreTraining.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.logits`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function DJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function YJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4RWxlY3RyYUZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheEVsZWN0cmFGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBsb2d0cyUyMGZvciUyMG5leHQlMjB0b2tlbiUwQW5leHRfdG9rZW5fbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlNUIlM0ElMkMlMjAtMSU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxElectraForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxElectraForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function HJ(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function KJ(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4RWxlY3RyYUZvck1hc2tlZExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheEVsZWN0cmFGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMCU1Qk1BU0slNUQuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxElectraForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxElectraForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function eU(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function tU(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4RWxlY3RyYUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZlbGVjdHJhLXNtYWxsLWRpc2NyaW1pbmF0b3IlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4RWxlY3RyYUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtc21hbGwtZGlzY3JpbWluYXRvciUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxElectraForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxElectraForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function oU(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function nU(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4RWxlY3RyYUZvck11bHRpcGxlQ2hvaWNlJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheEVsZWN0cmFGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKiU3QmslM0ElMjB2JTVCTm9uZSUyQyUyMCUzQSU1RCUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxElectraForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxElectraForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;jax&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v[<span class="hljs-literal">None</span>, :] <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()})

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function sU(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function aU(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4RWxlY3RyYUZvclRva2VuQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZlbGVjdHJhLXNtYWxsLWRpc2NyaW1pbmF0b3IlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4RWxlY3RyYUZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmVsZWN0cmEtc21hbGwtZGlzY3JpbWluYXRvciUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxElectraForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxElectraForTokenClassification.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function rU(F){let d,b,u,f,_;return{c(){d=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
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(i){d=n(i,"P",{});var h=a(d);b=l(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var x=a(u);f=l(x,"Module"),x.forEach(t),_=l(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(i,h){g(i,d,h),e(d,b),e(d,u),e(u,f),e(d,_)},d(i){i&&t(d)}}}function lU(F){let d,b,u,f,_;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4RWxlY3RyYUZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheEVsZWN0cmFGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZWxlY3RyYS1zbWFsbC1kaXNjcmltaW5hdG9yJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFzdGFydF9zY29yZXMlMjAlM0QlMjBvdXRwdXRzLnN0YXJ0X2xvZ2l0cyUwQWVuZF9zY29yZXMlMjAlM0QlMjBvdXRwdXRzLmVuZF9sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxElectraForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxElectraForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=o("p"),b=r("Example:"),u=c(),T(f.$$.fragment)},l(i){d=n(i,"P",{});var h=a(d);b=l(h,"Example:"),h.forEach(t),u=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,b),g(i,u,h),w(f,i,h),_=!0},p:We,i(i){_||(M(f.$$.fragment,i),_=!0)},o(i){E(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function iU(F){let d,b,u,f,_,i,h,x,be,fe,R,de,te,j,ve,X,ce,Ze,D,ae,re,L,le,Te,O,ke,ge,B,we,ie,ne,J,I,pe,H,_e,he,Q,Me,ye,U,Ee,Y,se,me,K,$e,ue,G,Fe,q,je,ee,W,xe,N,Ce,ze,v,C,Xe,oe,Je,Le,z,Oe,Qe,Re,De,Ye,A,P,Ge,Pe,S,He,Ve,Ue,Se,V,Be,Ld,fy,gy,Ep,Od,_y,yy,$p,Qd,by,vy,Fp,Dd,Ty,ky,jp,Yd,wy,My,xp,Hd,Ey,Nf,Po,Dn,Cp,rr,$y,zp,Fy,Zf,Pt,lr,jy,_o,xy,Kd,Cy,zy,ec,Jy,Uy,ir,Iy,Wy,Ny,Vo,Zy,tc,qy,Ay,oc,Gy,Ry,Py,Yn,qf,Bo,Hn,Jp,dr,Vy,Up,By,Af,tt,cr,Sy,Ip,Xy,Ly,pr,Oy,nc,Qy,Dy,Yy,xo,hr,Hy,Wp,Ky,eb,mr,sc,tb,Np,ob,nb,ac,sb,Zp,ab,rb,Kn,ur,lb,qp,ib,db,Vt,fr,cb,Ap,pb,hb,es,mb,So,ub,Gp,fb,gb,Rp,_b,yb,bb,ts,gr,vb,_r,Tb,Pp,kb,wb,Gf,Xo,os,Vp,yr,Mb,Bp,Eb,Rf,Tt,br,$b,vr,Fb,Sp,jb,xb,Cb,Tr,zb,rc,Jb,Ub,Ib,Co,kr,Wb,Xp,Nb,Zb,wr,lc,qb,Lp,Ab,Gb,ic,Rb,Op,Pb,Vb,Bt,Mr,Bb,Qp,Sb,Xb,ns,Lb,Lo,Ob,Dp,Qb,Db,Yp,Yb,Hb,Pf,Oo,ss,Hp,Er,Kb,Kp,ev,Vf,Qo,$r,tv,Fr,ov,dc,nv,sv,Bf,Do,jr,av,xr,rv,cc,lv,iv,Sf,Yo,as,eh,Cr,dv,th,cv,Xf,kt,zr,pv,oh,hv,mv,Jr,uv,pc,fv,gv,_v,Ur,yv,Ir,bv,vv,Tv,St,Wr,kv,Ho,wv,hc,Mv,Ev,nh,$v,Fv,jv,rs,xv,ls,Lf,Ko,is,sh,Nr,Cv,ah,zv,Of,pt,Zr,Jv,rh,Uv,Iv,lh,Wv,Nv,qr,Zv,mc,qv,Av,Gv,Ar,Rv,Gr,Pv,Vv,Bv,Xt,Rr,Sv,en,Xv,uc,Lv,Ov,ih,Qv,Dv,Yv,ds,Hv,cs,Qf,tn,ps,dh,Pr,Kv,ch,eT,Df,wt,Vr,tT,Br,oT,ph,nT,sT,aT,Sr,rT,fc,lT,iT,dT,Xr,cT,Lr,pT,hT,mT,Lt,Or,uT,on,fT,gc,gT,_T,hh,yT,bT,vT,hs,TT,ms,Yf,nn,us,mh,Qr,kT,uh,wT,Hf,ht,Dr,MT,fh,ET,$T,gh,FT,jT,Yr,xT,_c,CT,zT,JT,Hr,UT,Kr,IT,WT,NT,Ot,el,ZT,sn,qT,yc,AT,GT,_h,RT,PT,VT,fs,BT,gs,Kf,an,_s,yh,tl,ST,bh,XT,eg,Mt,ol,LT,vh,OT,QT,nl,DT,bc,YT,HT,KT,sl,ek,al,tk,ok,nk,jt,rl,sk,rn,ak,vc,rk,lk,Th,ik,dk,ck,ys,pk,bs,hk,vs,tg,ln,Ts,kh,ll,mk,wh,uk,og,Et,il,fk,Mh,gk,_k,dl,yk,Tc,bk,vk,Tk,cl,kk,pl,wk,Mk,Ek,Qt,hl,$k,dn,Fk,kc,jk,xk,Eh,Ck,zk,Jk,ks,Uk,ws,ng,cn,Ms,$h,ml,Ik,Fh,Wk,sg,mt,ul,Nk,jh,Zk,qk,xh,Ak,Gk,fl,Rk,wc,Pk,Vk,Bk,gl,Sk,_l,Xk,Lk,Ok,Dt,yl,Qk,pn,Dk,Mc,Yk,Hk,Ch,Kk,ew,tw,Es,ow,$s,ag,hn,Fs,zh,bl,nw,Jh,sw,rg,$t,vl,aw,mn,rw,Uh,lw,iw,Ih,dw,cw,pw,Tl,hw,Ec,mw,uw,fw,kl,gw,wl,_w,yw,bw,Yt,Ml,vw,un,Tw,$c,kw,ww,Wh,Mw,Ew,$w,js,Fw,xs,lg,fn,Cs,Nh,El,jw,Zh,xw,ig,ut,$l,Cw,qh,zw,Jw,Fl,Uw,Fc,Iw,Ww,Nw,jl,Zw,xl,qw,Aw,Gw,zs,Rw,Ht,Cl,Pw,gn,Vw,jc,Bw,Sw,Ah,Xw,Lw,Ow,Js,Qw,Us,dg,_n,Is,Gh,zl,Dw,Rh,Yw,cg,ot,Jl,Hw,Ph,Kw,e1,Vh,t1,o1,Ul,n1,xc,s1,a1,r1,Il,l1,Wl,i1,d1,c1,Ws,p1,Kt,Nl,h1,yn,m1,Cc,u1,f1,Bh,g1,_1,y1,Ns,b1,Zs,pg,bn,qs,Sh,Zl,v1,Xh,T1,hg,nt,ql,k1,Lh,w1,M1,Oh,E1,$1,Al,F1,zc,j1,x1,C1,Gl,z1,Rl,J1,U1,I1,As,W1,xt,Pl,N1,vn,Z1,Jc,q1,A1,Qh,G1,R1,P1,Gs,V1,Rs,B1,Ps,mg,Tn,Vs,Dh,Vl,S1,Yh,X1,ug,ft,Bl,L1,Hh,O1,Q1,Sl,D1,Uc,Y1,H1,K1,Xl,eM,Ll,tM,oM,nM,Bs,sM,Ct,Ol,aM,kn,rM,Ic,lM,iM,Kh,dM,cM,pM,Ss,hM,Xs,mM,Ls,fg,wn,Os,em,Ql,uM,tm,fM,gg,gt,Dl,gM,om,_M,yM,Yl,bM,Wc,vM,TM,kM,Hl,wM,Kl,MM,EM,$M,Qs,FM,eo,ei,jM,Mn,xM,Nc,CM,zM,nm,JM,UM,IM,Ds,WM,Ys,_g,En,Hs,sm,ti,NM,am,ZM,yg,st,oi,qM,rm,AM,GM,lm,RM,PM,ni,VM,Zc,BM,SM,XM,si,LM,ai,OM,QM,DM,Ks,YM,zt,ri,HM,$n,KM,qc,eE,tE,im,oE,nE,sE,ea,aE,ta,rE,oa,bg,Fn,na,dm,li,lE,cm,iE,vg,_t,ii,dE,jn,cE,pm,pE,hE,hm,mE,uE,fE,di,gE,Ac,_E,yE,bE,ci,vE,pi,TE,kE,wE,sa,ME,Jt,hi,EE,xn,$E,Gc,FE,jE,mm,xE,CE,zE,aa,JE,ra,UE,la,Tg,Cn,ia,um,mi,IE,fm,WE,kg,at,ui,NE,gm,ZE,qE,fi,AE,Rc,GE,RE,PE,gi,VE,_i,BE,SE,XE,_m,LE,OE,yo,ym,yi,QE,DE,bm,bi,YE,HE,vm,vi,KE,e2,Tm,Ti,t2,o2,to,ki,n2,zn,s2,km,a2,r2,wm,l2,i2,d2,da,c2,ca,wg,Jn,pa,Mm,wi,p2,Em,h2,Mg,Ke,Mi,m2,$m,u2,f2,Fm,g2,_2,Ei,y2,Pc,b2,v2,T2,$i,k2,Fi,w2,M2,E2,jm,$2,F2,bo,xm,ji,j2,x2,Cm,xi,C2,z2,zm,Ci,J2,U2,Jm,zi,I2,W2,oo,Ji,N2,Un,Z2,Um,q2,A2,Im,G2,R2,P2,ha,V2,ma,Eg,In,ua,Wm,Ui,B2,Nm,S2,$g,rt,Ii,X2,Zm,L2,O2,Wi,Q2,Vc,D2,Y2,H2,Ni,K2,Zi,e0,t0,o0,qm,n0,s0,vo,Am,qi,a0,r0,Gm,Ai,l0,i0,Rm,Gi,d0,c0,Pm,Ri,p0,h0,no,Pi,m0,Wn,u0,Vm,f0,g0,Bm,_0,y0,b0,fa,v0,ga,Fg,Nn,_a,Sm,Vi,T0,Xm,k0,jg,lt,Bi,w0,Si,M0,Lm,E0,$0,F0,Xi,j0,Bc,x0,C0,z0,Li,J0,Oi,U0,I0,W0,Om,N0,Z0,To,Qm,Qi,q0,A0,Dm,Di,G0,R0,Ym,Yi,P0,V0,Hm,Hi,B0,S0,so,Ki,X0,Zn,L0,Km,O0,Q0,eu,D0,Y0,H0,ya,K0,ba,xg,qn,va,tu,ed,e$,ou,t$,Cg,it,td,o$,nu,n$,s$,od,a$,Sc,r$,l$,i$,nd,d$,sd,c$,p$,h$,su,m$,u$,ko,au,ad,f$,g$,ru,rd,_$,y$,lu,ld,b$,v$,iu,id,T$,k$,ao,dd,w$,An,M$,du,E$,$$,cu,F$,j$,x$,Ta,C$,ka,zg,Gn,wa,pu,cd,z$,hu,J$,Jg,dt,pd,U$,mu,I$,W$,hd,N$,Xc,Z$,q$,A$,md,G$,ud,R$,P$,V$,uu,B$,S$,wo,fu,fd,X$,L$,gu,gd,O$,Q$,_u,_d,D$,Y$,yu,yd,H$,K$,ro,bd,eF,Rn,tF,bu,oF,nF,vu,sF,aF,rF,Ma,lF,Ea,Ug,Pn,$a,Tu,vd,iF,ku,dF,Ig,et,Td,cF,wu,pF,hF,Mu,mF,uF,kd,fF,Lc,gF,_F,yF,wd,bF,Md,vF,TF,kF,Eu,wF,MF,Mo,$u,Ed,EF,$F,Fu,$d,FF,jF,ju,Fd,xF,CF,xu,jd,zF,JF,lo,xd,UF,Vn,IF,Cu,WF,NF,zu,ZF,qF,AF,Fa,GF,ja,Wg,Bn,xa,Ju,Cd,RF,Uu,PF,Ng,ct,zd,VF,Sn,BF,Iu,SF,XF,Wu,LF,OF,QF,Jd,DF,Oc,YF,HF,KF,Ud,ej,Id,tj,oj,nj,Nu,sj,aj,Eo,Zu,Wd,rj,lj,qu,Nd,ij,dj,Au,Zd,cj,pj,Gu,qd,hj,mj,io,Ad,uj,Xn,fj,Ru,gj,_j,Pu,yj,bj,vj,Ca,Tj,za,Zg;return i=new Ae({}),le=new Ae({}),S=new Ae({}),rr=new Ae({}),lr=new Z({props:{name:"class transformers.ElectraConfig",anchor:"transformers.ElectraConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"embedding_size",val:" = 128"},{name:"hidden_size",val:" = 256"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 4"},{name:"intermediate_size",val:" = 1024"},{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:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"summary_type",val:" = 'first'"},{name:"summary_use_proj",val:" = True"},{name:"summary_activation",val:" = 'gelu'"},{name:"summary_last_dropout",val:" = 0.1"},{name:"pad_token_id",val:" = 0"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ElectraConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the ELECTRA 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.31.0/en/model_doc/electra#transformers.ElectraModel">ElectraModel</a> or <a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraModel">TFElectraModel</a>.`,name:"vocab_size"},{anchor:"transformers.ElectraConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"embedding_size"},{anchor:"transformers.ElectraConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.ElectraConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.ElectraConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.ElectraConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.ElectraConfig.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> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.ElectraConfig.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.ElectraConfig.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.ElectraConfig.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.ElectraConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraModel">ElectraModel</a> or <a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraModel">TFElectraModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.ElectraConfig.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.ElectraConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ElectraConfig.summary_type",description:`<strong>summary_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;first&quot;</code>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Has to be one of the following options:</p>
<ul>
<li><code>&quot;last&quot;</code>: Take the last token hidden state (like XLNet).</li>
<li><code>&quot;first&quot;</code>: Take the first token hidden state (like BERT).</li>
<li><code>&quot;mean&quot;</code>: Take the mean of all tokens hidden states.</li>
<li><code>&quot;cls_index&quot;</code>: Supply a Tensor of classification token position (like GPT/GPT-2).</li>
<li><code>&quot;attn&quot;</code>: Not implemented now, use multi-head attention.</li>
</ul>`,name:"summary_type"},{anchor:"transformers.ElectraConfig.summary_use_proj",description:`<strong>summary_use_proj</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Whether or not to add a projection after the vector extraction.`,name:"summary_use_proj"},{anchor:"transformers.ElectraConfig.summary_activation",description:`<strong>summary_activation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Pass <code>&quot;gelu&quot;</code> for a gelu activation to the output, any other value will result in no activation.`,name:"summary_activation"},{anchor:"transformers.ElectraConfig.summary_last_dropout",description:`<strong>summary_last_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>The dropout ratio to be used after the projection and activation.`,name:"summary_last_dropout"},{anchor:"transformers.ElectraConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.ElectraConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.ElectraConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/configuration_electra.py#L44"}}),Yn=new Ie({props:{anchor:"transformers.ElectraConfig.example",$$slots:{default:[tJ]},$$scope:{ctx:F}}}),dr=new Ae({}),cr=new Z({props:{name:"class transformers.ElectraTokenizer",anchor:"transformers.ElectraTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{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:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ElectraTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.ElectraTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.ElectraTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.ElectraTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.ElectraTokenizer.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.ElectraTokenizer.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.ElectraTokenizer.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.ElectraTokenizer.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.ElectraTokenizer.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.ElectraTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.ElectraTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original Electra).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/tokenization_electra.py#L93"}}),hr=new Z({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.ElectraTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.ElectraTokenizer.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.ElectraTokenizer.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.31.0/src/transformers/models/electra/tokenization_electra.py#L223",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>
`}}),ur=new Z({props:{name:"convert_tokens_to_string",anchor:"transformers.ElectraTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/tokenization_electra.py#L218"}}),fr=new Z({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.ElectraTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.ElectraTokenizer.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.ElectraTokenizer.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.31.0/src/transformers/models/electra/tokenization_electra.py#L276",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>
`}}),es=new Ie({props:{anchor:"transformers.ElectraTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[oJ]},$$scope:{ctx:F}}}),gr=new Z({props:{name:"get_special_tokens_mask",anchor:"transformers.ElectraTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.ElectraTokenizer.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.ElectraTokenizer.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.ElectraTokenizer.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.31.0/src/transformers/models/electra/tokenization_electra.py#L248",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>
`}}),yr=new Ae({}),br=new Z({props:{name:"class transformers.ElectraTokenizerFast",anchor:"transformers.ElectraTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{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:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ElectraTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.ElectraTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.ElectraTokenizerFast.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.ElectraTokenizerFast.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.ElectraTokenizerFast.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.ElectraTokenizerFast.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.ElectraTokenizerFast.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.ElectraTokenizerFast.clean_text",description:`<strong>clean_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the text before tokenization by removing any control characters and replacing all
whitespaces by the classic one.`,name:"clean_text"},{anchor:"transformers.ElectraTokenizerFast.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see <a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">this
issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.ElectraTokenizerFast.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original ELECTRA).`,name:"strip_accents"},{anchor:"transformers.ElectraTokenizerFast.wordpieces_prefix",description:`<strong>wordpieces_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;##&quot;</code>) &#x2014;
The prefix for subwords.`,name:"wordpieces_prefix"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/tokenization_electra_fast.py#L88"}}),kr=new Z({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.ElectraTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.ElectraTokenizerFast.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.ElectraTokenizerFast.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.31.0/src/transformers/models/electra/tokenization_electra_fast.py#L176",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>
`}}),Mr=new Z({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.ElectraTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.ElectraTokenizerFast.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.ElectraTokenizerFast.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.31.0/src/transformers/models/electra/tokenization_electra_fast.py#L200",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>
`}}),ns=new Ie({props:{anchor:"transformers.ElectraTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[nJ]},$$scope:{ctx:F}}}),Er=new Ae({}),$r=new Z({props:{name:"class transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput",anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss of the ELECTRA objective.`,name:"loss"},{anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput.logits",description:`<strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Prediction scores of the head (scores for each token before SoftMax).`,name:"logits"},{anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput.hidden_states",description:`<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>) &#x2014;
Tuple of <code>torch.FloatTensor</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.`,name:"hidden_states"},{anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/modeling_electra.py#L701"}}),jr=new Z({props:{name:"class transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput",anchor:"transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput",parameters:[{name:"logits",val:": tf.Tensor = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = None"}],parametersDescription:[{anchor:"transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>tf.Tensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss of the ELECTRA objective.`,name:"loss"},{anchor:"transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput.logits",description:`<strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Prediction scores of the head (scores for each token before SoftMax).`,name:"logits"},{anchor:"transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput.hidden_states",description:`<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>) &#x2014;
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.`,name:"hidden_states"},{anchor:"transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/modeling_tf_electra.py#L786"}}),Cr=new Ae({}),zr=new Z({props:{name:"class transformers.ElectraModel",anchor:"transformers.ElectraModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_electra.py#L813"}}),Wr=new Z({props:{name:"forward",anchor:"transformers.ElectraModel.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:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = 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.ElectraModel.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.ElectraModel.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.ElectraModel.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.ElectraModel.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.ElectraModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ElectraModel.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.ElectraModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraModel.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraModel.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.ElectraModel.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.ElectraModel.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.31.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.31.0/src/transformers/models/electra/modeling_electra.py#L840",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),rs=new qe({props:{$$slots:{default:[sJ]},$$scope:{ctx:F}}}),ls=new Ie({props:{anchor:"transformers.ElectraModel.forward.example",$$slots:{default:[aJ]},$$scope:{ctx:F}}}),Nr=new Ae({}),Zr=new Z({props:{name:"class transformers.ElectraForPreTraining",anchor:"transformers.ElectraForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_electra.py#L1062"}}),Rr=new Z({props:{name:"forward",anchor:"transformers.ElectraForPreTraining.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:"head_mask",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.ElectraForPreTraining.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.ElectraForPreTraining.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.ElectraForPreTraining.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.ElectraForPreTraining.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.ElectraForPreTraining.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ElectraForPreTraining.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.ElectraForPreTraining.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraForPreTraining.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraForPreTraining.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.ElectraForPreTraining.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.ElectraForPreTraining.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForPreTraining.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 ELECTRA loss. Input should be a sequence of tokens (see <code>input_ids</code> docstring)
Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates the token is an original token,</li>
<li>1 indicates the token was replaced.</li>
</ul>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/modeling_electra.py#L1071",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"
>transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss of the ELECTRA objective.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Prediction scores of the head (scores for each 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 + 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(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.31.0/en/model_doc/electra#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"
>transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ds=new qe({props:{$$slots:{default:[rJ]},$$scope:{ctx:F}}}),cs=new Ie({props:{anchor:"transformers.ElectraForPreTraining.forward.example",$$slots:{default:[lJ]},$$scope:{ctx:F}}}),Pr=new Ae({}),Vr=new Z({props:{name:"class transformers.ElectraForCausalLM",anchor:"transformers.ElectraForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_electra.py#L1535"}}),Or=new Z({props:{name:"forward",anchor:"transformers.ElectraForCausalLM.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:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = 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.ElectraForCausalLM.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.ElectraForCausalLM.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.ElectraForCausalLM.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.ElectraForCausalLM.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.ElectraForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ElectraForCausalLM.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.ElectraForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraForCausalLM.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.ElectraForCausalLM.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.ElectraForCausalLM.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraForCausalLM.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 left-to-right language modeling loss (next word prediction). 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"},{anchor:"transformers.ElectraForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.ElectraForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/modeling_electra.py#L1556",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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 Language modeling loss (for next-token prediction).</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>
<li>
<p><strong>cross_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>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),hs=new qe({props:{$$slots:{default:[iJ]},$$scope:{ctx:F}}}),ms=new Ie({props:{anchor:"transformers.ElectraForCausalLM.forward.example",$$slots:{default:[dJ]},$$scope:{ctx:F}}}),Qr=new Ae({}),Dr=new Z({props:{name:"class transformers.ElectraForMaskedLM",anchor:"transformers.ElectraForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_electra.py#L1168"}}),el=new Z({props:{name:"forward",anchor:"transformers.ElectraForMaskedLM.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:"head_mask",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.ElectraForMaskedLM.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.ElectraForMaskedLM.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.ElectraForMaskedLM.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.ElectraForMaskedLM.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.ElectraForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ElectraForMaskedLM.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.ElectraForMaskedLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraForMaskedLM.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraForMaskedLM.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.ElectraForMaskedLM.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.ElectraForMaskedLM.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForMaskedLM.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.31.0/src/transformers/models/electra/modeling_electra.py#L1187",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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.31.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fs=new qe({props:{$$slots:{default:[cJ]},$$scope:{ctx:F}}}),gs=new Ie({props:{anchor:"transformers.ElectraForMaskedLM.forward.example",$$slots:{default:[pJ]},$$scope:{ctx:F}}}),tl=new Ae({}),ol=new Z({props:{name:"class transformers.ElectraForSequenceClassification",anchor:"transformers.ElectraForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_electra.py#L964"}}),rl=new Z({props:{name:"forward",anchor:"transformers.ElectraForSequenceClassification.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:"head_mask",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.ElectraForSequenceClassification.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.ElectraForSequenceClassification.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.ElectraForSequenceClassification.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.ElectraForSequenceClassification.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.ElectraForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ElectraForSequenceClassification.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.ElectraForSequenceClassification.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraForSequenceClassification.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraForSequenceClassification.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.ElectraForSequenceClassification.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.ElectraForSequenceClassification.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForSequenceClassification.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.31.0/src/transformers/models/electra/modeling_electra.py#L975",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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.31.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ys=new qe({props:{$$slots:{default:[hJ]},$$scope:{ctx:F}}}),bs=new Ie({props:{anchor:"transformers.ElectraForSequenceClassification.forward.example",$$slots:{default:[mJ]},$$scope:{ctx:F}}}),vs=new Ie({props:{anchor:"transformers.ElectraForSequenceClassification.forward.example-2",$$slots:{default:[uJ]},$$scope:{ctx:F}}}),ll=new Ae({}),il=new Z({props:{name:"class transformers.ElectraForMultipleChoice",anchor:"transformers.ElectraForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_electra.py#L1448"}}),hl=new Z({props:{name:"forward",anchor:"transformers.ElectraForMultipleChoice.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:"head_mask",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.ElectraForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.ElectraForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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.ElectraForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, 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.ElectraForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, 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.ElectraForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ElectraForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.ElectraForMultipleChoice.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraForMultipleChoice.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraForMultipleChoice.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.ElectraForMultipleChoice.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.ElectraForMultipleChoice.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForMultipleChoice.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.31.0/src/transformers/models/electra/modeling_electra.py#L1459",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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.31.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ks=new qe({props:{$$slots:{default:[fJ]},$$scope:{ctx:F}}}),ws=new Ie({props:{anchor:"transformers.ElectraForMultipleChoice.forward.example",$$slots:{default:[gJ]},$$scope:{ctx:F}}}),ml=new Ae({}),ul=new Z({props:{name:"class transformers.ElectraForTokenClassification",anchor:"transformers.ElectraForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_electra.py#L1259"}}),yl=new Z({props:{name:"forward",anchor:"transformers.ElectraForTokenClassification.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:"head_mask",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.ElectraForTokenClassification.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.ElectraForTokenClassification.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.ElectraForTokenClassification.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.ElectraForTokenClassification.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.ElectraForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ElectraForTokenClassification.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.ElectraForTokenClassification.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraForTokenClassification.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraForTokenClassification.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.ElectraForTokenClassification.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.ElectraForTokenClassification.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForTokenClassification.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.31.0/src/transformers/models/electra/modeling_electra.py#L1273",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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.31.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Es=new qe({props:{$$slots:{default:[_J]},$$scope:{ctx:F}}}),$s=new Ie({props:{anchor:"transformers.ElectraForTokenClassification.forward.example",$$slots:{default:[yJ]},$$scope:{ctx:F}}}),bl=new Ae({}),vl=new Z({props:{name:"class transformers.ElectraForQuestionAnswering",anchor:"transformers.ElectraForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_electra.py#L1340"}}),Ml=new Z({props:{name:"forward",anchor:"transformers.ElectraForQuestionAnswering.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:"head_mask",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.ElectraForQuestionAnswering.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.ElectraForQuestionAnswering.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.ElectraForQuestionAnswering.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.ElectraForQuestionAnswering.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.ElectraForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ElectraForQuestionAnswering.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.ElectraForQuestionAnswering.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraForQuestionAnswering.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraForQuestionAnswering.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.ElectraForQuestionAnswering.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.ElectraForQuestionAnswering.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForQuestionAnswering.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.ElectraForQuestionAnswering.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.31.0/src/transformers/models/electra/modeling_electra.py#L1354",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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.31.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),js=new qe({props:{$$slots:{default:[bJ]},$$scope:{ctx:F}}}),xs=new Ie({props:{anchor:"transformers.ElectraForQuestionAnswering.forward.example",$$slots:{default:[vJ]},$$scope:{ctx:F}}}),El=new Ae({}),$l=new Z({props:{name:"class transformers.TFElectraModel",anchor:"transformers.TFElectraModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L911"}}),zs=new qe({props:{$$slots:{default:[TJ]},$$scope:{ctx:F}}}),Cl=new Z({props:{name:"call",anchor:"transformers.TFElectraModel.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:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = 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.TFElectraModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFElectraModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFElectraModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraModel.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraModel.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraModel.call.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFElectraModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.TFElectraModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFElectraModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/modeling_tf_electra.py#L917",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</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>
<li>
<p><strong>cross_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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Js=new qe({props:{$$slots:{default:[kJ]},$$scope:{ctx:F}}}),Us=new Ie({props:{anchor:"transformers.TFElectraModel.call.example",$$slots:{default:[wJ]},$$scope:{ctx:F}}}),zl=new Ae({}),Jl=new Z({props:{name:"class transformers.TFElectraForPreTraining",anchor:"transformers.TFElectraForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L990"}}),Ws=new qe({props:{$$slots:{default:[MJ]},$$scope:{ctx:F}}}),Nl=new Z({props:{name:"call",anchor:"transformers.TFElectraForPreTraining.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:"head_mask",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.TFElectraForPreTraining.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForPreTraining.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFElectraForPreTraining.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFElectraForPreTraining.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForPreTraining.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForPreTraining.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForPreTraining.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForPreTraining.call.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForPreTraining.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/electra/modeling_tf_electra.py#L997",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput"
>transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>tf.Tensor</code> of shape <code>(1,)</code>) \u2014 Total loss of the ELECTRA objective.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Prediction scores of the head (scores for each 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.31.0/en/model_doc/electra#transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput"
>transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ns=new qe({props:{$$slots:{default:[EJ]},$$scope:{ctx:F}}}),Zs=new Ie({props:{anchor:"transformers.TFElectraForPreTraining.call.example",$$slots:{default:[$J]},$$scope:{ctx:F}}}),Zl=new Ae({}),ql=new Z({props:{name:"class transformers.TFElectraForMaskedLM",anchor:"transformers.TFElectraForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1099"}}),As=new qe({props:{$$slots:{default:[FJ]},$$scope:{ctx:F}}}),Pl=new Z({props:{name:"call",anchor:"transformers.TFElectraForMaskedLM.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:"head_mask",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.TFElectraForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFElectraForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFElectraForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForMaskedLM.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForMaskedLM.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForMaskedLM.call.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1121",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Gs=new qe({props:{$$slots:{default:[jJ]},$$scope:{ctx:F}}}),Rs=new Ie({props:{anchor:"transformers.TFElectraForMaskedLM.call.example",$$slots:{default:[xJ]},$$scope:{ctx:F}}}),Ps=new Ie({props:{anchor:"transformers.TFElectraForMaskedLM.call.example-2",$$slots:{default:[CJ]},$$scope:{ctx:F}}}),Vl=new Ae({}),Bl=new Z({props:{name:"class transformers.TFElectraForSequenceClassification",anchor:"transformers.TFElectraForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1218"}}),Bs=new qe({props:{$$slots:{default:[zJ]},$$scope:{ctx:F}}}),Ol=new Z({props:{name:"call",anchor:"transformers.TFElectraForSequenceClassification.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:"head_mask",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.TFElectraForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFElectraForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFElectraForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForSequenceClassification.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForSequenceClassification.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForSequenceClassification.call.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1225",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ss=new qe({props:{$$slots:{default:[JJ]},$$scope:{ctx:F}}}),Xs=new Ie({props:{anchor:"transformers.TFElectraForSequenceClassification.call.example",$$slots:{default:[UJ]},$$scope:{ctx:F}}}),Ls=new Ie({props:{anchor:"transformers.TFElectraForSequenceClassification.call.example-2",$$slots:{default:[IJ]},$$scope:{ctx:F}}}),Ql=new Ae({}),Dl=new Z({props:{name:"class transformers.TFElectraForMultipleChoice",anchor:"transformers.TFElectraForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1289"}}),Qs=new qe({props:{$$slots:{default:[WJ]},$$scope:{ctx:F}}}),ei=new Z({props:{name:"call",anchor:"transformers.TFElectraForMultipleChoice.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:"head_mask",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.TFElectraForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, 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.TFElectraForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, 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.TFElectraForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, 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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForMultipleChoice.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForMultipleChoice.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForMultipleChoice.call.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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]</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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1301",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, 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, 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(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.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ds=new qe({props:{$$slots:{default:[NJ]},$$scope:{ctx:F}}}),Ys=new Ie({props:{anchor:"transformers.TFElectraForMultipleChoice.call.example",$$slots:{default:[ZJ]},$$scope:{ctx:F}}}),ti=new Ae({}),oi=new Z({props:{name:"class transformers.TFElectraForTokenClassification",anchor:"transformers.TFElectraForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1382"}}),Ks=new qe({props:{$$slots:{default:[qJ]},$$scope:{ctx:F}}}),ri=new Z({props:{name:"call",anchor:"transformers.TFElectraForTokenClassification.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:"head_mask",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.TFElectraForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFElectraForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFElectraForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForTokenClassification.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForTokenClassification.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForTokenClassification.call.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1395",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ea=new qe({props:{$$slots:{default:[AJ]},$$scope:{ctx:F}}}),ta=new Ie({props:{anchor:"transformers.TFElectraForTokenClassification.call.example",$$slots:{default:[GJ]},$$scope:{ctx:F}}}),oa=new Ie({props:{anchor:"transformers.TFElectraForTokenClassification.call.example-2",$$slots:{default:[RJ]},$$scope:{ctx:F}}}),li=new Ae({}),ii=new Z({props:{name:"class transformers.TFElectraForQuestionAnswering",anchor:"transformers.TFElectraForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1459"}}),sa=new qe({props:{$$slots:{default:[PJ]},$$scope:{ctx:F}}}),hi=new Z({props:{name:"call",anchor:"transformers.TFElectraForQuestionAnswering.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:"head_mask",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.TFElectraForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFElectraForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFElectraForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForQuestionAnswering.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForQuestionAnswering.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForQuestionAnswering.call.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</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.TFElectraForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</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.31.0/src/transformers/models/electra/modeling_tf_electra.py#L1469",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</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.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),aa=new qe({props:{$$slots:{default:[VJ]},$$scope:{ctx:F}}}),ra=new Ie({props:{anchor:"transformers.TFElectraForQuestionAnswering.call.example",$$slots:{default:[BJ]},$$scope:{ctx:F}}}),la=new Ie({props:{anchor:"transformers.TFElectraForQuestionAnswering.call.example-2",$$slots:{default:[SJ]},$$scope:{ctx:F}}}),mi=new Ae({}),ui=new Z({props:{name:"class transformers.FlaxElectraModel",anchor:"transformers.FlaxElectraModel",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L920"}}),ki=new Z({props:{name:"__call__",anchor:"transformers.FlaxElectraModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxElectraModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxElectraModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxElectraModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxElectraModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxElectraModel.__call__.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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),da=new qe({props:{$$slots:{default:[XJ]},$$scope:{ctx:F}}}),ca=new Ie({props:{anchor:"transformers.FlaxElectraModel.__call__.example",$$slots:{default:[LJ]},$$scope:{ctx:F}}}),wi=new Ae({}),Mi=new Z({props:{name:"class transformers.FlaxElectraForPreTraining",anchor:"transformers.FlaxElectraForPreTraining",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L1071"}}),Ji=new Z({props:{name:"__call__",anchor:"transformers.FlaxElectraForPreTraining.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForPreTraining.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxElectraForPreTraining.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxElectraForPreTraining.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxElectraForPreTraining.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxElectraForPreTraining.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxElectraForPreTraining.__call__.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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <code>transformers.models.electra.modeling_flax_electra.FlaxElectraForPreTrainingOutput</code> 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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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><code>transformers.models.electra.modeling_flax_electra.FlaxElectraForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ha=new qe({props:{$$slots:{default:[OJ]},$$scope:{ctx:F}}}),ma=new Ie({props:{anchor:"transformers.FlaxElectraForPreTraining.__call__.example",$$slots:{default:[QJ]},$$scope:{ctx:F}}}),Ui=new Ae({}),Ii=new Z({props:{name:"class transformers.FlaxElectraForCausalLM",anchor:"transformers.FlaxElectraForCausalLM",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L1565"}}),Pi=new Z({props:{name:"__call__",anchor:"transformers.FlaxElectraForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForCausalLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxElectraForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxElectraForCausalLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxElectraForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxElectraForCausalLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxElectraForCausalLM.__call__.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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fa=new qe({props:{$$slots:{default:[DJ]},$$scope:{ctx:F}}}),ga=new Ie({props:{anchor:"transformers.FlaxElectraForCausalLM.__call__.example",$$slots:{default:[YJ]},$$scope:{ctx:F}}}),Vi=new Ae({}),Bi=new Z({props:{name:"class transformers.FlaxElectraForMaskedLM",anchor:"transformers.FlaxElectraForMaskedLM",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L1007"}}),Ki=new Z({props:{name:"__call__",anchor:"transformers.FlaxElectraForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxElectraForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxElectraForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxElectraForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxElectraForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxElectraForMaskedLM.__call__.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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ya=new qe({props:{$$slots:{default:[HJ]},$$scope:{ctx:F}}}),ba=new Ie({props:{anchor:"transformers.FlaxElectraForMaskedLM.__call__.example",$$slots:{default:[KJ]},$$scope:{ctx:F}}}),ed=new Ae({}),td=new Z({props:{name:"class transformers.FlaxElectraForSequenceClassification",anchor:"transformers.FlaxElectraForSequenceClassification",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L1481"}}),dd=new Z({props:{name:"__call__",anchor:"transformers.FlaxElectraForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxElectraForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxElectraForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxElectraForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxElectraForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxElectraForSequenceClassification.__call__.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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new qe({props:{$$slots:{default:[eU]},$$scope:{ctx:F}}}),ka=new Ie({props:{anchor:"transformers.FlaxElectraForSequenceClassification.__call__.example",$$slots:{default:[tU]},$$scope:{ctx:F}}}),cd=new Ae({}),pd=new Z({props:{name:"class transformers.FlaxElectraForMultipleChoice",anchor:"transformers.FlaxElectraForMultipleChoice",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L1313"}}),bd=new Z({props:{name:"__call__",anchor:"transformers.FlaxElectraForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxElectraForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, 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.FlaxElectraForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, 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.FlaxElectraForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, 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>.`,name:"position_ids"},{anchor:"transformers.FlaxElectraForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxElectraForMultipleChoice.__call__.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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ma=new qe({props:{$$slots:{default:[oU]},$$scope:{ctx:F}}}),Ea=new Ie({props:{anchor:"transformers.FlaxElectraForMultipleChoice.__call__.example",$$slots:{default:[nU]},$$scope:{ctx:F}}}),vd=new Ae({}),Td=new Z({props:{name:"class transformers.FlaxElectraForTokenClassification",anchor:"transformers.FlaxElectraForTokenClassification",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L1166"}}),xd=new Z({props:{name:"__call__",anchor:"transformers.FlaxElectraForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxElectraForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxElectraForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxElectraForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxElectraForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxElectraForTokenClassification.__call__.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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fa=new qe({props:{$$slots:{default:[sU]},$$scope:{ctx:F}}}),ja=new Ie({props:{anchor:"transformers.FlaxElectraForTokenClassification.__call__.example",$$slots:{default:[aU]},$$scope:{ctx:F}}}),Cd=new Ae({}),zd=new Z({props:{name:"class transformers.FlaxElectraForQuestionAnswering",anchor:"transformers.FlaxElectraForQuestionAnswering",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L1388"}}),Ad=new Z({props:{name:"__call__",anchor:"transformers.FlaxElectraForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaxElectraForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxElectraForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxElectraForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxElectraForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxElectraForQuestionAnswering.__call__.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.31.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.31.0/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</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.31.0/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ca=new qe({props:{$$slots:{default:[rU]},$$scope:{ctx:F}}}),za=new Ie({props:{anchor:"transformers.FlaxElectraForQuestionAnswering.__call__.example",$$slots:{default:[lU]},$$scope:{ctx:F}}}),{c(){d=o("meta"),b=c(),u=o("h1"),f=o("a"),_=o("span"),T(i.$$.fragment),h=c(),x=o("span"),be=r("ELECTRA"),fe=c(),R=o("div"),de=o("a"),te=o("img"),ve=c(),X=o("a"),ce=o("img"),D=c(),ae=o("h2"),re=o("a"),L=o("span"),T(le.$$.fragment),Te=c(),O=o("span"),ke=r("Overview"),ge=c(),B=o("p"),we=r("The ELECTRA model was proposed in the paper "),ie=o("a"),ne=r(`ELECTRA: Pre-training Text Encoders as Discriminators Rather Than
Generators`),J=r(`. ELECTRA is a new pretraining approach which trains two
transformer models: the generator and the discriminator. The generator\u2019s role is to replace tokens in a sequence, and
is therefore trained as a masked language model. The discriminator, which is the model we\u2019re interested in, tries to
identify which tokens were replaced by the generator in the sequence.`),I=c(),pe=o("p"),H=r("The abstract from the paper is the following:"),_e=c(),he=o("p"),Q=o("em"),Me=r(`Masked language modeling (MLM) pretraining methods such as BERT corrupt the input by replacing some tokens with [MASK]
and then train a model to reconstruct the original tokens. While they produce good results when transferred to
downstream NLP tasks, they generally require large amounts of compute to be effective. As an alternative, we propose a
more sample-efficient pretraining task called replaced token detection. Instead of masking the input, our approach
corrupts it by replacing some tokens with plausible alternatives sampled from a small generator network. Then, instead
of training a model that predicts the original identities of the corrupted tokens, we train a discriminative model that
predicts whether each token in the corrupted input was replaced by a generator sample or not. Thorough experiments
demonstrate this new pretraining task is more efficient than MLM because the task is defined over all input tokens
rather than just the small subset that was masked out. As a result, the contextual representations learned by our
approach substantially outperform the ones learned by BERT given the same model size, data, and compute. The gains are
particularly strong for small models; for example, we train a model on one GPU for 4 days that outperforms GPT (trained
using 30x more compute) on the GLUE natural language understanding benchmark. Our approach also works well at scale,
where it performs comparably to RoBERTa and XLNet while using less than 1/4 of their compute and outperforms them when
using the same amount of compute.`),ye=c(),U=o("p"),Ee=r("Tips:"),Y=c(),se=o("ul"),me=o("li"),K=r(`ELECTRA is the pretraining approach, therefore there is nearly no changes done to the underlying model: BERT. The
only change is the separation of the embedding size and the hidden size: the embedding size is generally smaller,
while the hidden size is larger. An additional projection layer (linear) is used to project the embeddings from their
embedding size to the hidden size. In the case where the embedding size is the same as the hidden size, no projection
layer is used.`),$e=c(),ue=o("li"),G=r("ELECTRA is a transformer model pretrained with the use of another (small) masked language model. The inputs are corrupted by that language model, which takes an input text that is randomly masked and outputs a text in which ELECTRA has to predict which token is an original and which one has been replaced. Like for GAN training, the small language model is trained for a few steps (but with the original texts as objective, not to fool the ELECTRA model like in a traditional GAN setting) then the ELECTRA model is trained for a few steps."),Fe=c(),q=o("li"),je=r("The ELECTRA checkpoints saved using "),ee=o("a"),W=r("Google Research\u2019s implementation"),xe=r(`
contain both the generator and discriminator. The conversion script requires the user to name which model to export
into the correct architecture. Once converted to the HuggingFace format, these checkpoints may be loaded into all
available ELECTRA models, however. This means that the discriminator may be loaded in the
`),N=o("a"),Ce=r("ElectraForMaskedLM"),ze=r(` model, and the generator may be loaded in the
`),v=o("a"),C=r("ElectraForPreTraining"),Xe=r(` model (the classification head will be randomly initialized as it
doesn\u2019t exist in the generator).`),oe=c(),Je=o("p"),Le=r("This model was contributed by "),z=o("a"),Oe=r("lysandre"),Qe=r(". The original code can be found "),Re=o("a"),De=r("here"),Ye=r("."),A=c(),P=o("h2"),Ge=o("a"),Pe=o("span"),T(S.$$.fragment),He=c(),Ve=o("span"),Ue=r("Documentation resources"),Se=c(),V=o("ul"),Be=o("li"),Ld=o("a"),fy=r("Text classification task guide"),gy=c(),Ep=o("li"),Od=o("a"),_y=r("Token classification task guide"),yy=c(),$p=o("li"),Qd=o("a"),by=r("Question answering task guide"),vy=c(),Fp=o("li"),Dd=o("a"),Ty=r("Causal language modeling task guide"),ky=c(),jp=o("li"),Yd=o("a"),wy=r("Masked language modeling task guide"),My=c(),xp=o("li"),Hd=o("a"),Ey=r("Multiple choice task guide"),Nf=c(),Po=o("h2"),Dn=o("a"),Cp=o("span"),T(rr.$$.fragment),$y=c(),zp=o("span"),Fy=r("ElectraConfig"),Zf=c(),Pt=o("div"),T(lr.$$.fragment),jy=c(),_o=o("p"),xy=r("This is the configuration class to store the configuration of a "),Kd=o("a"),Cy=r("ElectraModel"),zy=r(" or a "),ec=o("a"),Jy=r("TFElectraModel"),Uy=r(`. It is
used to instantiate a ELECTRA 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 ELECTRA
`),ir=o("a"),Iy=r("google/electra-small-discriminator"),Wy=r(" architecture."),Ny=c(),Vo=o("p"),Zy=r("Configuration objects inherit from "),tc=o("a"),qy=r("PretrainedConfig"),Ay=r(` and can be used to control the model outputs. Read the
documentation from `),oc=o("a"),Gy=r("PretrainedConfig"),Ry=r(" for more information."),Py=c(),T(Yn.$$.fragment),qf=c(),Bo=o("h2"),Hn=o("a"),Jp=o("span"),T(dr.$$.fragment),Vy=c(),Up=o("span"),By=r("ElectraTokenizer"),Af=c(),tt=o("div"),T(cr.$$.fragment),Sy=c(),Ip=o("p"),Xy=r("Construct a Electra tokenizer. Based on WordPiece."),Ly=c(),pr=o("p"),Oy=r("This tokenizer inherits from "),nc=o("a"),Qy=r("PreTrainedTokenizer"),Dy=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Yy=c(),xo=o("div"),T(hr.$$.fragment),Hy=c(),Wp=o("p"),Ky=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Electra sequence has the following format:`),eb=c(),mr=o("ul"),sc=o("li"),tb=r("single sequence: "),Np=o("code"),ob=r("[CLS] X [SEP]"),nb=c(),ac=o("li"),sb=r("pair of sequences: "),Zp=o("code"),ab=r("[CLS] A [SEP] B [SEP]"),rb=c(),Kn=o("div"),T(ur.$$.fragment),lb=c(),qp=o("p"),ib=r("Converts a sequence of tokens (string) in a single string."),db=c(),Vt=o("div"),T(fr.$$.fragment),cb=c(),Ap=o("p"),pb=r("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Electra"),hb=c(),T(es.$$.fragment),mb=c(),So=o("p"),ub=r("If "),Gp=o("code"),fb=r("token_ids_1"),gb=r(" is "),Rp=o("code"),_b=r("None"),yb=r(", this method only returns the first portion of the mask (0s)."),bb=c(),ts=o("div"),T(gr.$$.fragment),vb=c(),_r=o("p"),Tb=r(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Pp=o("code"),kb=r("prepare_for_model"),wb=r(" method."),Gf=c(),Xo=o("h2"),os=o("a"),Vp=o("span"),T(yr.$$.fragment),Mb=c(),Bp=o("span"),Eb=r("ElectraTokenizerFast"),Rf=c(),Tt=o("div"),T(br.$$.fragment),$b=c(),vr=o("p"),Fb=r("Construct a \u201Cfast\u201D ELECTRA tokenizer (backed by HuggingFace\u2019s "),Sp=o("em"),jb=r("tokenizers"),xb=r(" library). Based on WordPiece."),Cb=c(),Tr=o("p"),zb=r("This tokenizer inherits from "),rc=o("a"),Jb=r("PreTrainedTokenizerFast"),Ub=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ib=c(),Co=o("div"),T(kr.$$.fragment),Wb=c(),Xp=o("p"),Nb=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A ELECTRA sequence has the following format:`),Zb=c(),wr=o("ul"),lc=o("li"),qb=r("single sequence: "),Lp=o("code"),Ab=r("[CLS] X [SEP]"),Gb=c(),ic=o("li"),Rb=r("pair of sequences: "),Op=o("code"),Pb=r("[CLS] A [SEP] B [SEP]"),Vb=c(),Bt=o("div"),T(Mr.$$.fragment),Bb=c(),Qp=o("p"),Sb=r("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ELECTRA"),Xb=c(),T(ns.$$.fragment),Lb=c(),Lo=o("p"),Ob=r("If "),Dp=o("code"),Qb=r("token_ids_1"),Db=r(" is "),Yp=o("code"),Yb=r("None"),Hb=r(", this method only returns the first portion of the mask (0s)."),Pf=c(),Oo=o("h2"),ss=o("a"),Hp=o("span"),T(Er.$$.fragment),Kb=c(),Kp=o("span"),ev=r("Electra specific outputs"),Vf=c(),Qo=o("div"),T($r.$$.fragment),tv=c(),Fr=o("p"),ov=r("Output type of "),dc=o("a"),nv=r("ElectraForPreTraining"),sv=r("."),Bf=c(),Do=o("div"),T(jr.$$.fragment),av=c(),xr=o("p"),rv=r("Output type of "),cc=o("a"),lv=r("TFElectraForPreTraining"),iv=r("."),Sf=c(),Yo=o("h2"),as=o("a"),eh=o("span"),T(Cr.$$.fragment),dv=c(),th=o("span"),cv=r("ElectraModel"),Xf=c(),kt=o("div"),T(zr.$$.fragment),pv=c(),oh=o("p"),hv=r("The bare Electra Model transformer outputting raw hidden-states without any specific head on top. Identical to the BERT model except that it uses an additional linear layer between the embedding layer and the encoder if the hidden size and embedding size are different. Both the generator and discriminator checkpoints may be loaded into this model."),mv=c(),Jr=o("p"),uv=r("This model inherits from "),pc=o("a"),fv=r("PreTrainedModel"),gv=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),_v=c(),Ur=o("p"),yv=r("This model is also a PyTorch "),Ir=o("a"),bv=r("torch.nn.Module"),vv=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Tv=c(),St=o("div"),T(Wr.$$.fragment),kv=c(),Ho=o("p"),wv=r("The "),hc=o("a"),Mv=r("ElectraModel"),Ev=r(" forward method, overrides the "),nh=o("code"),$v=r("__call__"),Fv=r(" special method."),jv=c(),T(rs.$$.fragment),xv=c(),T(ls.$$.fragment),Lf=c(),Ko=o("h2"),is=o("a"),sh=o("span"),T(Nr.$$.fragment),Cv=c(),ah=o("span"),zv=r("ElectraForPreTraining"),Of=c(),pt=o("div"),T(Zr.$$.fragment),Jv=c(),rh=o("p"),Uv=r("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),Iv=c(),lh=o("p"),Wv=r("It is recommended to load the discriminator checkpoint into that model."),Nv=c(),qr=o("p"),Zv=r("This model inherits from "),mc=o("a"),qv=r("PreTrainedModel"),Av=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Gv=c(),Ar=o("p"),Rv=r("This model is also a PyTorch "),Gr=o("a"),Pv=r("torch.nn.Module"),Vv=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Bv=c(),Xt=o("div"),T(Rr.$$.fragment),Sv=c(),en=o("p"),Xv=r("The "),uc=o("a"),Lv=r("ElectraForPreTraining"),Ov=r(" forward method, overrides the "),ih=o("code"),Qv=r("__call__"),Dv=r(" special method."),Yv=c(),T(ds.$$.fragment),Hv=c(),T(cs.$$.fragment),Qf=c(),tn=o("h2"),ps=o("a"),dh=o("span"),T(Pr.$$.fragment),Kv=c(),ch=o("span"),eT=r("ElectraForCausalLM"),Df=c(),wt=o("div"),T(Vr.$$.fragment),tT=c(),Br=o("p"),oT=r("ELECTRA Model with a "),ph=o("code"),nT=r("language modeling"),sT=r(" head on top for CLM fine-tuning."),aT=c(),Sr=o("p"),rT=r("This model inherits from "),fc=o("a"),lT=r("PreTrainedModel"),iT=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),dT=c(),Xr=o("p"),cT=r("This model is also a PyTorch "),Lr=o("a"),pT=r("torch.nn.Module"),hT=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),mT=c(),Lt=o("div"),T(Or.$$.fragment),uT=c(),on=o("p"),fT=r("The "),gc=o("a"),gT=r("ElectraForCausalLM"),_T=r(" forward method, overrides the "),hh=o("code"),yT=r("__call__"),bT=r(" special method."),vT=c(),T(hs.$$.fragment),TT=c(),T(ms.$$.fragment),Yf=c(),nn=o("h2"),us=o("a"),mh=o("span"),T(Qr.$$.fragment),kT=c(),uh=o("span"),wT=r("ElectraForMaskedLM"),Hf=c(),ht=o("div"),T(Dr.$$.fragment),MT=c(),fh=o("p"),ET=r("Electra model with a language modeling head on top."),$T=c(),gh=o("p"),FT=r(`Even though both the discriminator and generator may be loaded into this model, the generator is the only model of
the two to have been trained for the masked language modeling task.`),jT=c(),Yr=o("p"),xT=r("This model inherits from "),_c=o("a"),CT=r("PreTrainedModel"),zT=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),JT=c(),Hr=o("p"),UT=r("This model is also a PyTorch "),Kr=o("a"),IT=r("torch.nn.Module"),WT=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),NT=c(),Ot=o("div"),T(el.$$.fragment),ZT=c(),sn=o("p"),qT=r("The "),yc=o("a"),AT=r("ElectraForMaskedLM"),GT=r(" forward method, overrides the "),_h=o("code"),RT=r("__call__"),PT=r(" special method."),VT=c(),T(fs.$$.fragment),BT=c(),T(gs.$$.fragment),Kf=c(),an=o("h2"),_s=o("a"),yh=o("span"),T(tl.$$.fragment),ST=c(),bh=o("span"),XT=r("ElectraForSequenceClassification"),eg=c(),Mt=o("div"),T(ol.$$.fragment),LT=c(),vh=o("p"),OT=r(`ELECTRA Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),QT=c(),nl=o("p"),DT=r("This model inherits from "),bc=o("a"),YT=r("PreTrainedModel"),HT=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),KT=c(),sl=o("p"),ek=r("This model is also a PyTorch "),al=o("a"),tk=r("torch.nn.Module"),ok=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nk=c(),jt=o("div"),T(rl.$$.fragment),sk=c(),rn=o("p"),ak=r("The "),vc=o("a"),rk=r("ElectraForSequenceClassification"),lk=r(" forward method, overrides the "),Th=o("code"),ik=r("__call__"),dk=r(" special method."),ck=c(),T(ys.$$.fragment),pk=c(),T(bs.$$.fragment),hk=c(),T(vs.$$.fragment),tg=c(),ln=o("h2"),Ts=o("a"),kh=o("span"),T(ll.$$.fragment),mk=c(),wh=o("span"),uk=r("ElectraForMultipleChoice"),og=c(),Et=o("div"),T(il.$$.fragment),fk=c(),Mh=o("p"),gk=r(`ELECTRA 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.`),_k=c(),dl=o("p"),yk=r("This model inherits from "),Tc=o("a"),bk=r("PreTrainedModel"),vk=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tk=c(),cl=o("p"),kk=r("This model is also a PyTorch "),pl=o("a"),wk=r("torch.nn.Module"),Mk=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ek=c(),Qt=o("div"),T(hl.$$.fragment),$k=c(),dn=o("p"),Fk=r("The "),kc=o("a"),jk=r("ElectraForMultipleChoice"),xk=r(" forward method, overrides the "),Eh=o("code"),Ck=r("__call__"),zk=r(" special method."),Jk=c(),T(ks.$$.fragment),Uk=c(),T(ws.$$.fragment),ng=c(),cn=o("h2"),Ms=o("a"),$h=o("span"),T(ml.$$.fragment),Ik=c(),Fh=o("span"),Wk=r("ElectraForTokenClassification"),sg=c(),mt=o("div"),T(ul.$$.fragment),Nk=c(),jh=o("p"),Zk=r("Electra model with a token classification head on top."),qk=c(),xh=o("p"),Ak=r("Both the discriminator and generator may be loaded into this model."),Gk=c(),fl=o("p"),Rk=r("This model inherits from "),wc=o("a"),Pk=r("PreTrainedModel"),Vk=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Bk=c(),gl=o("p"),Sk=r("This model is also a PyTorch "),_l=o("a"),Xk=r("torch.nn.Module"),Lk=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ok=c(),Dt=o("div"),T(yl.$$.fragment),Qk=c(),pn=o("p"),Dk=r("The "),Mc=o("a"),Yk=r("ElectraForTokenClassification"),Hk=r(" forward method, overrides the "),Ch=o("code"),Kk=r("__call__"),ew=r(" special method."),tw=c(),T(Es.$$.fragment),ow=c(),T($s.$$.fragment),ag=c(),hn=o("h2"),Fs=o("a"),zh=o("span"),T(bl.$$.fragment),nw=c(),Jh=o("span"),sw=r("ElectraForQuestionAnswering"),rg=c(),$t=o("div"),T(vl.$$.fragment),aw=c(),mn=o("p"),rw=r(`ELECTRA 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 `),Uh=o("code"),lw=r("span start logits"),iw=r(" and "),Ih=o("code"),dw=r("span end logits"),cw=r(")."),pw=c(),Tl=o("p"),hw=r("This model inherits from "),Ec=o("a"),mw=r("PreTrainedModel"),uw=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fw=c(),kl=o("p"),gw=r("This model is also a PyTorch "),wl=o("a"),_w=r("torch.nn.Module"),yw=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),bw=c(),Yt=o("div"),T(Ml.$$.fragment),vw=c(),un=o("p"),Tw=r("The "),$c=o("a"),kw=r("ElectraForQuestionAnswering"),ww=r(" forward method, overrides the "),Wh=o("code"),Mw=r("__call__"),Ew=r(" special method."),$w=c(),T(js.$$.fragment),Fw=c(),T(xs.$$.fragment),lg=c(),fn=o("h2"),Cs=o("a"),Nh=o("span"),T(El.$$.fragment),jw=c(),Zh=o("span"),xw=r("TFElectraModel"),ig=c(),ut=o("div"),T($l.$$.fragment),Cw=c(),qh=o("p"),zw=r("The bare Electra Model transformer outputting raw hidden-states without any specific head on top. Identical to the BERT model except that it uses an additional linear layer between the embedding layer and the encoder if the hidden size and embedding size are different. Both the generator and discriminator checkpoints may be loaded into this model."),Jw=c(),Fl=o("p"),Uw=r("This model inherits from "),Fc=o("a"),Iw=r("TFPreTrainedModel"),Ww=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Nw=c(),jl=o("p"),Zw=r("This model is also a "),xl=o("a"),qw=r("tf.keras.Model"),Aw=r(` 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.`),Gw=c(),T(zs.$$.fragment),Rw=c(),Ht=o("div"),T(Cl.$$.fragment),Pw=c(),gn=o("p"),Vw=r("The "),jc=o("a"),Bw=r("TFElectraModel"),Sw=r(" forward method, overrides the "),Ah=o("code"),Xw=r("__call__"),Lw=r(" special method."),Ow=c(),T(Js.$$.fragment),Qw=c(),T(Us.$$.fragment),dg=c(),_n=o("h2"),Is=o("a"),Gh=o("span"),T(zl.$$.fragment),Dw=c(),Rh=o("span"),Yw=r("TFElectraForPreTraining"),cg=c(),ot=o("div"),T(Jl.$$.fragment),Hw=c(),Ph=o("p"),Kw=r("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),e1=c(),Vh=o("p"),t1=r(`Even though both the discriminator and generator may be loaded into this model, the discriminator is the only model
of the two to have the correct classification head to be used for this model.`),o1=c(),Ul=o("p"),n1=r("This model inherits from "),xc=o("a"),s1=r("TFPreTrainedModel"),a1=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),r1=c(),Il=o("p"),l1=r("This model is also a "),Wl=o("a"),i1=r("tf.keras.Model"),d1=r(` 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.`),c1=c(),T(Ws.$$.fragment),p1=c(),Kt=o("div"),T(Nl.$$.fragment),h1=c(),yn=o("p"),m1=r("The "),Cc=o("a"),u1=r("TFElectraForPreTraining"),f1=r(" forward method, overrides the "),Bh=o("code"),g1=r("__call__"),_1=r(" special method."),y1=c(),T(Ns.$$.fragment),b1=c(),T(Zs.$$.fragment),pg=c(),bn=o("h2"),qs=o("a"),Sh=o("span"),T(Zl.$$.fragment),v1=c(),Xh=o("span"),T1=r("TFElectraForMaskedLM"),hg=c(),nt=o("div"),T(ql.$$.fragment),k1=c(),Lh=o("p"),w1=r("Electra model with a language modeling head on top."),M1=c(),Oh=o("p"),E1=r(`Even though both the discriminator and generator may be loaded into this model, the generator is the only model of
the two to have been trained for the masked language modeling task.`),$1=c(),Al=o("p"),F1=r("This model inherits from "),zc=o("a"),j1=r("TFPreTrainedModel"),x1=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),C1=c(),Gl=o("p"),z1=r("This model is also a "),Rl=o("a"),J1=r("tf.keras.Model"),U1=r(` 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.`),I1=c(),T(As.$$.fragment),W1=c(),xt=o("div"),T(Pl.$$.fragment),N1=c(),vn=o("p"),Z1=r("The "),Jc=o("a"),q1=r("TFElectraForMaskedLM"),A1=r(" forward method, overrides the "),Qh=o("code"),G1=r("__call__"),R1=r(" special method."),P1=c(),T(Gs.$$.fragment),V1=c(),T(Rs.$$.fragment),B1=c(),T(Ps.$$.fragment),mg=c(),Tn=o("h2"),Vs=o("a"),Dh=o("span"),T(Vl.$$.fragment),S1=c(),Yh=o("span"),X1=r("TFElectraForSequenceClassification"),ug=c(),ft=o("div"),T(Bl.$$.fragment),L1=c(),Hh=o("p"),O1=r(`ELECTRA Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Q1=c(),Sl=o("p"),D1=r("This model inherits from "),Uc=o("a"),Y1=r("TFPreTrainedModel"),H1=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),K1=c(),Xl=o("p"),eM=r("This model is also a "),Ll=o("a"),tM=r("tf.keras.Model"),oM=r(` 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.`),nM=c(),T(Bs.$$.fragment),sM=c(),Ct=o("div"),T(Ol.$$.fragment),aM=c(),kn=o("p"),rM=r("The "),Ic=o("a"),lM=r("TFElectraForSequenceClassification"),iM=r(" forward method, overrides the "),Kh=o("code"),dM=r("__call__"),cM=r(" special method."),pM=c(),T(Ss.$$.fragment),hM=c(),T(Xs.$$.fragment),mM=c(),T(Ls.$$.fragment),fg=c(),wn=o("h2"),Os=o("a"),em=o("span"),T(Ql.$$.fragment),uM=c(),tm=o("span"),fM=r("TFElectraForMultipleChoice"),gg=c(),gt=o("div"),T(Dl.$$.fragment),gM=c(),om=o("p"),_M=r(`ELECTRA 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.`),yM=c(),Yl=o("p"),bM=r("This model inherits from "),Wc=o("a"),vM=r("TFPreTrainedModel"),TM=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),kM=c(),Hl=o("p"),wM=r("This model is also a "),Kl=o("a"),MM=r("tf.keras.Model"),EM=r(` 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.`),$M=c(),T(Qs.$$.fragment),FM=c(),eo=o("div"),T(ei.$$.fragment),jM=c(),Mn=o("p"),xM=r("The "),Nc=o("a"),CM=r("TFElectraForMultipleChoice"),zM=r(" forward method, overrides the "),nm=o("code"),JM=r("__call__"),UM=r(" special method."),IM=c(),T(Ds.$$.fragment),WM=c(),T(Ys.$$.fragment),_g=c(),En=o("h2"),Hs=o("a"),sm=o("span"),T(ti.$$.fragment),NM=c(),am=o("span"),ZM=r("TFElectraForTokenClassification"),yg=c(),st=o("div"),T(oi.$$.fragment),qM=c(),rm=o("p"),AM=r("Electra model with a token classification head on top."),GM=c(),lm=o("p"),RM=r("Both the discriminator and generator may be loaded into this model."),PM=c(),ni=o("p"),VM=r("This model inherits from "),Zc=o("a"),BM=r("TFPreTrainedModel"),SM=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),XM=c(),si=o("p"),LM=r("This model is also a "),ai=o("a"),OM=r("tf.keras.Model"),QM=r(` 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.`),DM=c(),T(Ks.$$.fragment),YM=c(),zt=o("div"),T(ri.$$.fragment),HM=c(),$n=o("p"),KM=r("The "),qc=o("a"),eE=r("TFElectraForTokenClassification"),tE=r(" forward method, overrides the "),im=o("code"),oE=r("__call__"),nE=r(" special method."),sE=c(),T(ea.$$.fragment),aE=c(),T(ta.$$.fragment),rE=c(),T(oa.$$.fragment),bg=c(),Fn=o("h2"),na=o("a"),dm=o("span"),T(li.$$.fragment),lE=c(),cm=o("span"),iE=r("TFElectraForQuestionAnswering"),vg=c(),_t=o("div"),T(ii.$$.fragment),dE=c(),jn=o("p"),cE=r(`Electra 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 `),pm=o("code"),pE=r("span start logits"),hE=r(" and "),hm=o("code"),mE=r("span end logits"),uE=r(")."),fE=c(),di=o("p"),gE=r("This model inherits from "),Ac=o("a"),_E=r("TFPreTrainedModel"),yE=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),bE=c(),ci=o("p"),vE=r("This model is also a "),pi=o("a"),TE=r("tf.keras.Model"),kE=r(` 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.`),wE=c(),T(sa.$$.fragment),ME=c(),Jt=o("div"),T(hi.$$.fragment),EE=c(),xn=o("p"),$E=r("The "),Gc=o("a"),FE=r("TFElectraForQuestionAnswering"),jE=r(" forward method, overrides the "),mm=o("code"),xE=r("__call__"),CE=r(" special method."),zE=c(),T(aa.$$.fragment),JE=c(),T(ra.$$.fragment),UE=c(),T(la.$$.fragment),Tg=c(),Cn=o("h2"),ia=o("a"),um=o("span"),T(mi.$$.fragment),IE=c(),fm=o("span"),WE=r("FlaxElectraModel"),kg=c(),at=o("div"),T(ui.$$.fragment),NE=c(),gm=o("p"),ZE=r("The bare Electra Model transformer outputting raw hidden-states without any specific head on top."),qE=c(),fi=o("p"),AE=r("This model inherits from "),Rc=o("a"),GE=r("FlaxPreTrainedModel"),RE=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),PE=c(),gi=o("p"),VE=r(`This model is also a Flax Linen
`),_i=o("a"),BE=r("flax.nn.Module"),SE=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),XE=c(),_m=o("p"),LE=r("Finally, this model supports inherent JAX features such as:"),OE=c(),yo=o("ul"),ym=o("li"),yi=o("a"),QE=r("Just-In-Time (JIT) compilation"),DE=c(),bm=o("li"),bi=o("a"),YE=r("Automatic Differentiation"),HE=c(),vm=o("li"),vi=o("a"),KE=r("Vectorization"),e2=c(),Tm=o("li"),Ti=o("a"),t2=r("Parallelization"),o2=c(),to=o("div"),T(ki.$$.fragment),n2=c(),zn=o("p"),s2=r("The "),km=o("code"),a2=r("FlaxElectraPreTrainedModel"),r2=r(" forward method, overrides the "),wm=o("code"),l2=r("__call__"),i2=r(" special method."),d2=c(),T(da.$$.fragment),c2=c(),T(ca.$$.fragment),wg=c(),Jn=o("h2"),pa=o("a"),Mm=o("span"),T(wi.$$.fragment),p2=c(),Em=o("span"),h2=r("FlaxElectraForPreTraining"),Mg=c(),Ke=o("div"),T(Mi.$$.fragment),m2=c(),$m=o("p"),u2=r("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),f2=c(),Fm=o("p"),g2=r("It is recommended to load the discriminator checkpoint into that model."),_2=c(),Ei=o("p"),y2=r("This model inherits from "),Pc=o("a"),b2=r("FlaxPreTrainedModel"),v2=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),T2=c(),$i=o("p"),k2=r(`This model is also a Flax Linen
`),Fi=o("a"),w2=r("flax.nn.Module"),M2=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),E2=c(),jm=o("p"),$2=r("Finally, this model supports inherent JAX features such as:"),F2=c(),bo=o("ul"),xm=o("li"),ji=o("a"),j2=r("Just-In-Time (JIT) compilation"),x2=c(),Cm=o("li"),xi=o("a"),C2=r("Automatic Differentiation"),z2=c(),zm=o("li"),Ci=o("a"),J2=r("Vectorization"),U2=c(),Jm=o("li"),zi=o("a"),I2=r("Parallelization"),W2=c(),oo=o("div"),T(Ji.$$.fragment),N2=c(),Un=o("p"),Z2=r("The "),Um=o("code"),q2=r("FlaxElectraPreTrainedModel"),A2=r(" forward method, overrides the "),Im=o("code"),G2=r("__call__"),R2=r(" special method."),P2=c(),T(ha.$$.fragment),V2=c(),T(ma.$$.fragment),Eg=c(),In=o("h2"),ua=o("a"),Wm=o("span"),T(Ui.$$.fragment),B2=c(),Nm=o("span"),S2=r("FlaxElectraForCausalLM"),$g=c(),rt=o("div"),T(Ii.$$.fragment),X2=c(),Zm=o("p"),L2=r(`Electra Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),O2=c(),Wi=o("p"),Q2=r("This model inherits from "),Vc=o("a"),D2=r("FlaxPreTrainedModel"),Y2=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),H2=c(),Ni=o("p"),K2=r(`This model is also a Flax Linen
`),Zi=o("a"),e0=r("flax.nn.Module"),t0=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),o0=c(),qm=o("p"),n0=r("Finally, this model supports inherent JAX features such as:"),s0=c(),vo=o("ul"),Am=o("li"),qi=o("a"),a0=r("Just-In-Time (JIT) compilation"),r0=c(),Gm=o("li"),Ai=o("a"),l0=r("Automatic Differentiation"),i0=c(),Rm=o("li"),Gi=o("a"),d0=r("Vectorization"),c0=c(),Pm=o("li"),Ri=o("a"),p0=r("Parallelization"),h0=c(),no=o("div"),T(Pi.$$.fragment),m0=c(),Wn=o("p"),u0=r("The "),Vm=o("code"),f0=r("FlaxElectraPreTrainedModel"),g0=r(" forward method, overrides the "),Bm=o("code"),_0=r("__call__"),y0=r(" special method."),b0=c(),T(fa.$$.fragment),v0=c(),T(ga.$$.fragment),Fg=c(),Nn=o("h2"),_a=o("a"),Sm=o("span"),T(Vi.$$.fragment),T0=c(),Xm=o("span"),k0=r("FlaxElectraForMaskedLM"),jg=c(),lt=o("div"),T(Bi.$$.fragment),w0=c(),Si=o("p"),M0=r("Electra Model with a "),Lm=o("code"),E0=r("language modeling"),$0=r(" head on top."),F0=c(),Xi=o("p"),j0=r("This model inherits from "),Bc=o("a"),x0=r("FlaxPreTrainedModel"),C0=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),z0=c(),Li=o("p"),J0=r(`This model is also a Flax Linen
`),Oi=o("a"),U0=r("flax.nn.Module"),I0=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),W0=c(),Om=o("p"),N0=r("Finally, this model supports inherent JAX features such as:"),Z0=c(),To=o("ul"),Qm=o("li"),Qi=o("a"),q0=r("Just-In-Time (JIT) compilation"),A0=c(),Dm=o("li"),Di=o("a"),G0=r("Automatic Differentiation"),R0=c(),Ym=o("li"),Yi=o("a"),P0=r("Vectorization"),V0=c(),Hm=o("li"),Hi=o("a"),B0=r("Parallelization"),S0=c(),so=o("div"),T(Ki.$$.fragment),X0=c(),Zn=o("p"),L0=r("The "),Km=o("code"),O0=r("FlaxElectraPreTrainedModel"),Q0=r(" forward method, overrides the "),eu=o("code"),D0=r("__call__"),Y0=r(" special method."),H0=c(),T(ya.$$.fragment),K0=c(),T(ba.$$.fragment),xg=c(),qn=o("h2"),va=o("a"),tu=o("span"),T(ed.$$.fragment),e$=c(),ou=o("span"),t$=r("FlaxElectraForSequenceClassification"),Cg=c(),it=o("div"),T(td.$$.fragment),o$=c(),nu=o("p"),n$=r(`Electra Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),s$=c(),od=o("p"),a$=r("This model inherits from "),Sc=o("a"),r$=r("FlaxPreTrainedModel"),l$=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),i$=c(),nd=o("p"),d$=r(`This model is also a Flax Linen
`),sd=o("a"),c$=r("flax.nn.Module"),p$=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),h$=c(),su=o("p"),m$=r("Finally, this model supports inherent JAX features such as:"),u$=c(),ko=o("ul"),au=o("li"),ad=o("a"),f$=r("Just-In-Time (JIT) compilation"),g$=c(),ru=o("li"),rd=o("a"),_$=r("Automatic Differentiation"),y$=c(),lu=o("li"),ld=o("a"),b$=r("Vectorization"),v$=c(),iu=o("li"),id=o("a"),T$=r("Parallelization"),k$=c(),ao=o("div"),T(dd.$$.fragment),w$=c(),An=o("p"),M$=r("The "),du=o("code"),E$=r("FlaxElectraPreTrainedModel"),$$=r(" forward method, overrides the "),cu=o("code"),F$=r("__call__"),j$=r(" special method."),x$=c(),T(Ta.$$.fragment),C$=c(),T(ka.$$.fragment),zg=c(),Gn=o("h2"),wa=o("a"),pu=o("span"),T(cd.$$.fragment),z$=c(),hu=o("span"),J$=r("FlaxElectraForMultipleChoice"),Jg=c(),dt=o("div"),T(pd.$$.fragment),U$=c(),mu=o("p"),I$=r(`ELECTRA 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.`),W$=c(),hd=o("p"),N$=r("This model inherits from "),Xc=o("a"),Z$=r("FlaxPreTrainedModel"),q$=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),A$=c(),md=o("p"),G$=r(`This model is also a Flax Linen
`),ud=o("a"),R$=r("flax.nn.Module"),P$=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),V$=c(),uu=o("p"),B$=r("Finally, this model supports inherent JAX features such as:"),S$=c(),wo=o("ul"),fu=o("li"),fd=o("a"),X$=r("Just-In-Time (JIT) compilation"),L$=c(),gu=o("li"),gd=o("a"),O$=r("Automatic Differentiation"),Q$=c(),_u=o("li"),_d=o("a"),D$=r("Vectorization"),Y$=c(),yu=o("li"),yd=o("a"),H$=r("Parallelization"),K$=c(),ro=o("div"),T(bd.$$.fragment),eF=c(),Rn=o("p"),tF=r("The "),bu=o("code"),oF=r("FlaxElectraPreTrainedModel"),nF=r(" forward method, overrides the "),vu=o("code"),sF=r("__call__"),aF=r(" special method."),rF=c(),T(Ma.$$.fragment),lF=c(),T(Ea.$$.fragment),Ug=c(),Pn=o("h2"),$a=o("a"),Tu=o("span"),T(vd.$$.fragment),iF=c(),ku=o("span"),dF=r("FlaxElectraForTokenClassification"),Ig=c(),et=o("div"),T(Td.$$.fragment),cF=c(),wu=o("p"),pF=r("Electra model with a token classification head on top."),hF=c(),Mu=o("p"),mF=r("Both the discriminator and generator may be loaded into this model."),uF=c(),kd=o("p"),fF=r("This model inherits from "),Lc=o("a"),gF=r("FlaxPreTrainedModel"),_F=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),yF=c(),wd=o("p"),bF=r(`This model is also a Flax Linen
`),Md=o("a"),vF=r("flax.nn.Module"),TF=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),kF=c(),Eu=o("p"),wF=r("Finally, this model supports inherent JAX features such as:"),MF=c(),Mo=o("ul"),$u=o("li"),Ed=o("a"),EF=r("Just-In-Time (JIT) compilation"),$F=c(),Fu=o("li"),$d=o("a"),FF=r("Automatic Differentiation"),jF=c(),ju=o("li"),Fd=o("a"),xF=r("Vectorization"),CF=c(),xu=o("li"),jd=o("a"),zF=r("Parallelization"),JF=c(),lo=o("div"),T(xd.$$.fragment),UF=c(),Vn=o("p"),IF=r("The "),Cu=o("code"),WF=r("FlaxElectraPreTrainedModel"),NF=r(" forward method, overrides the "),zu=o("code"),ZF=r("__call__"),qF=r(" special method."),AF=c(),T(Fa.$$.fragment),GF=c(),T(ja.$$.fragment),Wg=c(),Bn=o("h2"),xa=o("a"),Ju=o("span"),T(Cd.$$.fragment),RF=c(),Uu=o("span"),PF=r("FlaxElectraForQuestionAnswering"),Ng=c(),ct=o("div"),T(zd.$$.fragment),VF=c(),Sn=o("p"),BF=r(`ELECTRA 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 `),Iu=o("code"),SF=r("span start logits"),XF=r(" and "),Wu=o("code"),LF=r("span end logits"),OF=r(")."),QF=c(),Jd=o("p"),DF=r("This model inherits from "),Oc=o("a"),YF=r("FlaxPreTrainedModel"),HF=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),KF=c(),Ud=o("p"),ej=r(`This model is also a Flax Linen
`),Id=o("a"),tj=r("flax.nn.Module"),oj=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),nj=c(),Nu=o("p"),sj=r("Finally, this model supports inherent JAX features such as:"),aj=c(),Eo=o("ul"),Zu=o("li"),Wd=o("a"),rj=r("Just-In-Time (JIT) compilation"),lj=c(),qu=o("li"),Nd=o("a"),ij=r("Automatic Differentiation"),dj=c(),Au=o("li"),Zd=o("a"),cj=r("Vectorization"),pj=c(),Gu=o("li"),qd=o("a"),hj=r("Parallelization"),mj=c(),io=o("div"),T(Ad.$$.fragment),uj=c(),Xn=o("p"),fj=r("The "),Ru=o("code"),gj=r("FlaxElectraPreTrainedModel"),_j=r(" forward method, overrides the "),Pu=o("code"),yj=r("__call__"),bj=r(" special method."),vj=c(),T(Ca.$$.fragment),Tj=c(),T(za.$$.fragment),this.h()},l(s){const y=Kz('[data-svelte="svelte-1phssyn"]',document.head);d=n(y,"META",{name:!0,content:!0}),y.forEach(t),b=p(s),u=n(s,"H1",{class:!0});var Gd=a(u);f=n(Gd,"A",{id:!0,class:!0,href:!0});var Vu=a(f);_=n(Vu,"SPAN",{});var Bu=a(_);k(i.$$.fragment,Bu),Bu.forEach(t),Vu.forEach(t),h=p(Gd),x=n(Gd,"SPAN",{});var Su=a(x);be=l(Su,"ELECTRA"),Su.forEach(t),Gd.forEach(t),fe=p(s),R=n(s,"DIV",{class:!0});var Rd=a(R);de=n(Rd,"A",{href:!0});var Xu=a(de);te=n(Xu,"IMG",{alt:!0,src:!0}),Xu.forEach(t),ve=p(Rd),X=n(Rd,"A",{href:!0});var Lu=a(X);ce=n(Lu,"IMG",{alt:!0,src:!0}),Lu.forEach(t),Rd.forEach(t),D=p(s),ae=n(s,"H2",{class:!0});var Pd=a(ae);re=n(Pd,"A",{id:!0,class:!0,href:!0});var Ou=a(re);L=n(Ou,"SPAN",{});var Qu=a(L);k(le.$$.fragment,Qu),Qu.forEach(t),Ou.forEach(t),Te=p(Pd),O=n(Pd,"SPAN",{});var Du=a(O);ke=l(Du,"Overview"),Du.forEach(t),Pd.forEach(t),ge=p(s),B=n(s,"P",{});var Vd=a(B);we=l(Vd,"The ELECTRA model was proposed in the paper "),ie=n(Vd,"A",{href:!0,rel:!0});var Yu=a(ie);ne=l(Yu,`ELECTRA: Pre-training Text Encoders as Discriminators Rather Than
Generators`),Yu.forEach(t),J=l(Vd,`. ELECTRA is a new pretraining approach which trains two
transformer models: the generator and the discriminator. The generator\u2019s role is to replace tokens in a sequence, and
is therefore trained as a masked language model. The discriminator, which is the model we\u2019re interested in, tries to
identify which tokens were replaced by the generator in the sequence.`),Vd.forEach(t),I=p(s),pe=n(s,"P",{});var Hu=a(pe);H=l(Hu,"The abstract from the paper is the following:"),Hu.forEach(t),_e=p(s),he=n(s,"P",{});var Ku=a(he);Q=n(Ku,"EM",{});var ef=a(Q);Me=l(ef,`Masked language modeling (MLM) pretraining methods such as BERT corrupt the input by replacing some tokens with [MASK]
and then train a model to reconstruct the original tokens. While they produce good results when transferred to
downstream NLP tasks, they generally require large amounts of compute to be effective. As an alternative, we propose a
more sample-efficient pretraining task called replaced token detection. Instead of masking the input, our approach
corrupts it by replacing some tokens with plausible alternatives sampled from a small generator network. Then, instead
of training a model that predicts the original identities of the corrupted tokens, we train a discriminative model that
predicts whether each token in the corrupted input was replaced by a generator sample or not. Thorough experiments
demonstrate this new pretraining task is more efficient than MLM because the task is defined over all input tokens
rather than just the small subset that was masked out. As a result, the contextual representations learned by our
approach substantially outperform the ones learned by BERT given the same model size, data, and compute. The gains are
particularly strong for small models; for example, we train a model on one GPU for 4 days that outperforms GPT (trained
using 30x more compute) on the GLUE natural language understanding benchmark. Our approach also works well at scale,
where it performs comparably to RoBERTa and XLNet while using less than 1/4 of their compute and outperforms them when
using the same amount of compute.`),ef.forEach(t),Ku.forEach(t),ye=p(s),U=n(s,"P",{});var tf=a(U);Ee=l(tf,"Tips:"),tf.forEach(t),Y=p(s),se=n(s,"UL",{});var Ln=a(se);me=n(Ln,"LI",{});var of=a(me);K=l(of,`ELECTRA is the pretraining approach, therefore there is nearly no changes done to the underlying model: BERT. The
only change is the separation of the embedding size and the hidden size: the embedding size is generally smaller,
while the hidden size is larger. An additional projection layer (linear) is used to project the embeddings from their
embedding size to the hidden size. In the case where the embedding size is the same as the hidden size, no projection
layer is used.`),of.forEach(t),$e=p(Ln),ue=n(Ln,"LI",{});var nf=a(ue);G=l(nf,"ELECTRA is a transformer model pretrained with the use of another (small) masked language model. The inputs are corrupted by that language model, which takes an input text that is randomly masked and outputs a text in which ELECTRA has to predict which token is an original and which one has been replaced. Like for GAN training, the small language model is trained for a few steps (but with the original texts as objective, not to fool the ELECTRA model like in a traditional GAN setting) then the ELECTRA model is trained for a few steps."),nf.forEach(t),Fe=p(Ln),q=n(Ln,"LI",{});var $o=a(q);je=l($o,"The ELECTRA checkpoints saved using "),ee=n($o,"A",{href:!0,rel:!0});var sf=a(ee);W=l(sf,"Google Research\u2019s implementation"),sf.forEach(t),xe=l($o,`
contain both the generator and discriminator. The conversion script requires the user to name which model to export
into the correct architecture. Once converted to the HuggingFace format, these checkpoints may be loaded into all
available ELECTRA models, however. This means that the discriminator may be loaded in the
`),N=n($o,"A",{href:!0});var af=a(N);Ce=l(af,"ElectraForMaskedLM"),af.forEach(t),ze=l($o,` model, and the generator may be loaded in the
`),v=n($o,"A",{href:!0});var rf=a(v);C=l(rf,"ElectraForPreTraining"),rf.forEach(t),Xe=l($o,` model (the classification head will be randomly initialized as it
doesn\u2019t exist in the generator).`),$o.forEach(t),Ln.forEach(t),oe=p(s),Je=n(s,"P",{});var On=a(Je);Le=l(On,"This model was contributed by "),z=n(On,"A",{href:!0,rel:!0});var lf=a(z);Oe=l(lf,"lysandre"),lf.forEach(t),Qe=l(On,". The original code can be found "),Re=n(On,"A",{href:!0,rel:!0});var df=a(Re);De=l(df,"here"),df.forEach(t),Ye=l(On,"."),On.forEach(t),A=p(s),P=n(s,"H2",{class:!0});var Bd=a(P);Ge=n(Bd,"A",{id:!0,class:!0,href:!0});var cf=a(Ge);Pe=n(cf,"SPAN",{});var pf=a(Pe);k(S.$$.fragment,pf),pf.forEach(t),cf.forEach(t),He=p(Bd),Ve=n(Bd,"SPAN",{});var hf=a(Ve);Ue=l(hf,"Documentation resources"),hf.forEach(t),Bd.forEach(t),Se=p(s),V=n(s,"UL",{});var Ft=a(V);Be=n(Ft,"LI",{});var mf=a(Be);Ld=n(mf,"A",{href:!0});var uf=a(Ld);fy=l(uf,"Text classification task guide"),uf.forEach(t),mf.forEach(t),gy=p(Ft),Ep=n(Ft,"LI",{});var ff=a(Ep);Od=n(ff,"A",{href:!0});var gf=a(Od);_y=l(gf,"Token classification task guide"),gf.forEach(t),ff.forEach(t),yy=p(Ft),$p=n(Ft,"LI",{});var _f=a($p);Qd=n(_f,"A",{href:!0});var yf=a(Qd);by=l(yf,"Question answering task guide"),yf.forEach(t),_f.forEach(t),vy=p(Ft),Fp=n(Ft,"LI",{});var bf=a(Fp);Dd=n(bf,"A",{href:!0});var vf=a(Dd);Ty=l(vf,"Causal language modeling task guide"),vf.forEach(t),bf.forEach(t),ky=p(Ft),jp=n(Ft,"LI",{});var Tf=a(jp);Yd=n(Tf,"A",{href:!0});var kf=a(Yd);wy=l(kf,"Masked language modeling task guide"),kf.forEach(t),Tf.forEach(t),My=p(Ft),xp=n(Ft,"LI",{});var wf=a(xp);Hd=n(wf,"A",{href:!0});var Mf=a(Hd);Ey=l(Mf,"Multiple choice task guide"),Mf.forEach(t),wf.forEach(t),Ft.forEach(t),Nf=p(s),Po=n(s,"H2",{class:!0});var Sd=a(Po);Dn=n(Sd,"A",{id:!0,class:!0,href:!0});var Ef=a(Dn);Cp=n(Ef,"SPAN",{});var $f=a(Cp);k(rr.$$.fragment,$f),$f.forEach(t),Ef.forEach(t),$y=p(Sd),zp=n(Sd,"SPAN",{});var Ff=a(zp);Fy=l(Ff,"ElectraConfig"),Ff.forEach(t),Sd.forEach(t),Zf=p(s),Pt=n(s,"DIV",{class:!0});var Fo=a(Pt);k(lr.$$.fragment,Fo),jy=p(Fo),_o=n(Fo,"P",{});var jo=a(_o);xy=l(jo,"This is the configuration class to store the configuration of a "),Kd=n(jo,"A",{href:!0});var jf=a(Kd);Cy=l(jf,"ElectraModel"),jf.forEach(t),zy=l(jo," or a "),ec=n(jo,"A",{href:!0});var xf=a(ec);Jy=l(xf,"TFElectraModel"),xf.forEach(t),Uy=l(jo,`. It is
used to instantiate a ELECTRA 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 ELECTRA
`),ir=n(jo,"A",{href:!0,rel:!0});var Cf=a(ir);Iy=l(Cf,"google/electra-small-discriminator"),Cf.forEach(t),Wy=l(jo," architecture."),jo.forEach(t),Ny=p(Fo),Vo=n(Fo,"P",{});var Qn=a(Vo);Zy=l(Qn,"Configuration objects inherit from "),tc=n(Qn,"A",{href:!0});var zf=a(tc);qy=l(zf,"PretrainedConfig"),zf.forEach(t),Ay=l(Qn,` and can be used to control the model outputs. Read the
documentation from `),oc=n(Qn,"A",{href:!0});var Jf=a(oc);Gy=l(Jf,"PretrainedConfig"),Jf.forEach(t),Ry=l(Qn," for more information."),Qn.forEach(t),Py=p(Fo),k(Yn.$$.fragment,Fo),Fo.forEach(t),qf=p(s),Bo=n(s,"H2",{class:!0});var Xd=a(Bo);Hn=n(Xd,"A",{id:!0,class:!0,href:!0});var Uf=a(Hn);Jp=n(Uf,"SPAN",{});var If=a(Jp);k(dr.$$.fragment,If),If.forEach(t),Uf.forEach(t),Vy=p(Xd),Up=n(Xd,"SPAN",{});var Wf=a(Up);By=l(Wf,"ElectraTokenizer"),Wf.forEach(t),Xd.forEach(t),Af=p(s),tt=n(s,"DIV",{class:!0});var yt=a(tt);k(cr.$$.fragment,yt),Sy=p(yt),Ip=n(yt,"P",{});var $j=a(Ip);Xy=l($j,"Construct a Electra tokenizer. Based on WordPiece."),$j.forEach(t),Ly=p(yt),pr=n(yt,"P",{});var qg=a(pr);Oy=l(qg,"This tokenizer inherits from "),nc=n(qg,"A",{href:!0});var Fj=a(nc);Qy=l(Fj,"PreTrainedTokenizer"),Fj.forEach(t),Dy=l(qg,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),qg.forEach(t),Yy=p(yt),xo=n(yt,"DIV",{class:!0});var Qc=a(xo);k(hr.$$.fragment,Qc),Hy=p(Qc),Wp=n(Qc,"P",{});var jj=a(Wp);Ky=l(jj,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Electra sequence has the following format:`),jj.forEach(t),eb=p(Qc),mr=n(Qc,"UL",{});var Ag=a(mr);sc=n(Ag,"LI",{});var kj=a(sc);tb=l(kj,"single sequence: "),Np=n(kj,"CODE",{});var xj=a(Np);ob=l(xj,"[CLS] X [SEP]"),xj.forEach(t),kj.forEach(t),nb=p(Ag),ac=n(Ag,"LI",{});var wj=a(ac);sb=l(wj,"pair of sequences: "),Zp=n(wj,"CODE",{});var Cj=a(Zp);ab=l(Cj,"[CLS] A [SEP] B [SEP]"),Cj.forEach(t),wj.forEach(t),Ag.forEach(t),Qc.forEach(t),rb=p(yt),Kn=n(yt,"DIV",{class:!0});var Gg=a(Kn);k(ur.$$.fragment,Gg),lb=p(Gg),qp=n(Gg,"P",{});var zj=a(qp);ib=l(zj,"Converts a sequence of tokens (string) in a single string."),zj.forEach(t),Gg.forEach(t),db=p(yt),Vt=n(yt,"DIV",{class:!0});var Ja=a(Vt);k(fr.$$.fragment,Ja),cb=p(Ja),Ap=n(Ja,"P",{});var Jj=a(Ap);pb=l(Jj,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Electra"),Jj.forEach(t),hb=p(Ja),k(es.$$.fragment,Ja),mb=p(Ja),So=n(Ja,"P",{});var Dc=a(So);ub=l(Dc,"If "),Gp=n(Dc,"CODE",{});var Uj=a(Gp);fb=l(Uj,"token_ids_1"),Uj.forEach(t),gb=l(Dc," is "),Rp=n(Dc,"CODE",{});var Ij=a(Rp);_b=l(Ij,"None"),Ij.forEach(t),yb=l(Dc,", this method only returns the first portion of the mask (0s)."),Dc.forEach(t),Ja.forEach(t),bb=p(yt),ts=n(yt,"DIV",{class:!0});var Rg=a(ts);k(gr.$$.fragment,Rg),vb=p(Rg),_r=n(Rg,"P",{});var Pg=a(_r);Tb=l(Pg,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Pp=n(Pg,"CODE",{});var Wj=a(Pp);kb=l(Wj,"prepare_for_model"),Wj.forEach(t),wb=l(Pg," method."),Pg.forEach(t),Rg.forEach(t),yt.forEach(t),Gf=p(s),Xo=n(s,"H2",{class:!0});var Vg=a(Xo);os=n(Vg,"A",{id:!0,class:!0,href:!0});var Nj=a(os);Vp=n(Nj,"SPAN",{});var Zj=a(Vp);k(yr.$$.fragment,Zj),Zj.forEach(t),Nj.forEach(t),Mb=p(Vg),Bp=n(Vg,"SPAN",{});var qj=a(Bp);Eb=l(qj,"ElectraTokenizerFast"),qj.forEach(t),Vg.forEach(t),Rf=p(s),Tt=n(s,"DIV",{class:!0});var zo=a(Tt);k(br.$$.fragment,zo),$b=p(zo),vr=n(zo,"P",{});var Bg=a(vr);Fb=l(Bg,"Construct a \u201Cfast\u201D ELECTRA tokenizer (backed by HuggingFace\u2019s "),Sp=n(Bg,"EM",{});var Aj=a(Sp);jb=l(Aj,"tokenizers"),Aj.forEach(t),xb=l(Bg," library). Based on WordPiece."),Bg.forEach(t),Cb=p(zo),Tr=n(zo,"P",{});var Sg=a(Tr);zb=l(Sg,"This tokenizer inherits from "),rc=n(Sg,"A",{href:!0});var Gj=a(rc);Jb=l(Gj,"PreTrainedTokenizerFast"),Gj.forEach(t),Ub=l(Sg,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Sg.forEach(t),Ib=p(zo),Co=n(zo,"DIV",{class:!0});var Yc=a(Co);k(kr.$$.fragment,Yc),Wb=p(Yc),Xp=n(Yc,"P",{});var Rj=a(Xp);Nb=l(Rj,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A ELECTRA sequence has the following format:`),Rj.forEach(t),Zb=p(Yc),wr=n(Yc,"UL",{});var Xg=a(wr);lc=n(Xg,"LI",{});var Mj=a(lc);qb=l(Mj,"single sequence: "),Lp=n(Mj,"CODE",{});var Pj=a(Lp);Ab=l(Pj,"[CLS] X [SEP]"),Pj.forEach(t),Mj.forEach(t),Gb=p(Xg),ic=n(Xg,"LI",{});var Ej=a(ic);Rb=l(Ej,"pair of sequences: "),Op=n(Ej,"CODE",{});var Vj=a(Op);Pb=l(Vj,"[CLS] A [SEP] B [SEP]"),Vj.forEach(t),Ej.forEach(t),Xg.forEach(t),Yc.forEach(t),Vb=p(zo),Bt=n(zo,"DIV",{class:!0});var Ua=a(Bt);k(Mr.$$.fragment,Ua),Bb=p(Ua),Qp=n(Ua,"P",{});var Bj=a(Qp);Sb=l(Bj,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ELECTRA"),Bj.forEach(t),Xb=p(Ua),k(ns.$$.fragment,Ua),Lb=p(Ua),Lo=n(Ua,"P",{});var Hc=a(Lo);Ob=l(Hc,"If "),Dp=n(Hc,"CODE",{});var Sj=a(Dp);Qb=l(Sj,"token_ids_1"),Sj.forEach(t),Db=l(Hc," is "),Yp=n(Hc,"CODE",{});var Xj=a(Yp);Yb=l(Xj,"None"),Xj.forEach(t),Hb=l(Hc,", this method only returns the first portion of the mask (0s)."),Hc.forEach(t),Ua.forEach(t),zo.forEach(t),Pf=p(s),Oo=n(s,"H2",{class:!0});var Lg=a(Oo);ss=n(Lg,"A",{id:!0,class:!0,href:!0});var Lj=a(ss);Hp=n(Lj,"SPAN",{});var Oj=a(Hp);k(Er.$$.fragment,Oj),Oj.forEach(t),Lj.forEach(t),Kb=p(Lg),Kp=n(Lg,"SPAN",{});var Qj=a(Kp);ev=l(Qj,"Electra specific outputs"),Qj.forEach(t),Lg.forEach(t),Vf=p(s),Qo=n(s,"DIV",{class:!0});var Og=a(Qo);k($r.$$.fragment,Og),tv=p(Og),Fr=n(Og,"P",{});var Qg=a(Fr);ov=l(Qg,"Output type of "),dc=n(Qg,"A",{href:!0});var Dj=a(dc);nv=l(Dj,"ElectraForPreTraining"),Dj.forEach(t),sv=l(Qg,"."),Qg.forEach(t),Og.forEach(t),Bf=p(s),Do=n(s,"DIV",{class:!0});var Dg=a(Do);k(jr.$$.fragment,Dg),av=p(Dg),xr=n(Dg,"P",{});var Yg=a(xr);rv=l(Yg,"Output type of "),cc=n(Yg,"A",{href:!0});var Yj=a(cc);lv=l(Yj,"TFElectraForPreTraining"),Yj.forEach(t),iv=l(Yg,"."),Yg.forEach(t),Dg.forEach(t),Sf=p(s),Yo=n(s,"H2",{class:!0});var Hg=a(Yo);as=n(Hg,"A",{id:!0,class:!0,href:!0});var Hj=a(as);eh=n(Hj,"SPAN",{});var Kj=a(eh);k(Cr.$$.fragment,Kj),Kj.forEach(t),Hj.forEach(t),dv=p(Hg),th=n(Hg,"SPAN",{});var ex=a(th);cv=l(ex,"ElectraModel"),ex.forEach(t),Hg.forEach(t),Xf=p(s),kt=n(s,"DIV",{class:!0});var Jo=a(kt);k(zr.$$.fragment,Jo),pv=p(Jo),oh=n(Jo,"P",{});var tx=a(oh);hv=l(tx,"The bare Electra Model transformer outputting raw hidden-states without any specific head on top. Identical to the BERT model except that it uses an additional linear layer between the embedding layer and the encoder if the hidden size and embedding size are different. Both the generator and discriminator checkpoints may be loaded into this model."),tx.forEach(t),mv=p(Jo),Jr=n(Jo,"P",{});var Kg=a(Jr);uv=l(Kg,"This model inherits from "),pc=n(Kg,"A",{href:!0});var ox=a(pc);fv=l(ox,"PreTrainedModel"),ox.forEach(t),gv=l(Kg,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Kg.forEach(t),_v=p(Jo),Ur=n(Jo,"P",{});var e_=a(Ur);yv=l(e_,"This model is also a PyTorch "),Ir=n(e_,"A",{href:!0,rel:!0});var nx=a(Ir);bv=l(nx,"torch.nn.Module"),nx.forEach(t),vv=l(e_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),e_.forEach(t),Tv=p(Jo),St=n(Jo,"DIV",{class:!0});var Ia=a(St);k(Wr.$$.fragment,Ia),kv=p(Ia),Ho=n(Ia,"P",{});var Kc=a(Ho);wv=l(Kc,"The "),hc=n(Kc,"A",{href:!0});var sx=a(hc);Mv=l(sx,"ElectraModel"),sx.forEach(t),Ev=l(Kc," forward method, overrides the "),nh=n(Kc,"CODE",{});var ax=a(nh);$v=l(ax,"__call__"),ax.forEach(t),Fv=l(Kc," special method."),Kc.forEach(t),jv=p(Ia),k(rs.$$.fragment,Ia),xv=p(Ia),k(ls.$$.fragment,Ia),Ia.forEach(t),Jo.forEach(t),Lf=p(s),Ko=n(s,"H2",{class:!0});var t_=a(Ko);is=n(t_,"A",{id:!0,class:!0,href:!0});var rx=a(is);sh=n(rx,"SPAN",{});var lx=a(sh);k(Nr.$$.fragment,lx),lx.forEach(t),rx.forEach(t),Cv=p(t_),ah=n(t_,"SPAN",{});var ix=a(ah);zv=l(ix,"ElectraForPreTraining"),ix.forEach(t),t_.forEach(t),Of=p(s),pt=n(s,"DIV",{class:!0});var co=a(pt);k(Zr.$$.fragment,co),Jv=p(co),rh=n(co,"P",{});var dx=a(rh);Uv=l(dx,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),dx.forEach(t),Iv=p(co),lh=n(co,"P",{});var cx=a(lh);Wv=l(cx,"It is recommended to load the discriminator checkpoint into that model."),cx.forEach(t),Nv=p(co),qr=n(co,"P",{});var o_=a(qr);Zv=l(o_,"This model inherits from "),mc=n(o_,"A",{href:!0});var px=a(mc);qv=l(px,"PreTrainedModel"),px.forEach(t),Av=l(o_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),o_.forEach(t),Gv=p(co),Ar=n(co,"P",{});var n_=a(Ar);Rv=l(n_,"This model is also a PyTorch "),Gr=n(n_,"A",{href:!0,rel:!0});var hx=a(Gr);Pv=l(hx,"torch.nn.Module"),hx.forEach(t),Vv=l(n_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),n_.forEach(t),Bv=p(co),Xt=n(co,"DIV",{class:!0});var Wa=a(Xt);k(Rr.$$.fragment,Wa),Sv=p(Wa),en=n(Wa,"P",{});var ep=a(en);Xv=l(ep,"The "),uc=n(ep,"A",{href:!0});var mx=a(uc);Lv=l(mx,"ElectraForPreTraining"),mx.forEach(t),Ov=l(ep," forward method, overrides the "),ih=n(ep,"CODE",{});var ux=a(ih);Qv=l(ux,"__call__"),ux.forEach(t),Dv=l(ep," special method."),ep.forEach(t),Yv=p(Wa),k(ds.$$.fragment,Wa),Hv=p(Wa),k(cs.$$.fragment,Wa),Wa.forEach(t),co.forEach(t),Qf=p(s),tn=n(s,"H2",{class:!0});var s_=a(tn);ps=n(s_,"A",{id:!0,class:!0,href:!0});var fx=a(ps);dh=n(fx,"SPAN",{});var gx=a(dh);k(Pr.$$.fragment,gx),gx.forEach(t),fx.forEach(t),Kv=p(s_),ch=n(s_,"SPAN",{});var _x=a(ch);eT=l(_x,"ElectraForCausalLM"),_x.forEach(t),s_.forEach(t),Df=p(s),wt=n(s,"DIV",{class:!0});var Uo=a(wt);k(Vr.$$.fragment,Uo),tT=p(Uo),Br=n(Uo,"P",{});var a_=a(Br);oT=l(a_,"ELECTRA Model with a "),ph=n(a_,"CODE",{});var yx=a(ph);nT=l(yx,"language modeling"),yx.forEach(t),sT=l(a_," head on top for CLM fine-tuning."),a_.forEach(t),aT=p(Uo),Sr=n(Uo,"P",{});var r_=a(Sr);rT=l(r_,"This model inherits from "),fc=n(r_,"A",{href:!0});var bx=a(fc);lT=l(bx,"PreTrainedModel"),bx.forEach(t),iT=l(r_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),r_.forEach(t),dT=p(Uo),Xr=n(Uo,"P",{});var l_=a(Xr);cT=l(l_,"This model is also a PyTorch "),Lr=n(l_,"A",{href:!0,rel:!0});var vx=a(Lr);pT=l(vx,"torch.nn.Module"),vx.forEach(t),hT=l(l_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),l_.forEach(t),mT=p(Uo),Lt=n(Uo,"DIV",{class:!0});var Na=a(Lt);k(Or.$$.fragment,Na),uT=p(Na),on=n(Na,"P",{});var tp=a(on);fT=l(tp,"The "),gc=n(tp,"A",{href:!0});var Tx=a(gc);gT=l(Tx,"ElectraForCausalLM"),Tx.forEach(t),_T=l(tp," forward method, overrides the "),hh=n(tp,"CODE",{});var kx=a(hh);yT=l(kx,"__call__"),kx.forEach(t),bT=l(tp," special method."),tp.forEach(t),vT=p(Na),k(hs.$$.fragment,Na),TT=p(Na),k(ms.$$.fragment,Na),Na.forEach(t),Uo.forEach(t),Yf=p(s),nn=n(s,"H2",{class:!0});var i_=a(nn);us=n(i_,"A",{id:!0,class:!0,href:!0});var wx=a(us);mh=n(wx,"SPAN",{});var Mx=a(mh);k(Qr.$$.fragment,Mx),Mx.forEach(t),wx.forEach(t),kT=p(i_),uh=n(i_,"SPAN",{});var Ex=a(uh);wT=l(Ex,"ElectraForMaskedLM"),Ex.forEach(t),i_.forEach(t),Hf=p(s),ht=n(s,"DIV",{class:!0});var po=a(ht);k(Dr.$$.fragment,po),MT=p(po),fh=n(po,"P",{});var $x=a(fh);ET=l($x,"Electra model with a language modeling head on top."),$x.forEach(t),$T=p(po),gh=n(po,"P",{});var Fx=a(gh);FT=l(Fx,`Even though both the discriminator and generator may be loaded into this model, the generator is the only model of
the two to have been trained for the masked language modeling task.`),Fx.forEach(t),jT=p(po),Yr=n(po,"P",{});var d_=a(Yr);xT=l(d_,"This model inherits from "),_c=n(d_,"A",{href:!0});var jx=a(_c);CT=l(jx,"PreTrainedModel"),jx.forEach(t),zT=l(d_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),d_.forEach(t),JT=p(po),Hr=n(po,"P",{});var c_=a(Hr);UT=l(c_,"This model is also a PyTorch "),Kr=n(c_,"A",{href:!0,rel:!0});var xx=a(Kr);IT=l(xx,"torch.nn.Module"),xx.forEach(t),WT=l(c_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),c_.forEach(t),NT=p(po),Ot=n(po,"DIV",{class:!0});var Za=a(Ot);k(el.$$.fragment,Za),ZT=p(Za),sn=n(Za,"P",{});var op=a(sn);qT=l(op,"The "),yc=n(op,"A",{href:!0});var Cx=a(yc);AT=l(Cx,"ElectraForMaskedLM"),Cx.forEach(t),GT=l(op," forward method, overrides the "),_h=n(op,"CODE",{});var zx=a(_h);RT=l(zx,"__call__"),zx.forEach(t),PT=l(op," special method."),op.forEach(t),VT=p(Za),k(fs.$$.fragment,Za),BT=p(Za),k(gs.$$.fragment,Za),Za.forEach(t),po.forEach(t),Kf=p(s),an=n(s,"H2",{class:!0});var p_=a(an);_s=n(p_,"A",{id:!0,class:!0,href:!0});var Jx=a(_s);yh=n(Jx,"SPAN",{});var Ux=a(yh);k(tl.$$.fragment,Ux),Ux.forEach(t),Jx.forEach(t),ST=p(p_),bh=n(p_,"SPAN",{});var Ix=a(bh);XT=l(Ix,"ElectraForSequenceClassification"),Ix.forEach(t),p_.forEach(t),eg=p(s),Mt=n(s,"DIV",{class:!0});var Io=a(Mt);k(ol.$$.fragment,Io),LT=p(Io),vh=n(Io,"P",{});var Wx=a(vh);OT=l(Wx,`ELECTRA Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Wx.forEach(t),QT=p(Io),nl=n(Io,"P",{});var h_=a(nl);DT=l(h_,"This model inherits from "),bc=n(h_,"A",{href:!0});var Nx=a(bc);YT=l(Nx,"PreTrainedModel"),Nx.forEach(t),HT=l(h_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),h_.forEach(t),KT=p(Io),sl=n(Io,"P",{});var m_=a(sl);ek=l(m_,"This model is also a PyTorch "),al=n(m_,"A",{href:!0,rel:!0});var Zx=a(al);tk=l(Zx,"torch.nn.Module"),Zx.forEach(t),ok=l(m_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),m_.forEach(t),nk=p(Io),jt=n(Io,"DIV",{class:!0});var Wo=a(jt);k(rl.$$.fragment,Wo),sk=p(Wo),rn=n(Wo,"P",{});var np=a(rn);ak=l(np,"The "),vc=n(np,"A",{href:!0});var qx=a(vc);rk=l(qx,"ElectraForSequenceClassification"),qx.forEach(t),lk=l(np," forward method, overrides the "),Th=n(np,"CODE",{});var Ax=a(Th);ik=l(Ax,"__call__"),Ax.forEach(t),dk=l(np," special method."),np.forEach(t),ck=p(Wo),k(ys.$$.fragment,Wo),pk=p(Wo),k(bs.$$.fragment,Wo),hk=p(Wo),k(vs.$$.fragment,Wo),Wo.forEach(t),Io.forEach(t),tg=p(s),ln=n(s,"H2",{class:!0});var u_=a(ln);Ts=n(u_,"A",{id:!0,class:!0,href:!0});var Gx=a(Ts);kh=n(Gx,"SPAN",{});var Rx=a(kh);k(ll.$$.fragment,Rx),Rx.forEach(t),Gx.forEach(t),mk=p(u_),wh=n(u_,"SPAN",{});var Px=a(wh);uk=l(Px,"ElectraForMultipleChoice"),Px.forEach(t),u_.forEach(t),og=p(s),Et=n(s,"DIV",{class:!0});var No=a(Et);k(il.$$.fragment,No),fk=p(No),Mh=n(No,"P",{});var Vx=a(Mh);gk=l(Vx,`ELECTRA 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.`),Vx.forEach(t),_k=p(No),dl=n(No,"P",{});var f_=a(dl);yk=l(f_,"This model inherits from "),Tc=n(f_,"A",{href:!0});var Bx=a(Tc);bk=l(Bx,"PreTrainedModel"),Bx.forEach(t),vk=l(f_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),f_.forEach(t),Tk=p(No),cl=n(No,"P",{});var g_=a(cl);kk=l(g_,"This model is also a PyTorch "),pl=n(g_,"A",{href:!0,rel:!0});var Sx=a(pl);wk=l(Sx,"torch.nn.Module"),Sx.forEach(t),Mk=l(g_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),g_.forEach(t),Ek=p(No),Qt=n(No,"DIV",{class:!0});var qa=a(Qt);k(hl.$$.fragment,qa),$k=p(qa),dn=n(qa,"P",{});var sp=a(dn);Fk=l(sp,"The "),kc=n(sp,"A",{href:!0});var Xx=a(kc);jk=l(Xx,"ElectraForMultipleChoice"),Xx.forEach(t),xk=l(sp," forward method, overrides the "),Eh=n(sp,"CODE",{});var Lx=a(Eh);Ck=l(Lx,"__call__"),Lx.forEach(t),zk=l(sp," special method."),sp.forEach(t),Jk=p(qa),k(ks.$$.fragment,qa),Uk=p(qa),k(ws.$$.fragment,qa),qa.forEach(t),No.forEach(t),ng=p(s),cn=n(s,"H2",{class:!0});var __=a(cn);Ms=n(__,"A",{id:!0,class:!0,href:!0});var Ox=a(Ms);$h=n(Ox,"SPAN",{});var Qx=a($h);k(ml.$$.fragment,Qx),Qx.forEach(t),Ox.forEach(t),Ik=p(__),Fh=n(__,"SPAN",{});var Dx=a(Fh);Wk=l(Dx,"ElectraForTokenClassification"),Dx.forEach(t),__.forEach(t),sg=p(s),mt=n(s,"DIV",{class:!0});var ho=a(mt);k(ul.$$.fragment,ho),Nk=p(ho),jh=n(ho,"P",{});var Yx=a(jh);Zk=l(Yx,"Electra model with a token classification head on top."),Yx.forEach(t),qk=p(ho),xh=n(ho,"P",{});var Hx=a(xh);Ak=l(Hx,"Both the discriminator and generator may be loaded into this model."),Hx.forEach(t),Gk=p(ho),fl=n(ho,"P",{});var y_=a(fl);Rk=l(y_,"This model inherits from "),wc=n(y_,"A",{href:!0});var Kx=a(wc);Pk=l(Kx,"PreTrainedModel"),Kx.forEach(t),Vk=l(y_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),y_.forEach(t),Bk=p(ho),gl=n(ho,"P",{});var b_=a(gl);Sk=l(b_,"This model is also a PyTorch "),_l=n(b_,"A",{href:!0,rel:!0});var e3=a(_l);Xk=l(e3,"torch.nn.Module"),e3.forEach(t),Lk=l(b_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),b_.forEach(t),Ok=p(ho),Dt=n(ho,"DIV",{class:!0});var Aa=a(Dt);k(yl.$$.fragment,Aa),Qk=p(Aa),pn=n(Aa,"P",{});var ap=a(pn);Dk=l(ap,"The "),Mc=n(ap,"A",{href:!0});var t3=a(Mc);Yk=l(t3,"ElectraForTokenClassification"),t3.forEach(t),Hk=l(ap," forward method, overrides the "),Ch=n(ap,"CODE",{});var o3=a(Ch);Kk=l(o3,"__call__"),o3.forEach(t),ew=l(ap," special method."),ap.forEach(t),tw=p(Aa),k(Es.$$.fragment,Aa),ow=p(Aa),k($s.$$.fragment,Aa),Aa.forEach(t),ho.forEach(t),ag=p(s),hn=n(s,"H2",{class:!0});var v_=a(hn);Fs=n(v_,"A",{id:!0,class:!0,href:!0});var n3=a(Fs);zh=n(n3,"SPAN",{});var s3=a(zh);k(bl.$$.fragment,s3),s3.forEach(t),n3.forEach(t),nw=p(v_),Jh=n(v_,"SPAN",{});var a3=a(Jh);sw=l(a3,"ElectraForQuestionAnswering"),a3.forEach(t),v_.forEach(t),rg=p(s),$t=n(s,"DIV",{class:!0});var Zo=a($t);k(vl.$$.fragment,Zo),aw=p(Zo),mn=n(Zo,"P",{});var rp=a(mn);rw=l(rp,`ELECTRA 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 `),Uh=n(rp,"CODE",{});var r3=a(Uh);lw=l(r3,"span start logits"),r3.forEach(t),iw=l(rp," and "),Ih=n(rp,"CODE",{});var l3=a(Ih);dw=l(l3,"span end logits"),l3.forEach(t),cw=l(rp,")."),rp.forEach(t),pw=p(Zo),Tl=n(Zo,"P",{});var T_=a(Tl);hw=l(T_,"This model inherits from "),Ec=n(T_,"A",{href:!0});var i3=a(Ec);mw=l(i3,"PreTrainedModel"),i3.forEach(t),uw=l(T_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),T_.forEach(t),fw=p(Zo),kl=n(Zo,"P",{});var k_=a(kl);gw=l(k_,"This model is also a PyTorch "),wl=n(k_,"A",{href:!0,rel:!0});var d3=a(wl);_w=l(d3,"torch.nn.Module"),d3.forEach(t),yw=l(k_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),k_.forEach(t),bw=p(Zo),Yt=n(Zo,"DIV",{class:!0});var Ga=a(Yt);k(Ml.$$.fragment,Ga),vw=p(Ga),un=n(Ga,"P",{});var lp=a(un);Tw=l(lp,"The "),$c=n(lp,"A",{href:!0});var c3=a($c);kw=l(c3,"ElectraForQuestionAnswering"),c3.forEach(t),ww=l(lp," forward method, overrides the "),Wh=n(lp,"CODE",{});var p3=a(Wh);Mw=l(p3,"__call__"),p3.forEach(t),Ew=l(lp," special method."),lp.forEach(t),$w=p(Ga),k(js.$$.fragment,Ga),Fw=p(Ga),k(xs.$$.fragment,Ga),Ga.forEach(t),Zo.forEach(t),lg=p(s),fn=n(s,"H2",{class:!0});var w_=a(fn);Cs=n(w_,"A",{id:!0,class:!0,href:!0});var h3=a(Cs);Nh=n(h3,"SPAN",{});var m3=a(Nh);k(El.$$.fragment,m3),m3.forEach(t),h3.forEach(t),jw=p(w_),Zh=n(w_,"SPAN",{});var u3=a(Zh);xw=l(u3,"TFElectraModel"),u3.forEach(t),w_.forEach(t),ig=p(s),ut=n(s,"DIV",{class:!0});var mo=a(ut);k($l.$$.fragment,mo),Cw=p(mo),qh=n(mo,"P",{});var f3=a(qh);zw=l(f3,"The bare Electra Model transformer outputting raw hidden-states without any specific head on top. Identical to the BERT model except that it uses an additional linear layer between the embedding layer and the encoder if the hidden size and embedding size are different. Both the generator and discriminator checkpoints may be loaded into this model."),f3.forEach(t),Jw=p(mo),Fl=n(mo,"P",{});var M_=a(Fl);Uw=l(M_,"This model inherits from "),Fc=n(M_,"A",{href:!0});var g3=a(Fc);Iw=l(g3,"TFPreTrainedModel"),g3.forEach(t),Ww=l(M_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),M_.forEach(t),Nw=p(mo),jl=n(mo,"P",{});var E_=a(jl);Zw=l(E_,"This model is also a "),xl=n(E_,"A",{href:!0,rel:!0});var _3=a(xl);qw=l(_3,"tf.keras.Model"),_3.forEach(t),Aw=l(E_,` 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.`),E_.forEach(t),Gw=p(mo),k(zs.$$.fragment,mo),Rw=p(mo),Ht=n(mo,"DIV",{class:!0});var Ra=a(Ht);k(Cl.$$.fragment,Ra),Pw=p(Ra),gn=n(Ra,"P",{});var ip=a(gn);Vw=l(ip,"The "),jc=n(ip,"A",{href:!0});var y3=a(jc);Bw=l(y3,"TFElectraModel"),y3.forEach(t),Sw=l(ip," forward method, overrides the "),Ah=n(ip,"CODE",{});var b3=a(Ah);Xw=l(b3,"__call__"),b3.forEach(t),Lw=l(ip," special method."),ip.forEach(t),Ow=p(Ra),k(Js.$$.fragment,Ra),Qw=p(Ra),k(Us.$$.fragment,Ra),Ra.forEach(t),mo.forEach(t),dg=p(s),_n=n(s,"H2",{class:!0});var $_=a(_n);Is=n($_,"A",{id:!0,class:!0,href:!0});var v3=a(Is);Gh=n(v3,"SPAN",{});var T3=a(Gh);k(zl.$$.fragment,T3),T3.forEach(t),v3.forEach(t),Dw=p($_),Rh=n($_,"SPAN",{});var k3=a(Rh);Yw=l(k3,"TFElectraForPreTraining"),k3.forEach(t),$_.forEach(t),cg=p(s),ot=n(s,"DIV",{class:!0});var Ut=a(ot);k(Jl.$$.fragment,Ut),Hw=p(Ut),Ph=n(Ut,"P",{});var w3=a(Ph);Kw=l(w3,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),w3.forEach(t),e1=p(Ut),Vh=n(Ut,"P",{});var M3=a(Vh);t1=l(M3,`Even though both the discriminator and generator may be loaded into this model, the discriminator is the only model
of the two to have the correct classification head to be used for this model.`),M3.forEach(t),o1=p(Ut),Ul=n(Ut,"P",{});var F_=a(Ul);n1=l(F_,"This model inherits from "),xc=n(F_,"A",{href:!0});var E3=a(xc);s1=l(E3,"TFPreTrainedModel"),E3.forEach(t),a1=l(F_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),F_.forEach(t),r1=p(Ut),Il=n(Ut,"P",{});var j_=a(Il);l1=l(j_,"This model is also a "),Wl=n(j_,"A",{href:!0,rel:!0});var $3=a(Wl);i1=l($3,"tf.keras.Model"),$3.forEach(t),d1=l(j_,` 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.`),j_.forEach(t),c1=p(Ut),k(Ws.$$.fragment,Ut),p1=p(Ut),Kt=n(Ut,"DIV",{class:!0});var Pa=a(Kt);k(Nl.$$.fragment,Pa),h1=p(Pa),yn=n(Pa,"P",{});var dp=a(yn);m1=l(dp,"The "),Cc=n(dp,"A",{href:!0});var F3=a(Cc);u1=l(F3,"TFElectraForPreTraining"),F3.forEach(t),f1=l(dp," forward method, overrides the "),Bh=n(dp,"CODE",{});var j3=a(Bh);g1=l(j3,"__call__"),j3.forEach(t),_1=l(dp," special method."),dp.forEach(t),y1=p(Pa),k(Ns.$$.fragment,Pa),b1=p(Pa),k(Zs.$$.fragment,Pa),Pa.forEach(t),Ut.forEach(t),pg=p(s),bn=n(s,"H2",{class:!0});var x_=a(bn);qs=n(x_,"A",{id:!0,class:!0,href:!0});var x3=a(qs);Sh=n(x3,"SPAN",{});var C3=a(Sh);k(Zl.$$.fragment,C3),C3.forEach(t),x3.forEach(t),v1=p(x_),Xh=n(x_,"SPAN",{});var z3=a(Xh);T1=l(z3,"TFElectraForMaskedLM"),z3.forEach(t),x_.forEach(t),hg=p(s),nt=n(s,"DIV",{class:!0});var It=a(nt);k(ql.$$.fragment,It),k1=p(It),Lh=n(It,"P",{});var J3=a(Lh);w1=l(J3,"Electra model with a language modeling head on top."),J3.forEach(t),M1=p(It),Oh=n(It,"P",{});var U3=a(Oh);E1=l(U3,`Even though both the discriminator and generator may be loaded into this model, the generator is the only model of
the two to have been trained for the masked language modeling task.`),U3.forEach(t),$1=p(It),Al=n(It,"P",{});var C_=a(Al);F1=l(C_,"This model inherits from "),zc=n(C_,"A",{href:!0});var I3=a(zc);j1=l(I3,"TFPreTrainedModel"),I3.forEach(t),x1=l(C_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),C_.forEach(t),C1=p(It),Gl=n(It,"P",{});var z_=a(Gl);z1=l(z_,"This model is also a "),Rl=n(z_,"A",{href:!0,rel:!0});var W3=a(Rl);J1=l(W3,"tf.keras.Model"),W3.forEach(t),U1=l(z_,` 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.`),z_.forEach(t),I1=p(It),k(As.$$.fragment,It),W1=p(It),xt=n(It,"DIV",{class:!0});var qo=a(xt);k(Pl.$$.fragment,qo),N1=p(qo),vn=n(qo,"P",{});var cp=a(vn);Z1=l(cp,"The "),Jc=n(cp,"A",{href:!0});var N3=a(Jc);q1=l(N3,"TFElectraForMaskedLM"),N3.forEach(t),A1=l(cp," forward method, overrides the "),Qh=n(cp,"CODE",{});var Z3=a(Qh);G1=l(Z3,"__call__"),Z3.forEach(t),R1=l(cp," special method."),cp.forEach(t),P1=p(qo),k(Gs.$$.fragment,qo),V1=p(qo),k(Rs.$$.fragment,qo),B1=p(qo),k(Ps.$$.fragment,qo),qo.forEach(t),It.forEach(t),mg=p(s),Tn=n(s,"H2",{class:!0});var J_=a(Tn);Vs=n(J_,"A",{id:!0,class:!0,href:!0});var q3=a(Vs);Dh=n(q3,"SPAN",{});var A3=a(Dh);k(Vl.$$.fragment,A3),A3.forEach(t),q3.forEach(t),S1=p(J_),Yh=n(J_,"SPAN",{});var G3=a(Yh);X1=l(G3,"TFElectraForSequenceClassification"),G3.forEach(t),J_.forEach(t),ug=p(s),ft=n(s,"DIV",{class:!0});var uo=a(ft);k(Bl.$$.fragment,uo),L1=p(uo),Hh=n(uo,"P",{});var R3=a(Hh);O1=l(R3,`ELECTRA Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),R3.forEach(t),Q1=p(uo),Sl=n(uo,"P",{});var U_=a(Sl);D1=l(U_,"This model inherits from "),Uc=n(U_,"A",{href:!0});var P3=a(Uc);Y1=l(P3,"TFPreTrainedModel"),P3.forEach(t),H1=l(U_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),U_.forEach(t),K1=p(uo),Xl=n(uo,"P",{});var I_=a(Xl);eM=l(I_,"This model is also a "),Ll=n(I_,"A",{href:!0,rel:!0});var V3=a(Ll);tM=l(V3,"tf.keras.Model"),V3.forEach(t),oM=l(I_,` 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.`),I_.forEach(t),nM=p(uo),k(Bs.$$.fragment,uo),sM=p(uo),Ct=n(uo,"DIV",{class:!0});var Ao=a(Ct);k(Ol.$$.fragment,Ao),aM=p(Ao),kn=n(Ao,"P",{});var pp=a(kn);rM=l(pp,"The "),Ic=n(pp,"A",{href:!0});var B3=a(Ic);lM=l(B3,"TFElectraForSequenceClassification"),B3.forEach(t),iM=l(pp," forward method, overrides the "),Kh=n(pp,"CODE",{});var S3=a(Kh);dM=l(S3,"__call__"),S3.forEach(t),cM=l(pp," special method."),pp.forEach(t),pM=p(Ao),k(Ss.$$.fragment,Ao),hM=p(Ao),k(Xs.$$.fragment,Ao),mM=p(Ao),k(Ls.$$.fragment,Ao),Ao.forEach(t),uo.forEach(t),fg=p(s),wn=n(s,"H2",{class:!0});var W_=a(wn);Os=n(W_,"A",{id:!0,class:!0,href:!0});var X3=a(Os);em=n(X3,"SPAN",{});var L3=a(em);k(Ql.$$.fragment,L3),L3.forEach(t),X3.forEach(t),uM=p(W_),tm=n(W_,"SPAN",{});var O3=a(tm);fM=l(O3,"TFElectraForMultipleChoice"),O3.forEach(t),W_.forEach(t),gg=p(s),gt=n(s,"DIV",{class:!0});var fo=a(gt);k(Dl.$$.fragment,fo),gM=p(fo),om=n(fo,"P",{});var Q3=a(om);_M=l(Q3,`ELECTRA 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.`),Q3.forEach(t),yM=p(fo),Yl=n(fo,"P",{});var N_=a(Yl);bM=l(N_,"This model inherits from "),Wc=n(N_,"A",{href:!0});var D3=a(Wc);vM=l(D3,"TFPreTrainedModel"),D3.forEach(t),TM=l(N_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),N_.forEach(t),kM=p(fo),Hl=n(fo,"P",{});var Z_=a(Hl);wM=l(Z_,"This model is also a "),Kl=n(Z_,"A",{href:!0,rel:!0});var Y3=a(Kl);MM=l(Y3,"tf.keras.Model"),Y3.forEach(t),EM=l(Z_,` 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.`),Z_.forEach(t),$M=p(fo),k(Qs.$$.fragment,fo),FM=p(fo),eo=n(fo,"DIV",{class:!0});var Va=a(eo);k(ei.$$.fragment,Va),jM=p(Va),Mn=n(Va,"P",{});var hp=a(Mn);xM=l(hp,"The "),Nc=n(hp,"A",{href:!0});var H3=a(Nc);CM=l(H3,"TFElectraForMultipleChoice"),H3.forEach(t),zM=l(hp," forward method, overrides the "),nm=n(hp,"CODE",{});var K3=a(nm);JM=l(K3,"__call__"),K3.forEach(t),UM=l(hp," special method."),hp.forEach(t),IM=p(Va),k(Ds.$$.fragment,Va),WM=p(Va),k(Ys.$$.fragment,Va),Va.forEach(t),fo.forEach(t),_g=p(s),En=n(s,"H2",{class:!0});var q_=a(En);Hs=n(q_,"A",{id:!0,class:!0,href:!0});var e4=a(Hs);sm=n(e4,"SPAN",{});var t4=a(sm);k(ti.$$.fragment,t4),t4.forEach(t),e4.forEach(t),NM=p(q_),am=n(q_,"SPAN",{});var o4=a(am);ZM=l(o4,"TFElectraForTokenClassification"),o4.forEach(t),q_.forEach(t),yg=p(s),st=n(s,"DIV",{class:!0});var Wt=a(st);k(oi.$$.fragment,Wt),qM=p(Wt),rm=n(Wt,"P",{});var n4=a(rm);AM=l(n4,"Electra model with a token classification head on top."),n4.forEach(t),GM=p(Wt),lm=n(Wt,"P",{});var s4=a(lm);RM=l(s4,"Both the discriminator and generator may be loaded into this model."),s4.forEach(t),PM=p(Wt),ni=n(Wt,"P",{});var A_=a(ni);VM=l(A_,"This model inherits from "),Zc=n(A_,"A",{href:!0});var a4=a(Zc);BM=l(a4,"TFPreTrainedModel"),a4.forEach(t),SM=l(A_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),A_.forEach(t),XM=p(Wt),si=n(Wt,"P",{});var G_=a(si);LM=l(G_,"This model is also a "),ai=n(G_,"A",{href:!0,rel:!0});var r4=a(ai);OM=l(r4,"tf.keras.Model"),r4.forEach(t),QM=l(G_,` 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.`),G_.forEach(t),DM=p(Wt),k(Ks.$$.fragment,Wt),YM=p(Wt),zt=n(Wt,"DIV",{class:!0});var Go=a(zt);k(ri.$$.fragment,Go),HM=p(Go),$n=n(Go,"P",{});var mp=a($n);KM=l(mp,"The "),qc=n(mp,"A",{href:!0});var l4=a(qc);eE=l(l4,"TFElectraForTokenClassification"),l4.forEach(t),tE=l(mp," forward method, overrides the "),im=n(mp,"CODE",{});var i4=a(im);oE=l(i4,"__call__"),i4.forEach(t),nE=l(mp," special method."),mp.forEach(t),sE=p(Go),k(ea.$$.fragment,Go),aE=p(Go),k(ta.$$.fragment,Go),rE=p(Go),k(oa.$$.fragment,Go),Go.forEach(t),Wt.forEach(t),bg=p(s),Fn=n(s,"H2",{class:!0});var R_=a(Fn);na=n(R_,"A",{id:!0,class:!0,href:!0});var d4=a(na);dm=n(d4,"SPAN",{});var c4=a(dm);k(li.$$.fragment,c4),c4.forEach(t),d4.forEach(t),lE=p(R_),cm=n(R_,"SPAN",{});var p4=a(cm);iE=l(p4,"TFElectraForQuestionAnswering"),p4.forEach(t),R_.forEach(t),vg=p(s),_t=n(s,"DIV",{class:!0});var go=a(_t);k(ii.$$.fragment,go),dE=p(go),jn=n(go,"P",{});var up=a(jn);cE=l(up,`Electra 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 `),pm=n(up,"CODE",{});var h4=a(pm);pE=l(h4,"span start logits"),h4.forEach(t),hE=l(up," and "),hm=n(up,"CODE",{});var m4=a(hm);mE=l(m4,"span end logits"),m4.forEach(t),uE=l(up,")."),up.forEach(t),fE=p(go),di=n(go,"P",{});var P_=a(di);gE=l(P_,"This model inherits from "),Ac=n(P_,"A",{href:!0});var u4=a(Ac);_E=l(u4,"TFPreTrainedModel"),u4.forEach(t),yE=l(P_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),P_.forEach(t),bE=p(go),ci=n(go,"P",{});var V_=a(ci);vE=l(V_,"This model is also a "),pi=n(V_,"A",{href:!0,rel:!0});var f4=a(pi);TE=l(f4,"tf.keras.Model"),f4.forEach(t),kE=l(V_,` 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.`),V_.forEach(t),wE=p(go),k(sa.$$.fragment,go),ME=p(go),Jt=n(go,"DIV",{class:!0});var Ro=a(Jt);k(hi.$$.fragment,Ro),EE=p(Ro),xn=n(Ro,"P",{});var fp=a(xn);$E=l(fp,"The "),Gc=n(fp,"A",{href:!0});var g4=a(Gc);FE=l(g4,"TFElectraForQuestionAnswering"),g4.forEach(t),jE=l(fp," forward method, overrides the "),mm=n(fp,"CODE",{});var _4=a(mm);xE=l(_4,"__call__"),_4.forEach(t),CE=l(fp," special method."),fp.forEach(t),zE=p(Ro),k(aa.$$.fragment,Ro),JE=p(Ro),k(ra.$$.fragment,Ro),UE=p(Ro),k(la.$$.fragment,Ro),Ro.forEach(t),go.forEach(t),Tg=p(s),Cn=n(s,"H2",{class:!0});var B_=a(Cn);ia=n(B_,"A",{id:!0,class:!0,href:!0});var y4=a(ia);um=n(y4,"SPAN",{});var b4=a(um);k(mi.$$.fragment,b4),b4.forEach(t),y4.forEach(t),IE=p(B_),fm=n(B_,"SPAN",{});var v4=a(fm);WE=l(v4,"FlaxElectraModel"),v4.forEach(t),B_.forEach(t),kg=p(s),at=n(s,"DIV",{class:!0});var Nt=a(at);k(ui.$$.fragment,Nt),NE=p(Nt),gm=n(Nt,"P",{});var T4=a(gm);ZE=l(T4,"The bare Electra Model transformer outputting raw hidden-states without any specific head on top."),T4.forEach(t),qE=p(Nt),fi=n(Nt,"P",{});var S_=a(fi);AE=l(S_,"This model inherits from "),Rc=n(S_,"A",{href:!0});var k4=a(Rc);GE=l(k4,"FlaxPreTrainedModel"),k4.forEach(t),RE=l(S_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),S_.forEach(t),PE=p(Nt),gi=n(Nt,"P",{});var X_=a(gi);VE=l(X_,`This model is also a Flax Linen
`),_i=n(X_,"A",{href:!0,rel:!0});var w4=a(_i);BE=l(w4,"flax.nn.Module"),w4.forEach(t),SE=l(X_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),X_.forEach(t),XE=p(Nt),_m=n(Nt,"P",{});var M4=a(_m);LE=l(M4,"Finally, this model supports inherent JAX features such as:"),M4.forEach(t),OE=p(Nt),yo=n(Nt,"UL",{});var Ba=a(yo);ym=n(Ba,"LI",{});var E4=a(ym);yi=n(E4,"A",{href:!0,rel:!0});var $4=a(yi);QE=l($4,"Just-In-Time (JIT) compilation"),$4.forEach(t),E4.forEach(t),DE=p(Ba),bm=n(Ba,"LI",{});var F4=a(bm);bi=n(F4,"A",{href:!0,rel:!0});var j4=a(bi);YE=l(j4,"Automatic Differentiation"),j4.forEach(t),F4.forEach(t),HE=p(Ba),vm=n(Ba,"LI",{});var x4=a(vm);vi=n(x4,"A",{href:!0,rel:!0});var C4=a(vi);KE=l(C4,"Vectorization"),C4.forEach(t),x4.forEach(t),e2=p(Ba),Tm=n(Ba,"LI",{});var z4=a(Tm);Ti=n(z4,"A",{href:!0,rel:!0});var J4=a(Ti);t2=l(J4,"Parallelization"),J4.forEach(t),z4.forEach(t),Ba.forEach(t),o2=p(Nt),to=n(Nt,"DIV",{class:!0});var Sa=a(to);k(ki.$$.fragment,Sa),n2=p(Sa),zn=n(Sa,"P",{});var gp=a(zn);s2=l(gp,"The "),km=n(gp,"CODE",{});var U4=a(km);a2=l(U4,"FlaxElectraPreTrainedModel"),U4.forEach(t),r2=l(gp," forward method, overrides the "),wm=n(gp,"CODE",{});var I4=a(wm);l2=l(I4,"__call__"),I4.forEach(t),i2=l(gp," special method."),gp.forEach(t),d2=p(Sa),k(da.$$.fragment,Sa),c2=p(Sa),k(ca.$$.fragment,Sa),Sa.forEach(t),Nt.forEach(t),wg=p(s),Jn=n(s,"H2",{class:!0});var L_=a(Jn);pa=n(L_,"A",{id:!0,class:!0,href:!0});var W4=a(pa);Mm=n(W4,"SPAN",{});var N4=a(Mm);k(wi.$$.fragment,N4),N4.forEach(t),W4.forEach(t),p2=p(L_),Em=n(L_,"SPAN",{});var Z4=a(Em);h2=l(Z4,"FlaxElectraForPreTraining"),Z4.forEach(t),L_.forEach(t),Mg=p(s),Ke=n(s,"DIV",{class:!0});var bt=a(Ke);k(Mi.$$.fragment,bt),m2=p(bt),$m=n(bt,"P",{});var q4=a($m);u2=l(q4,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),q4.forEach(t),f2=p(bt),Fm=n(bt,"P",{});var A4=a(Fm);g2=l(A4,"It is recommended to load the discriminator checkpoint into that model."),A4.forEach(t),_2=p(bt),Ei=n(bt,"P",{});var O_=a(Ei);y2=l(O_,"This model inherits from "),Pc=n(O_,"A",{href:!0});var G4=a(Pc);b2=l(G4,"FlaxPreTrainedModel"),G4.forEach(t),v2=l(O_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),O_.forEach(t),T2=p(bt),$i=n(bt,"P",{});var Q_=a($i);k2=l(Q_,`This model is also a Flax Linen
`),Fi=n(Q_,"A",{href:!0,rel:!0});var R4=a(Fi);w2=l(R4,"flax.nn.Module"),R4.forEach(t),M2=l(Q_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Q_.forEach(t),E2=p(bt),jm=n(bt,"P",{});var P4=a(jm);$2=l(P4,"Finally, this model supports inherent JAX features such as:"),P4.forEach(t),F2=p(bt),bo=n(bt,"UL",{});var Xa=a(bo);xm=n(Xa,"LI",{});var V4=a(xm);ji=n(V4,"A",{href:!0,rel:!0});var B4=a(ji);j2=l(B4,"Just-In-Time (JIT) compilation"),B4.forEach(t),V4.forEach(t),x2=p(Xa),Cm=n(Xa,"LI",{});var S4=a(Cm);xi=n(S4,"A",{href:!0,rel:!0});var X4=a(xi);C2=l(X4,"Automatic Differentiation"),X4.forEach(t),S4.forEach(t),z2=p(Xa),zm=n(Xa,"LI",{});var L4=a(zm);Ci=n(L4,"A",{href:!0,rel:!0});var O4=a(Ci);J2=l(O4,"Vectorization"),O4.forEach(t),L4.forEach(t),U2=p(Xa),Jm=n(Xa,"LI",{});var Q4=a(Jm);zi=n(Q4,"A",{href:!0,rel:!0});var D4=a(zi);I2=l(D4,"Parallelization"),D4.forEach(t),Q4.forEach(t),Xa.forEach(t),W2=p(bt),oo=n(bt,"DIV",{class:!0});var La=a(oo);k(Ji.$$.fragment,La),N2=p(La),Un=n(La,"P",{});var _p=a(Un);Z2=l(_p,"The "),Um=n(_p,"CODE",{});var Y4=a(Um);q2=l(Y4,"FlaxElectraPreTrainedModel"),Y4.forEach(t),A2=l(_p," forward method, overrides the "),Im=n(_p,"CODE",{});var H4=a(Im);G2=l(H4,"__call__"),H4.forEach(t),R2=l(_p," special method."),_p.forEach(t),P2=p(La),k(ha.$$.fragment,La),V2=p(La),k(ma.$$.fragment,La),La.forEach(t),bt.forEach(t),Eg=p(s),In=n(s,"H2",{class:!0});var D_=a(In);ua=n(D_,"A",{id:!0,class:!0,href:!0});var K4=a(ua);Wm=n(K4,"SPAN",{});var eC=a(Wm);k(Ui.$$.fragment,eC),eC.forEach(t),K4.forEach(t),B2=p(D_),Nm=n(D_,"SPAN",{});var tC=a(Nm);S2=l(tC,"FlaxElectraForCausalLM"),tC.forEach(t),D_.forEach(t),$g=p(s),rt=n(s,"DIV",{class:!0});var Zt=a(rt);k(Ii.$$.fragment,Zt),X2=p(Zt),Zm=n(Zt,"P",{});var oC=a(Zm);L2=l(oC,`Electra Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),oC.forEach(t),O2=p(Zt),Wi=n(Zt,"P",{});var Y_=a(Wi);Q2=l(Y_,"This model inherits from "),Vc=n(Y_,"A",{href:!0});var nC=a(Vc);D2=l(nC,"FlaxPreTrainedModel"),nC.forEach(t),Y2=l(Y_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Y_.forEach(t),H2=p(Zt),Ni=n(Zt,"P",{});var H_=a(Ni);K2=l(H_,`This model is also a Flax Linen
`),Zi=n(H_,"A",{href:!0,rel:!0});var sC=a(Zi);e0=l(sC,"flax.nn.Module"),sC.forEach(t),t0=l(H_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),H_.forEach(t),o0=p(Zt),qm=n(Zt,"P",{});var aC=a(qm);n0=l(aC,"Finally, this model supports inherent JAX features such as:"),aC.forEach(t),s0=p(Zt),vo=n(Zt,"UL",{});var Oa=a(vo);Am=n(Oa,"LI",{});var rC=a(Am);qi=n(rC,"A",{href:!0,rel:!0});var lC=a(qi);a0=l(lC,"Just-In-Time (JIT) compilation"),lC.forEach(t),rC.forEach(t),r0=p(Oa),Gm=n(Oa,"LI",{});var iC=a(Gm);Ai=n(iC,"A",{href:!0,rel:!0});var dC=a(Ai);l0=l(dC,"Automatic Differentiation"),dC.forEach(t),iC.forEach(t),i0=p(Oa),Rm=n(Oa,"LI",{});var cC=a(Rm);Gi=n(cC,"A",{href:!0,rel:!0});var pC=a(Gi);d0=l(pC,"Vectorization"),pC.forEach(t),cC.forEach(t),c0=p(Oa),Pm=n(Oa,"LI",{});var hC=a(Pm);Ri=n(hC,"A",{href:!0,rel:!0});var mC=a(Ri);p0=l(mC,"Parallelization"),mC.forEach(t),hC.forEach(t),Oa.forEach(t),h0=p(Zt),no=n(Zt,"DIV",{class:!0});var Qa=a(no);k(Pi.$$.fragment,Qa),m0=p(Qa),Wn=n(Qa,"P",{});var yp=a(Wn);u0=l(yp,"The "),Vm=n(yp,"CODE",{});var uC=a(Vm);f0=l(uC,"FlaxElectraPreTrainedModel"),uC.forEach(t),g0=l(yp," forward method, overrides the "),Bm=n(yp,"CODE",{});var fC=a(Bm);_0=l(fC,"__call__"),fC.forEach(t),y0=l(yp," special method."),yp.forEach(t),b0=p(Qa),k(fa.$$.fragment,Qa),v0=p(Qa),k(ga.$$.fragment,Qa),Qa.forEach(t),Zt.forEach(t),Fg=p(s),Nn=n(s,"H2",{class:!0});var K_=a(Nn);_a=n(K_,"A",{id:!0,class:!0,href:!0});var gC=a(_a);Sm=n(gC,"SPAN",{});var _C=a(Sm);k(Vi.$$.fragment,_C),_C.forEach(t),gC.forEach(t),T0=p(K_),Xm=n(K_,"SPAN",{});var yC=a(Xm);k0=l(yC,"FlaxElectraForMaskedLM"),yC.forEach(t),K_.forEach(t),jg=p(s),lt=n(s,"DIV",{class:!0});var qt=a(lt);k(Bi.$$.fragment,qt),w0=p(qt),Si=n(qt,"P",{});var ey=a(Si);M0=l(ey,"Electra Model with a "),Lm=n(ey,"CODE",{});var bC=a(Lm);E0=l(bC,"language modeling"),bC.forEach(t),$0=l(ey," head on top."),ey.forEach(t),F0=p(qt),Xi=n(qt,"P",{});var ty=a(Xi);j0=l(ty,"This model inherits from "),Bc=n(ty,"A",{href:!0});var vC=a(Bc);x0=l(vC,"FlaxPreTrainedModel"),vC.forEach(t),C0=l(ty,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ty.forEach(t),z0=p(qt),Li=n(qt,"P",{});var oy=a(Li);J0=l(oy,`This model is also a Flax Linen
`),Oi=n(oy,"A",{href:!0,rel:!0});var TC=a(Oi);U0=l(TC,"flax.nn.Module"),TC.forEach(t),I0=l(oy,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),oy.forEach(t),W0=p(qt),Om=n(qt,"P",{});var kC=a(Om);N0=l(kC,"Finally, this model supports inherent JAX features such as:"),kC.forEach(t),Z0=p(qt),To=n(qt,"UL",{});var Da=a(To);Qm=n(Da,"LI",{});var wC=a(Qm);Qi=n(wC,"A",{href:!0,rel:!0});var MC=a(Qi);q0=l(MC,"Just-In-Time (JIT) compilation"),MC.forEach(t),wC.forEach(t),A0=p(Da),Dm=n(Da,"LI",{});var EC=a(Dm);Di=n(EC,"A",{href:!0,rel:!0});var $C=a(Di);G0=l($C,"Automatic Differentiation"),$C.forEach(t),EC.forEach(t),R0=p(Da),Ym=n(Da,"LI",{});var FC=a(Ym);Yi=n(FC,"A",{href:!0,rel:!0});var jC=a(Yi);P0=l(jC,"Vectorization"),jC.forEach(t),FC.forEach(t),V0=p(Da),Hm=n(Da,"LI",{});var xC=a(Hm);Hi=n(xC,"A",{href:!0,rel:!0});var CC=a(Hi);B0=l(CC,"Parallelization"),CC.forEach(t),xC.forEach(t),Da.forEach(t),S0=p(qt),so=n(qt,"DIV",{class:!0});var Ya=a(so);k(Ki.$$.fragment,Ya),X0=p(Ya),Zn=n(Ya,"P",{});var bp=a(Zn);L0=l(bp,"The "),Km=n(bp,"CODE",{});var zC=a(Km);O0=l(zC,"FlaxElectraPreTrainedModel"),zC.forEach(t),Q0=l(bp," forward method, overrides the "),eu=n(bp,"CODE",{});var JC=a(eu);D0=l(JC,"__call__"),JC.forEach(t),Y0=l(bp," special method."),bp.forEach(t),H0=p(Ya),k(ya.$$.fragment,Ya),K0=p(Ya),k(ba.$$.fragment,Ya),Ya.forEach(t),qt.forEach(t),xg=p(s),qn=n(s,"H2",{class:!0});var ny=a(qn);va=n(ny,"A",{id:!0,class:!0,href:!0});var UC=a(va);tu=n(UC,"SPAN",{});var IC=a(tu);k(ed.$$.fragment,IC),IC.forEach(t),UC.forEach(t),e$=p(ny),ou=n(ny,"SPAN",{});var WC=a(ou);t$=l(WC,"FlaxElectraForSequenceClassification"),WC.forEach(t),ny.forEach(t),Cg=p(s),it=n(s,"DIV",{class:!0});var At=a(it);k(td.$$.fragment,At),o$=p(At),nu=n(At,"P",{});var NC=a(nu);n$=l(NC,`Electra Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),NC.forEach(t),s$=p(At),od=n(At,"P",{});var sy=a(od);a$=l(sy,"This model inherits from "),Sc=n(sy,"A",{href:!0});var ZC=a(Sc);r$=l(ZC,"FlaxPreTrainedModel"),ZC.forEach(t),l$=l(sy,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),sy.forEach(t),i$=p(At),nd=n(At,"P",{});var ay=a(nd);d$=l(ay,`This model is also a Flax Linen
`),sd=n(ay,"A",{href:!0,rel:!0});var qC=a(sd);c$=l(qC,"flax.nn.Module"),qC.forEach(t),p$=l(ay,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),ay.forEach(t),h$=p(At),su=n(At,"P",{});var AC=a(su);m$=l(AC,"Finally, this model supports inherent JAX features such as:"),AC.forEach(t),u$=p(At),ko=n(At,"UL",{});var Ha=a(ko);au=n(Ha,"LI",{});var GC=a(au);ad=n(GC,"A",{href:!0,rel:!0});var RC=a(ad);f$=l(RC,"Just-In-Time (JIT) compilation"),RC.forEach(t),GC.forEach(t),g$=p(Ha),ru=n(Ha,"LI",{});var PC=a(ru);rd=n(PC,"A",{href:!0,rel:!0});var VC=a(rd);_$=l(VC,"Automatic Differentiation"),VC.forEach(t),PC.forEach(t),y$=p(Ha),lu=n(Ha,"LI",{});var BC=a(lu);ld=n(BC,"A",{href:!0,rel:!0});var SC=a(ld);b$=l(SC,"Vectorization"),SC.forEach(t),BC.forEach(t),v$=p(Ha),iu=n(Ha,"LI",{});var XC=a(iu);id=n(XC,"A",{href:!0,rel:!0});var LC=a(id);T$=l(LC,"Parallelization"),LC.forEach(t),XC.forEach(t),Ha.forEach(t),k$=p(At),ao=n(At,"DIV",{class:!0});var Ka=a(ao);k(dd.$$.fragment,Ka),w$=p(Ka),An=n(Ka,"P",{});var vp=a(An);M$=l(vp,"The "),du=n(vp,"CODE",{});var OC=a(du);E$=l(OC,"FlaxElectraPreTrainedModel"),OC.forEach(t),$$=l(vp," forward method, overrides the "),cu=n(vp,"CODE",{});var QC=a(cu);F$=l(QC,"__call__"),QC.forEach(t),j$=l(vp," special method."),vp.forEach(t),x$=p(Ka),k(Ta.$$.fragment,Ka),C$=p(Ka),k(ka.$$.fragment,Ka),Ka.forEach(t),At.forEach(t),zg=p(s),Gn=n(s,"H2",{class:!0});var ry=a(Gn);wa=n(ry,"A",{id:!0,class:!0,href:!0});var DC=a(wa);pu=n(DC,"SPAN",{});var YC=a(pu);k(cd.$$.fragment,YC),YC.forEach(t),DC.forEach(t),z$=p(ry),hu=n(ry,"SPAN",{});var HC=a(hu);J$=l(HC,"FlaxElectraForMultipleChoice"),HC.forEach(t),ry.forEach(t),Jg=p(s),dt=n(s,"DIV",{class:!0});var Gt=a(dt);k(pd.$$.fragment,Gt),U$=p(Gt),mu=n(Gt,"P",{});var KC=a(mu);I$=l(KC,`ELECTRA 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.`),KC.forEach(t),W$=p(Gt),hd=n(Gt,"P",{});var ly=a(hd);N$=l(ly,"This model inherits from "),Xc=n(ly,"A",{href:!0});var ez=a(Xc);Z$=l(ez,"FlaxPreTrainedModel"),ez.forEach(t),q$=l(ly,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ly.forEach(t),A$=p(Gt),md=n(Gt,"P",{});var iy=a(md);G$=l(iy,`This model is also a Flax Linen
`),ud=n(iy,"A",{href:!0,rel:!0});var tz=a(ud);R$=l(tz,"flax.nn.Module"),tz.forEach(t),P$=l(iy,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),iy.forEach(t),V$=p(Gt),uu=n(Gt,"P",{});var oz=a(uu);B$=l(oz,"Finally, this model supports inherent JAX features such as:"),oz.forEach(t),S$=p(Gt),wo=n(Gt,"UL",{});var er=a(wo);fu=n(er,"LI",{});var nz=a(fu);fd=n(nz,"A",{href:!0,rel:!0});var sz=a(fd);X$=l(sz,"Just-In-Time (JIT) compilation"),sz.forEach(t),nz.forEach(t),L$=p(er),gu=n(er,"LI",{});var az=a(gu);gd=n(az,"A",{href:!0,rel:!0});var rz=a(gd);O$=l(rz,"Automatic Differentiation"),rz.forEach(t),az.forEach(t),Q$=p(er),_u=n(er,"LI",{});var lz=a(_u);_d=n(lz,"A",{href:!0,rel:!0});var iz=a(_d);D$=l(iz,"Vectorization"),iz.forEach(t),lz.forEach(t),Y$=p(er),yu=n(er,"LI",{});var dz=a(yu);yd=n(dz,"A",{href:!0,rel:!0});var cz=a(yd);H$=l(cz,"Parallelization"),cz.forEach(t),dz.forEach(t),er.forEach(t),K$=p(Gt),ro=n(Gt,"DIV",{class:!0});var tr=a(ro);k(bd.$$.fragment,tr),eF=p(tr),Rn=n(tr,"P",{});var Tp=a(Rn);tF=l(Tp,"The "),bu=n(Tp,"CODE",{});var pz=a(bu);oF=l(pz,"FlaxElectraPreTrainedModel"),pz.forEach(t),nF=l(Tp," forward method, overrides the "),vu=n(Tp,"CODE",{});var hz=a(vu);sF=l(hz,"__call__"),hz.forEach(t),aF=l(Tp," special method."),Tp.forEach(t),rF=p(tr),k(Ma.$$.fragment,tr),lF=p(tr),k(Ea.$$.fragment,tr),tr.forEach(t),Gt.forEach(t),Ug=p(s),Pn=n(s,"H2",{class:!0});var dy=a(Pn);$a=n(dy,"A",{id:!0,class:!0,href:!0});var mz=a($a);Tu=n(mz,"SPAN",{});var uz=a(Tu);k(vd.$$.fragment,uz),uz.forEach(t),mz.forEach(t),iF=p(dy),ku=n(dy,"SPAN",{});var fz=a(ku);dF=l(fz,"FlaxElectraForTokenClassification"),fz.forEach(t),dy.forEach(t),Ig=p(s),et=n(s,"DIV",{class:!0});var vt=a(et);k(Td.$$.fragment,vt),cF=p(vt),wu=n(vt,"P",{});var gz=a(wu);pF=l(gz,"Electra model with a token classification head on top."),gz.forEach(t),hF=p(vt),Mu=n(vt,"P",{});var _z=a(Mu);mF=l(_z,"Both the discriminator and generator may be loaded into this model."),_z.forEach(t),uF=p(vt),kd=n(vt,"P",{});var cy=a(kd);fF=l(cy,"This model inherits from "),Lc=n(cy,"A",{href:!0});var yz=a(Lc);gF=l(yz,"FlaxPreTrainedModel"),yz.forEach(t),_F=l(cy,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),cy.forEach(t),yF=p(vt),wd=n(vt,"P",{});var py=a(wd);bF=l(py,`This model is also a Flax Linen
`),Md=n(py,"A",{href:!0,rel:!0});var bz=a(Md);vF=l(bz,"flax.nn.Module"),bz.forEach(t),TF=l(py,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),py.forEach(t),kF=p(vt),Eu=n(vt,"P",{});var vz=a(Eu);wF=l(vz,"Finally, this model supports inherent JAX features such as:"),vz.forEach(t),MF=p(vt),Mo=n(vt,"UL",{});var or=a(Mo);$u=n(or,"LI",{});var Tz=a($u);Ed=n(Tz,"A",{href:!0,rel:!0});var kz=a(Ed);EF=l(kz,"Just-In-Time (JIT) compilation"),kz.forEach(t),Tz.forEach(t),$F=p(or),Fu=n(or,"LI",{});var wz=a(Fu);$d=n(wz,"A",{href:!0,rel:!0});var Mz=a($d);FF=l(Mz,"Automatic Differentiation"),Mz.forEach(t),wz.forEach(t),jF=p(or),ju=n(or,"LI",{});var Ez=a(ju);Fd=n(Ez,"A",{href:!0,rel:!0});var $z=a(Fd);xF=l($z,"Vectorization"),$z.forEach(t),Ez.forEach(t),CF=p(or),xu=n(or,"LI",{});var Fz=a(xu);jd=n(Fz,"A",{href:!0,rel:!0});var jz=a(jd);zF=l(jz,"Parallelization"),jz.forEach(t),Fz.forEach(t),or.forEach(t),JF=p(vt),lo=n(vt,"DIV",{class:!0});var nr=a(lo);k(xd.$$.fragment,nr),UF=p(nr),Vn=n(nr,"P",{});var kp=a(Vn);IF=l(kp,"The "),Cu=n(kp,"CODE",{});var xz=a(Cu);WF=l(xz,"FlaxElectraPreTrainedModel"),xz.forEach(t),NF=l(kp," forward method, overrides the "),zu=n(kp,"CODE",{});var Cz=a(zu);ZF=l(Cz,"__call__"),Cz.forEach(t),qF=l(kp," special method."),kp.forEach(t),AF=p(nr),k(Fa.$$.fragment,nr),GF=p(nr),k(ja.$$.fragment,nr),nr.forEach(t),vt.forEach(t),Wg=p(s),Bn=n(s,"H2",{class:!0});var hy=a(Bn);xa=n(hy,"A",{id:!0,class:!0,href:!0});var zz=a(xa);Ju=n(zz,"SPAN",{});var Jz=a(Ju);k(Cd.$$.fragment,Jz),Jz.forEach(t),zz.forEach(t),RF=p(hy),Uu=n(hy,"SPAN",{});var Uz=a(Uu);PF=l(Uz,"FlaxElectraForQuestionAnswering"),Uz.forEach(t),hy.forEach(t),Ng=p(s),ct=n(s,"DIV",{class:!0});var Rt=a(ct);k(zd.$$.fragment,Rt),VF=p(Rt),Sn=n(Rt,"P",{});var wp=a(Sn);BF=l(wp,`ELECTRA 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 `),Iu=n(wp,"CODE",{});var Iz=a(Iu);SF=l(Iz,"span start logits"),Iz.forEach(t),XF=l(wp," and "),Wu=n(wp,"CODE",{});var Wz=a(Wu);LF=l(Wz,"span end logits"),Wz.forEach(t),OF=l(wp,")."),wp.forEach(t),QF=p(Rt),Jd=n(Rt,"P",{});var my=a(Jd);DF=l(my,"This model inherits from "),Oc=n(my,"A",{href:!0});var Nz=a(Oc);YF=l(Nz,"FlaxPreTrainedModel"),Nz.forEach(t),HF=l(my,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),my.forEach(t),KF=p(Rt),Ud=n(Rt,"P",{});var uy=a(Ud);ej=l(uy,`This model is also a Flax Linen
`),Id=n(uy,"A",{href:!0,rel:!0});var Zz=a(Id);tj=l(Zz,"flax.nn.Module"),Zz.forEach(t),oj=l(uy,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),uy.forEach(t),nj=p(Rt),Nu=n(Rt,"P",{});var qz=a(Nu);sj=l(qz,"Finally, this model supports inherent JAX features such as:"),qz.forEach(t),aj=p(Rt),Eo=n(Rt,"UL",{});var sr=a(Eo);Zu=n(sr,"LI",{});var Az=a(Zu);Wd=n(Az,"A",{href:!0,rel:!0});var Gz=a(Wd);rj=l(Gz,"Just-In-Time (JIT) compilation"),Gz.forEach(t),Az.forEach(t),lj=p(sr),qu=n(sr,"LI",{});var Rz=a(qu);Nd=n(Rz,"A",{href:!0,rel:!0});var Pz=a(Nd);ij=l(Pz,"Automatic Differentiation"),Pz.forEach(t),Rz.forEach(t),dj=p(sr),Au=n(sr,"LI",{});var Vz=a(Au);Zd=n(Vz,"A",{href:!0,rel:!0});var Bz=a(Zd);cj=l(Bz,"Vectorization"),Bz.forEach(t),Vz.forEach(t),pj=p(sr),Gu=n(sr,"LI",{});var Sz=a(Gu);qd=n(Sz,"A",{href:!0,rel:!0});var Xz=a(qd);hj=l(Xz,"Parallelization"),Xz.forEach(t),Sz.forEach(t),sr.forEach(t),mj=p(Rt),io=n(Rt,"DIV",{class:!0});var ar=a(io);k(Ad.$$.fragment,ar),uj=p(ar),Xn=n(ar,"P",{});var Mp=a(Xn);fj=l(Mp,"The "),Ru=n(Mp,"CODE",{});var Lz=a(Ru);gj=l(Lz,"FlaxElectraPreTrainedModel"),Lz.forEach(t),_j=l(Mp," forward method, overrides the "),Pu=n(Mp,"CODE",{});var Oz=a(Pu);yj=l(Oz,"__call__"),Oz.forEach(t),bj=l(Mp," special method."),Mp.forEach(t),vj=p(ar),k(Ca.$$.fragment,ar),Tj=p(ar),k(za.$$.fragment,ar),ar.forEach(t),Rt.forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(dU)),m(f,"id","electra"),m(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"),m(f,"href","#electra"),m(u,"class","relative group"),m(te,"alt","Models"),Qz(te.src,j="https://img.shields.io/badge/All_model_pages-electra-blueviolet")||m(te,"src",j),m(de,"href","https://huggingface.co/models?filter=electra"),m(ce,"alt","Spaces"),Qz(ce.src,Ze="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||m(ce,"src",Ze),m(X,"href","https://huggingface.co/spaces/docs-demos/electra_large_discriminator_squad2_512"),m(R,"class","flex flex-wrap space-x-1"),m(re,"id","overview"),m(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(re,"href","#overview"),m(ae,"class","relative group"),m(ie,"href","https://openreview.net/pdf?id=r1xMH1BtvB"),m(ie,"rel","nofollow"),m(ee,"href","https://github.com/google-research/electra"),m(ee,"rel","nofollow"),m(N,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForMaskedLM"),m(v,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForPreTraining"),m(z,"href","https://huggingface.co/lysandre"),m(z,"rel","nofollow"),m(Re,"href","https://github.com/google-research/electra"),m(Re,"rel","nofollow"),m(Ge,"id","documentation-resources"),m(Ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Ge,"href","#documentation-resources"),m(P,"class","relative group"),m(Ld,"href","../tasks/sequence_classification"),m(Od,"href","../tasks/token_classification"),m(Qd,"href","../tasks/question_answering"),m(Dd,"href","../tasks/language_modeling"),m(Yd,"href","../tasks/masked_language_modeling"),m(Hd,"href","../tasks/multiple_choice"),m(Dn,"id","transformers.ElectraConfig"),m(Dn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Dn,"href","#transformers.ElectraConfig"),m(Po,"class","relative group"),m(Kd,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraModel"),m(ec,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraModel"),m(ir,"href","https://huggingface.co/google/electra-small-discriminator"),m(ir,"rel","nofollow"),m(tc,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(oc,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Hn,"id","transformers.ElectraTokenizer"),m(Hn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Hn,"href","#transformers.ElectraTokenizer"),m(Bo,"class","relative group"),m(nc,"href","/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Kn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ts,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(os,"id","transformers.ElectraTokenizerFast"),m(os,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(os,"href","#transformers.ElectraTokenizerFast"),m(Xo,"class","relative group"),m(rc,"href","/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(Co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(ss,"id","transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"),m(ss,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ss,"href","#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"),m(Oo,"class","relative group"),m(dc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForPreTraining"),m(Qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(cc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraForPreTraining"),m(Do,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(as,"id","transformers.ElectraModel"),m(as,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(as,"href","#transformers.ElectraModel"),m(Yo,"class","relative group"),m(pc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(Ir,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Ir,"rel","nofollow"),m(hc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraModel"),m(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(is,"id","transformers.ElectraForPreTraining"),m(is,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(is,"href","#transformers.ElectraForPreTraining"),m(Ko,"class","relative group"),m(mc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(Gr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Gr,"rel","nofollow"),m(uc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForPreTraining"),m(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ps,"id","transformers.ElectraForCausalLM"),m(ps,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ps,"href","#transformers.ElectraForCausalLM"),m(tn,"class","relative group"),m(fc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(Lr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Lr,"rel","nofollow"),m(gc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForCausalLM"),m(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(us,"id","transformers.ElectraForMaskedLM"),m(us,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(us,"href","#transformers.ElectraForMaskedLM"),m(nn,"class","relative group"),m(_c,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(Kr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Kr,"rel","nofollow"),m(yc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForMaskedLM"),m(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_s,"id","transformers.ElectraForSequenceClassification"),m(_s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(_s,"href","#transformers.ElectraForSequenceClassification"),m(an,"class","relative group"),m(bc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(al,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(al,"rel","nofollow"),m(vc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForSequenceClassification"),m(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ts,"id","transformers.ElectraForMultipleChoice"),m(Ts,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Ts,"href","#transformers.ElectraForMultipleChoice"),m(ln,"class","relative group"),m(Tc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(pl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(pl,"rel","nofollow"),m(kc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForMultipleChoice"),m(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ms,"id","transformers.ElectraForTokenClassification"),m(Ms,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Ms,"href","#transformers.ElectraForTokenClassification"),m(cn,"class","relative group"),m(wc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(_l,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(_l,"rel","nofollow"),m(Mc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForTokenClassification"),m(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Fs,"id","transformers.ElectraForQuestionAnswering"),m(Fs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Fs,"href","#transformers.ElectraForQuestionAnswering"),m(hn,"class","relative group"),m(Ec,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),m(wl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(wl,"rel","nofollow"),m($c,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.ElectraForQuestionAnswering"),m(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Cs,"id","transformers.TFElectraModel"),m(Cs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Cs,"href","#transformers.TFElectraModel"),m(fn,"class","relative group"),m(Fc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(xl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(xl,"rel","nofollow"),m(jc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraModel"),m(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Is,"id","transformers.TFElectraForPreTraining"),m(Is,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Is,"href","#transformers.TFElectraForPreTraining"),m(_n,"class","relative group"),m(xc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(Wl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Wl,"rel","nofollow"),m(Cc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraForPreTraining"),m(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(qs,"id","transformers.TFElectraForMaskedLM"),m(qs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(qs,"href","#transformers.TFElectraForMaskedLM"),m(bn,"class","relative group"),m(zc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(Rl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Rl,"rel","nofollow"),m(Jc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraForMaskedLM"),m(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Vs,"id","transformers.TFElectraForSequenceClassification"),m(Vs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Vs,"href","#transformers.TFElectraForSequenceClassification"),m(Tn,"class","relative group"),m(Uc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(Ll,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Ll,"rel","nofollow"),m(Ic,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraForSequenceClassification"),m(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Os,"id","transformers.TFElectraForMultipleChoice"),m(Os,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Os,"href","#transformers.TFElectraForMultipleChoice"),m(wn,"class","relative group"),m(Wc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(Kl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Kl,"rel","nofollow"),m(Nc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraForMultipleChoice"),m(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Hs,"id","transformers.TFElectraForTokenClassification"),m(Hs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Hs,"href","#transformers.TFElectraForTokenClassification"),m(En,"class","relative group"),m(Zc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(ai,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(ai,"rel","nofollow"),m(qc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraForTokenClassification"),m(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(na,"id","transformers.TFElectraForQuestionAnswering"),m(na,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(na,"href","#transformers.TFElectraForQuestionAnswering"),m(Fn,"class","relative group"),m(Ac,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(pi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(pi,"rel","nofollow"),m(Gc,"href","/docs/transformers/v4.31.0/en/model_doc/electra#transformers.TFElectraForQuestionAnswering"),m(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ia,"id","transformers.FlaxElectraModel"),m(ia,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ia,"href","#transformers.FlaxElectraModel"),m(Cn,"class","relative group"),m(Rc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(_i,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(_i,"rel","nofollow"),m(yi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(yi,"rel","nofollow"),m(bi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(bi,"rel","nofollow"),m(vi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(vi,"rel","nofollow"),m(Ti,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Ti,"rel","nofollow"),m(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pa,"id","transformers.FlaxElectraForPreTraining"),m(pa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(pa,"href","#transformers.FlaxElectraForPreTraining"),m(Jn,"class","relative group"),m(Pc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Fi,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Fi,"rel","nofollow"),m(ji,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(ji,"rel","nofollow"),m(xi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(xi,"rel","nofollow"),m(Ci,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Ci,"rel","nofollow"),m(zi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(zi,"rel","nofollow"),m(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ua,"id","transformers.FlaxElectraForCausalLM"),m(ua,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ua,"href","#transformers.FlaxElectraForCausalLM"),m(In,"class","relative group"),m(Vc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Zi,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Zi,"rel","nofollow"),m(qi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(qi,"rel","nofollow"),m(Ai,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Ai,"rel","nofollow"),m(Gi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Gi,"rel","nofollow"),m(Ri,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Ri,"rel","nofollow"),m(no,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_a,"id","transformers.FlaxElectraForMaskedLM"),m(_a,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(_a,"href","#transformers.FlaxElectraForMaskedLM"),m(Nn,"class","relative group"),m(Bc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Oi,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Oi,"rel","nofollow"),m(Qi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Qi,"rel","nofollow"),m(Di,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Di,"rel","nofollow"),m(Yi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Yi,"rel","nofollow"),m(Hi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Hi,"rel","nofollow"),m(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(va,"id","transformers.FlaxElectraForSequenceClassification"),m(va,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(va,"href","#transformers.FlaxElectraForSequenceClassification"),m(qn,"class","relative group"),m(Sc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(sd,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(sd,"rel","nofollow"),m(ad,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(ad,"rel","nofollow"),m(rd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(rd,"rel","nofollow"),m(ld,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(ld,"rel","nofollow"),m(id,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(id,"rel","nofollow"),m(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wa,"id","transformers.FlaxElectraForMultipleChoice"),m(wa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(wa,"href","#transformers.FlaxElectraForMultipleChoice"),m(Gn,"class","relative group"),m(Xc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ud,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(ud,"rel","nofollow"),m(fd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(fd,"rel","nofollow"),m(gd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(gd,"rel","nofollow"),m(_d,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(_d,"rel","nofollow"),m(yd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(yd,"rel","nofollow"),m(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($a,"id","transformers.FlaxElectraForTokenClassification"),m($a,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m($a,"href","#transformers.FlaxElectraForTokenClassification"),m(Pn,"class","relative group"),m(Lc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Md,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Md,"rel","nofollow"),m(Ed,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Ed,"rel","nofollow"),m($d,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m($d,"rel","nofollow"),m(Fd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Fd,"rel","nofollow"),m(jd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(jd,"rel","nofollow"),m(lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(xa,"id","transformers.FlaxElectraForQuestionAnswering"),m(xa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(xa,"href","#transformers.FlaxElectraForQuestionAnswering"),m(Bn,"class","relative group"),m(Oc,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Id,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Id,"rel","nofollow"),m(Wd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Wd,"rel","nofollow"),m(Nd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Nd,"rel","nofollow"),m(Zd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Zd,"rel","nofollow"),m(qd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(qd,"rel","nofollow"),m(io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(s,y){e(document.head,d),g(s,b,y),g(s,u,y),e(u,f),e(f,_),w(i,_,null),e(u,h),e(u,x),e(x,be),g(s,fe,y),g(s,R,y),e(R,de),e(de,te),e(R,ve),e(R,X),e(X,ce),g(s,D,y),g(s,ae,y),e(ae,re),e(re,L),w(le,L,null),e(ae,Te),e(ae,O),e(O,ke),g(s,ge,y),g(s,B,y),e(B,we),e(B,ie),e(ie,ne),e(B,J),g(s,I,y),g(s,pe,y),e(pe,H),g(s,_e,y),g(s,he,y),e(he,Q),e(Q,Me),g(s,ye,y),g(s,U,y),e(U,Ee),g(s,Y,y),g(s,se,y),e(se,me),e(me,K),e(se,$e),e(se,ue),e(ue,G),e(se,Fe),e(se,q),e(q,je),e(q,ee),e(ee,W),e(q,xe),e(q,N),e(N,Ce),e(q,ze),e(q,v),e(v,C),e(q,Xe),g(s,oe,y),g(s,Je,y),e(Je,Le),e(Je,z),e(z,Oe),e(Je,Qe),e(Je,Re),e(Re,De),e(Je,Ye),g(s,A,y),g(s,P,y),e(P,Ge),e(Ge,Pe),w(S,Pe,null),e(P,He),e(P,Ve),e(Ve,Ue),g(s,Se,y),g(s,V,y),e(V,Be),e(Be,Ld),e(Ld,fy),e(V,gy),e(V,Ep),e(Ep,Od),e(Od,_y),e(V,yy),e(V,$p),e($p,Qd),e(Qd,by),e(V,vy),e(V,Fp),e(Fp,Dd),e(Dd,Ty),e(V,ky),e(V,jp),e(jp,Yd),e(Yd,wy),e(V,My),e(V,xp),e(xp,Hd),e(Hd,Ey),g(s,Nf,y),g(s,Po,y),e(Po,Dn),e(Dn,Cp),w(rr,Cp,null),e(Po,$y),e(Po,zp),e(zp,Fy),g(s,Zf,y),g(s,Pt,y),w(lr,Pt,null),e(Pt,jy),e(Pt,_o),e(_o,xy),e(_o,Kd),e(Kd,Cy),e(_o,zy),e(_o,ec),e(ec,Jy),e(_o,Uy),e(_o,ir),e(ir,Iy),e(_o,Wy),e(Pt,Ny),e(Pt,Vo),e(Vo,Zy),e(Vo,tc),e(tc,qy),e(Vo,Ay),e(Vo,oc),e(oc,Gy),e(Vo,Ry),e(Pt,Py),w(Yn,Pt,null),g(s,qf,y),g(s,Bo,y),e(Bo,Hn),e(Hn,Jp),w(dr,Jp,null),e(Bo,Vy),e(Bo,Up),e(Up,By),g(s,Af,y),g(s,tt,y),w(cr,tt,null),e(tt,Sy),e(tt,Ip),e(Ip,Xy),e(tt,Ly),e(tt,pr),e(pr,Oy),e(pr,nc),e(nc,Qy),e(pr,Dy),e(tt,Yy),e(tt,xo),w(hr,xo,null),e(xo,Hy),e(xo,Wp),e(Wp,Ky),e(xo,eb),e(xo,mr),e(mr,sc),e(sc,tb),e(sc,Np),e(Np,ob),e(mr,nb),e(mr,ac),e(ac,sb),e(ac,Zp),e(Zp,ab),e(tt,rb),e(tt,Kn),w(ur,Kn,null),e(Kn,lb),e(Kn,qp),e(qp,ib),e(tt,db),e(tt,Vt),w(fr,Vt,null),e(Vt,cb),e(Vt,Ap),e(Ap,pb),e(Vt,hb),w(es,Vt,null),e(Vt,mb),e(Vt,So),e(So,ub),e(So,Gp),e(Gp,fb),e(So,gb),e(So,Rp),e(Rp,_b),e(So,yb),e(tt,bb),e(tt,ts),w(gr,ts,null),e(ts,vb),e(ts,_r),e(_r,Tb),e(_r,Pp),e(Pp,kb),e(_r,wb),g(s,Gf,y),g(s,Xo,y),e(Xo,os),e(os,Vp),w(yr,Vp,null),e(Xo,Mb),e(Xo,Bp),e(Bp,Eb),g(s,Rf,y),g(s,Tt,y),w(br,Tt,null),e(Tt,$b),e(Tt,vr),e(vr,Fb),e(vr,Sp),e(Sp,jb),e(vr,xb),e(Tt,Cb),e(Tt,Tr),e(Tr,zb),e(Tr,rc),e(rc,Jb),e(Tr,Ub),e(Tt,Ib),e(Tt,Co),w(kr,Co,null),e(Co,Wb),e(Co,Xp),e(Xp,Nb),e(Co,Zb),e(Co,wr),e(wr,lc),e(lc,qb),e(lc,Lp),e(Lp,Ab),e(wr,Gb),e(wr,ic),e(ic,Rb),e(ic,Op),e(Op,Pb),e(Tt,Vb),e(Tt,Bt),w(Mr,Bt,null),e(Bt,Bb),e(Bt,Qp),e(Qp,Sb),e(Bt,Xb),w(ns,Bt,null),e(Bt,Lb),e(Bt,Lo),e(Lo,Ob),e(Lo,Dp),e(Dp,Qb),e(Lo,Db),e(Lo,Yp),e(Yp,Yb),e(Lo,Hb),g(s,Pf,y),g(s,Oo,y),e(Oo,ss),e(ss,Hp),w(Er,Hp,null),e(Oo,Kb),e(Oo,Kp),e(Kp,ev),g(s,Vf,y),g(s,Qo,y),w($r,Qo,null),e(Qo,tv),e(Qo,Fr),e(Fr,ov),e(Fr,dc),e(dc,nv),e(Fr,sv),g(s,Bf,y),g(s,Do,y),w(jr,Do,null),e(Do,av),e(Do,xr),e(xr,rv),e(xr,cc),e(cc,lv),e(xr,iv),g(s,Sf,y),g(s,Yo,y),e(Yo,as),e(as,eh),w(Cr,eh,null),e(Yo,dv),e(Yo,th),e(th,cv),g(s,Xf,y),g(s,kt,y),w(zr,kt,null),e(kt,pv),e(kt,oh),e(oh,hv),e(kt,mv),e(kt,Jr),e(Jr,uv),e(Jr,pc),e(pc,fv),e(Jr,gv),e(kt,_v),e(kt,Ur),e(Ur,yv),e(Ur,Ir),e(Ir,bv),e(Ur,vv),e(kt,Tv),e(kt,St),w(Wr,St,null),e(St,kv),e(St,Ho),e(Ho,wv),e(Ho,hc),e(hc,Mv),e(Ho,Ev),e(Ho,nh),e(nh,$v),e(Ho,Fv),e(St,jv),w(rs,St,null),e(St,xv),w(ls,St,null),g(s,Lf,y),g(s,Ko,y),e(Ko,is),e(is,sh),w(Nr,sh,null),e(Ko,Cv),e(Ko,ah),e(ah,zv),g(s,Of,y),g(s,pt,y),w(Zr,pt,null),e(pt,Jv),e(pt,rh),e(rh,Uv),e(pt,Iv),e(pt,lh),e(lh,Wv),e(pt,Nv),e(pt,qr),e(qr,Zv),e(qr,mc),e(mc,qv),e(qr,Av),e(pt,Gv),e(pt,Ar),e(Ar,Rv),e(Ar,Gr),e(Gr,Pv),e(Ar,Vv),e(pt,Bv),e(pt,Xt),w(Rr,Xt,null),e(Xt,Sv),e(Xt,en),e(en,Xv),e(en,uc),e(uc,Lv),e(en,Ov),e(en,ih),e(ih,Qv),e(en,Dv),e(Xt,Yv),w(ds,Xt,null),e(Xt,Hv),w(cs,Xt,null),g(s,Qf,y),g(s,tn,y),e(tn,ps),e(ps,dh),w(Pr,dh,null),e(tn,Kv),e(tn,ch),e(ch,eT),g(s,Df,y),g(s,wt,y),w(Vr,wt,null),e(wt,tT),e(wt,Br),e(Br,oT),e(Br,ph),e(ph,nT),e(Br,sT),e(wt,aT),e(wt,Sr),e(Sr,rT),e(Sr,fc),e(fc,lT),e(Sr,iT),e(wt,dT),e(wt,Xr),e(Xr,cT),e(Xr,Lr),e(Lr,pT),e(Xr,hT),e(wt,mT),e(wt,Lt),w(Or,Lt,null),e(Lt,uT),e(Lt,on),e(on,fT),e(on,gc),e(gc,gT),e(on,_T),e(on,hh),e(hh,yT),e(on,bT),e(Lt,vT),w(hs,Lt,null),e(Lt,TT),w(ms,Lt,null),g(s,Yf,y),g(s,nn,y),e(nn,us),e(us,mh),w(Qr,mh,null),e(nn,kT),e(nn,uh),e(uh,wT),g(s,Hf,y),g(s,ht,y),w(Dr,ht,null),e(ht,MT),e(ht,fh),e(fh,ET),e(ht,$T),e(ht,gh),e(gh,FT),e(ht,jT),e(ht,Yr),e(Yr,xT),e(Yr,_c),e(_c,CT),e(Yr,zT),e(ht,JT),e(ht,Hr),e(Hr,UT),e(Hr,Kr),e(Kr,IT),e(Hr,WT),e(ht,NT),e(ht,Ot),w(el,Ot,null),e(Ot,ZT),e(Ot,sn),e(sn,qT),e(sn,yc),e(yc,AT),e(sn,GT),e(sn,_h),e(_h,RT),e(sn,PT),e(Ot,VT),w(fs,Ot,null),e(Ot,BT),w(gs,Ot,null),g(s,Kf,y),g(s,an,y),e(an,_s),e(_s,yh),w(tl,yh,null),e(an,ST),e(an,bh),e(bh,XT),g(s,eg,y),g(s,Mt,y),w(ol,Mt,null),e(Mt,LT),e(Mt,vh),e(vh,OT),e(Mt,QT),e(Mt,nl),e(nl,DT),e(nl,bc),e(bc,YT),e(nl,HT),e(Mt,KT),e(Mt,sl),e(sl,ek),e(sl,al),e(al,tk),e(sl,ok),e(Mt,nk),e(Mt,jt),w(rl,jt,null),e(jt,sk),e(jt,rn),e(rn,ak),e(rn,vc),e(vc,rk),e(rn,lk),e(rn,Th),e(Th,ik),e(rn,dk),e(jt,ck),w(ys,jt,null),e(jt,pk),w(bs,jt,null),e(jt,hk),w(vs,jt,null),g(s,tg,y),g(s,ln,y),e(ln,Ts),e(Ts,kh),w(ll,kh,null),e(ln,mk),e(ln,wh),e(wh,uk),g(s,og,y),g(s,Et,y),w(il,Et,null),e(Et,fk),e(Et,Mh),e(Mh,gk),e(Et,_k),e(Et,dl),e(dl,yk),e(dl,Tc),e(Tc,bk),e(dl,vk),e(Et,Tk),e(Et,cl),e(cl,kk),e(cl,pl),e(pl,wk),e(cl,Mk),e(Et,Ek),e(Et,Qt),w(hl,Qt,null),e(Qt,$k),e(Qt,dn),e(dn,Fk),e(dn,kc),e(kc,jk),e(dn,xk),e(dn,Eh),e(Eh,Ck),e(dn,zk),e(Qt,Jk),w(ks,Qt,null),e(Qt,Uk),w(ws,Qt,null),g(s,ng,y),g(s,cn,y),e(cn,Ms),e(Ms,$h),w(ml,$h,null),e(cn,Ik),e(cn,Fh),e(Fh,Wk),g(s,sg,y),g(s,mt,y),w(ul,mt,null),e(mt,Nk),e(mt,jh),e(jh,Zk),e(mt,qk),e(mt,xh),e(xh,Ak),e(mt,Gk),e(mt,fl),e(fl,Rk),e(fl,wc),e(wc,Pk),e(fl,Vk),e(mt,Bk),e(mt,gl),e(gl,Sk),e(gl,_l),e(_l,Xk),e(gl,Lk),e(mt,Ok),e(mt,Dt),w(yl,Dt,null),e(Dt,Qk),e(Dt,pn),e(pn,Dk),e(pn,Mc),e(Mc,Yk),e(pn,Hk),e(pn,Ch),e(Ch,Kk),e(pn,ew),e(Dt,tw),w(Es,Dt,null),e(Dt,ow),w($s,Dt,null),g(s,ag,y),g(s,hn,y),e(hn,Fs),e(Fs,zh),w(bl,zh,null),e(hn,nw),e(hn,Jh),e(Jh,sw),g(s,rg,y),g(s,$t,y),w(vl,$t,null),e($t,aw),e($t,mn),e(mn,rw),e(mn,Uh),e(Uh,lw),e(mn,iw),e(mn,Ih),e(Ih,dw),e(mn,cw),e($t,pw),e($t,Tl),e(Tl,hw),e(Tl,Ec),e(Ec,mw),e(Tl,uw),e($t,fw),e($t,kl),e(kl,gw),e(kl,wl),e(wl,_w),e(kl,yw),e($t,bw),e($t,Yt),w(Ml,Yt,null),e(Yt,vw),e(Yt,un),e(un,Tw),e(un,$c),e($c,kw),e(un,ww),e(un,Wh),e(Wh,Mw),e(un,Ew),e(Yt,$w),w(js,Yt,null),e(Yt,Fw),w(xs,Yt,null),g(s,lg,y),g(s,fn,y),e(fn,Cs),e(Cs,Nh),w(El,Nh,null),e(fn,jw),e(fn,Zh),e(Zh,xw),g(s,ig,y),g(s,ut,y),w($l,ut,null),e(ut,Cw),e(ut,qh),e(qh,zw),e(ut,Jw),e(ut,Fl),e(Fl,Uw),e(Fl,Fc),e(Fc,Iw),e(Fl,Ww),e(ut,Nw),e(ut,jl),e(jl,Zw),e(jl,xl),e(xl,qw),e(jl,Aw),e(ut,Gw),w(zs,ut,null),e(ut,Rw),e(ut,Ht),w(Cl,Ht,null),e(Ht,Pw),e(Ht,gn),e(gn,Vw),e(gn,jc),e(jc,Bw),e(gn,Sw),e(gn,Ah),e(Ah,Xw),e(gn,Lw),e(Ht,Ow),w(Js,Ht,null),e(Ht,Qw),w(Us,Ht,null),g(s,dg,y),g(s,_n,y),e(_n,Is),e(Is,Gh),w(zl,Gh,null),e(_n,Dw),e(_n,Rh),e(Rh,Yw),g(s,cg,y),g(s,ot,y),w(Jl,ot,null),e(ot,Hw),e(ot,Ph),e(Ph,Kw),e(ot,e1),e(ot,Vh),e(Vh,t1),e(ot,o1),e(ot,Ul),e(Ul,n1),e(Ul,xc),e(xc,s1),e(Ul,a1),e(ot,r1),e(ot,Il),e(Il,l1),e(Il,Wl),e(Wl,i1),e(Il,d1),e(ot,c1),w(Ws,ot,null),e(ot,p1),e(ot,Kt),w(Nl,Kt,null),e(Kt,h1),e(Kt,yn),e(yn,m1),e(yn,Cc),e(Cc,u1),e(yn,f1),e(yn,Bh),e(Bh,g1),e(yn,_1),e(Kt,y1),w(Ns,Kt,null),e(Kt,b1),w(Zs,Kt,null),g(s,pg,y),g(s,bn,y),e(bn,qs),e(qs,Sh),w(Zl,Sh,null),e(bn,v1),e(bn,Xh),e(Xh,T1),g(s,hg,y),g(s,nt,y),w(ql,nt,null),e(nt,k1),e(nt,Lh),e(Lh,w1),e(nt,M1),e(nt,Oh),e(Oh,E1),e(nt,$1),e(nt,Al),e(Al,F1),e(Al,zc),e(zc,j1),e(Al,x1),e(nt,C1),e(nt,Gl),e(Gl,z1),e(Gl,Rl),e(Rl,J1),e(Gl,U1),e(nt,I1),w(As,nt,null),e(nt,W1),e(nt,xt),w(Pl,xt,null),e(xt,N1),e(xt,vn),e(vn,Z1),e(vn,Jc),e(Jc,q1),e(vn,A1),e(vn,Qh),e(Qh,G1),e(vn,R1),e(xt,P1),w(Gs,xt,null),e(xt,V1),w(Rs,xt,null),e(xt,B1),w(Ps,xt,null),g(s,mg,y),g(s,Tn,y),e(Tn,Vs),e(Vs,Dh),w(Vl,Dh,null),e(Tn,S1),e(Tn,Yh),e(Yh,X1),g(s,ug,y),g(s,ft,y),w(Bl,ft,null),e(ft,L1),e(ft,Hh),e(Hh,O1),e(ft,Q1),e(ft,Sl),e(Sl,D1),e(Sl,Uc),e(Uc,Y1),e(Sl,H1),e(ft,K1),e(ft,Xl),e(Xl,eM),e(Xl,Ll),e(Ll,tM),e(Xl,oM),e(ft,nM),w(Bs,ft,null),e(ft,sM),e(ft,Ct),w(Ol,Ct,null),e(Ct,aM),e(Ct,kn),e(kn,rM),e(kn,Ic),e(Ic,lM),e(kn,iM),e(kn,Kh),e(Kh,dM),e(kn,cM),e(Ct,pM),w(Ss,Ct,null),e(Ct,hM),w(Xs,Ct,null),e(Ct,mM),w(Ls,Ct,null),g(s,fg,y),g(s,wn,y),e(wn,Os),e(Os,em),w(Ql,em,null),e(wn,uM),e(wn,tm),e(tm,fM),g(s,gg,y),g(s,gt,y),w(Dl,gt,null),e(gt,gM),e(gt,om),e(om,_M),e(gt,yM),e(gt,Yl),e(Yl,bM),e(Yl,Wc),e(Wc,vM),e(Yl,TM),e(gt,kM),e(gt,Hl),e(Hl,wM),e(Hl,Kl),e(Kl,MM),e(Hl,EM),e(gt,$M),w(Qs,gt,null),e(gt,FM),e(gt,eo),w(ei,eo,null),e(eo,jM),e(eo,Mn),e(Mn,xM),e(Mn,Nc),e(Nc,CM),e(Mn,zM),e(Mn,nm),e(nm,JM),e(Mn,UM),e(eo,IM),w(Ds,eo,null),e(eo,WM),w(Ys,eo,null),g(s,_g,y),g(s,En,y),e(En,Hs),e(Hs,sm),w(ti,sm,null),e(En,NM),e(En,am),e(am,ZM),g(s,yg,y),g(s,st,y),w(oi,st,null),e(st,qM),e(st,rm),e(rm,AM),e(st,GM),e(st,lm),e(lm,RM),e(st,PM),e(st,ni),e(ni,VM),e(ni,Zc),e(Zc,BM),e(ni,SM),e(st,XM),e(st,si),e(si,LM),e(si,ai),e(ai,OM),e(si,QM),e(st,DM),w(Ks,st,null),e(st,YM),e(st,zt),w(ri,zt,null),e(zt,HM),e(zt,$n),e($n,KM),e($n,qc),e(qc,eE),e($n,tE),e($n,im),e(im,oE),e($n,nE),e(zt,sE),w(ea,zt,null),e(zt,aE),w(ta,zt,null),e(zt,rE),w(oa,zt,null),g(s,bg,y),g(s,Fn,y),e(Fn,na),e(na,dm),w(li,dm,null),e(Fn,lE),e(Fn,cm),e(cm,iE),g(s,vg,y),g(s,_t,y),w(ii,_t,null),e(_t,dE),e(_t,jn),e(jn,cE),e(jn,pm),e(pm,pE),e(jn,hE),e(jn,hm),e(hm,mE),e(jn,uE),e(_t,fE),e(_t,di),e(di,gE),e(di,Ac),e(Ac,_E),e(di,yE),e(_t,bE),e(_t,ci),e(ci,vE),e(ci,pi),e(pi,TE),e(ci,kE),e(_t,wE),w(sa,_t,null),e(_t,ME),e(_t,Jt),w(hi,Jt,null),e(Jt,EE),e(Jt,xn),e(xn,$E),e(xn,Gc),e(Gc,FE),e(xn,jE),e(xn,mm),e(mm,xE),e(xn,CE),e(Jt,zE),w(aa,Jt,null),e(Jt,JE),w(ra,Jt,null),e(Jt,UE),w(la,Jt,null),g(s,Tg,y),g(s,Cn,y),e(Cn,ia),e(ia,um),w(mi,um,null),e(Cn,IE),e(Cn,fm),e(fm,WE),g(s,kg,y),g(s,at,y),w(ui,at,null),e(at,NE),e(at,gm),e(gm,ZE),e(at,qE),e(at,fi),e(fi,AE),e(fi,Rc),e(Rc,GE),e(fi,RE),e(at,PE),e(at,gi),e(gi,VE),e(gi,_i),e(_i,BE),e(gi,SE),e(at,XE),e(at,_m),e(_m,LE),e(at,OE),e(at,yo),e(yo,ym),e(ym,yi),e(yi,QE),e(yo,DE),e(yo,bm),e(bm,bi),e(bi,YE),e(yo,HE),e(yo,vm),e(vm,vi),e(vi,KE),e(yo,e2),e(yo,Tm),e(Tm,Ti),e(Ti,t2),e(at,o2),e(at,to),w(ki,to,null),e(to,n2),e(to,zn),e(zn,s2),e(zn,km),e(km,a2),e(zn,r2),e(zn,wm),e(wm,l2),e(zn,i2),e(to,d2),w(da,to,null),e(to,c2),w(ca,to,null),g(s,wg,y),g(s,Jn,y),e(Jn,pa),e(pa,Mm),w(wi,Mm,null),e(Jn,p2),e(Jn,Em),e(Em,h2),g(s,Mg,y),g(s,Ke,y),w(Mi,Ke,null),e(Ke,m2),e(Ke,$m),e($m,u2),e(Ke,f2),e(Ke,Fm),e(Fm,g2),e(Ke,_2),e(Ke,Ei),e(Ei,y2),e(Ei,Pc),e(Pc,b2),e(Ei,v2),e(Ke,T2),e(Ke,$i),e($i,k2),e($i,Fi),e(Fi,w2),e($i,M2),e(Ke,E2),e(Ke,jm),e(jm,$2),e(Ke,F2),e(Ke,bo),e(bo,xm),e(xm,ji),e(ji,j2),e(bo,x2),e(bo,Cm),e(Cm,xi),e(xi,C2),e(bo,z2),e(bo,zm),e(zm,Ci),e(Ci,J2),e(bo,U2),e(bo,Jm),e(Jm,zi),e(zi,I2),e(Ke,W2),e(Ke,oo),w(Ji,oo,null),e(oo,N2),e(oo,Un),e(Un,Z2),e(Un,Um),e(Um,q2),e(Un,A2),e(Un,Im),e(Im,G2),e(Un,R2),e(oo,P2),w(ha,oo,null),e(oo,V2),w(ma,oo,null),g(s,Eg,y),g(s,In,y),e(In,ua),e(ua,Wm),w(Ui,Wm,null),e(In,B2),e(In,Nm),e(Nm,S2),g(s,$g,y),g(s,rt,y),w(Ii,rt,null),e(rt,X2),e(rt,Zm),e(Zm,L2),e(rt,O2),e(rt,Wi),e(Wi,Q2),e(Wi,Vc),e(Vc,D2),e(Wi,Y2),e(rt,H2),e(rt,Ni),e(Ni,K2),e(Ni,Zi),e(Zi,e0),e(Ni,t0),e(rt,o0),e(rt,qm),e(qm,n0),e(rt,s0),e(rt,vo),e(vo,Am),e(Am,qi),e(qi,a0),e(vo,r0),e(vo,Gm),e(Gm,Ai),e(Ai,l0),e(vo,i0),e(vo,Rm),e(Rm,Gi),e(Gi,d0),e(vo,c0),e(vo,Pm),e(Pm,Ri),e(Ri,p0),e(rt,h0),e(rt,no),w(Pi,no,null),e(no,m0),e(no,Wn),e(Wn,u0),e(Wn,Vm),e(Vm,f0),e(Wn,g0),e(Wn,Bm),e(Bm,_0),e(Wn,y0),e(no,b0),w(fa,no,null),e(no,v0),w(ga,no,null),g(s,Fg,y),g(s,Nn,y),e(Nn,_a),e(_a,Sm),w(Vi,Sm,null),e(Nn,T0),e(Nn,Xm),e(Xm,k0),g(s,jg,y),g(s,lt,y),w(Bi,lt,null),e(lt,w0),e(lt,Si),e(Si,M0),e(Si,Lm),e(Lm,E0),e(Si,$0),e(lt,F0),e(lt,Xi),e(Xi,j0),e(Xi,Bc),e(Bc,x0),e(Xi,C0),e(lt,z0),e(lt,Li),e(Li,J0),e(Li,Oi),e(Oi,U0),e(Li,I0),e(lt,W0),e(lt,Om),e(Om,N0),e(lt,Z0),e(lt,To),e(To,Qm),e(Qm,Qi),e(Qi,q0),e(To,A0),e(To,Dm),e(Dm,Di),e(Di,G0),e(To,R0),e(To,Ym),e(Ym,Yi),e(Yi,P0),e(To,V0),e(To,Hm),e(Hm,Hi),e(Hi,B0),e(lt,S0),e(lt,so),w(Ki,so,null),e(so,X0),e(so,Zn),e(Zn,L0),e(Zn,Km),e(Km,O0),e(Zn,Q0),e(Zn,eu),e(eu,D0),e(Zn,Y0),e(so,H0),w(ya,so,null),e(so,K0),w(ba,so,null),g(s,xg,y),g(s,qn,y),e(qn,va),e(va,tu),w(ed,tu,null),e(qn,e$),e(qn,ou),e(ou,t$),g(s,Cg,y),g(s,it,y),w(td,it,null),e(it,o$),e(it,nu),e(nu,n$),e(it,s$),e(it,od),e(od,a$),e(od,Sc),e(Sc,r$),e(od,l$),e(it,i$),e(it,nd),e(nd,d$),e(nd,sd),e(sd,c$),e(nd,p$),e(it,h$),e(it,su),e(su,m$),e(it,u$),e(it,ko),e(ko,au),e(au,ad),e(ad,f$),e(ko,g$),e(ko,ru),e(ru,rd),e(rd,_$),e(ko,y$),e(ko,lu),e(lu,ld),e(ld,b$),e(ko,v$),e(ko,iu),e(iu,id),e(id,T$),e(it,k$),e(it,ao),w(dd,ao,null),e(ao,w$),e(ao,An),e(An,M$),e(An,du),e(du,E$),e(An,$$),e(An,cu),e(cu,F$),e(An,j$),e(ao,x$),w(Ta,ao,null),e(ao,C$),w(ka,ao,null),g(s,zg,y),g(s,Gn,y),e(Gn,wa),e(wa,pu),w(cd,pu,null),e(Gn,z$),e(Gn,hu),e(hu,J$),g(s,Jg,y),g(s,dt,y),w(pd,dt,null),e(dt,U$),e(dt,mu),e(mu,I$),e(dt,W$),e(dt,hd),e(hd,N$),e(hd,Xc),e(Xc,Z$),e(hd,q$),e(dt,A$),e(dt,md),e(md,G$),e(md,ud),e(ud,R$),e(md,P$),e(dt,V$),e(dt,uu),e(uu,B$),e(dt,S$),e(dt,wo),e(wo,fu),e(fu,fd),e(fd,X$),e(wo,L$),e(wo,gu),e(gu,gd),e(gd,O$),e(wo,Q$),e(wo,_u),e(_u,_d),e(_d,D$),e(wo,Y$),e(wo,yu),e(yu,yd),e(yd,H$),e(dt,K$),e(dt,ro),w(bd,ro,null),e(ro,eF),e(ro,Rn),e(Rn,tF),e(Rn,bu),e(bu,oF),e(Rn,nF),e(Rn,vu),e(vu,sF),e(Rn,aF),e(ro,rF),w(Ma,ro,null),e(ro,lF),w(Ea,ro,null),g(s,Ug,y),g(s,Pn,y),e(Pn,$a),e($a,Tu),w(vd,Tu,null),e(Pn,iF),e(Pn,ku),e(ku,dF),g(s,Ig,y),g(s,et,y),w(Td,et,null),e(et,cF),e(et,wu),e(wu,pF),e(et,hF),e(et,Mu),e(Mu,mF),e(et,uF),e(et,kd),e(kd,fF),e(kd,Lc),e(Lc,gF),e(kd,_F),e(et,yF),e(et,wd),e(wd,bF),e(wd,Md),e(Md,vF),e(wd,TF),e(et,kF),e(et,Eu),e(Eu,wF),e(et,MF),e(et,Mo),e(Mo,$u),e($u,Ed),e(Ed,EF),e(Mo,$F),e(Mo,Fu),e(Fu,$d),e($d,FF),e(Mo,jF),e(Mo,ju),e(ju,Fd),e(Fd,xF),e(Mo,CF),e(Mo,xu),e(xu,jd),e(jd,zF),e(et,JF),e(et,lo),w(xd,lo,null),e(lo,UF),e(lo,Vn),e(Vn,IF),e(Vn,Cu),e(Cu,WF),e(Vn,NF),e(Vn,zu),e(zu,ZF),e(Vn,qF),e(lo,AF),w(Fa,lo,null),e(lo,GF),w(ja,lo,null),g(s,Wg,y),g(s,Bn,y),e(Bn,xa),e(xa,Ju),w(Cd,Ju,null),e(Bn,RF),e(Bn,Uu),e(Uu,PF),g(s,Ng,y),g(s,ct,y),w(zd,ct,null),e(ct,VF),e(ct,Sn),e(Sn,BF),e(Sn,Iu),e(Iu,SF),e(Sn,XF),e(Sn,Wu),e(Wu,LF),e(Sn,OF),e(ct,QF),e(ct,Jd),e(Jd,DF),e(Jd,Oc),e(Oc,YF),e(Jd,HF),e(ct,KF),e(ct,Ud),e(Ud,ej),e(Ud,Id),e(Id,tj),e(Ud,oj),e(ct,nj),e(ct,Nu),e(Nu,sj),e(ct,aj),e(ct,Eo),e(Eo,Zu),e(Zu,Wd),e(Wd,rj),e(Eo,lj),e(Eo,qu),e(qu,Nd),e(Nd,ij),e(Eo,dj),e(Eo,Au),e(Au,Zd),e(Zd,cj),e(Eo,pj),e(Eo,Gu),e(Gu,qd),e(qd,hj),e(ct,mj),e(ct,io),w(Ad,io,null),e(io,uj),e(io,Xn),e(Xn,fj),e(Xn,Ru),e(Ru,gj),e(Xn,_j),e(Xn,Pu),e(Pu,yj),e(Xn,bj),e(io,vj),w(Ca,io,null),e(io,Tj),w(za,io,null),Zg=!0},p(s,[y]){const Gd={};y&2&&(Gd.$$scope={dirty:y,ctx:s}),Yn.$set(Gd);const Vu={};y&2&&(Vu.$$scope={dirty:y,ctx:s}),es.$set(Vu);const Bu={};y&2&&(Bu.$$scope={dirty:y,ctx:s}),ns.$set(Bu);const Su={};y&2&&(Su.$$scope={dirty:y,ctx:s}),rs.$set(Su);const Rd={};y&2&&(Rd.$$scope={dirty:y,ctx:s}),ls.$set(Rd);const Xu={};y&2&&(Xu.$$scope={dirty:y,ctx:s}),ds.$set(Xu);const Lu={};y&2&&(Lu.$$scope={dirty:y,ctx:s}),cs.$set(Lu);const Pd={};y&2&&(Pd.$$scope={dirty:y,ctx:s}),hs.$set(Pd);const Ou={};y&2&&(Ou.$$scope={dirty:y,ctx:s}),ms.$set(Ou);const Qu={};y&2&&(Qu.$$scope={dirty:y,ctx:s}),fs.$set(Qu);const Du={};y&2&&(Du.$$scope={dirty:y,ctx:s}),gs.$set(Du);const Vd={};y&2&&(Vd.$$scope={dirty:y,ctx:s}),ys.$set(Vd);const Yu={};y&2&&(Yu.$$scope={dirty:y,ctx:s}),bs.$set(Yu);const Hu={};y&2&&(Hu.$$scope={dirty:y,ctx:s}),vs.$set(Hu);const Ku={};y&2&&(Ku.$$scope={dirty:y,ctx:s}),ks.$set(Ku);const ef={};y&2&&(ef.$$scope={dirty:y,ctx:s}),ws.$set(ef);const tf={};y&2&&(tf.$$scope={dirty:y,ctx:s}),Es.$set(tf);const Ln={};y&2&&(Ln.$$scope={dirty:y,ctx:s}),$s.$set(Ln);const of={};y&2&&(of.$$scope={dirty:y,ctx:s}),js.$set(of);const nf={};y&2&&(nf.$$scope={dirty:y,ctx:s}),xs.$set(nf);const $o={};y&2&&($o.$$scope={dirty:y,ctx:s}),zs.$set($o);const sf={};y&2&&(sf.$$scope={dirty:y,ctx:s}),Js.$set(sf);const af={};y&2&&(af.$$scope={dirty:y,ctx:s}),Us.$set(af);const rf={};y&2&&(rf.$$scope={dirty:y,ctx:s}),Ws.$set(rf);const On={};y&2&&(On.$$scope={dirty:y,ctx:s}),Ns.$set(On);const lf={};y&2&&(lf.$$scope={dirty:y,ctx:s}),Zs.$set(lf);const df={};y&2&&(df.$$scope={dirty:y,ctx:s}),As.$set(df);const Bd={};y&2&&(Bd.$$scope={dirty:y,ctx:s}),Gs.$set(Bd);const cf={};y&2&&(cf.$$scope={dirty:y,ctx:s}),Rs.$set(cf);const pf={};y&2&&(pf.$$scope={dirty:y,ctx:s}),Ps.$set(pf);const hf={};y&2&&(hf.$$scope={dirty:y,ctx:s}),Bs.$set(hf);const Ft={};y&2&&(Ft.$$scope={dirty:y,ctx:s}),Ss.$set(Ft);const mf={};y&2&&(mf.$$scope={dirty:y,ctx:s}),Xs.$set(mf);const uf={};y&2&&(uf.$$scope={dirty:y,ctx:s}),Ls.$set(uf);const ff={};y&2&&(ff.$$scope={dirty:y,ctx:s}),Qs.$set(ff);const gf={};y&2&&(gf.$$scope={dirty:y,ctx:s}),Ds.$set(gf);const _f={};y&2&&(_f.$$scope={dirty:y,ctx:s}),Ys.$set(_f);const yf={};y&2&&(yf.$$scope={dirty:y,ctx:s}),Ks.$set(yf);const bf={};y&2&&(bf.$$scope={dirty:y,ctx:s}),ea.$set(bf);const vf={};y&2&&(vf.$$scope={dirty:y,ctx:s}),ta.$set(vf);const Tf={};y&2&&(Tf.$$scope={dirty:y,ctx:s}),oa.$set(Tf);const kf={};y&2&&(kf.$$scope={dirty:y,ctx:s}),sa.$set(kf);const wf={};y&2&&(wf.$$scope={dirty:y,ctx:s}),aa.$set(wf);const Mf={};y&2&&(Mf.$$scope={dirty:y,ctx:s}),ra.$set(Mf);const Sd={};y&2&&(Sd.$$scope={dirty:y,ctx:s}),la.$set(Sd);const Ef={};y&2&&(Ef.$$scope={dirty:y,ctx:s}),da.$set(Ef);const $f={};y&2&&($f.$$scope={dirty:y,ctx:s}),ca.$set($f);const Ff={};y&2&&(Ff.$$scope={dirty:y,ctx:s}),ha.$set(Ff);const Fo={};y&2&&(Fo.$$scope={dirty:y,ctx:s}),ma.$set(Fo);const jo={};y&2&&(jo.$$scope={dirty:y,ctx:s}),fa.$set(jo);const jf={};y&2&&(jf.$$scope={dirty:y,ctx:s}),ga.$set(jf);const xf={};y&2&&(xf.$$scope={dirty:y,ctx:s}),ya.$set(xf);const Cf={};y&2&&(Cf.$$scope={dirty:y,ctx:s}),ba.$set(Cf);const Qn={};y&2&&(Qn.$$scope={dirty:y,ctx:s}),Ta.$set(Qn);const zf={};y&2&&(zf.$$scope={dirty:y,ctx:s}),ka.$set(zf);const Jf={};y&2&&(Jf.$$scope={dirty:y,ctx:s}),Ma.$set(Jf);const Xd={};y&2&&(Xd.$$scope={dirty:y,ctx:s}),Ea.$set(Xd);const Uf={};y&2&&(Uf.$$scope={dirty:y,ctx:s}),Fa.$set(Uf);const If={};y&2&&(If.$$scope={dirty:y,ctx:s}),ja.$set(If);const Wf={};y&2&&(Wf.$$scope={dirty:y,ctx:s}),Ca.$set(Wf);const yt={};y&2&&(yt.$$scope={dirty:y,ctx:s}),za.$set(yt)},i(s){Zg||(M(i.$$.fragment,s),M(le.$$.fragment,s),M(S.$$.fragment,s),M(rr.$$.fragment,s),M(lr.$$.fragment,s),M(Yn.$$.fragment,s),M(dr.$$.fragment,s),M(cr.$$.fragment,s),M(hr.$$.fragment,s),M(ur.$$.fragment,s),M(fr.$$.fragment,s),M(es.$$.fragment,s),M(gr.$$.fragment,s),M(yr.$$.fragment,s),M(br.$$.fragment,s),M(kr.$$.fragment,s),M(Mr.$$.fragment,s),M(ns.$$.fragment,s),M(Er.$$.fragment,s),M($r.$$.fragment,s),M(jr.$$.fragment,s),M(Cr.$$.fragment,s),M(zr.$$.fragment,s),M(Wr.$$.fragment,s),M(rs.$$.fragment,s),M(ls.$$.fragment,s),M(Nr.$$.fragment,s),M(Zr.$$.fragment,s),M(Rr.$$.fragment,s),M(ds.$$.fragment,s),M(cs.$$.fragment,s),M(Pr.$$.fragment,s),M(Vr.$$.fragment,s),M(Or.$$.fragment,s),M(hs.$$.fragment,s),M(ms.$$.fragment,s),M(Qr.$$.fragment,s),M(Dr.$$.fragment,s),M(el.$$.fragment,s),M(fs.$$.fragment,s),M(gs.$$.fragment,s),M(tl.$$.fragment,s),M(ol.$$.fragment,s),M(rl.$$.fragment,s),M(ys.$$.fragment,s),M(bs.$$.fragment,s),M(vs.$$.fragment,s),M(ll.$$.fragment,s),M(il.$$.fragment,s),M(hl.$$.fragment,s),M(ks.$$.fragment,s),M(ws.$$.fragment,s),M(ml.$$.fragment,s),M(ul.$$.fragment,s),M(yl.$$.fragment,s),M(Es.$$.fragment,s),M($s.$$.fragment,s),M(bl.$$.fragment,s),M(vl.$$.fragment,s),M(Ml.$$.fragment,s),M(js.$$.fragment,s),M(xs.$$.fragment,s),M(El.$$.fragment,s),M($l.$$.fragment,s),M(zs.$$.fragment,s),M(Cl.$$.fragment,s),M(Js.$$.fragment,s),M(Us.$$.fragment,s),M(zl.$$.fragment,s),M(Jl.$$.fragment,s),M(Ws.$$.fragment,s),M(Nl.$$.fragment,s),M(Ns.$$.fragment,s),M(Zs.$$.fragment,s),M(Zl.$$.fragment,s),M(ql.$$.fragment,s),M(As.$$.fragment,s),M(Pl.$$.fragment,s),M(Gs.$$.fragment,s),M(Rs.$$.fragment,s),M(Ps.$$.fragment,s),M(Vl.$$.fragment,s),M(Bl.$$.fragment,s),M(Bs.$$.fragment,s),M(Ol.$$.fragment,s),M(Ss.$$.fragment,s),M(Xs.$$.fragment,s),M(Ls.$$.fragment,s),M(Ql.$$.fragment,s),M(Dl.$$.fragment,s),M(Qs.$$.fragment,s),M(ei.$$.fragment,s),M(Ds.$$.fragment,s),M(Ys.$$.fragment,s),M(ti.$$.fragment,s),M(oi.$$.fragment,s),M(Ks.$$.fragment,s),M(ri.$$.fragment,s),M(ea.$$.fragment,s),M(ta.$$.fragment,s),M(oa.$$.fragment,s),M(li.$$.fragment,s),M(ii.$$.fragment,s),M(sa.$$.fragment,s),M(hi.$$.fragment,s),M(aa.$$.fragment,s),M(ra.$$.fragment,s),M(la.$$.fragment,s),M(mi.$$.fragment,s),M(ui.$$.fragment,s),M(ki.$$.fragment,s),M(da.$$.fragment,s),M(ca.$$.fragment,s),M(wi.$$.fragment,s),M(Mi.$$.fragment,s),M(Ji.$$.fragment,s),M(ha.$$.fragment,s),M(ma.$$.fragment,s),M(Ui.$$.fragment,s),M(Ii.$$.fragment,s),M(Pi.$$.fragment,s),M(fa.$$.fragment,s),M(ga.$$.fragment,s),M(Vi.$$.fragment,s),M(Bi.$$.fragment,s),M(Ki.$$.fragment,s),M(ya.$$.fragment,s),M(ba.$$.fragment,s),M(ed.$$.fragment,s),M(td.$$.fragment,s),M(dd.$$.fragment,s),M(Ta.$$.fragment,s),M(ka.$$.fragment,s),M(cd.$$.fragment,s),M(pd.$$.fragment,s),M(bd.$$.fragment,s),M(Ma.$$.fragment,s),M(Ea.$$.fragment,s),M(vd.$$.fragment,s),M(Td.$$.fragment,s),M(xd.$$.fragment,s),M(Fa.$$.fragment,s),M(ja.$$.fragment,s),M(Cd.$$.fragment,s),M(zd.$$.fragment,s),M(Ad.$$.fragment,s),M(Ca.$$.fragment,s),M(za.$$.fragment,s),Zg=!0)},o(s){E(i.$$.fragment,s),E(le.$$.fragment,s),E(S.$$.fragment,s),E(rr.$$.fragment,s),E(lr.$$.fragment,s),E(Yn.$$.fragment,s),E(dr.$$.fragment,s),E(cr.$$.fragment,s),E(hr.$$.fragment,s),E(ur.$$.fragment,s),E(fr.$$.fragment,s),E(es.$$.fragment,s),E(gr.$$.fragment,s),E(yr.$$.fragment,s),E(br.$$.fragment,s),E(kr.$$.fragment,s),E(Mr.$$.fragment,s),E(ns.$$.fragment,s),E(Er.$$.fragment,s),E($r.$$.fragment,s),E(jr.$$.fragment,s),E(Cr.$$.fragment,s),E(zr.$$.fragment,s),E(Wr.$$.fragment,s),E(rs.$$.fragment,s),E(ls.$$.fragment,s),E(Nr.$$.fragment,s),E(Zr.$$.fragment,s),E(Rr.$$.fragment,s),E(ds.$$.fragment,s),E(cs.$$.fragment,s),E(Pr.$$.fragment,s),E(Vr.$$.fragment,s),E(Or.$$.fragment,s),E(hs.$$.fragment,s),E(ms.$$.fragment,s),E(Qr.$$.fragment,s),E(Dr.$$.fragment,s),E(el.$$.fragment,s),E(fs.$$.fragment,s),E(gs.$$.fragment,s),E(tl.$$.fragment,s),E(ol.$$.fragment,s),E(rl.$$.fragment,s),E(ys.$$.fragment,s),E(bs.$$.fragment,s),E(vs.$$.fragment,s),E(ll.$$.fragment,s),E(il.$$.fragment,s),E(hl.$$.fragment,s),E(ks.$$.fragment,s),E(ws.$$.fragment,s),E(ml.$$.fragment,s),E(ul.$$.fragment,s),E(yl.$$.fragment,s),E(Es.$$.fragment,s),E($s.$$.fragment,s),E(bl.$$.fragment,s),E(vl.$$.fragment,s),E(Ml.$$.fragment,s),E(js.$$.fragment,s),E(xs.$$.fragment,s),E(El.$$.fragment,s),E($l.$$.fragment,s),E(zs.$$.fragment,s),E(Cl.$$.fragment,s),E(Js.$$.fragment,s),E(Us.$$.fragment,s),E(zl.$$.fragment,s),E(Jl.$$.fragment,s),E(Ws.$$.fragment,s),E(Nl.$$.fragment,s),E(Ns.$$.fragment,s),E(Zs.$$.fragment,s),E(Zl.$$.fragment,s),E(ql.$$.fragment,s),E(As.$$.fragment,s),E(Pl.$$.fragment,s),E(Gs.$$.fragment,s),E(Rs.$$.fragment,s),E(Ps.$$.fragment,s),E(Vl.$$.fragment,s),E(Bl.$$.fragment,s),E(Bs.$$.fragment,s),E(Ol.$$.fragment,s),E(Ss.$$.fragment,s),E(Xs.$$.fragment,s),E(Ls.$$.fragment,s),E(Ql.$$.fragment,s),E(Dl.$$.fragment,s),E(Qs.$$.fragment,s),E(ei.$$.fragment,s),E(Ds.$$.fragment,s),E(Ys.$$.fragment,s),E(ti.$$.fragment,s),E(oi.$$.fragment,s),E(Ks.$$.fragment,s),E(ri.$$.fragment,s),E(ea.$$.fragment,s),E(ta.$$.fragment,s),E(oa.$$.fragment,s),E(li.$$.fragment,s),E(ii.$$.fragment,s),E(sa.$$.fragment,s),E(hi.$$.fragment,s),E(aa.$$.fragment,s),E(ra.$$.fragment,s),E(la.$$.fragment,s),E(mi.$$.fragment,s),E(ui.$$.fragment,s),E(ki.$$.fragment,s),E(da.$$.fragment,s),E(ca.$$.fragment,s),E(wi.$$.fragment,s),E(Mi.$$.fragment,s),E(Ji.$$.fragment,s),E(ha.$$.fragment,s),E(ma.$$.fragment,s),E(Ui.$$.fragment,s),E(Ii.$$.fragment,s),E(Pi.$$.fragment,s),E(fa.$$.fragment,s),E(ga.$$.fragment,s),E(Vi.$$.fragment,s),E(Bi.$$.fragment,s),E(Ki.$$.fragment,s),E(ya.$$.fragment,s),E(ba.$$.fragment,s),E(ed.$$.fragment,s),E(td.$$.fragment,s),E(dd.$$.fragment,s),E(Ta.$$.fragment,s),E(ka.$$.fragment,s),E(cd.$$.fragment,s),E(pd.$$.fragment,s),E(bd.$$.fragment,s),E(Ma.$$.fragment,s),E(Ea.$$.fragment,s),E(vd.$$.fragment,s),E(Td.$$.fragment,s),E(xd.$$.fragment,s),E(Fa.$$.fragment,s),E(ja.$$.fragment,s),E(Cd.$$.fragment,s),E(zd.$$.fragment,s),E(Ad.$$.fragment,s),E(Ca.$$.fragment,s),E(za.$$.fragment,s),Zg=!1},d(s){t(d),s&&t(b),s&&t(u),$(i),s&&t(fe),s&&t(R),s&&t(D),s&&t(ae),$(le),s&&t(ge),s&&t(B),s&&t(I),s&&t(pe),s&&t(_e),s&&t(he),s&&t(ye),s&&t(U),s&&t(Y),s&&t(se),s&&t(oe),s&&t(Je),s&&t(A),s&&t(P),$(S),s&&t(Se),s&&t(V),s&&t(Nf),s&&t(Po),$(rr),s&&t(Zf),s&&t(Pt),$(lr),$(Yn),s&&t(qf),s&&t(Bo),$(dr),s&&t(Af),s&&t(tt),$(cr),$(hr),$(ur),$(fr),$(es),$(gr),s&&t(Gf),s&&t(Xo),$(yr),s&&t(Rf),s&&t(Tt),$(br),$(kr),$(Mr),$(ns),s&&t(Pf),s&&t(Oo),$(Er),s&&t(Vf),s&&t(Qo),$($r),s&&t(Bf),s&&t(Do),$(jr),s&&t(Sf),s&&t(Yo),$(Cr),s&&t(Xf),s&&t(kt),$(zr),$(Wr),$(rs),$(ls),s&&t(Lf),s&&t(Ko),$(Nr),s&&t(Of),s&&t(pt),$(Zr),$(Rr),$(ds),$(cs),s&&t(Qf),s&&t(tn),$(Pr),s&&t(Df),s&&t(wt),$(Vr),$(Or),$(hs),$(ms),s&&t(Yf),s&&t(nn),$(Qr),s&&t(Hf),s&&t(ht),$(Dr),$(el),$(fs),$(gs),s&&t(Kf),s&&t(an),$(tl),s&&t(eg),s&&t(Mt),$(ol),$(rl),$(ys),$(bs),$(vs),s&&t(tg),s&&t(ln),$(ll),s&&t(og),s&&t(Et),$(il),$(hl),$(ks),$(ws),s&&t(ng),s&&t(cn),$(ml),s&&t(sg),s&&t(mt),$(ul),$(yl),$(Es),$($s),s&&t(ag),s&&t(hn),$(bl),s&&t(rg),s&&t($t),$(vl),$(Ml),$(js),$(xs),s&&t(lg),s&&t(fn),$(El),s&&t(ig),s&&t(ut),$($l),$(zs),$(Cl),$(Js),$(Us),s&&t(dg),s&&t(_n),$(zl),s&&t(cg),s&&t(ot),$(Jl),$(Ws),$(Nl),$(Ns),$(Zs),s&&t(pg),s&&t(bn),$(Zl),s&&t(hg),s&&t(nt),$(ql),$(As),$(Pl),$(Gs),$(Rs),$(Ps),s&&t(mg),s&&t(Tn),$(Vl),s&&t(ug),s&&t(ft),$(Bl),$(Bs),$(Ol),$(Ss),$(Xs),$(Ls),s&&t(fg),s&&t(wn),$(Ql),s&&t(gg),s&&t(gt),$(Dl),$(Qs),$(ei),$(Ds),$(Ys),s&&t(_g),s&&t(En),$(ti),s&&t(yg),s&&t(st),$(oi),$(Ks),$(ri),$(ea),$(ta),$(oa),s&&t(bg),s&&t(Fn),$(li),s&&t(vg),s&&t(_t),$(ii),$(sa),$(hi),$(aa),$(ra),$(la),s&&t(Tg),s&&t(Cn),$(mi),s&&t(kg),s&&t(at),$(ui),$(ki),$(da),$(ca),s&&t(wg),s&&t(Jn),$(wi),s&&t(Mg),s&&t(Ke),$(Mi),$(Ji),$(ha),$(ma),s&&t(Eg),s&&t(In),$(Ui),s&&t($g),s&&t(rt),$(Ii),$(Pi),$(fa),$(ga),s&&t(Fg),s&&t(Nn),$(Vi),s&&t(jg),s&&t(lt),$(Bi),$(Ki),$(ya),$(ba),s&&t(xg),s&&t(qn),$(ed),s&&t(Cg),s&&t(it),$(td),$(dd),$(Ta),$(ka),s&&t(zg),s&&t(Gn),$(cd),s&&t(Jg),s&&t(dt),$(pd),$(bd),$(Ma),$(Ea),s&&t(Ug),s&&t(Pn),$(vd),s&&t(Ig),s&&t(et),$(Td),$(xd),$(Fa),$(ja),s&&t(Wg),s&&t(Bn),$(Cd),s&&t(Ng),s&&t(ct),$(zd),$(Ad),$(Ca),$(za)}}}const dU={local:"electra",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.ElectraConfig",title:"ElectraConfig"},{local:"transformers.ElectraTokenizer",title:"ElectraTokenizer"},{local:"transformers.ElectraTokenizerFast",title:"ElectraTokenizerFast"},{local:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput",title:"Electra specific outputs"},{local:"transformers.ElectraModel",title:"ElectraModel"},{local:"transformers.ElectraForPreTraining",title:"ElectraForPreTraining"},{local:"transformers.ElectraForCausalLM",title:"ElectraForCausalLM"},{local:"transformers.ElectraForMaskedLM",title:"ElectraForMaskedLM"},{local:"transformers.ElectraForSequenceClassification",title:"ElectraForSequenceClassification"},{local:"transformers.ElectraForMultipleChoice",title:"ElectraForMultipleChoice"},{local:"transformers.ElectraForTokenClassification",title:"ElectraForTokenClassification"},{local:"transformers.ElectraForQuestionAnswering",title:"ElectraForQuestionAnswering"},{local:"transformers.TFElectraModel",title:"TFElectraModel"},{local:"transformers.TFElectraForPreTraining",title:"TFElectraForPreTraining"},{local:"transformers.TFElectraForMaskedLM",title:"TFElectraForMaskedLM"},{local:"transformers.TFElectraForSequenceClassification",title:"TFElectraForSequenceClassification"},{local:"transformers.TFElectraForMultipleChoice",title:"TFElectraForMultipleChoice"},{local:"transformers.TFElectraForTokenClassification",title:"TFElectraForTokenClassification"},{local:"transformers.TFElectraForQuestionAnswering",title:"TFElectraForQuestionAnswering"},{local:"transformers.FlaxElectraModel",title:"FlaxElectraModel"},{local:"transformers.FlaxElectraForPreTraining",title:"FlaxElectraForPreTraining"},{local:"transformers.FlaxElectraForCausalLM",title:"FlaxElectraForCausalLM"},{local:"transformers.FlaxElectraForMaskedLM",title:"FlaxElectraForMaskedLM"},{local:"transformers.FlaxElectraForSequenceClassification",title:"FlaxElectraForSequenceClassification"},{local:"transformers.FlaxElectraForMultipleChoice",title:"FlaxElectraForMultipleChoice"},{local:"transformers.FlaxElectraForTokenClassification",title:"FlaxElectraForTokenClassification"},{local:"transformers.FlaxElectraForQuestionAnswering",title:"FlaxElectraForQuestionAnswering"}],title:"ELECTRA"};function cU(F){return eJ(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _U extends Dz{constructor(d){super();Yz(this,d,cU,iU,Hz,{})}}export{_U as default,dU as metadata};
