import{S as Nj,i as Ij,s as Dj,e as a,k as c,w as T,t as o,M as Sj,c as r,d as t,m as p,a as i,x as b,h as n,b as u,G as e,g,y as w,q as E,o as $,B as F,v as Wj,L as Oe}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ie}from"../../chunks/Tip-hf-doc-builder.js";import{D as I}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ne}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Se}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Le}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Uj(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import ElectraConfig, ElectraModel

# Initializing a ELECTRA electra-base-uncased style configuration
configuration = ElectraConfig()

# Initializing a model (with random weights) from the electra-base-uncased style configuration
model = ElectraModel(configuration)

# Accessing the model configuration
configuration = model.config`,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=a("p"),k=o("Examples:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Examples:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function Bj(M){let d,k,m,f,_;return f=new Ne({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),k=o("sequence pair mask has the following format:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"sequence pair mask has the following format:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function Rj(M){let d,k,m,f,_;return f=new Ne({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),k=o("sequence pair mask has the following format:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"sequence pair mask has the following format:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function Hj(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function Kj(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, ElectraModel
import torch

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = ElectraModel.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function Qj(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function Vj(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import ElectraForPreTraining, AutoTokenizer
import torch

discriminator = ElectraForPreTraining.from_pretrained("google/electra-base-discriminator")
tokenizer = AutoTokenizer.from_pretrained("google/electra-base-discriminator")

sentence = "The quick brown fox jumps over the lazy dog"
fake_sentence = "The quick brown fox fake over the lazy dog"

fake_tokens = tokenizer.tokenize(fake_sentence, add_special_tokens=True)
fake_inputs = tokenizer.encode(fake_sentence, return_tensors="pt")
discriminator_outputs = discriminator(fake_inputs)
predictions = torch.round((torch.sign(discriminator_outputs[0]) + 1) / 2)

fake_tokens

predictions.squeeze().tolist()`,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=a("p"),k=o("Examples:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Examples:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function Jj(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function Gj(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, ElectraForCausalLM, ElectraConfig
import torch

tokenizer = AutoTokenizer.from_pretrained("google/electra-base-generator")
config = ElectraConfig.from_pretrained("google/electra-base-generator")
config.is_decoder = True
model = ElectraForCausalLM.from_pretrained("google/electra-base-generator", config=config)

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

prediction_logits = outputs.logits`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function Xj(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function Yj(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, ElectraForMaskedLM
import torch

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-generator")
model = ElectraForMaskedLM.from_pretrained("google/electra-small-generator")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# retrieve index of [MASK]
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[0].nonzero(as_tuple=True)[0]

predicted_token_id = logits[0, mask_token_index].argmax(axis=-1)
tokenizer.decode(predicted_token_id)

labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]
# mask labels of non-[MASK] tokens
labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

outputs = model(**inputs, labels=labels)
round(outputs.loss.item(), 2)`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function Zj(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function eC(M){let d,k,m,f,_;return f=new Ne({props:{code:`import torch
from transformers import AutoTokenizer, ElectraForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("bhadresh-savani/electra-base-emotion")
model = ElectraForSequenceClassification.from_pretrained("bhadresh-savani/electra-base-emotion")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()
model.config.id2label[predicted_class_id]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = ElectraForSequenceClassification.from_pretrained("bhadresh-savani/electra-base-emotion", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)`,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=a("p"),k=o("Example of single-label classification:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example of single-label classification:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function tC(M){let d,k,m,f,_;return f=new Ne({props:{code:`import torch
from transformers import AutoTokenizer, ElectraForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("bhadresh-savani/electra-base-emotion")
model = ElectraForSequenceClassification.from_pretrained("bhadresh-savani/electra-base-emotion", problem_type="multi_label_classification")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = ElectraForSequenceClassification.from_pretrained(
    "bhadresh-savani/electra-base-emotion", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.sum(
    torch.nn.functional.one_hot(predicted_class_ids[None, :].clone(), num_classes=num_labels), dim=1
).to(torch.float)
loss = model(**inputs, labels=labels).loss`,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=a("p"),k=o("Example of multi-label classification:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example of multi-label classification:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function oC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function nC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, ElectraForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = ElectraForMultipleChoice.from_pretrained("google/electra-small-discriminator")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."
labels = torch.tensor(0).unsqueeze(0)  # choice0 is correct (according to Wikipedia ;)), batch size 1

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
outputs = model(**{k: v.unsqueeze(0) for k, v in encoding.items()}, labels=labels)  # batch size is 1

# the linear classifier still needs to be trained
loss = outputs.loss
logits = outputs.logits`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function sC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function aC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, ElectraForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("bhadresh-savani/electra-base-discriminator-finetuned-conll03-english")
model = ElectraForTokenClassification.from_pretrained("bhadresh-savani/electra-base-discriminator-finetuned-conll03-english")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="pt"
)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_token_class_ids = logits.argmax(-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t.item()] for t in predicted_token_class_ids[0]]
predicted_tokens_classes

labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function rC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function iC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, ElectraForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("bhadresh-savani/electra-base-squad2")
model = ElectraForQuestionAnswering.from_pretrained("bhadresh-savani/electra-base-squad2")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]
tokenizer.decode(predict_answer_tokens, skip_special_tokens=True)

# target is "nice puppet"
target_start_index = torch.tensor([11])
target_end_index = torch.tensor([12])

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

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = TFElectraModel.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)

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

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

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-generator")
model = TFElectraForMaskedLM.from_pretrained("google/electra-small-generator")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="tf")
logits = model(**inputs).logits

# retrieve index of [MASK]
mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[0])
selected_logits = tf.gather_nd(logits[0], indices=mask_token_index)

predicted_token_id = tf.math.argmax(selected_logits, axis=-1)
tokenizer.decode(predicted_token_id)`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function _C(M){let d,k;return d=new Ne({props:{code:`labels = tokenizer("The capital of France is Paris.", return_tensors="tf")["input_ids"]
# mask labels of non-[MASK] tokens
labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

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

tokenizer = AutoTokenizer.from_pretrained("bhadresh-savani/electra-base-emotion")
model = TFElectraForSequenceClassification.from_pretrained("bhadresh-savani/electra-base-emotion")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")

logits = model(**inputs).logits

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

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = TFElectraForMultipleChoice.from_pretrained("google/electra-small-discriminator")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="tf", padding=True)
inputs = {k: tf.expand_dims(v, 0) for k, v in encoding.items()}
outputs = model(inputs)  # batch size is 1

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

tokenizer = AutoTokenizer.from_pretrained("bhadresh-savani/electra-base-discriminator-finetuned-conll03-english")
model = TFElectraForTokenClassification.from_pretrained("bhadresh-savani/electra-base-discriminator-finetuned-conll03-english")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="tf"
)

logits = model(**inputs).logits
predicted_token_class_ids = tf.math.argmax(logits, axis=-1)

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

tokenizer = AutoTokenizer.from_pretrained("bhadresh-savani/electra-base-squad2")
model = TFElectraForQuestionAnswering.from_pretrained("bhadresh-savani/electra-base-squad2")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="tf")
outputs = model(**inputs)

answer_start_index = int(tf.math.argmax(outputs.start_logits, axis=-1)[0])
answer_end_index = int(tf.math.argmax(outputs.end_logits, axis=-1)[0])

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]
tokenizer.decode(predict_answer_tokens)`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function CC(M){let d,k;return d=new Ne({props:{code:`# target is "nice puppet"
target_start_index = tf.constant([11])
target_end_index = tf.constant([12])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = tf.math.reduce_mean(outputs.loss)
round(float(loss), 2)`,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(m){b(d.$$.fragment,m)},m(m,f){w(d,m,f),k=!0},p:Oe,i(m){k||(E(d.$$.fragment,m),k=!0)},o(m){$(d.$$.fragment,m),k=!1},d(m){F(d,m)}}}function PC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function AC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, FlaxElectraModel

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = FlaxElectraModel.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function LC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function OC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, FlaxElectraForPreTraining

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = FlaxElectraForPreTraining.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="np")
outputs = model(**inputs)

prediction_logits = outputs.logits`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function NC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function IC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, FlaxElectraForCausalLM

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = FlaxElectraForCausalLM.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="np")
outputs = model(**inputs)

# retrieve logts for next token
next_token_logits = outputs.logits[:, -1]`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function DC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function SC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, FlaxElectraForMaskedLM

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = FlaxElectraForMaskedLM.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="jax")

outputs = model(**inputs)
logits = outputs.logits`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function WC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function UC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, FlaxElectraForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = FlaxElectraForSequenceClassification.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")

outputs = model(**inputs)
logits = outputs.logits`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function BC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function RC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, FlaxElectraForMultipleChoice

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = FlaxElectraForMultipleChoice.from_pretrained("google/electra-small-discriminator")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="jax", padding=True)
outputs = model(**{k: v[None, :] for k, v in encoding.items()})

logits = outputs.logits`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function HC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function KC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, FlaxElectraForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = FlaxElectraForTokenClassification.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")

outputs = model(**inputs)
logits = outputs.logits`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function QC(M){let d,k,m,f,_;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),_=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(h,"CODE",{});var z=i(m);f=n(z,"Module"),z.forEach(t),_=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,m),e(m,f),e(d,_)},d(l){l&&t(d)}}}function VC(M){let d,k,m,f,_;return f=new Ne({props:{code:`from transformers import AutoTokenizer, FlaxElectraForQuestionAnswering

tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator")
model = FlaxElectraForQuestionAnswering.from_pretrained("google/electra-small-discriminator")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
inputs = tokenizer(question, text, return_tensors="jax")

outputs = model(**inputs)
start_scores = outputs.start_logits
end_scores = outputs.end_logits`,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=a("p"),k=o("Example:"),m=c(),T(f.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=n(h,"Example:"),h.forEach(t),m=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,m,h),w(f,l,h),_=!0},p:Oe,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(m),F(f,l)}}}function JC(M){let d,k,m,f,_,l,h,z,ke,he,W,ae,ee,x,ve,K,ye,me,U,Te,re,Q,be,ue,R,we,fe,H,ce,Ee,oe,C,A,ge,B,pe,$e,V,ne,Fe,P,xe,J,ie,Me,G,le,ze,D,_e,S,qe,Z,L,je,O,Ce,Pe,y,q,De,te,We,Qe,j,Ve,Ke,de,Ue,Je,N,X,Re,Ge,Y,He,Xe,Ae,Be,se,Ye,O_,So,N_,Hd,I_,D_,Kd,S_,W_,U_,Vn,pf,Wo,Jn,fp,or,B_,gp,R_,hf,tt,nr,H_,_p,K_,Q_,sr,V_,Qd,J_,G_,X_,xo,ar,Y_,kp,Z_,ek,rr,Vd,tk,vp,ok,nk,Jd,sk,yp,ak,rk,Gn,ir,ik,Tp,lk,dk,Wt,lr,ck,bp,pk,hk,Xn,mk,Uo,uk,wp,fk,gk,Ep,_k,kk,vk,Yn,dr,yk,cr,Tk,$p,bk,wk,mf,Bo,Zn,Fp,pr,Ek,xp,$k,uf,Tt,hr,Fk,mr,xk,Mp,Mk,zk,qk,ur,jk,Gd,Ck,Pk,Ak,Mo,fr,Lk,zp,Ok,Nk,gr,Xd,Ik,qp,Dk,Sk,Yd,Wk,jp,Uk,Bk,Ut,_r,Rk,Cp,Hk,Kk,es,Qk,Ro,Vk,Pp,Jk,Gk,Ap,Xk,Yk,ff,Ho,ts,Lp,kr,Zk,Op,ev,gf,Ko,vr,tv,yr,ov,Zd,nv,sv,_f,Qo,Tr,av,br,rv,ec,iv,lv,kf,Vo,os,Np,wr,dv,Ip,cv,vf,bt,Er,pv,Dp,hv,mv,$r,uv,tc,fv,gv,_v,Fr,kv,xr,vv,yv,Tv,Bt,Mr,bv,Jo,wv,oc,Ev,$v,Sp,Fv,xv,Mv,ns,zv,ss,yf,Go,as,Wp,zr,qv,Up,jv,Tf,pt,qr,Cv,Bp,Pv,Av,Rp,Lv,Ov,jr,Nv,nc,Iv,Dv,Sv,Cr,Wv,Pr,Uv,Bv,Rv,Rt,Ar,Hv,Xo,Kv,sc,Qv,Vv,Hp,Jv,Gv,Xv,rs,Yv,is,bf,Yo,ls,Kp,Lr,Zv,Qp,ey,wf,wt,Or,ty,Nr,oy,Vp,ny,sy,ay,Ir,ry,ac,iy,ly,dy,Dr,cy,Sr,py,hy,my,Ht,Wr,uy,Zo,fy,rc,gy,_y,Jp,ky,vy,yy,ds,Ty,cs,Ef,en,ps,Gp,Ur,by,Xp,wy,$f,ht,Br,Ey,Yp,$y,Fy,Zp,xy,My,Rr,zy,ic,qy,jy,Cy,Hr,Py,Kr,Ay,Ly,Oy,Kt,Qr,Ny,tn,Iy,lc,Dy,Sy,eh,Wy,Uy,By,hs,Ry,ms,Ff,on,us,th,Vr,Hy,oh,Ky,xf,Et,Jr,Qy,nh,Vy,Jy,Gr,Gy,dc,Xy,Yy,Zy,Xr,eT,Yr,tT,oT,nT,xt,Zr,sT,nn,aT,cc,rT,iT,sh,lT,dT,cT,fs,pT,gs,hT,_s,Mf,sn,ks,ah,ei,mT,rh,uT,zf,$t,ti,fT,ih,gT,_T,oi,kT,pc,vT,yT,TT,ni,bT,si,wT,ET,$T,Qt,ai,FT,an,xT,hc,MT,zT,lh,qT,jT,CT,vs,PT,ys,qf,rn,Ts,dh,ri,AT,ch,LT,jf,mt,ii,OT,ph,NT,IT,hh,DT,ST,li,WT,mc,UT,BT,RT,di,HT,ci,KT,QT,VT,Vt,pi,JT,ln,GT,uc,XT,YT,mh,ZT,eb,tb,bs,ob,ws,Cf,dn,Es,uh,hi,nb,fh,sb,Pf,Ft,mi,ab,cn,rb,gh,ib,lb,_h,db,cb,pb,ui,hb,fc,mb,ub,fb,fi,gb,gi,_b,kb,vb,Jt,_i,yb,pn,Tb,gc,bb,wb,kh,Eb,$b,Fb,$s,xb,Fs,Af,hn,xs,vh,ki,Mb,yh,zb,Lf,ut,vi,qb,Th,jb,Cb,yi,Pb,_c,Ab,Lb,Ob,Ti,Nb,bi,Ib,Db,Sb,Ms,Wb,Gt,wi,Ub,mn,Bb,kc,Rb,Hb,bh,Kb,Qb,Vb,zs,Jb,qs,Of,un,js,wh,Ei,Gb,Eh,Xb,Nf,ot,$i,Yb,$h,Zb,ew,Fh,tw,ow,Fi,nw,vc,sw,aw,rw,xi,iw,Mi,lw,dw,cw,Cs,pw,Xt,zi,hw,fn,mw,yc,uw,fw,xh,gw,_w,kw,Ps,vw,As,If,gn,Ls,Mh,qi,yw,zh,Tw,Df,nt,ji,bw,qh,ww,Ew,jh,$w,Fw,Ci,xw,Tc,Mw,zw,qw,Pi,jw,Ai,Cw,Pw,Aw,Os,Lw,Mt,Li,Ow,_n,Nw,bc,Iw,Dw,Ch,Sw,Ww,Uw,Ns,Bw,Is,Rw,Ds,Sf,kn,Ss,Ph,Oi,Hw,Ah,Kw,Wf,ft,Ni,Qw,Lh,Vw,Jw,Ii,Gw,wc,Xw,Yw,Zw,Di,eE,Si,tE,oE,nE,Ws,sE,zt,Wi,aE,vn,rE,Ec,iE,lE,Oh,dE,cE,pE,Us,hE,Bs,mE,Rs,Uf,yn,Hs,Nh,Ui,uE,Ih,fE,Bf,gt,Bi,gE,Dh,_E,kE,Ri,vE,$c,yE,TE,bE,Hi,wE,Ki,EE,$E,FE,Ks,xE,Yt,Qi,ME,Tn,zE,Fc,qE,jE,Sh,CE,PE,AE,Qs,LE,Vs,Rf,bn,Js,Wh,Vi,OE,Uh,NE,Hf,st,Ji,IE,Bh,DE,SE,Rh,WE,UE,Gi,BE,xc,RE,HE,KE,Xi,QE,Yi,VE,JE,GE,Gs,XE,qt,Zi,YE,wn,ZE,Mc,e1,t1,Hh,o1,n1,s1,Xs,a1,Ys,r1,Zs,Kf,En,ea,Kh,el,i1,Qh,l1,Qf,_t,tl,d1,$n,c1,Vh,p1,h1,Jh,m1,u1,f1,ol,g1,zc,_1,k1,v1,nl,y1,sl,T1,b1,w1,ta,E1,jt,al,$1,Fn,F1,qc,x1,M1,Gh,z1,q1,j1,oa,C1,na,P1,sa,Vf,xn,aa,Xh,rl,A1,Yh,L1,Jf,at,il,O1,Zh,N1,I1,ll,D1,jc,S1,W1,U1,dl,B1,cl,R1,H1,K1,em,Q1,V1,fo,tm,pl,J1,G1,om,hl,X1,Y1,nm,ml,Z1,e$,sm,ul,t$,o$,Zt,fl,n$,Mn,s$,am,a$,r$,rm,i$,l$,d$,ra,c$,ia,Gf,zn,la,im,gl,p$,lm,h$,Xf,Ze,_l,m$,dm,u$,f$,cm,g$,_$,kl,k$,Cc,v$,y$,T$,vl,b$,yl,w$,E$,$$,pm,F$,x$,go,hm,Tl,M$,z$,mm,bl,q$,j$,um,wl,C$,P$,fm,El,A$,L$,eo,$l,O$,qn,N$,gm,I$,D$,_m,S$,W$,U$,da,B$,ca,Yf,jn,pa,km,Fl,R$,vm,H$,Zf,rt,xl,K$,ym,Q$,V$,Ml,J$,Pc,G$,X$,Y$,zl,Z$,ql,e2,t2,o2,Tm,n2,s2,_o,bm,jl,a2,r2,wm,Cl,i2,l2,Em,Pl,d2,c2,$m,Al,p2,h2,to,Ll,m2,Cn,u2,Fm,f2,g2,xm,_2,k2,v2,ha,y2,ma,eg,Pn,ua,Mm,Ol,T2,zm,b2,tg,it,Nl,w2,Il,E2,qm,$2,F2,x2,Dl,M2,Ac,z2,q2,j2,Sl,C2,Wl,P2,A2,L2,jm,O2,N2,ko,Cm,Ul,I2,D2,Pm,Bl,S2,W2,Am,Rl,U2,B2,Lm,Hl,R2,H2,oo,Kl,K2,An,Q2,Om,V2,J2,Nm,G2,X2,Y2,fa,Z2,ga,og,Ln,_a,Im,Ql,eF,Dm,tF,ng,lt,Vl,oF,Sm,nF,sF,Jl,aF,Lc,rF,iF,lF,Gl,dF,Xl,cF,pF,hF,Wm,mF,uF,vo,Um,Yl,fF,gF,Bm,Zl,_F,kF,Rm,ed,vF,yF,Hm,td,TF,bF,no,od,wF,On,EF,Km,$F,FF,Qm,xF,MF,zF,ka,qF,va,sg,Nn,ya,Vm,nd,jF,Jm,CF,ag,dt,sd,PF,Gm,AF,LF,ad,OF,Oc,NF,IF,DF,rd,SF,id,WF,UF,BF,Xm,RF,HF,yo,Ym,ld,KF,QF,Zm,dd,VF,JF,eu,cd,GF,XF,tu,pd,YF,ZF,so,hd,e0,In,t0,ou,o0,n0,nu,s0,a0,r0,Ta,i0,ba,rg,Dn,wa,su,md,l0,au,d0,ig,et,ud,c0,ru,p0,h0,iu,m0,u0,fd,f0,Nc,g0,_0,k0,gd,v0,_d,y0,T0,b0,lu,w0,E0,To,du,kd,$0,F0,cu,vd,x0,M0,pu,yd,z0,q0,hu,Td,j0,C0,ao,bd,P0,Sn,A0,mu,L0,O0,uu,N0,I0,D0,Ea,S0,$a,lg,Wn,Fa,fu,wd,W0,gu,U0,dg,ct,Ed,B0,Un,R0,_u,H0,K0,ku,Q0,V0,J0,$d,G0,Ic,X0,Y0,Z0,Fd,ex,xd,tx,ox,nx,vu,sx,ax,bo,yu,Md,rx,ix,Tu,zd,lx,dx,bu,qd,cx,px,wu,jd,hx,mx,ro,Cd,ux,Bn,fx,Eu,gx,_x,$u,kx,vx,yx,xa,Tx,Ma,cg;return l=new Se({}),x=new Se({}),We=new Se({}),Ue=new I({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/main/en/model_doc/electra#transformers.ElectraModel">ElectraModel</a> or <a href="/docs/transformers/main/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/main/en/model_doc/electra#transformers.ElectraModel">ElectraModel</a> or <a href="/docs/transformers/main/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/main/src/transformers/models/electra/configuration_electra.py#L44"}}),Vn=new Le({props:{anchor:"transformers.ElectraConfig.example",$$slots:{default:[Uj]},$$scope:{ctx:M}}}),or=new Se({}),nr=new I({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/main/src/transformers/models/electra/tokenization_electra.py#L93"}}),ar=new I({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/main/src/transformers/models/electra/tokenization_electra.py#L224",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>
`}}),ir=new I({props:{name:"convert_tokens_to_string",anchor:"transformers.ElectraTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/tokenization_electra.py#L219"}}),lr=new I({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/main/src/transformers/models/electra/tokenization_electra.py#L277",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>
`}}),Xn=new Le({props:{anchor:"transformers.ElectraTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Bj]},$$scope:{ctx:M}}}),dr=new I({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/main/src/transformers/models/electra/tokenization_electra.py#L249",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>
`}}),pr=new Se({}),hr=new I({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/main/src/transformers/models/electra/tokenization_electra_fast.py#L88"}}),fr=new I({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/main/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>
`}}),_r=new I({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/main/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>
`}}),es=new Le({props:{anchor:"transformers.ElectraTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Rj]},$$scope:{ctx:M}}}),kr=new Se({}),vr=new I({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/main/src/transformers/models/electra/modeling_electra.py#L700"}}),Tr=new I({props:{name:"class transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput",anchor:"transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput",parameters:[{name:"logits",val:": Tensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = 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/main/src/transformers/models/electra/modeling_tf_electra.py#L813"}}),wr=new Se({}),Er=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_electra.py#L812"}}),Mr=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_electra.py#L839",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ns=new Ie({props:{$$slots:{default:[Hj]},$$scope:{ctx:M}}}),ss=new Le({props:{anchor:"transformers.ElectraModel.forward.example",$$slots:{default:[Kj]},$$scope:{ctx:M}}}),zr=new Se({}),qr=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_electra.py#L1061"}}),Ar=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/electra/modeling_electra.py#L1070",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/model_doc/electra#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"
>transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),rs=new Ie({props:{$$slots:{default:[Qj]},$$scope:{ctx:M}}}),is=new Le({props:{anchor:"transformers.ElectraForPreTraining.forward.example",$$slots:{default:[Vj]},$$scope:{ctx:M}}}),Lr=new Se({}),Or=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_electra.py#L1534"}}),Wr=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/electra/modeling_electra.py#L1555",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ds=new Ie({props:{$$slots:{default:[Jj]},$$scope:{ctx:M}}}),cs=new Le({props:{anchor:"transformers.ElectraForCausalLM.forward.example",$$slots:{default:[Gj]},$$scope:{ctx:M}}}),Ur=new Se({}),Br=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_electra.py#L1167"}}),Qr=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/electra/modeling_electra.py#L1186",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),hs=new Ie({props:{$$slots:{default:[Xj]},$$scope:{ctx:M}}}),ms=new Le({props:{anchor:"transformers.ElectraForMaskedLM.forward.example",$$slots:{default:[Yj]},$$scope:{ctx:M}}}),Vr=new Se({}),Jr=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_electra.py#L963"}}),Zr=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/electra/modeling_electra.py#L974",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fs=new Ie({props:{$$slots:{default:[Zj]},$$scope:{ctx:M}}}),gs=new Le({props:{anchor:"transformers.ElectraForSequenceClassification.forward.example",$$slots:{default:[eC]},$$scope:{ctx:M}}}),_s=new Le({props:{anchor:"transformers.ElectraForSequenceClassification.forward.example-2",$$slots:{default:[tC]},$$scope:{ctx:M}}}),ei=new Se({}),ti=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_electra.py#L1447"}}),ai=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/electra/modeling_electra.py#L1458",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vs=new Ie({props:{$$slots:{default:[oC]},$$scope:{ctx:M}}}),ys=new Le({props:{anchor:"transformers.ElectraForMultipleChoice.forward.example",$$slots:{default:[nC]},$$scope:{ctx:M}}}),ri=new Se({}),ii=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_electra.py#L1258"}}),pi=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/electra/modeling_electra.py#L1272",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bs=new Ie({props:{$$slots:{default:[sC]},$$scope:{ctx:M}}}),ws=new Le({props:{anchor:"transformers.ElectraForTokenClassification.forward.example",$$slots:{default:[aC]},$$scope:{ctx:M}}}),hi=new Se({}),mi=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_electra.py#L1339"}}),_i=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/electra/modeling_electra.py#L1353",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$s=new Ie({props:{$$slots:{default:[rC]},$$scope:{ctx:M}}}),Fs=new Le({props:{anchor:"transformers.ElectraForQuestionAnswering.forward.example",$$slots:{default:[iC]},$$scope:{ctx:M}}}),ki=new Se({}),vi=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_tf_electra.py#L938"}}),Ms=new Ie({props:{$$slots:{default:[lC]},$$scope:{ctx:M}}}),wi=new I({props:{name:"call",anchor:"transformers.TFElectraModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = 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"},{name:"training",val:": typing.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/electra/modeling_tf_electra.py#L944",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),zs=new Ie({props:{$$slots:{default:[dC]},$$scope:{ctx:M}}}),qs=new Le({props:{anchor:"transformers.TFElectraModel.call.example",$$slots:{default:[cC]},$$scope:{ctx:M}}}),Ei=new Se({}),$i=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_tf_electra.py#L1034"}}),Cs=new Ie({props:{$$slots:{default:[pC]},$$scope:{ctx:M}}}),zi=new I({props:{name:"call",anchor:"transformers.TFElectraForPreTraining.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"training",val:": typing.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/electra/modeling_tf_electra.py#L1041",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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>
`}}),Ps=new Ie({props:{$$slots:{default:[hC]},$$scope:{ctx:M}}}),As=new Le({props:{anchor:"transformers.TFElectraForPreTraining.call.example",$$slots:{default:[mC]},$$scope:{ctx:M}}}),qi=new Se({}),ji=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_tf_electra.py#L1149"}}),Os=new Ie({props:{$$slots:{default:[uC]},$$scope:{ctx:M}}}),Li=new I({props:{name:"call",anchor:"transformers.TFElectraForMaskedLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/electra/modeling_tf_electra.py#L1171",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ns=new Ie({props:{$$slots:{default:[fC]},$$scope:{ctx:M}}}),Is=new Le({props:{anchor:"transformers.TFElectraForMaskedLM.call.example",$$slots:{default:[gC]},$$scope:{ctx:M}}}),Ds=new Le({props:{anchor:"transformers.TFElectraForMaskedLM.call.example-2",$$slots:{default:[_C]},$$scope:{ctx:M}}}),Oi=new Se({}),Ni=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_tf_electra.py#L1275"}}),Ws=new Ie({props:{$$slots:{default:[kC]},$$scope:{ctx:M}}}),Wi=new I({props:{name:"call",anchor:"transformers.TFElectraForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/electra/modeling_tf_electra.py#L1282",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Us=new Ie({props:{$$slots:{default:[vC]},$$scope:{ctx:M}}}),Bs=new Le({props:{anchor:"transformers.TFElectraForSequenceClassification.call.example",$$slots:{default:[yC]},$$scope:{ctx:M}}}),Rs=new Le({props:{anchor:"transformers.TFElectraForSequenceClassification.call.example-2",$$slots:{default:[TC]},$$scope:{ctx:M}}}),Ui=new Se({}),Bi=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_tf_electra.py#L1353"}}),Ks=new Ie({props:{$$slots:{default:[bC]},$$scope:{ctx:M}}}),Qi=new I({props:{name:"call",anchor:"transformers.TFElectraForMultipleChoice.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/electra/modeling_tf_electra.py#L1375",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Qs=new Ie({props:{$$slots:{default:[wC]},$$scope:{ctx:M}}}),Vs=new Le({props:{anchor:"transformers.TFElectraForMultipleChoice.call.example",$$slots:{default:[EC]},$$scope:{ctx:M}}}),Vi=new Se({}),Ji=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_tf_electra.py#L1478"}}),Gs=new Ie({props:{$$slots:{default:[$C]},$$scope:{ctx:M}}}),Zi=new I({props:{name:"call",anchor:"transformers.TFElectraForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/electra/modeling_tf_electra.py#L1491",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Xs=new Ie({props:{$$slots:{default:[FC]},$$scope:{ctx:M}}}),Ys=new Le({props:{anchor:"transformers.TFElectraForTokenClassification.call.example",$$slots:{default:[xC]},$$scope:{ctx:M}}}),Zs=new Le({props:{anchor:"transformers.TFElectraForTokenClassification.call.example-2",$$slots:{default:[MC]},$$scope:{ctx:M}}}),el=new Se({}),tl=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_tf_electra.py#L1562"}}),ta=new Ie({props:{$$slots:{default:[zC]},$$scope:{ctx:M}}}),al=new I({props:{name:"call",anchor:"transformers.TFElectraForQuestionAnswering.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"start_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"end_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/electra/modeling_tf_electra.py#L1572",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),oa=new Ie({props:{$$slots:{default:[qC]},$$scope:{ctx:M}}}),na=new Le({props:{anchor:"transformers.TFElectraForQuestionAnswering.call.example",$$slots:{default:[jC]},$$scope:{ctx:M}}}),sa=new Le({props:{anchor:"transformers.TFElectraForQuestionAnswering.call.example-2",$$slots:{default:[CC]},$$scope:{ctx:M}}}),rl=new Se({}),il=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L922"}}),fl=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L771",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ra=new Ie({props:{$$slots:{default:[PC]},$$scope:{ctx:M}}}),ia=new Le({props:{anchor:"transformers.FlaxElectraModel.__call__.example",$$slots:{default:[AC]},$$scope:{ctx:M}}}),gl=new Se({}),_l=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L1073"}}),$l=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L771",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/main/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>
`}}),da=new Ie({props:{$$slots:{default:[LC]},$$scope:{ctx:M}}}),ca=new Le({props:{anchor:"transformers.FlaxElectraForPreTraining.__call__.example",$$slots:{default:[OC]},$$scope:{ctx:M}}}),Fl=new Se({}),xl=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L1567"}}),Ll=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L771",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ha=new Ie({props:{$$slots:{default:[NC]},$$scope:{ctx:M}}}),ma=new Le({props:{anchor:"transformers.FlaxElectraForCausalLM.__call__.example",$$slots:{default:[IC]},$$scope:{ctx:M}}}),Ol=new Se({}),Nl=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L1009"}}),Kl=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L771",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fa=new Ie({props:{$$slots:{default:[DC]},$$scope:{ctx:M}}}),ga=new Le({props:{anchor:"transformers.FlaxElectraForMaskedLM.__call__.example",$$slots:{default:[SC]},$$scope:{ctx:M}}}),Ql=new Se({}),Vl=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L1483"}}),od=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L771",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ka=new Ie({props:{$$slots:{default:[WC]},$$scope:{ctx:M}}}),va=new Le({props:{anchor:"transformers.FlaxElectraForSequenceClassification.__call__.example",$$slots:{default:[UC]},$$scope:{ctx:M}}}),nd=new Se({}),sd=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L1315"}}),hd=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L771",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new Ie({props:{$$slots:{default:[BC]},$$scope:{ctx:M}}}),ba=new Le({props:{anchor:"transformers.FlaxElectraForMultipleChoice.__call__.example",$$slots:{default:[RC]},$$scope:{ctx:M}}}),md=new Se({}),ud=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L1168"}}),bd=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L771",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ea=new Ie({props:{$$slots:{default:[HC]},$$scope:{ctx:M}}}),$a=new Le({props:{anchor:"transformers.FlaxElectraForTokenClassification.__call__.example",$$slots:{default:[KC]},$$scope:{ctx:M}}}),wd=new Se({}),Ed=new I({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L1390"}}),Cd=new I({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/electra/modeling_flax_electra.py#L771",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xa=new Ie({props:{$$slots:{default:[QC]},$$scope:{ctx:M}}}),Ma=new Le({props:{anchor:"transformers.FlaxElectraForQuestionAnswering.__call__.example",$$slots:{default:[VC]},$$scope:{ctx:M}}}),{c(){d=a("meta"),k=c(),m=a("h1"),f=a("a"),_=a("span"),T(l.$$.fragment),h=c(),z=a("span"),ke=o("ELECTRA"),he=c(),W=a("h2"),ae=a("a"),ee=a("span"),T(x.$$.fragment),ve=c(),K=a("span"),ye=o("Overview"),me=c(),U=a("p"),Te=o("The ELECTRA model was proposed in the paper "),re=a("a"),Q=o(`ELECTRA: Pre-training Text Encoders as Discriminators Rather Than
Generators`),be=o(`. 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.`),ue=c(),R=a("p"),we=o("The abstract from the paper is the following:"),fe=c(),H=a("p"),ce=a("em"),Ee=o(`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.`),oe=c(),C=a("p"),A=o("Tips:"),ge=c(),B=a("ul"),pe=a("li"),$e=o(`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.`),V=c(),ne=a("li"),Fe=o("The ELECTRA checkpoints saved using "),P=a("a"),xe=o("Google Research\u2019s implementation"),J=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
`),ie=a("a"),Me=o("ElectraForMaskedLM"),G=o(` model, and the generator may be loaded in the
`),le=a("a"),ze=o("ElectraForPreTraining"),D=o(` model (the classification head will be randomly initialized as it
doesn\u2019t exist in the generator).`),_e=c(),S=a("p"),qe=o("This model was contributed by "),Z=a("a"),L=o("lysandre"),je=o(". The original code can be found "),O=a("a"),Ce=o("here"),Pe=o("."),y=c(),q=a("h2"),De=a("a"),te=a("span"),T(We.$$.fragment),Qe=c(),j=a("span"),Ve=o("ElectraConfig"),Ke=c(),de=a("div"),T(Ue.$$.fragment),Je=c(),N=a("p"),X=o("This is the configuration class to store the configuration of a "),Re=a("a"),Ge=o("ElectraModel"),Y=o(" or a "),He=a("a"),Xe=o("TFElectraModel"),Ae=o(`. 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
`),Be=a("a"),se=o("google/electra-small-discriminator"),Ye=o(" architecture."),O_=c(),So=a("p"),N_=o("Configuration objects inherit from "),Hd=a("a"),I_=o("PretrainedConfig"),D_=o(` and can be used to control the model outputs. Read the
documentation from `),Kd=a("a"),S_=o("PretrainedConfig"),W_=o(" for more information."),U_=c(),T(Vn.$$.fragment),pf=c(),Wo=a("h2"),Jn=a("a"),fp=a("span"),T(or.$$.fragment),B_=c(),gp=a("span"),R_=o("ElectraTokenizer"),hf=c(),tt=a("div"),T(nr.$$.fragment),H_=c(),_p=a("p"),K_=o("Construct a Electra tokenizer. Based on WordPiece."),Q_=c(),sr=a("p"),V_=o("This tokenizer inherits from "),Qd=a("a"),J_=o("PreTrainedTokenizer"),G_=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),X_=c(),xo=a("div"),T(ar.$$.fragment),Y_=c(),kp=a("p"),Z_=o(`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:`),ek=c(),rr=a("ul"),Vd=a("li"),tk=o("single sequence: "),vp=a("code"),ok=o("[CLS] X [SEP]"),nk=c(),Jd=a("li"),sk=o("pair of sequences: "),yp=a("code"),ak=o("[CLS] A [SEP] B [SEP]"),rk=c(),Gn=a("div"),T(ir.$$.fragment),ik=c(),Tp=a("p"),lk=o("Converts a sequence of tokens (string) in a single string."),dk=c(),Wt=a("div"),T(lr.$$.fragment),ck=c(),bp=a("p"),pk=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Electra"),hk=c(),T(Xn.$$.fragment),mk=c(),Uo=a("p"),uk=o("If "),wp=a("code"),fk=o("token_ids_1"),gk=o(" is "),Ep=a("code"),_k=o("None"),kk=o(", this method only returns the first portion of the mask (0s)."),vk=c(),Yn=a("div"),T(dr.$$.fragment),yk=c(),cr=a("p"),Tk=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),$p=a("code"),bk=o("prepare_for_model"),wk=o(" method."),mf=c(),Bo=a("h2"),Zn=a("a"),Fp=a("span"),T(pr.$$.fragment),Ek=c(),xp=a("span"),$k=o("ElectraTokenizerFast"),uf=c(),Tt=a("div"),T(hr.$$.fragment),Fk=c(),mr=a("p"),xk=o("Construct a \u201Cfast\u201D ELECTRA tokenizer (backed by HuggingFace\u2019s "),Mp=a("em"),Mk=o("tokenizers"),zk=o(" library). Based on WordPiece."),qk=c(),ur=a("p"),jk=o("This tokenizer inherits from "),Gd=a("a"),Ck=o("PreTrainedTokenizerFast"),Pk=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ak=c(),Mo=a("div"),T(fr.$$.fragment),Lk=c(),zp=a("p"),Ok=o(`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:`),Nk=c(),gr=a("ul"),Xd=a("li"),Ik=o("single sequence: "),qp=a("code"),Dk=o("[CLS] X [SEP]"),Sk=c(),Yd=a("li"),Wk=o("pair of sequences: "),jp=a("code"),Uk=o("[CLS] A [SEP] B [SEP]"),Bk=c(),Ut=a("div"),T(_r.$$.fragment),Rk=c(),Cp=a("p"),Hk=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ELECTRA"),Kk=c(),T(es.$$.fragment),Qk=c(),Ro=a("p"),Vk=o("If "),Pp=a("code"),Jk=o("token_ids_1"),Gk=o(" is "),Ap=a("code"),Xk=o("None"),Yk=o(", this method only returns the first portion of the mask (0s)."),ff=c(),Ho=a("h2"),ts=a("a"),Lp=a("span"),T(kr.$$.fragment),Zk=c(),Op=a("span"),ev=o("Electra specific outputs"),gf=c(),Ko=a("div"),T(vr.$$.fragment),tv=c(),yr=a("p"),ov=o("Output type of "),Zd=a("a"),nv=o("ElectraForPreTraining"),sv=o("."),_f=c(),Qo=a("div"),T(Tr.$$.fragment),av=c(),br=a("p"),rv=o("Output type of "),ec=a("a"),iv=o("TFElectraForPreTraining"),lv=o("."),kf=c(),Vo=a("h2"),os=a("a"),Np=a("span"),T(wr.$$.fragment),dv=c(),Ip=a("span"),cv=o("ElectraModel"),vf=c(),bt=a("div"),T(Er.$$.fragment),pv=c(),Dp=a("p"),hv=o("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(),$r=a("p"),uv=o("This model inherits from "),tc=a("a"),fv=o("PreTrainedModel"),gv=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.)`),_v=c(),Fr=a("p"),kv=o("This model is also a PyTorch "),xr=a("a"),vv=o("torch.nn.Module"),yv=o(` 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(),Bt=a("div"),T(Mr.$$.fragment),bv=c(),Jo=a("p"),wv=o("The "),oc=a("a"),Ev=o("ElectraModel"),$v=o(" forward method, overrides the "),Sp=a("code"),Fv=o("__call__"),xv=o(" special method."),Mv=c(),T(ns.$$.fragment),zv=c(),T(ss.$$.fragment),yf=c(),Go=a("h2"),as=a("a"),Wp=a("span"),T(zr.$$.fragment),qv=c(),Up=a("span"),jv=o("ElectraForPreTraining"),Tf=c(),pt=a("div"),T(qr.$$.fragment),Cv=c(),Bp=a("p"),Pv=o("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),Av=c(),Rp=a("p"),Lv=o("It is recommended to load the discriminator checkpoint into that model."),Ov=c(),jr=a("p"),Nv=o("This model inherits from "),nc=a("a"),Iv=o("PreTrainedModel"),Dv=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.)`),Sv=c(),Cr=a("p"),Wv=o("This model is also a PyTorch "),Pr=a("a"),Uv=o("torch.nn.Module"),Bv=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rv=c(),Rt=a("div"),T(Ar.$$.fragment),Hv=c(),Xo=a("p"),Kv=o("The "),sc=a("a"),Qv=o("ElectraForPreTraining"),Vv=o(" forward method, overrides the "),Hp=a("code"),Jv=o("__call__"),Gv=o(" special method."),Xv=c(),T(rs.$$.fragment),Yv=c(),T(is.$$.fragment),bf=c(),Yo=a("h2"),ls=a("a"),Kp=a("span"),T(Lr.$$.fragment),Zv=c(),Qp=a("span"),ey=o("ElectraForCausalLM"),wf=c(),wt=a("div"),T(Or.$$.fragment),ty=c(),Nr=a("p"),oy=o("ELECTRA Model with a "),Vp=a("code"),ny=o("language modeling"),sy=o(" head on top for CLM fine-tuning."),ay=c(),Ir=a("p"),ry=o("This model inherits from "),ac=a("a"),iy=o("PreTrainedModel"),ly=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.)`),dy=c(),Dr=a("p"),cy=o("This model is also a PyTorch "),Sr=a("a"),py=o("torch.nn.Module"),hy=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),my=c(),Ht=a("div"),T(Wr.$$.fragment),uy=c(),Zo=a("p"),fy=o("The "),rc=a("a"),gy=o("ElectraForCausalLM"),_y=o(" forward method, overrides the "),Jp=a("code"),ky=o("__call__"),vy=o(" special method."),yy=c(),T(ds.$$.fragment),Ty=c(),T(cs.$$.fragment),Ef=c(),en=a("h2"),ps=a("a"),Gp=a("span"),T(Ur.$$.fragment),by=c(),Xp=a("span"),wy=o("ElectraForMaskedLM"),$f=c(),ht=a("div"),T(Br.$$.fragment),Ey=c(),Yp=a("p"),$y=o("Electra model with a language modeling head on top."),Fy=c(),Zp=a("p"),xy=o(`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.`),My=c(),Rr=a("p"),zy=o("This model inherits from "),ic=a("a"),qy=o("PreTrainedModel"),jy=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.)`),Cy=c(),Hr=a("p"),Py=o("This model is also a PyTorch "),Kr=a("a"),Ay=o("torch.nn.Module"),Ly=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Oy=c(),Kt=a("div"),T(Qr.$$.fragment),Ny=c(),tn=a("p"),Iy=o("The "),lc=a("a"),Dy=o("ElectraForMaskedLM"),Sy=o(" forward method, overrides the "),eh=a("code"),Wy=o("__call__"),Uy=o(" special method."),By=c(),T(hs.$$.fragment),Ry=c(),T(ms.$$.fragment),Ff=c(),on=a("h2"),us=a("a"),th=a("span"),T(Vr.$$.fragment),Hy=c(),oh=a("span"),Ky=o("ElectraForSequenceClassification"),xf=c(),Et=a("div"),T(Jr.$$.fragment),Qy=c(),nh=a("p"),Vy=o(`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.`),Jy=c(),Gr=a("p"),Gy=o("This model inherits from "),dc=a("a"),Xy=o("PreTrainedModel"),Yy=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.)`),Zy=c(),Xr=a("p"),eT=o("This model is also a PyTorch "),Yr=a("a"),tT=o("torch.nn.Module"),oT=o(` 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(),xt=a("div"),T(Zr.$$.fragment),sT=c(),nn=a("p"),aT=o("The "),cc=a("a"),rT=o("ElectraForSequenceClassification"),iT=o(" forward method, overrides the "),sh=a("code"),lT=o("__call__"),dT=o(" special method."),cT=c(),T(fs.$$.fragment),pT=c(),T(gs.$$.fragment),hT=c(),T(_s.$$.fragment),Mf=c(),sn=a("h2"),ks=a("a"),ah=a("span"),T(ei.$$.fragment),mT=c(),rh=a("span"),uT=o("ElectraForMultipleChoice"),zf=c(),$t=a("div"),T(ti.$$.fragment),fT=c(),ih=a("p"),gT=o(`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.`),_T=c(),oi=a("p"),kT=o("This model inherits from "),pc=a("a"),vT=o("PreTrainedModel"),yT=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.)`),TT=c(),ni=a("p"),bT=o("This model is also a PyTorch "),si=a("a"),wT=o("torch.nn.Module"),ET=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$T=c(),Qt=a("div"),T(ai.$$.fragment),FT=c(),an=a("p"),xT=o("The "),hc=a("a"),MT=o("ElectraForMultipleChoice"),zT=o(" forward method, overrides the "),lh=a("code"),qT=o("__call__"),jT=o(" special method."),CT=c(),T(vs.$$.fragment),PT=c(),T(ys.$$.fragment),qf=c(),rn=a("h2"),Ts=a("a"),dh=a("span"),T(ri.$$.fragment),AT=c(),ch=a("span"),LT=o("ElectraForTokenClassification"),jf=c(),mt=a("div"),T(ii.$$.fragment),OT=c(),ph=a("p"),NT=o("Electra model with a token classification head on top."),IT=c(),hh=a("p"),DT=o("Both the discriminator and generator may be loaded into this model."),ST=c(),li=a("p"),WT=o("This model inherits from "),mc=a("a"),UT=o("PreTrainedModel"),BT=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.)`),RT=c(),di=a("p"),HT=o("This model is also a PyTorch "),ci=a("a"),KT=o("torch.nn.Module"),QT=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),VT=c(),Vt=a("div"),T(pi.$$.fragment),JT=c(),ln=a("p"),GT=o("The "),uc=a("a"),XT=o("ElectraForTokenClassification"),YT=o(" forward method, overrides the "),mh=a("code"),ZT=o("__call__"),eb=o(" special method."),tb=c(),T(bs.$$.fragment),ob=c(),T(ws.$$.fragment),Cf=c(),dn=a("h2"),Es=a("a"),uh=a("span"),T(hi.$$.fragment),nb=c(),fh=a("span"),sb=o("ElectraForQuestionAnswering"),Pf=c(),Ft=a("div"),T(mi.$$.fragment),ab=c(),cn=a("p"),rb=o(`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 `),gh=a("code"),ib=o("span start logits"),lb=o(" and "),_h=a("code"),db=o("span end logits"),cb=o(")."),pb=c(),ui=a("p"),hb=o("This model inherits from "),fc=a("a"),mb=o("PreTrainedModel"),ub=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.)`),fb=c(),fi=a("p"),gb=o("This model is also a PyTorch "),gi=a("a"),_b=o("torch.nn.Module"),kb=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vb=c(),Jt=a("div"),T(_i.$$.fragment),yb=c(),pn=a("p"),Tb=o("The "),gc=a("a"),bb=o("ElectraForQuestionAnswering"),wb=o(" forward method, overrides the "),kh=a("code"),Eb=o("__call__"),$b=o(" special method."),Fb=c(),T($s.$$.fragment),xb=c(),T(Fs.$$.fragment),Af=c(),hn=a("h2"),xs=a("a"),vh=a("span"),T(ki.$$.fragment),Mb=c(),yh=a("span"),zb=o("TFElectraModel"),Lf=c(),ut=a("div"),T(vi.$$.fragment),qb=c(),Th=a("p"),jb=o("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."),Cb=c(),yi=a("p"),Pb=o("This model inherits from "),_c=a("a"),Ab=o("TFPreTrainedModel"),Lb=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.)`),Ob=c(),Ti=a("p"),Nb=o("This model is also a "),bi=a("a"),Ib=o("tf.keras.Model"),Db=o(` 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.`),Sb=c(),T(Ms.$$.fragment),Wb=c(),Gt=a("div"),T(wi.$$.fragment),Ub=c(),mn=a("p"),Bb=o("The "),kc=a("a"),Rb=o("TFElectraModel"),Hb=o(" forward method, overrides the "),bh=a("code"),Kb=o("__call__"),Qb=o(" special method."),Vb=c(),T(zs.$$.fragment),Jb=c(),T(qs.$$.fragment),Of=c(),un=a("h2"),js=a("a"),wh=a("span"),T(Ei.$$.fragment),Gb=c(),Eh=a("span"),Xb=o("TFElectraForPreTraining"),Nf=c(),ot=a("div"),T($i.$$.fragment),Yb=c(),$h=a("p"),Zb=o("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),ew=c(),Fh=a("p"),tw=o(`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.`),ow=c(),Fi=a("p"),nw=o("This model inherits from "),vc=a("a"),sw=o("TFPreTrainedModel"),aw=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.)`),rw=c(),xi=a("p"),iw=o("This model is also a "),Mi=a("a"),lw=o("tf.keras.Model"),dw=o(` 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.`),cw=c(),T(Cs.$$.fragment),pw=c(),Xt=a("div"),T(zi.$$.fragment),hw=c(),fn=a("p"),mw=o("The "),yc=a("a"),uw=o("TFElectraForPreTraining"),fw=o(" forward method, overrides the "),xh=a("code"),gw=o("__call__"),_w=o(" special method."),kw=c(),T(Ps.$$.fragment),vw=c(),T(As.$$.fragment),If=c(),gn=a("h2"),Ls=a("a"),Mh=a("span"),T(qi.$$.fragment),yw=c(),zh=a("span"),Tw=o("TFElectraForMaskedLM"),Df=c(),nt=a("div"),T(ji.$$.fragment),bw=c(),qh=a("p"),ww=o("Electra model with a language modeling head on top."),Ew=c(),jh=a("p"),$w=o(`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.`),Fw=c(),Ci=a("p"),xw=o("This model inherits from "),Tc=a("a"),Mw=o("TFPreTrainedModel"),zw=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.)`),qw=c(),Pi=a("p"),jw=o("This model is also a "),Ai=a("a"),Cw=o("tf.keras.Model"),Pw=o(` 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.`),Aw=c(),T(Os.$$.fragment),Lw=c(),Mt=a("div"),T(Li.$$.fragment),Ow=c(),_n=a("p"),Nw=o("The "),bc=a("a"),Iw=o("TFElectraForMaskedLM"),Dw=o(" forward method, overrides the "),Ch=a("code"),Sw=o("__call__"),Ww=o(" special method."),Uw=c(),T(Ns.$$.fragment),Bw=c(),T(Is.$$.fragment),Rw=c(),T(Ds.$$.fragment),Sf=c(),kn=a("h2"),Ss=a("a"),Ph=a("span"),T(Oi.$$.fragment),Hw=c(),Ah=a("span"),Kw=o("TFElectraForSequenceClassification"),Wf=c(),ft=a("div"),T(Ni.$$.fragment),Qw=c(),Lh=a("p"),Vw=o(`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.`),Jw=c(),Ii=a("p"),Gw=o("This model inherits from "),wc=a("a"),Xw=o("TFPreTrainedModel"),Yw=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.)`),Zw=c(),Di=a("p"),eE=o("This model is also a "),Si=a("a"),tE=o("tf.keras.Model"),oE=o(` 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.`),nE=c(),T(Ws.$$.fragment),sE=c(),zt=a("div"),T(Wi.$$.fragment),aE=c(),vn=a("p"),rE=o("The "),Ec=a("a"),iE=o("TFElectraForSequenceClassification"),lE=o(" forward method, overrides the "),Oh=a("code"),dE=o("__call__"),cE=o(" special method."),pE=c(),T(Us.$$.fragment),hE=c(),T(Bs.$$.fragment),mE=c(),T(Rs.$$.fragment),Uf=c(),yn=a("h2"),Hs=a("a"),Nh=a("span"),T(Ui.$$.fragment),uE=c(),Ih=a("span"),fE=o("TFElectraForMultipleChoice"),Bf=c(),gt=a("div"),T(Bi.$$.fragment),gE=c(),Dh=a("p"),_E=o(`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.`),kE=c(),Ri=a("p"),vE=o("This model inherits from "),$c=a("a"),yE=o("TFPreTrainedModel"),TE=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.)`),bE=c(),Hi=a("p"),wE=o("This model is also a "),Ki=a("a"),EE=o("tf.keras.Model"),$E=o(` 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.`),FE=c(),T(Ks.$$.fragment),xE=c(),Yt=a("div"),T(Qi.$$.fragment),ME=c(),Tn=a("p"),zE=o("The "),Fc=a("a"),qE=o("TFElectraForMultipleChoice"),jE=o(" forward method, overrides the "),Sh=a("code"),CE=o("__call__"),PE=o(" special method."),AE=c(),T(Qs.$$.fragment),LE=c(),T(Vs.$$.fragment),Rf=c(),bn=a("h2"),Js=a("a"),Wh=a("span"),T(Vi.$$.fragment),OE=c(),Uh=a("span"),NE=o("TFElectraForTokenClassification"),Hf=c(),st=a("div"),T(Ji.$$.fragment),IE=c(),Bh=a("p"),DE=o("Electra model with a token classification head on top."),SE=c(),Rh=a("p"),WE=o("Both the discriminator and generator may be loaded into this model."),UE=c(),Gi=a("p"),BE=o("This model inherits from "),xc=a("a"),RE=o("TFPreTrainedModel"),HE=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.)`),KE=c(),Xi=a("p"),QE=o("This model is also a "),Yi=a("a"),VE=o("tf.keras.Model"),JE=o(` 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.`),GE=c(),T(Gs.$$.fragment),XE=c(),qt=a("div"),T(Zi.$$.fragment),YE=c(),wn=a("p"),ZE=o("The "),Mc=a("a"),e1=o("TFElectraForTokenClassification"),t1=o(" forward method, overrides the "),Hh=a("code"),o1=o("__call__"),n1=o(" special method."),s1=c(),T(Xs.$$.fragment),a1=c(),T(Ys.$$.fragment),r1=c(),T(Zs.$$.fragment),Kf=c(),En=a("h2"),ea=a("a"),Kh=a("span"),T(el.$$.fragment),i1=c(),Qh=a("span"),l1=o("TFElectraForQuestionAnswering"),Qf=c(),_t=a("div"),T(tl.$$.fragment),d1=c(),$n=a("p"),c1=o(`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 `),Vh=a("code"),p1=o("span start logits"),h1=o(" and "),Jh=a("code"),m1=o("span end logits"),u1=o(")."),f1=c(),ol=a("p"),g1=o("This model inherits from "),zc=a("a"),_1=o("TFPreTrainedModel"),k1=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.)`),v1=c(),nl=a("p"),y1=o("This model is also a "),sl=a("a"),T1=o("tf.keras.Model"),b1=o(` 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.`),w1=c(),T(ta.$$.fragment),E1=c(),jt=a("div"),T(al.$$.fragment),$1=c(),Fn=a("p"),F1=o("The "),qc=a("a"),x1=o("TFElectraForQuestionAnswering"),M1=o(" forward method, overrides the "),Gh=a("code"),z1=o("__call__"),q1=o(" special method."),j1=c(),T(oa.$$.fragment),C1=c(),T(na.$$.fragment),P1=c(),T(sa.$$.fragment),Vf=c(),xn=a("h2"),aa=a("a"),Xh=a("span"),T(rl.$$.fragment),A1=c(),Yh=a("span"),L1=o("FlaxElectraModel"),Jf=c(),at=a("div"),T(il.$$.fragment),O1=c(),Zh=a("p"),N1=o("The bare Electra Model transformer outputting raw hidden-states without any specific head on top."),I1=c(),ll=a("p"),D1=o("This model inherits from "),jc=a("a"),S1=o("FlaxPreTrainedModel"),W1=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)`),U1=c(),dl=a("p"),B1=o(`This model is also a Flax Linen
`),cl=a("a"),R1=o("flax.nn.Module"),H1=o(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),K1=c(),em=a("p"),Q1=o("Finally, this model supports inherent JAX features such as:"),V1=c(),fo=a("ul"),tm=a("li"),pl=a("a"),J1=o("Just-In-Time (JIT) compilation"),G1=c(),om=a("li"),hl=a("a"),X1=o("Automatic Differentiation"),Y1=c(),nm=a("li"),ml=a("a"),Z1=o("Vectorization"),e$=c(),sm=a("li"),ul=a("a"),t$=o("Parallelization"),o$=c(),Zt=a("div"),T(fl.$$.fragment),n$=c(),Mn=a("p"),s$=o("The "),am=a("code"),a$=o("FlaxElectraPreTrainedModel"),r$=o(" forward method, overrides the "),rm=a("code"),i$=o("__call__"),l$=o(" special method."),d$=c(),T(ra.$$.fragment),c$=c(),T(ia.$$.fragment),Gf=c(),zn=a("h2"),la=a("a"),im=a("span"),T(gl.$$.fragment),p$=c(),lm=a("span"),h$=o("FlaxElectraForPreTraining"),Xf=c(),Ze=a("div"),T(_l.$$.fragment),m$=c(),dm=a("p"),u$=o("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),f$=c(),cm=a("p"),g$=o("It is recommended to load the discriminator checkpoint into that model."),_$=c(),kl=a("p"),k$=o("This model inherits from "),Cc=a("a"),v$=o("FlaxPreTrainedModel"),y$=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)`),T$=c(),vl=a("p"),b$=o(`This model is also a Flax Linen
`),yl=a("a"),w$=o("flax.nn.Module"),E$=o(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),$$=c(),pm=a("p"),F$=o("Finally, this model supports inherent JAX features such as:"),x$=c(),go=a("ul"),hm=a("li"),Tl=a("a"),M$=o("Just-In-Time (JIT) compilation"),z$=c(),mm=a("li"),bl=a("a"),q$=o("Automatic Differentiation"),j$=c(),um=a("li"),wl=a("a"),C$=o("Vectorization"),P$=c(),fm=a("li"),El=a("a"),A$=o("Parallelization"),L$=c(),eo=a("div"),T($l.$$.fragment),O$=c(),qn=a("p"),N$=o("The "),gm=a("code"),I$=o("FlaxElectraPreTrainedModel"),D$=o(" forward method, overrides the "),_m=a("code"),S$=o("__call__"),W$=o(" special method."),U$=c(),T(da.$$.fragment),B$=c(),T(ca.$$.fragment),Yf=c(),jn=a("h2"),pa=a("a"),km=a("span"),T(Fl.$$.fragment),R$=c(),vm=a("span"),H$=o("FlaxElectraForCausalLM"),Zf=c(),rt=a("div"),T(xl.$$.fragment),K$=c(),ym=a("p"),Q$=o(`Electra Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),V$=c(),Ml=a("p"),J$=o("This model inherits from "),Pc=a("a"),G$=o("FlaxPreTrainedModel"),X$=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)`),Y$=c(),zl=a("p"),Z$=o(`This model is also a Flax Linen
`),ql=a("a"),e2=o("flax.nn.Module"),t2=o(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),o2=c(),Tm=a("p"),n2=o("Finally, this model supports inherent JAX features such as:"),s2=c(),_o=a("ul"),bm=a("li"),jl=a("a"),a2=o("Just-In-Time (JIT) compilation"),r2=c(),wm=a("li"),Cl=a("a"),i2=o("Automatic Differentiation"),l2=c(),Em=a("li"),Pl=a("a"),d2=o("Vectorization"),c2=c(),$m=a("li"),Al=a("a"),p2=o("Parallelization"),h2=c(),to=a("div"),T(Ll.$$.fragment),m2=c(),Cn=a("p"),u2=o("The "),Fm=a("code"),f2=o("FlaxElectraPreTrainedModel"),g2=o(" forward method, overrides the "),xm=a("code"),_2=o("__call__"),k2=o(" special method."),v2=c(),T(ha.$$.fragment),y2=c(),T(ma.$$.fragment),eg=c(),Pn=a("h2"),ua=a("a"),Mm=a("span"),T(Ol.$$.fragment),T2=c(),zm=a("span"),b2=o("FlaxElectraForMaskedLM"),tg=c(),it=a("div"),T(Nl.$$.fragment),w2=c(),Il=a("p"),E2=o("Electra Model with a "),qm=a("code"),$2=o("language modeling"),F2=o(" head on top."),x2=c(),Dl=a("p"),M2=o("This model inherits from "),Ac=a("a"),z2=o("FlaxPreTrainedModel"),q2=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)`),j2=c(),Sl=a("p"),C2=o(`This model is also a Flax Linen
`),Wl=a("a"),P2=o("flax.nn.Module"),A2=o(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),L2=c(),jm=a("p"),O2=o("Finally, this model supports inherent JAX features such as:"),N2=c(),ko=a("ul"),Cm=a("li"),Ul=a("a"),I2=o("Just-In-Time (JIT) compilation"),D2=c(),Pm=a("li"),Bl=a("a"),S2=o("Automatic Differentiation"),W2=c(),Am=a("li"),Rl=a("a"),U2=o("Vectorization"),B2=c(),Lm=a("li"),Hl=a("a"),R2=o("Parallelization"),H2=c(),oo=a("div"),T(Kl.$$.fragment),K2=c(),An=a("p"),Q2=o("The "),Om=a("code"),V2=o("FlaxElectraPreTrainedModel"),J2=o(" forward method, overrides the "),Nm=a("code"),G2=o("__call__"),X2=o(" special method."),Y2=c(),T(fa.$$.fragment),Z2=c(),T(ga.$$.fragment),og=c(),Ln=a("h2"),_a=a("a"),Im=a("span"),T(Ql.$$.fragment),eF=c(),Dm=a("span"),tF=o("FlaxElectraForSequenceClassification"),ng=c(),lt=a("div"),T(Vl.$$.fragment),oF=c(),Sm=a("p"),nF=o(`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.`),sF=c(),Jl=a("p"),aF=o("This model inherits from "),Lc=a("a"),rF=o("FlaxPreTrainedModel"),iF=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)`),lF=c(),Gl=a("p"),dF=o(`This model is also a Flax Linen
`),Xl=a("a"),cF=o("flax.nn.Module"),pF=o(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),hF=c(),Wm=a("p"),mF=o("Finally, this model supports inherent JAX features such as:"),uF=c(),vo=a("ul"),Um=a("li"),Yl=a("a"),fF=o("Just-In-Time (JIT) compilation"),gF=c(),Bm=a("li"),Zl=a("a"),_F=o("Automatic Differentiation"),kF=c(),Rm=a("li"),ed=a("a"),vF=o("Vectorization"),yF=c(),Hm=a("li"),td=a("a"),TF=o("Parallelization"),bF=c(),no=a("div"),T(od.$$.fragment),wF=c(),On=a("p"),EF=o("The "),Km=a("code"),$F=o("FlaxElectraPreTrainedModel"),FF=o(" forward method, overrides the "),Qm=a("code"),xF=o("__call__"),MF=o(" special method."),zF=c(),T(ka.$$.fragment),qF=c(),T(va.$$.fragment),sg=c(),Nn=a("h2"),ya=a("a"),Vm=a("span"),T(nd.$$.fragment),jF=c(),Jm=a("span"),CF=o("FlaxElectraForMultipleChoice"),ag=c(),dt=a("div"),T(sd.$$.fragment),PF=c(),Gm=a("p"),AF=o(`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.`),LF=c(),ad=a("p"),OF=o("This model inherits from "),Oc=a("a"),NF=o("FlaxPreTrainedModel"),IF=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)`),DF=c(),rd=a("p"),SF=o(`This model is also a Flax Linen
`),id=a("a"),WF=o("flax.nn.Module"),UF=o(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),BF=c(),Xm=a("p"),RF=o("Finally, this model supports inherent JAX features such as:"),HF=c(),yo=a("ul"),Ym=a("li"),ld=a("a"),KF=o("Just-In-Time (JIT) compilation"),QF=c(),Zm=a("li"),dd=a("a"),VF=o("Automatic Differentiation"),JF=c(),eu=a("li"),cd=a("a"),GF=o("Vectorization"),XF=c(),tu=a("li"),pd=a("a"),YF=o("Parallelization"),ZF=c(),so=a("div"),T(hd.$$.fragment),e0=c(),In=a("p"),t0=o("The "),ou=a("code"),o0=o("FlaxElectraPreTrainedModel"),n0=o(" forward method, overrides the "),nu=a("code"),s0=o("__call__"),a0=o(" special method."),r0=c(),T(Ta.$$.fragment),i0=c(),T(ba.$$.fragment),rg=c(),Dn=a("h2"),wa=a("a"),su=a("span"),T(md.$$.fragment),l0=c(),au=a("span"),d0=o("FlaxElectraForTokenClassification"),ig=c(),et=a("div"),T(ud.$$.fragment),c0=c(),ru=a("p"),p0=o("Electra model with a token classification head on top."),h0=c(),iu=a("p"),m0=o("Both the discriminator and generator may be loaded into this model."),u0=c(),fd=a("p"),f0=o("This model inherits from "),Nc=a("a"),g0=o("FlaxPreTrainedModel"),_0=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)`),k0=c(),gd=a("p"),v0=o(`This model is also a Flax Linen
`),_d=a("a"),y0=o("flax.nn.Module"),T0=o(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),b0=c(),lu=a("p"),w0=o("Finally, this model supports inherent JAX features such as:"),E0=c(),To=a("ul"),du=a("li"),kd=a("a"),$0=o("Just-In-Time (JIT) compilation"),F0=c(),cu=a("li"),vd=a("a"),x0=o("Automatic Differentiation"),M0=c(),pu=a("li"),yd=a("a"),z0=o("Vectorization"),q0=c(),hu=a("li"),Td=a("a"),j0=o("Parallelization"),C0=c(),ao=a("div"),T(bd.$$.fragment),P0=c(),Sn=a("p"),A0=o("The "),mu=a("code"),L0=o("FlaxElectraPreTrainedModel"),O0=o(" forward method, overrides the "),uu=a("code"),N0=o("__call__"),I0=o(" special method."),D0=c(),T(Ea.$$.fragment),S0=c(),T($a.$$.fragment),lg=c(),Wn=a("h2"),Fa=a("a"),fu=a("span"),T(wd.$$.fragment),W0=c(),gu=a("span"),U0=o("FlaxElectraForQuestionAnswering"),dg=c(),ct=a("div"),T(Ed.$$.fragment),B0=c(),Un=a("p"),R0=o(`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 `),_u=a("code"),H0=o("span start logits"),K0=o(" and "),ku=a("code"),Q0=o("span end logits"),V0=o(")."),J0=c(),$d=a("p"),G0=o("This model inherits from "),Ic=a("a"),X0=o("FlaxPreTrainedModel"),Y0=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)`),Z0=c(),Fd=a("p"),ex=o(`This model is also a Flax Linen
`),xd=a("a"),tx=o("flax.nn.Module"),ox=o(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),nx=c(),vu=a("p"),sx=o("Finally, this model supports inherent JAX features such as:"),ax=c(),bo=a("ul"),yu=a("li"),Md=a("a"),rx=o("Just-In-Time (JIT) compilation"),ix=c(),Tu=a("li"),zd=a("a"),lx=o("Automatic Differentiation"),dx=c(),bu=a("li"),qd=a("a"),cx=o("Vectorization"),px=c(),wu=a("li"),jd=a("a"),hx=o("Parallelization"),mx=c(),ro=a("div"),T(Cd.$$.fragment),ux=c(),Bn=a("p"),fx=o("The "),Eu=a("code"),gx=o("FlaxElectraPreTrainedModel"),_x=o(" forward method, overrides the "),$u=a("code"),kx=o("__call__"),vx=o(" special method."),yx=c(),T(xa.$$.fragment),Tx=c(),T(Ma.$$.fragment),this.h()},l(s){const v=Sj('[data-svelte="svelte-1phssyn"]',document.head);d=r(v,"META",{name:!0,content:!0}),v.forEach(t),k=p(s),m=r(s,"H1",{class:!0});var Pd=i(m);f=r(Pd,"A",{id:!0,class:!0,href:!0});var Fu=i(f);_=r(Fu,"SPAN",{});var xu=i(_);b(l.$$.fragment,xu),xu.forEach(t),Fu.forEach(t),h=p(Pd),z=r(Pd,"SPAN",{});var Mu=i(z);ke=n(Mu,"ELECTRA"),Mu.forEach(t),Pd.forEach(t),he=p(s),W=r(s,"H2",{class:!0});var Ad=i(W);ae=r(Ad,"A",{id:!0,class:!0,href:!0});var zu=i(ae);ee=r(zu,"SPAN",{});var qu=i(ee);b(x.$$.fragment,qu),qu.forEach(t),zu.forEach(t),ve=p(Ad),K=r(Ad,"SPAN",{});var ju=i(K);ye=n(ju,"Overview"),ju.forEach(t),Ad.forEach(t),me=p(s),U=r(s,"P",{});var Ld=i(U);Te=n(Ld,"The ELECTRA model was proposed in the paper "),re=r(Ld,"A",{href:!0,rel:!0});var Cu=i(re);Q=n(Cu,`ELECTRA: Pre-training Text Encoders as Discriminators Rather Than
Generators`),Cu.forEach(t),be=n(Ld,`. 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.`),Ld.forEach(t),ue=p(s),R=r(s,"P",{});var Pu=i(R);we=n(Pu,"The abstract from the paper is the following:"),Pu.forEach(t),fe=p(s),H=r(s,"P",{});var Au=i(H);ce=r(Au,"EM",{});var Lu=i(ce);Ee=n(Lu,`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.`),Lu.forEach(t),Au.forEach(t),oe=p(s),C=r(s,"P",{});var Ou=i(C);A=n(Ou,"Tips:"),Ou.forEach(t),ge=p(s),B=r(s,"UL",{});var Od=i(B);pe=r(Od,"LI",{});var Nu=i(pe);$e=n(Nu,`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.`),Nu.forEach(t),V=p(Od),ne=r(Od,"LI",{});var wo=i(ne);Fe=n(wo,"The ELECTRA checkpoints saved using "),P=r(wo,"A",{href:!0,rel:!0});var Iu=i(P);xe=n(Iu,"Google Research\u2019s implementation"),Iu.forEach(t),J=n(wo,`
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
`),ie=r(wo,"A",{href:!0});var Du=i(ie);Me=n(Du,"ElectraForMaskedLM"),Du.forEach(t),G=n(wo,` model, and the generator may be loaded in the
`),le=r(wo,"A",{href:!0});var Su=i(le);ze=n(Su,"ElectraForPreTraining"),Su.forEach(t),D=n(wo,` model (the classification head will be randomly initialized as it
doesn\u2019t exist in the generator).`),wo.forEach(t),Od.forEach(t),_e=p(s),S=r(s,"P",{});var Rn=i(S);qe=n(Rn,"This model was contributed by "),Z=r(Rn,"A",{href:!0,rel:!0});var Wu=i(Z);L=n(Wu,"lysandre"),Wu.forEach(t),je=n(Rn,". The original code can be found "),O=r(Rn,"A",{href:!0,rel:!0});var Uu=i(O);Ce=n(Uu,"here"),Uu.forEach(t),Pe=n(Rn,"."),Rn.forEach(t),y=p(s),q=r(s,"H2",{class:!0});var Nd=i(q);De=r(Nd,"A",{id:!0,class:!0,href:!0});var Bu=i(De);te=r(Bu,"SPAN",{});var Ru=i(te);b(We.$$.fragment,Ru),Ru.forEach(t),Bu.forEach(t),Qe=p(Nd),j=r(Nd,"SPAN",{});var Hu=i(j);Ve=n(Hu,"ElectraConfig"),Hu.forEach(t),Nd.forEach(t),Ke=p(s),de=r(s,"DIV",{class:!0});var Eo=i(de);b(Ue.$$.fragment,Eo),Je=p(Eo),N=r(Eo,"P",{});var $o=i(N);X=n($o,"This is the configuration class to store the configuration of a "),Re=r($o,"A",{href:!0});var Ku=i(Re);Ge=n(Ku,"ElectraModel"),Ku.forEach(t),Y=n($o," or a "),He=r($o,"A",{href:!0});var Qu=i(He);Xe=n(Qu,"TFElectraModel"),Qu.forEach(t),Ae=n($o,`. 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
`),Be=r($o,"A",{href:!0,rel:!0});var Vu=i(Be);se=n(Vu,"google/electra-small-discriminator"),Vu.forEach(t),Ye=n($o," architecture."),$o.forEach(t),O_=p(Eo),So=r(Eo,"P",{});var Hn=i(So);N_=n(Hn,"Configuration objects inherit from "),Hd=r(Hn,"A",{href:!0});var Ju=i(Hd);I_=n(Ju,"PretrainedConfig"),Ju.forEach(t),D_=n(Hn,` and can be used to control the model outputs. Read the
documentation from `),Kd=r(Hn,"A",{href:!0});var Gu=i(Kd);S_=n(Gu,"PretrainedConfig"),Gu.forEach(t),W_=n(Hn," for more information."),Hn.forEach(t),U_=p(Eo),b(Vn.$$.fragment,Eo),Eo.forEach(t),pf=p(s),Wo=r(s,"H2",{class:!0});var Id=i(Wo);Jn=r(Id,"A",{id:!0,class:!0,href:!0});var Xu=i(Jn);fp=r(Xu,"SPAN",{});var Yu=i(fp);b(or.$$.fragment,Yu),Yu.forEach(t),Xu.forEach(t),B_=p(Id),gp=r(Id,"SPAN",{});var Zu=i(gp);R_=n(Zu,"ElectraTokenizer"),Zu.forEach(t),Id.forEach(t),hf=p(s),tt=r(s,"DIV",{class:!0});var kt=i(tt);b(nr.$$.fragment,kt),H_=p(kt),_p=r(kt,"P",{});var ef=i(_p);K_=n(ef,"Construct a Electra tokenizer. Based on WordPiece."),ef.forEach(t),Q_=p(kt),sr=r(kt,"P",{});var Dd=i(sr);V_=n(Dd,"This tokenizer inherits from "),Qd=r(Dd,"A",{href:!0});var tf=i(Qd);J_=n(tf,"PreTrainedTokenizer"),tf.forEach(t),G_=n(Dd,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Dd.forEach(t),X_=p(kt),xo=r(kt,"DIV",{class:!0});var Kn=i(xo);b(ar.$$.fragment,Kn),Y_=p(Kn),kp=r(Kn,"P",{});var of=i(kp);Z_=n(of,`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:`),of.forEach(t),ek=p(Kn),rr=r(Kn,"UL",{});var Sd=i(rr);Vd=r(Sd,"LI",{});var Dc=i(Vd);tk=n(Dc,"single sequence: "),vp=r(Dc,"CODE",{});var nf=i(vp);ok=n(nf,"[CLS] X [SEP]"),nf.forEach(t),Dc.forEach(t),nk=p(Sd),Jd=r(Sd,"LI",{});var Sc=i(Jd);sk=n(Sc,"pair of sequences: "),yp=r(Sc,"CODE",{});var sf=i(yp);ak=n(sf,"[CLS] A [SEP] B [SEP]"),sf.forEach(t),Sc.forEach(t),Sd.forEach(t),Kn.forEach(t),rk=p(kt),Gn=r(kt,"DIV",{class:!0});var Wd=i(Gn);b(ir.$$.fragment,Wd),ik=p(Wd),Tp=r(Wd,"P",{});var af=i(Tp);lk=n(af,"Converts a sequence of tokens (string) in a single string."),af.forEach(t),Wd.forEach(t),dk=p(kt),Wt=r(kt,"DIV",{class:!0});var Fo=i(Wt);b(lr.$$.fragment,Fo),ck=p(Fo),bp=r(Fo,"P",{});var rf=i(bp);pk=n(rf,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Electra"),rf.forEach(t),hk=p(Fo),b(Xn.$$.fragment,Fo),mk=p(Fo),Uo=r(Fo,"P",{});var Qn=i(Uo);uk=n(Qn,"If "),wp=r(Qn,"CODE",{});var lf=i(wp);fk=n(lf,"token_ids_1"),lf.forEach(t),gk=n(Qn," is "),Ep=r(Qn,"CODE",{});var df=i(Ep);_k=n(df,"None"),df.forEach(t),kk=n(Qn,", this method only returns the first portion of the mask (0s)."),Qn.forEach(t),Fo.forEach(t),vk=p(kt),Yn=r(kt,"DIV",{class:!0});var Ud=i(Yn);b(dr.$$.fragment,Ud),yk=p(Ud),cr=r(Ud,"P",{});var Bd=i(cr);Tk=n(Bd,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),$p=r(Bd,"CODE",{});var cf=i($p);bk=n(cf,"prepare_for_model"),cf.forEach(t),wk=n(Bd," method."),Bd.forEach(t),Ud.forEach(t),kt.forEach(t),mf=p(s),Bo=r(s,"H2",{class:!0});var Rd=i(Bo);Zn=r(Rd,"A",{id:!0,class:!0,href:!0});var Ex=i(Zn);Fp=r(Ex,"SPAN",{});var $x=i(Fp);b(pr.$$.fragment,$x),$x.forEach(t),Ex.forEach(t),Ek=p(Rd),xp=r(Rd,"SPAN",{});var Fx=i(xp);$k=n(Fx,"ElectraTokenizerFast"),Fx.forEach(t),Rd.forEach(t),uf=p(s),Tt=r(s,"DIV",{class:!0});var zo=i(Tt);b(hr.$$.fragment,zo),Fk=p(zo),mr=r(zo,"P",{});var pg=i(mr);xk=n(pg,"Construct a \u201Cfast\u201D ELECTRA tokenizer (backed by HuggingFace\u2019s "),Mp=r(pg,"EM",{});var xx=i(Mp);Mk=n(xx,"tokenizers"),xx.forEach(t),zk=n(pg," library). Based on WordPiece."),pg.forEach(t),qk=p(zo),ur=r(zo,"P",{});var hg=i(ur);jk=n(hg,"This tokenizer inherits from "),Gd=r(hg,"A",{href:!0});var Mx=i(Gd);Ck=n(Mx,"PreTrainedTokenizerFast"),Mx.forEach(t),Pk=n(hg,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),hg.forEach(t),Ak=p(zo),Mo=r(zo,"DIV",{class:!0});var Wc=i(Mo);b(fr.$$.fragment,Wc),Lk=p(Wc),zp=r(Wc,"P",{});var zx=i(zp);Ok=n(zx,`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:`),zx.forEach(t),Nk=p(Wc),gr=r(Wc,"UL",{});var mg=i(gr);Xd=r(mg,"LI",{});var bx=i(Xd);Ik=n(bx,"single sequence: "),qp=r(bx,"CODE",{});var qx=i(qp);Dk=n(qx,"[CLS] X [SEP]"),qx.forEach(t),bx.forEach(t),Sk=p(mg),Yd=r(mg,"LI",{});var wx=i(Yd);Wk=n(wx,"pair of sequences: "),jp=r(wx,"CODE",{});var jx=i(jp);Uk=n(jx,"[CLS] A [SEP] B [SEP]"),jx.forEach(t),wx.forEach(t),mg.forEach(t),Wc.forEach(t),Bk=p(zo),Ut=r(zo,"DIV",{class:!0});var za=i(Ut);b(_r.$$.fragment,za),Rk=p(za),Cp=r(za,"P",{});var Cx=i(Cp);Hk=n(Cx,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ELECTRA"),Cx.forEach(t),Kk=p(za),b(es.$$.fragment,za),Qk=p(za),Ro=r(za,"P",{});var Uc=i(Ro);Vk=n(Uc,"If "),Pp=r(Uc,"CODE",{});var Px=i(Pp);Jk=n(Px,"token_ids_1"),Px.forEach(t),Gk=n(Uc," is "),Ap=r(Uc,"CODE",{});var Ax=i(Ap);Xk=n(Ax,"None"),Ax.forEach(t),Yk=n(Uc,", this method only returns the first portion of the mask (0s)."),Uc.forEach(t),za.forEach(t),zo.forEach(t),ff=p(s),Ho=r(s,"H2",{class:!0});var ug=i(Ho);ts=r(ug,"A",{id:!0,class:!0,href:!0});var Lx=i(ts);Lp=r(Lx,"SPAN",{});var Ox=i(Lp);b(kr.$$.fragment,Ox),Ox.forEach(t),Lx.forEach(t),Zk=p(ug),Op=r(ug,"SPAN",{});var Nx=i(Op);ev=n(Nx,"Electra specific outputs"),Nx.forEach(t),ug.forEach(t),gf=p(s),Ko=r(s,"DIV",{class:!0});var fg=i(Ko);b(vr.$$.fragment,fg),tv=p(fg),yr=r(fg,"P",{});var gg=i(yr);ov=n(gg,"Output type of "),Zd=r(gg,"A",{href:!0});var Ix=i(Zd);nv=n(Ix,"ElectraForPreTraining"),Ix.forEach(t),sv=n(gg,"."),gg.forEach(t),fg.forEach(t),_f=p(s),Qo=r(s,"DIV",{class:!0});var _g=i(Qo);b(Tr.$$.fragment,_g),av=p(_g),br=r(_g,"P",{});var kg=i(br);rv=n(kg,"Output type of "),ec=r(kg,"A",{href:!0});var Dx=i(ec);iv=n(Dx,"TFElectraForPreTraining"),Dx.forEach(t),lv=n(kg,"."),kg.forEach(t),_g.forEach(t),kf=p(s),Vo=r(s,"H2",{class:!0});var vg=i(Vo);os=r(vg,"A",{id:!0,class:!0,href:!0});var Sx=i(os);Np=r(Sx,"SPAN",{});var Wx=i(Np);b(wr.$$.fragment,Wx),Wx.forEach(t),Sx.forEach(t),dv=p(vg),Ip=r(vg,"SPAN",{});var Ux=i(Ip);cv=n(Ux,"ElectraModel"),Ux.forEach(t),vg.forEach(t),vf=p(s),bt=r(s,"DIV",{class:!0});var qo=i(bt);b(Er.$$.fragment,qo),pv=p(qo),Dp=r(qo,"P",{});var Bx=i(Dp);hv=n(Bx,"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."),Bx.forEach(t),mv=p(qo),$r=r(qo,"P",{});var yg=i($r);uv=n(yg,"This model inherits from "),tc=r(yg,"A",{href:!0});var Rx=i(tc);fv=n(Rx,"PreTrainedModel"),Rx.forEach(t),gv=n(yg,`. 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.)`),yg.forEach(t),_v=p(qo),Fr=r(qo,"P",{});var Tg=i(Fr);kv=n(Tg,"This model is also a PyTorch "),xr=r(Tg,"A",{href:!0,rel:!0});var Hx=i(xr);vv=n(Hx,"torch.nn.Module"),Hx.forEach(t),yv=n(Tg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Tg.forEach(t),Tv=p(qo),Bt=r(qo,"DIV",{class:!0});var qa=i(Bt);b(Mr.$$.fragment,qa),bv=p(qa),Jo=r(qa,"P",{});var Bc=i(Jo);wv=n(Bc,"The "),oc=r(Bc,"A",{href:!0});var Kx=i(oc);Ev=n(Kx,"ElectraModel"),Kx.forEach(t),$v=n(Bc," forward method, overrides the "),Sp=r(Bc,"CODE",{});var Qx=i(Sp);Fv=n(Qx,"__call__"),Qx.forEach(t),xv=n(Bc," special method."),Bc.forEach(t),Mv=p(qa),b(ns.$$.fragment,qa),zv=p(qa),b(ss.$$.fragment,qa),qa.forEach(t),qo.forEach(t),yf=p(s),Go=r(s,"H2",{class:!0});var bg=i(Go);as=r(bg,"A",{id:!0,class:!0,href:!0});var Vx=i(as);Wp=r(Vx,"SPAN",{});var Jx=i(Wp);b(zr.$$.fragment,Jx),Jx.forEach(t),Vx.forEach(t),qv=p(bg),Up=r(bg,"SPAN",{});var Gx=i(Up);jv=n(Gx,"ElectraForPreTraining"),Gx.forEach(t),bg.forEach(t),Tf=p(s),pt=r(s,"DIV",{class:!0});var io=i(pt);b(qr.$$.fragment,io),Cv=p(io),Bp=r(io,"P",{});var Xx=i(Bp);Pv=n(Xx,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),Xx.forEach(t),Av=p(io),Rp=r(io,"P",{});var Yx=i(Rp);Lv=n(Yx,"It is recommended to load the discriminator checkpoint into that model."),Yx.forEach(t),Ov=p(io),jr=r(io,"P",{});var wg=i(jr);Nv=n(wg,"This model inherits from "),nc=r(wg,"A",{href:!0});var Zx=i(nc);Iv=n(Zx,"PreTrainedModel"),Zx.forEach(t),Dv=n(wg,`. 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.)`),wg.forEach(t),Sv=p(io),Cr=r(io,"P",{});var Eg=i(Cr);Wv=n(Eg,"This model is also a PyTorch "),Pr=r(Eg,"A",{href:!0,rel:!0});var eM=i(Pr);Uv=n(eM,"torch.nn.Module"),eM.forEach(t),Bv=n(Eg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Eg.forEach(t),Rv=p(io),Rt=r(io,"DIV",{class:!0});var ja=i(Rt);b(Ar.$$.fragment,ja),Hv=p(ja),Xo=r(ja,"P",{});var Rc=i(Xo);Kv=n(Rc,"The "),sc=r(Rc,"A",{href:!0});var tM=i(sc);Qv=n(tM,"ElectraForPreTraining"),tM.forEach(t),Vv=n(Rc," forward method, overrides the "),Hp=r(Rc,"CODE",{});var oM=i(Hp);Jv=n(oM,"__call__"),oM.forEach(t),Gv=n(Rc," special method."),Rc.forEach(t),Xv=p(ja),b(rs.$$.fragment,ja),Yv=p(ja),b(is.$$.fragment,ja),ja.forEach(t),io.forEach(t),bf=p(s),Yo=r(s,"H2",{class:!0});var $g=i(Yo);ls=r($g,"A",{id:!0,class:!0,href:!0});var nM=i(ls);Kp=r(nM,"SPAN",{});var sM=i(Kp);b(Lr.$$.fragment,sM),sM.forEach(t),nM.forEach(t),Zv=p($g),Qp=r($g,"SPAN",{});var aM=i(Qp);ey=n(aM,"ElectraForCausalLM"),aM.forEach(t),$g.forEach(t),wf=p(s),wt=r(s,"DIV",{class:!0});var jo=i(wt);b(Or.$$.fragment,jo),ty=p(jo),Nr=r(jo,"P",{});var Fg=i(Nr);oy=n(Fg,"ELECTRA Model with a "),Vp=r(Fg,"CODE",{});var rM=i(Vp);ny=n(rM,"language modeling"),rM.forEach(t),sy=n(Fg," head on top for CLM fine-tuning."),Fg.forEach(t),ay=p(jo),Ir=r(jo,"P",{});var xg=i(Ir);ry=n(xg,"This model inherits from "),ac=r(xg,"A",{href:!0});var iM=i(ac);iy=n(iM,"PreTrainedModel"),iM.forEach(t),ly=n(xg,`. 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.)`),xg.forEach(t),dy=p(jo),Dr=r(jo,"P",{});var Mg=i(Dr);cy=n(Mg,"This model is also a PyTorch "),Sr=r(Mg,"A",{href:!0,rel:!0});var lM=i(Sr);py=n(lM,"torch.nn.Module"),lM.forEach(t),hy=n(Mg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Mg.forEach(t),my=p(jo),Ht=r(jo,"DIV",{class:!0});var Ca=i(Ht);b(Wr.$$.fragment,Ca),uy=p(Ca),Zo=r(Ca,"P",{});var Hc=i(Zo);fy=n(Hc,"The "),rc=r(Hc,"A",{href:!0});var dM=i(rc);gy=n(dM,"ElectraForCausalLM"),dM.forEach(t),_y=n(Hc," forward method, overrides the "),Jp=r(Hc,"CODE",{});var cM=i(Jp);ky=n(cM,"__call__"),cM.forEach(t),vy=n(Hc," special method."),Hc.forEach(t),yy=p(Ca),b(ds.$$.fragment,Ca),Ty=p(Ca),b(cs.$$.fragment,Ca),Ca.forEach(t),jo.forEach(t),Ef=p(s),en=r(s,"H2",{class:!0});var zg=i(en);ps=r(zg,"A",{id:!0,class:!0,href:!0});var pM=i(ps);Gp=r(pM,"SPAN",{});var hM=i(Gp);b(Ur.$$.fragment,hM),hM.forEach(t),pM.forEach(t),by=p(zg),Xp=r(zg,"SPAN",{});var mM=i(Xp);wy=n(mM,"ElectraForMaskedLM"),mM.forEach(t),zg.forEach(t),$f=p(s),ht=r(s,"DIV",{class:!0});var lo=i(ht);b(Br.$$.fragment,lo),Ey=p(lo),Yp=r(lo,"P",{});var uM=i(Yp);$y=n(uM,"Electra model with a language modeling head on top."),uM.forEach(t),Fy=p(lo),Zp=r(lo,"P",{});var fM=i(Zp);xy=n(fM,`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.`),fM.forEach(t),My=p(lo),Rr=r(lo,"P",{});var qg=i(Rr);zy=n(qg,"This model inherits from "),ic=r(qg,"A",{href:!0});var gM=i(ic);qy=n(gM,"PreTrainedModel"),gM.forEach(t),jy=n(qg,`. 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.)`),qg.forEach(t),Cy=p(lo),Hr=r(lo,"P",{});var jg=i(Hr);Py=n(jg,"This model is also a PyTorch "),Kr=r(jg,"A",{href:!0,rel:!0});var _M=i(Kr);Ay=n(_M,"torch.nn.Module"),_M.forEach(t),Ly=n(jg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),jg.forEach(t),Oy=p(lo),Kt=r(lo,"DIV",{class:!0});var Pa=i(Kt);b(Qr.$$.fragment,Pa),Ny=p(Pa),tn=r(Pa,"P",{});var Kc=i(tn);Iy=n(Kc,"The "),lc=r(Kc,"A",{href:!0});var kM=i(lc);Dy=n(kM,"ElectraForMaskedLM"),kM.forEach(t),Sy=n(Kc," forward method, overrides the "),eh=r(Kc,"CODE",{});var vM=i(eh);Wy=n(vM,"__call__"),vM.forEach(t),Uy=n(Kc," special method."),Kc.forEach(t),By=p(Pa),b(hs.$$.fragment,Pa),Ry=p(Pa),b(ms.$$.fragment,Pa),Pa.forEach(t),lo.forEach(t),Ff=p(s),on=r(s,"H2",{class:!0});var Cg=i(on);us=r(Cg,"A",{id:!0,class:!0,href:!0});var yM=i(us);th=r(yM,"SPAN",{});var TM=i(th);b(Vr.$$.fragment,TM),TM.forEach(t),yM.forEach(t),Hy=p(Cg),oh=r(Cg,"SPAN",{});var bM=i(oh);Ky=n(bM,"ElectraForSequenceClassification"),bM.forEach(t),Cg.forEach(t),xf=p(s),Et=r(s,"DIV",{class:!0});var Co=i(Et);b(Jr.$$.fragment,Co),Qy=p(Co),nh=r(Co,"P",{});var wM=i(nh);Vy=n(wM,`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.`),wM.forEach(t),Jy=p(Co),Gr=r(Co,"P",{});var Pg=i(Gr);Gy=n(Pg,"This model inherits from "),dc=r(Pg,"A",{href:!0});var EM=i(dc);Xy=n(EM,"PreTrainedModel"),EM.forEach(t),Yy=n(Pg,`. 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.)`),Pg.forEach(t),Zy=p(Co),Xr=r(Co,"P",{});var Ag=i(Xr);eT=n(Ag,"This model is also a PyTorch "),Yr=r(Ag,"A",{href:!0,rel:!0});var $M=i(Yr);tT=n($M,"torch.nn.Module"),$M.forEach(t),oT=n(Ag,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ag.forEach(t),nT=p(Co),xt=r(Co,"DIV",{class:!0});var Po=i(xt);b(Zr.$$.fragment,Po),sT=p(Po),nn=r(Po,"P",{});var Qc=i(nn);aT=n(Qc,"The "),cc=r(Qc,"A",{href:!0});var FM=i(cc);rT=n(FM,"ElectraForSequenceClassification"),FM.forEach(t),iT=n(Qc," forward method, overrides the "),sh=r(Qc,"CODE",{});var xM=i(sh);lT=n(xM,"__call__"),xM.forEach(t),dT=n(Qc," special method."),Qc.forEach(t),cT=p(Po),b(fs.$$.fragment,Po),pT=p(Po),b(gs.$$.fragment,Po),hT=p(Po),b(_s.$$.fragment,Po),Po.forEach(t),Co.forEach(t),Mf=p(s),sn=r(s,"H2",{class:!0});var Lg=i(sn);ks=r(Lg,"A",{id:!0,class:!0,href:!0});var MM=i(ks);ah=r(MM,"SPAN",{});var zM=i(ah);b(ei.$$.fragment,zM),zM.forEach(t),MM.forEach(t),mT=p(Lg),rh=r(Lg,"SPAN",{});var qM=i(rh);uT=n(qM,"ElectraForMultipleChoice"),qM.forEach(t),Lg.forEach(t),zf=p(s),$t=r(s,"DIV",{class:!0});var Ao=i($t);b(ti.$$.fragment,Ao),fT=p(Ao),ih=r(Ao,"P",{});var jM=i(ih);gT=n(jM,`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.`),jM.forEach(t),_T=p(Ao),oi=r(Ao,"P",{});var Og=i(oi);kT=n(Og,"This model inherits from "),pc=r(Og,"A",{href:!0});var CM=i(pc);vT=n(CM,"PreTrainedModel"),CM.forEach(t),yT=n(Og,`. 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.)`),Og.forEach(t),TT=p(Ao),ni=r(Ao,"P",{});var Ng=i(ni);bT=n(Ng,"This model is also a PyTorch "),si=r(Ng,"A",{href:!0,rel:!0});var PM=i(si);wT=n(PM,"torch.nn.Module"),PM.forEach(t),ET=n(Ng,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ng.forEach(t),$T=p(Ao),Qt=r(Ao,"DIV",{class:!0});var Aa=i(Qt);b(ai.$$.fragment,Aa),FT=p(Aa),an=r(Aa,"P",{});var Vc=i(an);xT=n(Vc,"The "),hc=r(Vc,"A",{href:!0});var AM=i(hc);MT=n(AM,"ElectraForMultipleChoice"),AM.forEach(t),zT=n(Vc," forward method, overrides the "),lh=r(Vc,"CODE",{});var LM=i(lh);qT=n(LM,"__call__"),LM.forEach(t),jT=n(Vc," special method."),Vc.forEach(t),CT=p(Aa),b(vs.$$.fragment,Aa),PT=p(Aa),b(ys.$$.fragment,Aa),Aa.forEach(t),Ao.forEach(t),qf=p(s),rn=r(s,"H2",{class:!0});var Ig=i(rn);Ts=r(Ig,"A",{id:!0,class:!0,href:!0});var OM=i(Ts);dh=r(OM,"SPAN",{});var NM=i(dh);b(ri.$$.fragment,NM),NM.forEach(t),OM.forEach(t),AT=p(Ig),ch=r(Ig,"SPAN",{});var IM=i(ch);LT=n(IM,"ElectraForTokenClassification"),IM.forEach(t),Ig.forEach(t),jf=p(s),mt=r(s,"DIV",{class:!0});var co=i(mt);b(ii.$$.fragment,co),OT=p(co),ph=r(co,"P",{});var DM=i(ph);NT=n(DM,"Electra model with a token classification head on top."),DM.forEach(t),IT=p(co),hh=r(co,"P",{});var SM=i(hh);DT=n(SM,"Both the discriminator and generator may be loaded into this model."),SM.forEach(t),ST=p(co),li=r(co,"P",{});var Dg=i(li);WT=n(Dg,"This model inherits from "),mc=r(Dg,"A",{href:!0});var WM=i(mc);UT=n(WM,"PreTrainedModel"),WM.forEach(t),BT=n(Dg,`. 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.)`),Dg.forEach(t),RT=p(co),di=r(co,"P",{});var Sg=i(di);HT=n(Sg,"This model is also a PyTorch "),ci=r(Sg,"A",{href:!0,rel:!0});var UM=i(ci);KT=n(UM,"torch.nn.Module"),UM.forEach(t),QT=n(Sg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sg.forEach(t),VT=p(co),Vt=r(co,"DIV",{class:!0});var La=i(Vt);b(pi.$$.fragment,La),JT=p(La),ln=r(La,"P",{});var Jc=i(ln);GT=n(Jc,"The "),uc=r(Jc,"A",{href:!0});var BM=i(uc);XT=n(BM,"ElectraForTokenClassification"),BM.forEach(t),YT=n(Jc," forward method, overrides the "),mh=r(Jc,"CODE",{});var RM=i(mh);ZT=n(RM,"__call__"),RM.forEach(t),eb=n(Jc," special method."),Jc.forEach(t),tb=p(La),b(bs.$$.fragment,La),ob=p(La),b(ws.$$.fragment,La),La.forEach(t),co.forEach(t),Cf=p(s),dn=r(s,"H2",{class:!0});var Wg=i(dn);Es=r(Wg,"A",{id:!0,class:!0,href:!0});var HM=i(Es);uh=r(HM,"SPAN",{});var KM=i(uh);b(hi.$$.fragment,KM),KM.forEach(t),HM.forEach(t),nb=p(Wg),fh=r(Wg,"SPAN",{});var QM=i(fh);sb=n(QM,"ElectraForQuestionAnswering"),QM.forEach(t),Wg.forEach(t),Pf=p(s),Ft=r(s,"DIV",{class:!0});var Lo=i(Ft);b(mi.$$.fragment,Lo),ab=p(Lo),cn=r(Lo,"P",{});var Gc=i(cn);rb=n(Gc,`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 `),gh=r(Gc,"CODE",{});var VM=i(gh);ib=n(VM,"span start logits"),VM.forEach(t),lb=n(Gc," and "),_h=r(Gc,"CODE",{});var JM=i(_h);db=n(JM,"span end logits"),JM.forEach(t),cb=n(Gc,")."),Gc.forEach(t),pb=p(Lo),ui=r(Lo,"P",{});var Ug=i(ui);hb=n(Ug,"This model inherits from "),fc=r(Ug,"A",{href:!0});var GM=i(fc);mb=n(GM,"PreTrainedModel"),GM.forEach(t),ub=n(Ug,`. 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.)`),Ug.forEach(t),fb=p(Lo),fi=r(Lo,"P",{});var Bg=i(fi);gb=n(Bg,"This model is also a PyTorch "),gi=r(Bg,"A",{href:!0,rel:!0});var XM=i(gi);_b=n(XM,"torch.nn.Module"),XM.forEach(t),kb=n(Bg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Bg.forEach(t),vb=p(Lo),Jt=r(Lo,"DIV",{class:!0});var Oa=i(Jt);b(_i.$$.fragment,Oa),yb=p(Oa),pn=r(Oa,"P",{});var Xc=i(pn);Tb=n(Xc,"The "),gc=r(Xc,"A",{href:!0});var YM=i(gc);bb=n(YM,"ElectraForQuestionAnswering"),YM.forEach(t),wb=n(Xc," forward method, overrides the "),kh=r(Xc,"CODE",{});var ZM=i(kh);Eb=n(ZM,"__call__"),ZM.forEach(t),$b=n(Xc," special method."),Xc.forEach(t),Fb=p(Oa),b($s.$$.fragment,Oa),xb=p(Oa),b(Fs.$$.fragment,Oa),Oa.forEach(t),Lo.forEach(t),Af=p(s),hn=r(s,"H2",{class:!0});var Rg=i(hn);xs=r(Rg,"A",{id:!0,class:!0,href:!0});var ez=i(xs);vh=r(ez,"SPAN",{});var tz=i(vh);b(ki.$$.fragment,tz),tz.forEach(t),ez.forEach(t),Mb=p(Rg),yh=r(Rg,"SPAN",{});var oz=i(yh);zb=n(oz,"TFElectraModel"),oz.forEach(t),Rg.forEach(t),Lf=p(s),ut=r(s,"DIV",{class:!0});var po=i(ut);b(vi.$$.fragment,po),qb=p(po),Th=r(po,"P",{});var nz=i(Th);jb=n(nz,"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."),nz.forEach(t),Cb=p(po),yi=r(po,"P",{});var Hg=i(yi);Pb=n(Hg,"This model inherits from "),_c=r(Hg,"A",{href:!0});var sz=i(_c);Ab=n(sz,"TFPreTrainedModel"),sz.forEach(t),Lb=n(Hg,`. 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.)`),Hg.forEach(t),Ob=p(po),Ti=r(po,"P",{});var Kg=i(Ti);Nb=n(Kg,"This model is also a "),bi=r(Kg,"A",{href:!0,rel:!0});var az=i(bi);Ib=n(az,"tf.keras.Model"),az.forEach(t),Db=n(Kg,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Kg.forEach(t),Sb=p(po),b(Ms.$$.fragment,po),Wb=p(po),Gt=r(po,"DIV",{class:!0});var Na=i(Gt);b(wi.$$.fragment,Na),Ub=p(Na),mn=r(Na,"P",{});var Yc=i(mn);Bb=n(Yc,"The "),kc=r(Yc,"A",{href:!0});var rz=i(kc);Rb=n(rz,"TFElectraModel"),rz.forEach(t),Hb=n(Yc," forward method, overrides the "),bh=r(Yc,"CODE",{});var iz=i(bh);Kb=n(iz,"__call__"),iz.forEach(t),Qb=n(Yc," special method."),Yc.forEach(t),Vb=p(Na),b(zs.$$.fragment,Na),Jb=p(Na),b(qs.$$.fragment,Na),Na.forEach(t),po.forEach(t),Of=p(s),un=r(s,"H2",{class:!0});var Qg=i(un);js=r(Qg,"A",{id:!0,class:!0,href:!0});var lz=i(js);wh=r(lz,"SPAN",{});var dz=i(wh);b(Ei.$$.fragment,dz),dz.forEach(t),lz.forEach(t),Gb=p(Qg),Eh=r(Qg,"SPAN",{});var cz=i(Eh);Xb=n(cz,"TFElectraForPreTraining"),cz.forEach(t),Qg.forEach(t),Nf=p(s),ot=r(s,"DIV",{class:!0});var Ct=i(ot);b($i.$$.fragment,Ct),Yb=p(Ct),$h=r(Ct,"P",{});var pz=i($h);Zb=n(pz,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),pz.forEach(t),ew=p(Ct),Fh=r(Ct,"P",{});var hz=i(Fh);tw=n(hz,`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.`),hz.forEach(t),ow=p(Ct),Fi=r(Ct,"P",{});var Vg=i(Fi);nw=n(Vg,"This model inherits from "),vc=r(Vg,"A",{href:!0});var mz=i(vc);sw=n(mz,"TFPreTrainedModel"),mz.forEach(t),aw=n(Vg,`. 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.)`),Vg.forEach(t),rw=p(Ct),xi=r(Ct,"P",{});var Jg=i(xi);iw=n(Jg,"This model is also a "),Mi=r(Jg,"A",{href:!0,rel:!0});var uz=i(Mi);lw=n(uz,"tf.keras.Model"),uz.forEach(t),dw=n(Jg,` 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.`),Jg.forEach(t),cw=p(Ct),b(Cs.$$.fragment,Ct),pw=p(Ct),Xt=r(Ct,"DIV",{class:!0});var Ia=i(Xt);b(zi.$$.fragment,Ia),hw=p(Ia),fn=r(Ia,"P",{});var Zc=i(fn);mw=n(Zc,"The "),yc=r(Zc,"A",{href:!0});var fz=i(yc);uw=n(fz,"TFElectraForPreTraining"),fz.forEach(t),fw=n(Zc," forward method, overrides the "),xh=r(Zc,"CODE",{});var gz=i(xh);gw=n(gz,"__call__"),gz.forEach(t),_w=n(Zc," special method."),Zc.forEach(t),kw=p(Ia),b(Ps.$$.fragment,Ia),vw=p(Ia),b(As.$$.fragment,Ia),Ia.forEach(t),Ct.forEach(t),If=p(s),gn=r(s,"H2",{class:!0});var Gg=i(gn);Ls=r(Gg,"A",{id:!0,class:!0,href:!0});var _z=i(Ls);Mh=r(_z,"SPAN",{});var kz=i(Mh);b(qi.$$.fragment,kz),kz.forEach(t),_z.forEach(t),yw=p(Gg),zh=r(Gg,"SPAN",{});var vz=i(zh);Tw=n(vz,"TFElectraForMaskedLM"),vz.forEach(t),Gg.forEach(t),Df=p(s),nt=r(s,"DIV",{class:!0});var Pt=i(nt);b(ji.$$.fragment,Pt),bw=p(Pt),qh=r(Pt,"P",{});var yz=i(qh);ww=n(yz,"Electra model with a language modeling head on top."),yz.forEach(t),Ew=p(Pt),jh=r(Pt,"P",{});var Tz=i(jh);$w=n(Tz,`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.`),Tz.forEach(t),Fw=p(Pt),Ci=r(Pt,"P",{});var Xg=i(Ci);xw=n(Xg,"This model inherits from "),Tc=r(Xg,"A",{href:!0});var bz=i(Tc);Mw=n(bz,"TFPreTrainedModel"),bz.forEach(t),zw=n(Xg,`. 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.)`),Xg.forEach(t),qw=p(Pt),Pi=r(Pt,"P",{});var Yg=i(Pi);jw=n(Yg,"This model is also a "),Ai=r(Yg,"A",{href:!0,rel:!0});var wz=i(Ai);Cw=n(wz,"tf.keras.Model"),wz.forEach(t),Pw=n(Yg,` 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.`),Yg.forEach(t),Aw=p(Pt),b(Os.$$.fragment,Pt),Lw=p(Pt),Mt=r(Pt,"DIV",{class:!0});var Oo=i(Mt);b(Li.$$.fragment,Oo),Ow=p(Oo),_n=r(Oo,"P",{});var ep=i(_n);Nw=n(ep,"The "),bc=r(ep,"A",{href:!0});var Ez=i(bc);Iw=n(Ez,"TFElectraForMaskedLM"),Ez.forEach(t),Dw=n(ep," forward method, overrides the "),Ch=r(ep,"CODE",{});var $z=i(Ch);Sw=n($z,"__call__"),$z.forEach(t),Ww=n(ep," special method."),ep.forEach(t),Uw=p(Oo),b(Ns.$$.fragment,Oo),Bw=p(Oo),b(Is.$$.fragment,Oo),Rw=p(Oo),b(Ds.$$.fragment,Oo),Oo.forEach(t),Pt.forEach(t),Sf=p(s),kn=r(s,"H2",{class:!0});var Zg=i(kn);Ss=r(Zg,"A",{id:!0,class:!0,href:!0});var Fz=i(Ss);Ph=r(Fz,"SPAN",{});var xz=i(Ph);b(Oi.$$.fragment,xz),xz.forEach(t),Fz.forEach(t),Hw=p(Zg),Ah=r(Zg,"SPAN",{});var Mz=i(Ah);Kw=n(Mz,"TFElectraForSequenceClassification"),Mz.forEach(t),Zg.forEach(t),Wf=p(s),ft=r(s,"DIV",{class:!0});var ho=i(ft);b(Ni.$$.fragment,ho),Qw=p(ho),Lh=r(ho,"P",{});var zz=i(Lh);Vw=n(zz,`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.`),zz.forEach(t),Jw=p(ho),Ii=r(ho,"P",{});var e_=i(Ii);Gw=n(e_,"This model inherits from "),wc=r(e_,"A",{href:!0});var qz=i(wc);Xw=n(qz,"TFPreTrainedModel"),qz.forEach(t),Yw=n(e_,`. 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.)`),e_.forEach(t),Zw=p(ho),Di=r(ho,"P",{});var t_=i(Di);eE=n(t_,"This model is also a "),Si=r(t_,"A",{href:!0,rel:!0});var jz=i(Si);tE=n(jz,"tf.keras.Model"),jz.forEach(t),oE=n(t_,` 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.`),t_.forEach(t),nE=p(ho),b(Ws.$$.fragment,ho),sE=p(ho),zt=r(ho,"DIV",{class:!0});var No=i(zt);b(Wi.$$.fragment,No),aE=p(No),vn=r(No,"P",{});var tp=i(vn);rE=n(tp,"The "),Ec=r(tp,"A",{href:!0});var Cz=i(Ec);iE=n(Cz,"TFElectraForSequenceClassification"),Cz.forEach(t),lE=n(tp," forward method, overrides the "),Oh=r(tp,"CODE",{});var Pz=i(Oh);dE=n(Pz,"__call__"),Pz.forEach(t),cE=n(tp," special method."),tp.forEach(t),pE=p(No),b(Us.$$.fragment,No),hE=p(No),b(Bs.$$.fragment,No),mE=p(No),b(Rs.$$.fragment,No),No.forEach(t),ho.forEach(t),Uf=p(s),yn=r(s,"H2",{class:!0});var o_=i(yn);Hs=r(o_,"A",{id:!0,class:!0,href:!0});var Az=i(Hs);Nh=r(Az,"SPAN",{});var Lz=i(Nh);b(Ui.$$.fragment,Lz),Lz.forEach(t),Az.forEach(t),uE=p(o_),Ih=r(o_,"SPAN",{});var Oz=i(Ih);fE=n(Oz,"TFElectraForMultipleChoice"),Oz.forEach(t),o_.forEach(t),Bf=p(s),gt=r(s,"DIV",{class:!0});var mo=i(gt);b(Bi.$$.fragment,mo),gE=p(mo),Dh=r(mo,"P",{});var Nz=i(Dh);_E=n(Nz,`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.`),Nz.forEach(t),kE=p(mo),Ri=r(mo,"P",{});var n_=i(Ri);vE=n(n_,"This model inherits from "),$c=r(n_,"A",{href:!0});var Iz=i($c);yE=n(Iz,"TFPreTrainedModel"),Iz.forEach(t),TE=n(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),bE=p(mo),Hi=r(mo,"P",{});var s_=i(Hi);wE=n(s_,"This model is also a "),Ki=r(s_,"A",{href:!0,rel:!0});var Dz=i(Ki);EE=n(Dz,"tf.keras.Model"),Dz.forEach(t),$E=n(s_,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),s_.forEach(t),FE=p(mo),b(Ks.$$.fragment,mo),xE=p(mo),Yt=r(mo,"DIV",{class:!0});var Da=i(Yt);b(Qi.$$.fragment,Da),ME=p(Da),Tn=r(Da,"P",{});var op=i(Tn);zE=n(op,"The "),Fc=r(op,"A",{href:!0});var Sz=i(Fc);qE=n(Sz,"TFElectraForMultipleChoice"),Sz.forEach(t),jE=n(op," forward method, overrides the "),Sh=r(op,"CODE",{});var Wz=i(Sh);CE=n(Wz,"__call__"),Wz.forEach(t),PE=n(op," special method."),op.forEach(t),AE=p(Da),b(Qs.$$.fragment,Da),LE=p(Da),b(Vs.$$.fragment,Da),Da.forEach(t),mo.forEach(t),Rf=p(s),bn=r(s,"H2",{class:!0});var a_=i(bn);Js=r(a_,"A",{id:!0,class:!0,href:!0});var Uz=i(Js);Wh=r(Uz,"SPAN",{});var Bz=i(Wh);b(Vi.$$.fragment,Bz),Bz.forEach(t),Uz.forEach(t),OE=p(a_),Uh=r(a_,"SPAN",{});var Rz=i(Uh);NE=n(Rz,"TFElectraForTokenClassification"),Rz.forEach(t),a_.forEach(t),Hf=p(s),st=r(s,"DIV",{class:!0});var At=i(st);b(Ji.$$.fragment,At),IE=p(At),Bh=r(At,"P",{});var Hz=i(Bh);DE=n(Hz,"Electra model with a token classification head on top."),Hz.forEach(t),SE=p(At),Rh=r(At,"P",{});var Kz=i(Rh);WE=n(Kz,"Both the discriminator and generator may be loaded into this model."),Kz.forEach(t),UE=p(At),Gi=r(At,"P",{});var r_=i(Gi);BE=n(r_,"This model inherits from "),xc=r(r_,"A",{href:!0});var Qz=i(xc);RE=n(Qz,"TFPreTrainedModel"),Qz.forEach(t),HE=n(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),KE=p(At),Xi=r(At,"P",{});var i_=i(Xi);QE=n(i_,"This model is also a "),Yi=r(i_,"A",{href:!0,rel:!0});var Vz=i(Yi);VE=n(Vz,"tf.keras.Model"),Vz.forEach(t),JE=n(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),GE=p(At),b(Gs.$$.fragment,At),XE=p(At),qt=r(At,"DIV",{class:!0});var Io=i(qt);b(Zi.$$.fragment,Io),YE=p(Io),wn=r(Io,"P",{});var np=i(wn);ZE=n(np,"The "),Mc=r(np,"A",{href:!0});var Jz=i(Mc);e1=n(Jz,"TFElectraForTokenClassification"),Jz.forEach(t),t1=n(np," forward method, overrides the "),Hh=r(np,"CODE",{});var Gz=i(Hh);o1=n(Gz,"__call__"),Gz.forEach(t),n1=n(np," special method."),np.forEach(t),s1=p(Io),b(Xs.$$.fragment,Io),a1=p(Io),b(Ys.$$.fragment,Io),r1=p(Io),b(Zs.$$.fragment,Io),Io.forEach(t),At.forEach(t),Kf=p(s),En=r(s,"H2",{class:!0});var l_=i(En);ea=r(l_,"A",{id:!0,class:!0,href:!0});var Xz=i(ea);Kh=r(Xz,"SPAN",{});var Yz=i(Kh);b(el.$$.fragment,Yz),Yz.forEach(t),Xz.forEach(t),i1=p(l_),Qh=r(l_,"SPAN",{});var Zz=i(Qh);l1=n(Zz,"TFElectraForQuestionAnswering"),Zz.forEach(t),l_.forEach(t),Qf=p(s),_t=r(s,"DIV",{class:!0});var uo=i(_t);b(tl.$$.fragment,uo),d1=p(uo),$n=r(uo,"P",{});var sp=i($n);c1=n(sp,`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 `),Vh=r(sp,"CODE",{});var e4=i(Vh);p1=n(e4,"span start logits"),e4.forEach(t),h1=n(sp," and "),Jh=r(sp,"CODE",{});var t4=i(Jh);m1=n(t4,"span end logits"),t4.forEach(t),u1=n(sp,")."),sp.forEach(t),f1=p(uo),ol=r(uo,"P",{});var d_=i(ol);g1=n(d_,"This model inherits from "),zc=r(d_,"A",{href:!0});var o4=i(zc);_1=n(o4,"TFPreTrainedModel"),o4.forEach(t),k1=n(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),v1=p(uo),nl=r(uo,"P",{});var c_=i(nl);y1=n(c_,"This model is also a "),sl=r(c_,"A",{href:!0,rel:!0});var n4=i(sl);T1=n(n4,"tf.keras.Model"),n4.forEach(t),b1=n(c_,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),c_.forEach(t),w1=p(uo),b(ta.$$.fragment,uo),E1=p(uo),jt=r(uo,"DIV",{class:!0});var Do=i(jt);b(al.$$.fragment,Do),$1=p(Do),Fn=r(Do,"P",{});var ap=i(Fn);F1=n(ap,"The "),qc=r(ap,"A",{href:!0});var s4=i(qc);x1=n(s4,"TFElectraForQuestionAnswering"),s4.forEach(t),M1=n(ap," forward method, overrides the "),Gh=r(ap,"CODE",{});var a4=i(Gh);z1=n(a4,"__call__"),a4.forEach(t),q1=n(ap," special method."),ap.forEach(t),j1=p(Do),b(oa.$$.fragment,Do),C1=p(Do),b(na.$$.fragment,Do),P1=p(Do),b(sa.$$.fragment,Do),Do.forEach(t),uo.forEach(t),Vf=p(s),xn=r(s,"H2",{class:!0});var p_=i(xn);aa=r(p_,"A",{id:!0,class:!0,href:!0});var r4=i(aa);Xh=r(r4,"SPAN",{});var i4=i(Xh);b(rl.$$.fragment,i4),i4.forEach(t),r4.forEach(t),A1=p(p_),Yh=r(p_,"SPAN",{});var l4=i(Yh);L1=n(l4,"FlaxElectraModel"),l4.forEach(t),p_.forEach(t),Jf=p(s),at=r(s,"DIV",{class:!0});var Lt=i(at);b(il.$$.fragment,Lt),O1=p(Lt),Zh=r(Lt,"P",{});var d4=i(Zh);N1=n(d4,"The bare Electra Model transformer outputting raw hidden-states without any specific head on top."),d4.forEach(t),I1=p(Lt),ll=r(Lt,"P",{});var h_=i(ll);D1=n(h_,"This model inherits from "),jc=r(h_,"A",{href:!0});var c4=i(jc);S1=n(c4,"FlaxPreTrainedModel"),c4.forEach(t),W1=n(h_,`. 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)`),h_.forEach(t),U1=p(Lt),dl=r(Lt,"P",{});var m_=i(dl);B1=n(m_,`This model is also a Flax Linen
`),cl=r(m_,"A",{href:!0,rel:!0});var p4=i(cl);R1=n(p4,"flax.nn.Module"),p4.forEach(t),H1=n(m_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),m_.forEach(t),K1=p(Lt),em=r(Lt,"P",{});var h4=i(em);Q1=n(h4,"Finally, this model supports inherent JAX features such as:"),h4.forEach(t),V1=p(Lt),fo=r(Lt,"UL",{});var Sa=i(fo);tm=r(Sa,"LI",{});var m4=i(tm);pl=r(m4,"A",{href:!0,rel:!0});var u4=i(pl);J1=n(u4,"Just-In-Time (JIT) compilation"),u4.forEach(t),m4.forEach(t),G1=p(Sa),om=r(Sa,"LI",{});var f4=i(om);hl=r(f4,"A",{href:!0,rel:!0});var g4=i(hl);X1=n(g4,"Automatic Differentiation"),g4.forEach(t),f4.forEach(t),Y1=p(Sa),nm=r(Sa,"LI",{});var _4=i(nm);ml=r(_4,"A",{href:!0,rel:!0});var k4=i(ml);Z1=n(k4,"Vectorization"),k4.forEach(t),_4.forEach(t),e$=p(Sa),sm=r(Sa,"LI",{});var v4=i(sm);ul=r(v4,"A",{href:!0,rel:!0});var y4=i(ul);t$=n(y4,"Parallelization"),y4.forEach(t),v4.forEach(t),Sa.forEach(t),o$=p(Lt),Zt=r(Lt,"DIV",{class:!0});var Wa=i(Zt);b(fl.$$.fragment,Wa),n$=p(Wa),Mn=r(Wa,"P",{});var rp=i(Mn);s$=n(rp,"The "),am=r(rp,"CODE",{});var T4=i(am);a$=n(T4,"FlaxElectraPreTrainedModel"),T4.forEach(t),r$=n(rp," forward method, overrides the "),rm=r(rp,"CODE",{});var b4=i(rm);i$=n(b4,"__call__"),b4.forEach(t),l$=n(rp," special method."),rp.forEach(t),d$=p(Wa),b(ra.$$.fragment,Wa),c$=p(Wa),b(ia.$$.fragment,Wa),Wa.forEach(t),Lt.forEach(t),Gf=p(s),zn=r(s,"H2",{class:!0});var u_=i(zn);la=r(u_,"A",{id:!0,class:!0,href:!0});var w4=i(la);im=r(w4,"SPAN",{});var E4=i(im);b(gl.$$.fragment,E4),E4.forEach(t),w4.forEach(t),p$=p(u_),lm=r(u_,"SPAN",{});var $4=i(lm);h$=n($4,"FlaxElectraForPreTraining"),$4.forEach(t),u_.forEach(t),Xf=p(s),Ze=r(s,"DIV",{class:!0});var vt=i(Ze);b(_l.$$.fragment,vt),m$=p(vt),dm=r(vt,"P",{});var F4=i(dm);u$=n(F4,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),F4.forEach(t),f$=p(vt),cm=r(vt,"P",{});var x4=i(cm);g$=n(x4,"It is recommended to load the discriminator checkpoint into that model."),x4.forEach(t),_$=p(vt),kl=r(vt,"P",{});var f_=i(kl);k$=n(f_,"This model inherits from "),Cc=r(f_,"A",{href:!0});var M4=i(Cc);v$=n(M4,"FlaxPreTrainedModel"),M4.forEach(t),y$=n(f_,`. 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)`),f_.forEach(t),T$=p(vt),vl=r(vt,"P",{});var g_=i(vl);b$=n(g_,`This model is also a Flax Linen
`),yl=r(g_,"A",{href:!0,rel:!0});var z4=i(yl);w$=n(z4,"flax.nn.Module"),z4.forEach(t),E$=n(g_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),g_.forEach(t),$$=p(vt),pm=r(vt,"P",{});var q4=i(pm);F$=n(q4,"Finally, this model supports inherent JAX features such as:"),q4.forEach(t),x$=p(vt),go=r(vt,"UL",{});var Ua=i(go);hm=r(Ua,"LI",{});var j4=i(hm);Tl=r(j4,"A",{href:!0,rel:!0});var C4=i(Tl);M$=n(C4,"Just-In-Time (JIT) compilation"),C4.forEach(t),j4.forEach(t),z$=p(Ua),mm=r(Ua,"LI",{});var P4=i(mm);bl=r(P4,"A",{href:!0,rel:!0});var A4=i(bl);q$=n(A4,"Automatic Differentiation"),A4.forEach(t),P4.forEach(t),j$=p(Ua),um=r(Ua,"LI",{});var L4=i(um);wl=r(L4,"A",{href:!0,rel:!0});var O4=i(wl);C$=n(O4,"Vectorization"),O4.forEach(t),L4.forEach(t),P$=p(Ua),fm=r(Ua,"LI",{});var N4=i(fm);El=r(N4,"A",{href:!0,rel:!0});var I4=i(El);A$=n(I4,"Parallelization"),I4.forEach(t),N4.forEach(t),Ua.forEach(t),L$=p(vt),eo=r(vt,"DIV",{class:!0});var Ba=i(eo);b($l.$$.fragment,Ba),O$=p(Ba),qn=r(Ba,"P",{});var ip=i(qn);N$=n(ip,"The "),gm=r(ip,"CODE",{});var D4=i(gm);I$=n(D4,"FlaxElectraPreTrainedModel"),D4.forEach(t),D$=n(ip," forward method, overrides the "),_m=r(ip,"CODE",{});var S4=i(_m);S$=n(S4,"__call__"),S4.forEach(t),W$=n(ip," special method."),ip.forEach(t),U$=p(Ba),b(da.$$.fragment,Ba),B$=p(Ba),b(ca.$$.fragment,Ba),Ba.forEach(t),vt.forEach(t),Yf=p(s),jn=r(s,"H2",{class:!0});var __=i(jn);pa=r(__,"A",{id:!0,class:!0,href:!0});var W4=i(pa);km=r(W4,"SPAN",{});var U4=i(km);b(Fl.$$.fragment,U4),U4.forEach(t),W4.forEach(t),R$=p(__),vm=r(__,"SPAN",{});var B4=i(vm);H$=n(B4,"FlaxElectraForCausalLM"),B4.forEach(t),__.forEach(t),Zf=p(s),rt=r(s,"DIV",{class:!0});var Ot=i(rt);b(xl.$$.fragment,Ot),K$=p(Ot),ym=r(Ot,"P",{});var R4=i(ym);Q$=n(R4,`Electra Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),R4.forEach(t),V$=p(Ot),Ml=r(Ot,"P",{});var k_=i(Ml);J$=n(k_,"This model inherits from "),Pc=r(k_,"A",{href:!0});var H4=i(Pc);G$=n(H4,"FlaxPreTrainedModel"),H4.forEach(t),X$=n(k_,`. 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)`),k_.forEach(t),Y$=p(Ot),zl=r(Ot,"P",{});var v_=i(zl);Z$=n(v_,`This model is also a Flax Linen
`),ql=r(v_,"A",{href:!0,rel:!0});var K4=i(ql);e2=n(K4,"flax.nn.Module"),K4.forEach(t),t2=n(v_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),v_.forEach(t),o2=p(Ot),Tm=r(Ot,"P",{});var Q4=i(Tm);n2=n(Q4,"Finally, this model supports inherent JAX features such as:"),Q4.forEach(t),s2=p(Ot),_o=r(Ot,"UL",{});var Ra=i(_o);bm=r(Ra,"LI",{});var V4=i(bm);jl=r(V4,"A",{href:!0,rel:!0});var J4=i(jl);a2=n(J4,"Just-In-Time (JIT) compilation"),J4.forEach(t),V4.forEach(t),r2=p(Ra),wm=r(Ra,"LI",{});var G4=i(wm);Cl=r(G4,"A",{href:!0,rel:!0});var X4=i(Cl);i2=n(X4,"Automatic Differentiation"),X4.forEach(t),G4.forEach(t),l2=p(Ra),Em=r(Ra,"LI",{});var Y4=i(Em);Pl=r(Y4,"A",{href:!0,rel:!0});var Z4=i(Pl);d2=n(Z4,"Vectorization"),Z4.forEach(t),Y4.forEach(t),c2=p(Ra),$m=r(Ra,"LI",{});var eq=i($m);Al=r(eq,"A",{href:!0,rel:!0});var tq=i(Al);p2=n(tq,"Parallelization"),tq.forEach(t),eq.forEach(t),Ra.forEach(t),h2=p(Ot),to=r(Ot,"DIV",{class:!0});var Ha=i(to);b(Ll.$$.fragment,Ha),m2=p(Ha),Cn=r(Ha,"P",{});var lp=i(Cn);u2=n(lp,"The "),Fm=r(lp,"CODE",{});var oq=i(Fm);f2=n(oq,"FlaxElectraPreTrainedModel"),oq.forEach(t),g2=n(lp," forward method, overrides the "),xm=r(lp,"CODE",{});var nq=i(xm);_2=n(nq,"__call__"),nq.forEach(t),k2=n(lp," special method."),lp.forEach(t),v2=p(Ha),b(ha.$$.fragment,Ha),y2=p(Ha),b(ma.$$.fragment,Ha),Ha.forEach(t),Ot.forEach(t),eg=p(s),Pn=r(s,"H2",{class:!0});var y_=i(Pn);ua=r(y_,"A",{id:!0,class:!0,href:!0});var sq=i(ua);Mm=r(sq,"SPAN",{});var aq=i(Mm);b(Ol.$$.fragment,aq),aq.forEach(t),sq.forEach(t),T2=p(y_),zm=r(y_,"SPAN",{});var rq=i(zm);b2=n(rq,"FlaxElectraForMaskedLM"),rq.forEach(t),y_.forEach(t),tg=p(s),it=r(s,"DIV",{class:!0});var Nt=i(it);b(Nl.$$.fragment,Nt),w2=p(Nt),Il=r(Nt,"P",{});var T_=i(Il);E2=n(T_,"Electra Model with a "),qm=r(T_,"CODE",{});var iq=i(qm);$2=n(iq,"language modeling"),iq.forEach(t),F2=n(T_," head on top."),T_.forEach(t),x2=p(Nt),Dl=r(Nt,"P",{});var b_=i(Dl);M2=n(b_,"This model inherits from "),Ac=r(b_,"A",{href:!0});var lq=i(Ac);z2=n(lq,"FlaxPreTrainedModel"),lq.forEach(t),q2=n(b_,`. 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)`),b_.forEach(t),j2=p(Nt),Sl=r(Nt,"P",{});var w_=i(Sl);C2=n(w_,`This model is also a Flax Linen
`),Wl=r(w_,"A",{href:!0,rel:!0});var dq=i(Wl);P2=n(dq,"flax.nn.Module"),dq.forEach(t),A2=n(w_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),w_.forEach(t),L2=p(Nt),jm=r(Nt,"P",{});var cq=i(jm);O2=n(cq,"Finally, this model supports inherent JAX features such as:"),cq.forEach(t),N2=p(Nt),ko=r(Nt,"UL",{});var Ka=i(ko);Cm=r(Ka,"LI",{});var pq=i(Cm);Ul=r(pq,"A",{href:!0,rel:!0});var hq=i(Ul);I2=n(hq,"Just-In-Time (JIT) compilation"),hq.forEach(t),pq.forEach(t),D2=p(Ka),Pm=r(Ka,"LI",{});var mq=i(Pm);Bl=r(mq,"A",{href:!0,rel:!0});var uq=i(Bl);S2=n(uq,"Automatic Differentiation"),uq.forEach(t),mq.forEach(t),W2=p(Ka),Am=r(Ka,"LI",{});var fq=i(Am);Rl=r(fq,"A",{href:!0,rel:!0});var gq=i(Rl);U2=n(gq,"Vectorization"),gq.forEach(t),fq.forEach(t),B2=p(Ka),Lm=r(Ka,"LI",{});var _q=i(Lm);Hl=r(_q,"A",{href:!0,rel:!0});var kq=i(Hl);R2=n(kq,"Parallelization"),kq.forEach(t),_q.forEach(t),Ka.forEach(t),H2=p(Nt),oo=r(Nt,"DIV",{class:!0});var Qa=i(oo);b(Kl.$$.fragment,Qa),K2=p(Qa),An=r(Qa,"P",{});var dp=i(An);Q2=n(dp,"The "),Om=r(dp,"CODE",{});var vq=i(Om);V2=n(vq,"FlaxElectraPreTrainedModel"),vq.forEach(t),J2=n(dp," forward method, overrides the "),Nm=r(dp,"CODE",{});var yq=i(Nm);G2=n(yq,"__call__"),yq.forEach(t),X2=n(dp," special method."),dp.forEach(t),Y2=p(Qa),b(fa.$$.fragment,Qa),Z2=p(Qa),b(ga.$$.fragment,Qa),Qa.forEach(t),Nt.forEach(t),og=p(s),Ln=r(s,"H2",{class:!0});var E_=i(Ln);_a=r(E_,"A",{id:!0,class:!0,href:!0});var Tq=i(_a);Im=r(Tq,"SPAN",{});var bq=i(Im);b(Ql.$$.fragment,bq),bq.forEach(t),Tq.forEach(t),eF=p(E_),Dm=r(E_,"SPAN",{});var wq=i(Dm);tF=n(wq,"FlaxElectraForSequenceClassification"),wq.forEach(t),E_.forEach(t),ng=p(s),lt=r(s,"DIV",{class:!0});var It=i(lt);b(Vl.$$.fragment,It),oF=p(It),Sm=r(It,"P",{});var Eq=i(Sm);nF=n(Eq,`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.`),Eq.forEach(t),sF=p(It),Jl=r(It,"P",{});var $_=i(Jl);aF=n($_,"This model inherits from "),Lc=r($_,"A",{href:!0});var $q=i(Lc);rF=n($q,"FlaxPreTrainedModel"),$q.forEach(t),iF=n($_,`. 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)`),$_.forEach(t),lF=p(It),Gl=r(It,"P",{});var F_=i(Gl);dF=n(F_,`This model is also a Flax Linen
`),Xl=r(F_,"A",{href:!0,rel:!0});var Fq=i(Xl);cF=n(Fq,"flax.nn.Module"),Fq.forEach(t),pF=n(F_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),F_.forEach(t),hF=p(It),Wm=r(It,"P",{});var xq=i(Wm);mF=n(xq,"Finally, this model supports inherent JAX features such as:"),xq.forEach(t),uF=p(It),vo=r(It,"UL",{});var Va=i(vo);Um=r(Va,"LI",{});var Mq=i(Um);Yl=r(Mq,"A",{href:!0,rel:!0});var zq=i(Yl);fF=n(zq,"Just-In-Time (JIT) compilation"),zq.forEach(t),Mq.forEach(t),gF=p(Va),Bm=r(Va,"LI",{});var qq=i(Bm);Zl=r(qq,"A",{href:!0,rel:!0});var jq=i(Zl);_F=n(jq,"Automatic Differentiation"),jq.forEach(t),qq.forEach(t),kF=p(Va),Rm=r(Va,"LI",{});var Cq=i(Rm);ed=r(Cq,"A",{href:!0,rel:!0});var Pq=i(ed);vF=n(Pq,"Vectorization"),Pq.forEach(t),Cq.forEach(t),yF=p(Va),Hm=r(Va,"LI",{});var Aq=i(Hm);td=r(Aq,"A",{href:!0,rel:!0});var Lq=i(td);TF=n(Lq,"Parallelization"),Lq.forEach(t),Aq.forEach(t),Va.forEach(t),bF=p(It),no=r(It,"DIV",{class:!0});var Ja=i(no);b(od.$$.fragment,Ja),wF=p(Ja),On=r(Ja,"P",{});var cp=i(On);EF=n(cp,"The "),Km=r(cp,"CODE",{});var Oq=i(Km);$F=n(Oq,"FlaxElectraPreTrainedModel"),Oq.forEach(t),FF=n(cp," forward method, overrides the "),Qm=r(cp,"CODE",{});var Nq=i(Qm);xF=n(Nq,"__call__"),Nq.forEach(t),MF=n(cp," special method."),cp.forEach(t),zF=p(Ja),b(ka.$$.fragment,Ja),qF=p(Ja),b(va.$$.fragment,Ja),Ja.forEach(t),It.forEach(t),sg=p(s),Nn=r(s,"H2",{class:!0});var x_=i(Nn);ya=r(x_,"A",{id:!0,class:!0,href:!0});var Iq=i(ya);Vm=r(Iq,"SPAN",{});var Dq=i(Vm);b(nd.$$.fragment,Dq),Dq.forEach(t),Iq.forEach(t),jF=p(x_),Jm=r(x_,"SPAN",{});var Sq=i(Jm);CF=n(Sq,"FlaxElectraForMultipleChoice"),Sq.forEach(t),x_.forEach(t),ag=p(s),dt=r(s,"DIV",{class:!0});var Dt=i(dt);b(sd.$$.fragment,Dt),PF=p(Dt),Gm=r(Dt,"P",{});var Wq=i(Gm);AF=n(Wq,`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.`),Wq.forEach(t),LF=p(Dt),ad=r(Dt,"P",{});var M_=i(ad);OF=n(M_,"This model inherits from "),Oc=r(M_,"A",{href:!0});var Uq=i(Oc);NF=n(Uq,"FlaxPreTrainedModel"),Uq.forEach(t),IF=n(M_,`. 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)`),M_.forEach(t),DF=p(Dt),rd=r(Dt,"P",{});var z_=i(rd);SF=n(z_,`This model is also a Flax Linen
`),id=r(z_,"A",{href:!0,rel:!0});var Bq=i(id);WF=n(Bq,"flax.nn.Module"),Bq.forEach(t),UF=n(z_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),z_.forEach(t),BF=p(Dt),Xm=r(Dt,"P",{});var Rq=i(Xm);RF=n(Rq,"Finally, this model supports inherent JAX features such as:"),Rq.forEach(t),HF=p(Dt),yo=r(Dt,"UL",{});var Ga=i(yo);Ym=r(Ga,"LI",{});var Hq=i(Ym);ld=r(Hq,"A",{href:!0,rel:!0});var Kq=i(ld);KF=n(Kq,"Just-In-Time (JIT) compilation"),Kq.forEach(t),Hq.forEach(t),QF=p(Ga),Zm=r(Ga,"LI",{});var Qq=i(Zm);dd=r(Qq,"A",{href:!0,rel:!0});var Vq=i(dd);VF=n(Vq,"Automatic Differentiation"),Vq.forEach(t),Qq.forEach(t),JF=p(Ga),eu=r(Ga,"LI",{});var Jq=i(eu);cd=r(Jq,"A",{href:!0,rel:!0});var Gq=i(cd);GF=n(Gq,"Vectorization"),Gq.forEach(t),Jq.forEach(t),XF=p(Ga),tu=r(Ga,"LI",{});var Xq=i(tu);pd=r(Xq,"A",{href:!0,rel:!0});var Yq=i(pd);YF=n(Yq,"Parallelization"),Yq.forEach(t),Xq.forEach(t),Ga.forEach(t),ZF=p(Dt),so=r(Dt,"DIV",{class:!0});var Xa=i(so);b(hd.$$.fragment,Xa),e0=p(Xa),In=r(Xa,"P",{});var pp=i(In);t0=n(pp,"The "),ou=r(pp,"CODE",{});var Zq=i(ou);o0=n(Zq,"FlaxElectraPreTrainedModel"),Zq.forEach(t),n0=n(pp," forward method, overrides the "),nu=r(pp,"CODE",{});var ej=i(nu);s0=n(ej,"__call__"),ej.forEach(t),a0=n(pp," special method."),pp.forEach(t),r0=p(Xa),b(Ta.$$.fragment,Xa),i0=p(Xa),b(ba.$$.fragment,Xa),Xa.forEach(t),Dt.forEach(t),rg=p(s),Dn=r(s,"H2",{class:!0});var q_=i(Dn);wa=r(q_,"A",{id:!0,class:!0,href:!0});var tj=i(wa);su=r(tj,"SPAN",{});var oj=i(su);b(md.$$.fragment,oj),oj.forEach(t),tj.forEach(t),l0=p(q_),au=r(q_,"SPAN",{});var nj=i(au);d0=n(nj,"FlaxElectraForTokenClassification"),nj.forEach(t),q_.forEach(t),ig=p(s),et=r(s,"DIV",{class:!0});var yt=i(et);b(ud.$$.fragment,yt),c0=p(yt),ru=r(yt,"P",{});var sj=i(ru);p0=n(sj,"Electra model with a token classification head on top."),sj.forEach(t),h0=p(yt),iu=r(yt,"P",{});var aj=i(iu);m0=n(aj,"Both the discriminator and generator may be loaded into this model."),aj.forEach(t),u0=p(yt),fd=r(yt,"P",{});var j_=i(fd);f0=n(j_,"This model inherits from "),Nc=r(j_,"A",{href:!0});var rj=i(Nc);g0=n(rj,"FlaxPreTrainedModel"),rj.forEach(t),_0=n(j_,`. 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)`),j_.forEach(t),k0=p(yt),gd=r(yt,"P",{});var C_=i(gd);v0=n(C_,`This model is also a Flax Linen
`),_d=r(C_,"A",{href:!0,rel:!0});var ij=i(_d);y0=n(ij,"flax.nn.Module"),ij.forEach(t),T0=n(C_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),C_.forEach(t),b0=p(yt),lu=r(yt,"P",{});var lj=i(lu);w0=n(lj,"Finally, this model supports inherent JAX features such as:"),lj.forEach(t),E0=p(yt),To=r(yt,"UL",{});var Ya=i(To);du=r(Ya,"LI",{});var dj=i(du);kd=r(dj,"A",{href:!0,rel:!0});var cj=i(kd);$0=n(cj,"Just-In-Time (JIT) compilation"),cj.forEach(t),dj.forEach(t),F0=p(Ya),cu=r(Ya,"LI",{});var pj=i(cu);vd=r(pj,"A",{href:!0,rel:!0});var hj=i(vd);x0=n(hj,"Automatic Differentiation"),hj.forEach(t),pj.forEach(t),M0=p(Ya),pu=r(Ya,"LI",{});var mj=i(pu);yd=r(mj,"A",{href:!0,rel:!0});var uj=i(yd);z0=n(uj,"Vectorization"),uj.forEach(t),mj.forEach(t),q0=p(Ya),hu=r(Ya,"LI",{});var fj=i(hu);Td=r(fj,"A",{href:!0,rel:!0});var gj=i(Td);j0=n(gj,"Parallelization"),gj.forEach(t),fj.forEach(t),Ya.forEach(t),C0=p(yt),ao=r(yt,"DIV",{class:!0});var Za=i(ao);b(bd.$$.fragment,Za),P0=p(Za),Sn=r(Za,"P",{});var hp=i(Sn);A0=n(hp,"The "),mu=r(hp,"CODE",{});var _j=i(mu);L0=n(_j,"FlaxElectraPreTrainedModel"),_j.forEach(t),O0=n(hp," forward method, overrides the "),uu=r(hp,"CODE",{});var kj=i(uu);N0=n(kj,"__call__"),kj.forEach(t),I0=n(hp," special method."),hp.forEach(t),D0=p(Za),b(Ea.$$.fragment,Za),S0=p(Za),b($a.$$.fragment,Za),Za.forEach(t),yt.forEach(t),lg=p(s),Wn=r(s,"H2",{class:!0});var P_=i(Wn);Fa=r(P_,"A",{id:!0,class:!0,href:!0});var vj=i(Fa);fu=r(vj,"SPAN",{});var yj=i(fu);b(wd.$$.fragment,yj),yj.forEach(t),vj.forEach(t),W0=p(P_),gu=r(P_,"SPAN",{});var Tj=i(gu);U0=n(Tj,"FlaxElectraForQuestionAnswering"),Tj.forEach(t),P_.forEach(t),dg=p(s),ct=r(s,"DIV",{class:!0});var St=i(ct);b(Ed.$$.fragment,St),B0=p(St),Un=r(St,"P",{});var mp=i(Un);R0=n(mp,`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 `),_u=r(mp,"CODE",{});var bj=i(_u);H0=n(bj,"span start logits"),bj.forEach(t),K0=n(mp," and "),ku=r(mp,"CODE",{});var wj=i(ku);Q0=n(wj,"span end logits"),wj.forEach(t),V0=n(mp,")."),mp.forEach(t),J0=p(St),$d=r(St,"P",{});var A_=i($d);G0=n(A_,"This model inherits from "),Ic=r(A_,"A",{href:!0});var Ej=i(Ic);X0=n(Ej,"FlaxPreTrainedModel"),Ej.forEach(t),Y0=n(A_,`. 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_.forEach(t),Z0=p(St),Fd=r(St,"P",{});var L_=i(Fd);ex=n(L_,`This model is also a Flax Linen
`),xd=r(L_,"A",{href:!0,rel:!0});var $j=i(xd);tx=n($j,"flax.nn.Module"),$j.forEach(t),ox=n(L_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),L_.forEach(t),nx=p(St),vu=r(St,"P",{});var Fj=i(vu);sx=n(Fj,"Finally, this model supports inherent JAX features such as:"),Fj.forEach(t),ax=p(St),bo=r(St,"UL",{});var er=i(bo);yu=r(er,"LI",{});var xj=i(yu);Md=r(xj,"A",{href:!0,rel:!0});var Mj=i(Md);rx=n(Mj,"Just-In-Time (JIT) compilation"),Mj.forEach(t),xj.forEach(t),ix=p(er),Tu=r(er,"LI",{});var zj=i(Tu);zd=r(zj,"A",{href:!0,rel:!0});var qj=i(zd);lx=n(qj,"Automatic Differentiation"),qj.forEach(t),zj.forEach(t),dx=p(er),bu=r(er,"LI",{});var jj=i(bu);qd=r(jj,"A",{href:!0,rel:!0});var Cj=i(qd);cx=n(Cj,"Vectorization"),Cj.forEach(t),jj.forEach(t),px=p(er),wu=r(er,"LI",{});var Pj=i(wu);jd=r(Pj,"A",{href:!0,rel:!0});var Aj=i(jd);hx=n(Aj,"Parallelization"),Aj.forEach(t),Pj.forEach(t),er.forEach(t),mx=p(St),ro=r(St,"DIV",{class:!0});var tr=i(ro);b(Cd.$$.fragment,tr),ux=p(tr),Bn=r(tr,"P",{});var up=i(Bn);fx=n(up,"The "),Eu=r(up,"CODE",{});var Lj=i(Eu);gx=n(Lj,"FlaxElectraPreTrainedModel"),Lj.forEach(t),_x=n(up," forward method, overrides the "),$u=r(up,"CODE",{});var Oj=i($u);kx=n(Oj,"__call__"),Oj.forEach(t),vx=n(up," special method."),up.forEach(t),yx=p(tr),b(xa.$$.fragment,tr),Tx=p(tr),b(Ma.$$.fragment,tr),tr.forEach(t),St.forEach(t),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(GC)),u(f,"id","electra"),u(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(f,"href","#electra"),u(m,"class","relative group"),u(ae,"id","overview"),u(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ae,"href","#overview"),u(W,"class","relative group"),u(re,"href","https://openreview.net/pdf?id=r1xMH1BtvB"),u(re,"rel","nofollow"),u(P,"href","https://github.com/google-research/electra"),u(P,"rel","nofollow"),u(ie,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForMaskedLM"),u(le,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForPreTraining"),u(Z,"href","https://huggingface.co/lysandre"),u(Z,"rel","nofollow"),u(O,"href","https://github.com/google-research/electra"),u(O,"rel","nofollow"),u(De,"id","transformers.ElectraConfig"),u(De,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(De,"href","#transformers.ElectraConfig"),u(q,"class","relative group"),u(Re,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraModel"),u(He,"href","/docs/transformers/main/en/model_doc/electra#transformers.TFElectraModel"),u(Be,"href","https://huggingface.co/google/electra-small-discriminator"),u(Be,"rel","nofollow"),u(Hd,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),u(Kd,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),u(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Jn,"id","transformers.ElectraTokenizer"),u(Jn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Jn,"href","#transformers.ElectraTokenizer"),u(Wo,"class","relative group"),u(Qd,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),u(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Gn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Zn,"id","transformers.ElectraTokenizerFast"),u(Zn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Zn,"href","#transformers.ElectraTokenizerFast"),u(Bo,"class","relative group"),u(Gd,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),u(Mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ts,"id","transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"),u(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"),u(ts,"href","#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"),u(Ho,"class","relative group"),u(Zd,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForPreTraining"),u(Ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ec,"href","/docs/transformers/main/en/model_doc/electra#transformers.TFElectraForPreTraining"),u(Qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(os,"id","transformers.ElectraModel"),u(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"),u(os,"href","#transformers.ElectraModel"),u(Vo,"class","relative group"),u(tc,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),u(xr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(xr,"rel","nofollow"),u(oc,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraModel"),u(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(as,"id","transformers.ElectraForPreTraining"),u(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"),u(as,"href","#transformers.ElectraForPreTraining"),u(Go,"class","relative group"),u(nc,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),u(Pr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Pr,"rel","nofollow"),u(sc,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForPreTraining"),u(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ls,"id","transformers.ElectraForCausalLM"),u(ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ls,"href","#transformers.ElectraForCausalLM"),u(Yo,"class","relative group"),u(ac,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),u(Sr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Sr,"rel","nofollow"),u(rc,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForCausalLM"),u(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ps,"id","transformers.ElectraForMaskedLM"),u(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"),u(ps,"href","#transformers.ElectraForMaskedLM"),u(en,"class","relative group"),u(ic,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),u(Kr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Kr,"rel","nofollow"),u(lc,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForMaskedLM"),u(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(us,"id","transformers.ElectraForSequenceClassification"),u(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"),u(us,"href","#transformers.ElectraForSequenceClassification"),u(on,"class","relative group"),u(dc,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),u(Yr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Yr,"rel","nofollow"),u(cc,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForSequenceClassification"),u(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ks,"id","transformers.ElectraForMultipleChoice"),u(ks,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ks,"href","#transformers.ElectraForMultipleChoice"),u(sn,"class","relative group"),u(pc,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),u(si,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(si,"rel","nofollow"),u(hc,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForMultipleChoice"),u(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ts,"id","transformers.ElectraForTokenClassification"),u(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"),u(Ts,"href","#transformers.ElectraForTokenClassification"),u(rn,"class","relative group"),u(mc,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),u(ci,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(ci,"rel","nofollow"),u(uc,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForTokenClassification"),u(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Es,"id","transformers.ElectraForQuestionAnswering"),u(Es,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Es,"href","#transformers.ElectraForQuestionAnswering"),u(dn,"class","relative group"),u(fc,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),u(gi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(gi,"rel","nofollow"),u(gc,"href","/docs/transformers/main/en/model_doc/electra#transformers.ElectraForQuestionAnswering"),u(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(xs,"id","transformers.TFElectraModel"),u(xs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(xs,"href","#transformers.TFElectraModel"),u(hn,"class","relative group"),u(_c,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),u(bi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(bi,"rel","nofollow"),u(kc,"href","/docs/transformers/main/en/model_doc/electra#transformers.TFElectraModel"),u(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(js,"id","transformers.TFElectraForPreTraining"),u(js,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(js,"href","#transformers.TFElectraForPreTraining"),u(un,"class","relative group"),u(vc,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),u(Mi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Mi,"rel","nofollow"),u(yc,"href","/docs/transformers/main/en/model_doc/electra#transformers.TFElectraForPreTraining"),u(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ls,"id","transformers.TFElectraForMaskedLM"),u(Ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Ls,"href","#transformers.TFElectraForMaskedLM"),u(gn,"class","relative group"),u(Tc,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),u(Ai,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Ai,"rel","nofollow"),u(bc,"href","/docs/transformers/main/en/model_doc/electra#transformers.TFElectraForMaskedLM"),u(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ss,"id","transformers.TFElectraForSequenceClassification"),u(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"),u(Ss,"href","#transformers.TFElectraForSequenceClassification"),u(kn,"class","relative group"),u(wc,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),u(Si,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Si,"rel","nofollow"),u(Ec,"href","/docs/transformers/main/en/model_doc/electra#transformers.TFElectraForSequenceClassification"),u(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Hs,"id","transformers.TFElectraForMultipleChoice"),u(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"),u(Hs,"href","#transformers.TFElectraForMultipleChoice"),u(yn,"class","relative group"),u($c,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),u(Ki,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Ki,"rel","nofollow"),u(Fc,"href","/docs/transformers/main/en/model_doc/electra#transformers.TFElectraForMultipleChoice"),u(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Js,"id","transformers.TFElectraForTokenClassification"),u(Js,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Js,"href","#transformers.TFElectraForTokenClassification"),u(bn,"class","relative group"),u(xc,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),u(Yi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Yi,"rel","nofollow"),u(Mc,"href","/docs/transformers/main/en/model_doc/electra#transformers.TFElectraForTokenClassification"),u(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ea,"id","transformers.TFElectraForQuestionAnswering"),u(ea,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ea,"href","#transformers.TFElectraForQuestionAnswering"),u(En,"class","relative group"),u(zc,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),u(sl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(sl,"rel","nofollow"),u(qc,"href","/docs/transformers/main/en/model_doc/electra#transformers.TFElectraForQuestionAnswering"),u(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(aa,"id","transformers.FlaxElectraModel"),u(aa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(aa,"href","#transformers.FlaxElectraModel"),u(xn,"class","relative group"),u(jc,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(cl,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),u(cl,"rel","nofollow"),u(pl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(pl,"rel","nofollow"),u(hl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(hl,"rel","nofollow"),u(ml,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(ml,"rel","nofollow"),u(ul,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(ul,"rel","nofollow"),u(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(la,"id","transformers.FlaxElectraForPreTraining"),u(la,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(la,"href","#transformers.FlaxElectraForPreTraining"),u(zn,"class","relative group"),u(Cc,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(yl,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),u(yl,"rel","nofollow"),u(Tl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(Tl,"rel","nofollow"),u(bl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(bl,"rel","nofollow"),u(wl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(wl,"rel","nofollow"),u(El,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(El,"rel","nofollow"),u(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(pa,"id","transformers.FlaxElectraForCausalLM"),u(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"),u(pa,"href","#transformers.FlaxElectraForCausalLM"),u(jn,"class","relative group"),u(Pc,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(ql,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),u(ql,"rel","nofollow"),u(jl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(jl,"rel","nofollow"),u(Cl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Cl,"rel","nofollow"),u(Pl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(Pl,"rel","nofollow"),u(Al,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(Al,"rel","nofollow"),u(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ua,"id","transformers.FlaxElectraForMaskedLM"),u(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"),u(ua,"href","#transformers.FlaxElectraForMaskedLM"),u(Pn,"class","relative group"),u(Ac,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(Wl,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),u(Wl,"rel","nofollow"),u(Ul,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(Ul,"rel","nofollow"),u(Bl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Bl,"rel","nofollow"),u(Rl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(Rl,"rel","nofollow"),u(Hl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(Hl,"rel","nofollow"),u(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(_a,"id","transformers.FlaxElectraForSequenceClassification"),u(_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"),u(_a,"href","#transformers.FlaxElectraForSequenceClassification"),u(Ln,"class","relative group"),u(Lc,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(Xl,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),u(Xl,"rel","nofollow"),u(Yl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(Yl,"rel","nofollow"),u(Zl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Zl,"rel","nofollow"),u(ed,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(ed,"rel","nofollow"),u(td,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(td,"rel","nofollow"),u(no,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ya,"id","transformers.FlaxElectraForMultipleChoice"),u(ya,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ya,"href","#transformers.FlaxElectraForMultipleChoice"),u(Nn,"class","relative group"),u(Oc,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(id,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),u(id,"rel","nofollow"),u(ld,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(ld,"rel","nofollow"),u(dd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(dd,"rel","nofollow"),u(cd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(cd,"rel","nofollow"),u(pd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(pd,"rel","nofollow"),u(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(wa,"id","transformers.FlaxElectraForTokenClassification"),u(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"),u(wa,"href","#transformers.FlaxElectraForTokenClassification"),u(Dn,"class","relative group"),u(Nc,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(_d,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),u(_d,"rel","nofollow"),u(kd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(kd,"rel","nofollow"),u(vd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(vd,"rel","nofollow"),u(yd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(yd,"rel","nofollow"),u(Td,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(Td,"rel","nofollow"),u(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Fa,"id","transformers.FlaxElectraForQuestionAnswering"),u(Fa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Fa,"href","#transformers.FlaxElectraForQuestionAnswering"),u(Wn,"class","relative group"),u(Ic,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(xd,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),u(xd,"rel","nofollow"),u(Md,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(Md,"rel","nofollow"),u(zd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(zd,"rel","nofollow"),u(qd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(qd,"rel","nofollow"),u(jd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(jd,"rel","nofollow"),u(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(s,v){e(document.head,d),g(s,k,v),g(s,m,v),e(m,f),e(f,_),w(l,_,null),e(m,h),e(m,z),e(z,ke),g(s,he,v),g(s,W,v),e(W,ae),e(ae,ee),w(x,ee,null),e(W,ve),e(W,K),e(K,ye),g(s,me,v),g(s,U,v),e(U,Te),e(U,re),e(re,Q),e(U,be),g(s,ue,v),g(s,R,v),e(R,we),g(s,fe,v),g(s,H,v),e(H,ce),e(ce,Ee),g(s,oe,v),g(s,C,v),e(C,A),g(s,ge,v),g(s,B,v),e(B,pe),e(pe,$e),e(B,V),e(B,ne),e(ne,Fe),e(ne,P),e(P,xe),e(ne,J),e(ne,ie),e(ie,Me),e(ne,G),e(ne,le),e(le,ze),e(ne,D),g(s,_e,v),g(s,S,v),e(S,qe),e(S,Z),e(Z,L),e(S,je),e(S,O),e(O,Ce),e(S,Pe),g(s,y,v),g(s,q,v),e(q,De),e(De,te),w(We,te,null),e(q,Qe),e(q,j),e(j,Ve),g(s,Ke,v),g(s,de,v),w(Ue,de,null),e(de,Je),e(de,N),e(N,X),e(N,Re),e(Re,Ge),e(N,Y),e(N,He),e(He,Xe),e(N,Ae),e(N,Be),e(Be,se),e(N,Ye),e(de,O_),e(de,So),e(So,N_),e(So,Hd),e(Hd,I_),e(So,D_),e(So,Kd),e(Kd,S_),e(So,W_),e(de,U_),w(Vn,de,null),g(s,pf,v),g(s,Wo,v),e(Wo,Jn),e(Jn,fp),w(or,fp,null),e(Wo,B_),e(Wo,gp),e(gp,R_),g(s,hf,v),g(s,tt,v),w(nr,tt,null),e(tt,H_),e(tt,_p),e(_p,K_),e(tt,Q_),e(tt,sr),e(sr,V_),e(sr,Qd),e(Qd,J_),e(sr,G_),e(tt,X_),e(tt,xo),w(ar,xo,null),e(xo,Y_),e(xo,kp),e(kp,Z_),e(xo,ek),e(xo,rr),e(rr,Vd),e(Vd,tk),e(Vd,vp),e(vp,ok),e(rr,nk),e(rr,Jd),e(Jd,sk),e(Jd,yp),e(yp,ak),e(tt,rk),e(tt,Gn),w(ir,Gn,null),e(Gn,ik),e(Gn,Tp),e(Tp,lk),e(tt,dk),e(tt,Wt),w(lr,Wt,null),e(Wt,ck),e(Wt,bp),e(bp,pk),e(Wt,hk),w(Xn,Wt,null),e(Wt,mk),e(Wt,Uo),e(Uo,uk),e(Uo,wp),e(wp,fk),e(Uo,gk),e(Uo,Ep),e(Ep,_k),e(Uo,kk),e(tt,vk),e(tt,Yn),w(dr,Yn,null),e(Yn,yk),e(Yn,cr),e(cr,Tk),e(cr,$p),e($p,bk),e(cr,wk),g(s,mf,v),g(s,Bo,v),e(Bo,Zn),e(Zn,Fp),w(pr,Fp,null),e(Bo,Ek),e(Bo,xp),e(xp,$k),g(s,uf,v),g(s,Tt,v),w(hr,Tt,null),e(Tt,Fk),e(Tt,mr),e(mr,xk),e(mr,Mp),e(Mp,Mk),e(mr,zk),e(Tt,qk),e(Tt,ur),e(ur,jk),e(ur,Gd),e(Gd,Ck),e(ur,Pk),e(Tt,Ak),e(Tt,Mo),w(fr,Mo,null),e(Mo,Lk),e(Mo,zp),e(zp,Ok),e(Mo,Nk),e(Mo,gr),e(gr,Xd),e(Xd,Ik),e(Xd,qp),e(qp,Dk),e(gr,Sk),e(gr,Yd),e(Yd,Wk),e(Yd,jp),e(jp,Uk),e(Tt,Bk),e(Tt,Ut),w(_r,Ut,null),e(Ut,Rk),e(Ut,Cp),e(Cp,Hk),e(Ut,Kk),w(es,Ut,null),e(Ut,Qk),e(Ut,Ro),e(Ro,Vk),e(Ro,Pp),e(Pp,Jk),e(Ro,Gk),e(Ro,Ap),e(Ap,Xk),e(Ro,Yk),g(s,ff,v),g(s,Ho,v),e(Ho,ts),e(ts,Lp),w(kr,Lp,null),e(Ho,Zk),e(Ho,Op),e(Op,ev),g(s,gf,v),g(s,Ko,v),w(vr,Ko,null),e(Ko,tv),e(Ko,yr),e(yr,ov),e(yr,Zd),e(Zd,nv),e(yr,sv),g(s,_f,v),g(s,Qo,v),w(Tr,Qo,null),e(Qo,av),e(Qo,br),e(br,rv),e(br,ec),e(ec,iv),e(br,lv),g(s,kf,v),g(s,Vo,v),e(Vo,os),e(os,Np),w(wr,Np,null),e(Vo,dv),e(Vo,Ip),e(Ip,cv),g(s,vf,v),g(s,bt,v),w(Er,bt,null),e(bt,pv),e(bt,Dp),e(Dp,hv),e(bt,mv),e(bt,$r),e($r,uv),e($r,tc),e(tc,fv),e($r,gv),e(bt,_v),e(bt,Fr),e(Fr,kv),e(Fr,xr),e(xr,vv),e(Fr,yv),e(bt,Tv),e(bt,Bt),w(Mr,Bt,null),e(Bt,bv),e(Bt,Jo),e(Jo,wv),e(Jo,oc),e(oc,Ev),e(Jo,$v),e(Jo,Sp),e(Sp,Fv),e(Jo,xv),e(Bt,Mv),w(ns,Bt,null),e(Bt,zv),w(ss,Bt,null),g(s,yf,v),g(s,Go,v),e(Go,as),e(as,Wp),w(zr,Wp,null),e(Go,qv),e(Go,Up),e(Up,jv),g(s,Tf,v),g(s,pt,v),w(qr,pt,null),e(pt,Cv),e(pt,Bp),e(Bp,Pv),e(pt,Av),e(pt,Rp),e(Rp,Lv),e(pt,Ov),e(pt,jr),e(jr,Nv),e(jr,nc),e(nc,Iv),e(jr,Dv),e(pt,Sv),e(pt,Cr),e(Cr,Wv),e(Cr,Pr),e(Pr,Uv),e(Cr,Bv),e(pt,Rv),e(pt,Rt),w(Ar,Rt,null),e(Rt,Hv),e(Rt,Xo),e(Xo,Kv),e(Xo,sc),e(sc,Qv),e(Xo,Vv),e(Xo,Hp),e(Hp,Jv),e(Xo,Gv),e(Rt,Xv),w(rs,Rt,null),e(Rt,Yv),w(is,Rt,null),g(s,bf,v),g(s,Yo,v),e(Yo,ls),e(ls,Kp),w(Lr,Kp,null),e(Yo,Zv),e(Yo,Qp),e(Qp,ey),g(s,wf,v),g(s,wt,v),w(Or,wt,null),e(wt,ty),e(wt,Nr),e(Nr,oy),e(Nr,Vp),e(Vp,ny),e(Nr,sy),e(wt,ay),e(wt,Ir),e(Ir,ry),e(Ir,ac),e(ac,iy),e(Ir,ly),e(wt,dy),e(wt,Dr),e(Dr,cy),e(Dr,Sr),e(Sr,py),e(Dr,hy),e(wt,my),e(wt,Ht),w(Wr,Ht,null),e(Ht,uy),e(Ht,Zo),e(Zo,fy),e(Zo,rc),e(rc,gy),e(Zo,_y),e(Zo,Jp),e(Jp,ky),e(Zo,vy),e(Ht,yy),w(ds,Ht,null),e(Ht,Ty),w(cs,Ht,null),g(s,Ef,v),g(s,en,v),e(en,ps),e(ps,Gp),w(Ur,Gp,null),e(en,by),e(en,Xp),e(Xp,wy),g(s,$f,v),g(s,ht,v),w(Br,ht,null),e(ht,Ey),e(ht,Yp),e(Yp,$y),e(ht,Fy),e(ht,Zp),e(Zp,xy),e(ht,My),e(ht,Rr),e(Rr,zy),e(Rr,ic),e(ic,qy),e(Rr,jy),e(ht,Cy),e(ht,Hr),e(Hr,Py),e(Hr,Kr),e(Kr,Ay),e(Hr,Ly),e(ht,Oy),e(ht,Kt),w(Qr,Kt,null),e(Kt,Ny),e(Kt,tn),e(tn,Iy),e(tn,lc),e(lc,Dy),e(tn,Sy),e(tn,eh),e(eh,Wy),e(tn,Uy),e(Kt,By),w(hs,Kt,null),e(Kt,Ry),w(ms,Kt,null),g(s,Ff,v),g(s,on,v),e(on,us),e(us,th),w(Vr,th,null),e(on,Hy),e(on,oh),e(oh,Ky),g(s,xf,v),g(s,Et,v),w(Jr,Et,null),e(Et,Qy),e(Et,nh),e(nh,Vy),e(Et,Jy),e(Et,Gr),e(Gr,Gy),e(Gr,dc),e(dc,Xy),e(Gr,Yy),e(Et,Zy),e(Et,Xr),e(Xr,eT),e(Xr,Yr),e(Yr,tT),e(Xr,oT),e(Et,nT),e(Et,xt),w(Zr,xt,null),e(xt,sT),e(xt,nn),e(nn,aT),e(nn,cc),e(cc,rT),e(nn,iT),e(nn,sh),e(sh,lT),e(nn,dT),e(xt,cT),w(fs,xt,null),e(xt,pT),w(gs,xt,null),e(xt,hT),w(_s,xt,null),g(s,Mf,v),g(s,sn,v),e(sn,ks),e(ks,ah),w(ei,ah,null),e(sn,mT),e(sn,rh),e(rh,uT),g(s,zf,v),g(s,$t,v),w(ti,$t,null),e($t,fT),e($t,ih),e(ih,gT),e($t,_T),e($t,oi),e(oi,kT),e(oi,pc),e(pc,vT),e(oi,yT),e($t,TT),e($t,ni),e(ni,bT),e(ni,si),e(si,wT),e(ni,ET),e($t,$T),e($t,Qt),w(ai,Qt,null),e(Qt,FT),e(Qt,an),e(an,xT),e(an,hc),e(hc,MT),e(an,zT),e(an,lh),e(lh,qT),e(an,jT),e(Qt,CT),w(vs,Qt,null),e(Qt,PT),w(ys,Qt,null),g(s,qf,v),g(s,rn,v),e(rn,Ts),e(Ts,dh),w(ri,dh,null),e(rn,AT),e(rn,ch),e(ch,LT),g(s,jf,v),g(s,mt,v),w(ii,mt,null),e(mt,OT),e(mt,ph),e(ph,NT),e(mt,IT),e(mt,hh),e(hh,DT),e(mt,ST),e(mt,li),e(li,WT),e(li,mc),e(mc,UT),e(li,BT),e(mt,RT),e(mt,di),e(di,HT),e(di,ci),e(ci,KT),e(di,QT),e(mt,VT),e(mt,Vt),w(pi,Vt,null),e(Vt,JT),e(Vt,ln),e(ln,GT),e(ln,uc),e(uc,XT),e(ln,YT),e(ln,mh),e(mh,ZT),e(ln,eb),e(Vt,tb),w(bs,Vt,null),e(Vt,ob),w(ws,Vt,null),g(s,Cf,v),g(s,dn,v),e(dn,Es),e(Es,uh),w(hi,uh,null),e(dn,nb),e(dn,fh),e(fh,sb),g(s,Pf,v),g(s,Ft,v),w(mi,Ft,null),e(Ft,ab),e(Ft,cn),e(cn,rb),e(cn,gh),e(gh,ib),e(cn,lb),e(cn,_h),e(_h,db),e(cn,cb),e(Ft,pb),e(Ft,ui),e(ui,hb),e(ui,fc),e(fc,mb),e(ui,ub),e(Ft,fb),e(Ft,fi),e(fi,gb),e(fi,gi),e(gi,_b),e(fi,kb),e(Ft,vb),e(Ft,Jt),w(_i,Jt,null),e(Jt,yb),e(Jt,pn),e(pn,Tb),e(pn,gc),e(gc,bb),e(pn,wb),e(pn,kh),e(kh,Eb),e(pn,$b),e(Jt,Fb),w($s,Jt,null),e(Jt,xb),w(Fs,Jt,null),g(s,Af,v),g(s,hn,v),e(hn,xs),e(xs,vh),w(ki,vh,null),e(hn,Mb),e(hn,yh),e(yh,zb),g(s,Lf,v),g(s,ut,v),w(vi,ut,null),e(ut,qb),e(ut,Th),e(Th,jb),e(ut,Cb),e(ut,yi),e(yi,Pb),e(yi,_c),e(_c,Ab),e(yi,Lb),e(ut,Ob),e(ut,Ti),e(Ti,Nb),e(Ti,bi),e(bi,Ib),e(Ti,Db),e(ut,Sb),w(Ms,ut,null),e(ut,Wb),e(ut,Gt),w(wi,Gt,null),e(Gt,Ub),e(Gt,mn),e(mn,Bb),e(mn,kc),e(kc,Rb),e(mn,Hb),e(mn,bh),e(bh,Kb),e(mn,Qb),e(Gt,Vb),w(zs,Gt,null),e(Gt,Jb),w(qs,Gt,null),g(s,Of,v),g(s,un,v),e(un,js),e(js,wh),w(Ei,wh,null),e(un,Gb),e(un,Eh),e(Eh,Xb),g(s,Nf,v),g(s,ot,v),w($i,ot,null),e(ot,Yb),e(ot,$h),e($h,Zb),e(ot,ew),e(ot,Fh),e(Fh,tw),e(ot,ow),e(ot,Fi),e(Fi,nw),e(Fi,vc),e(vc,sw),e(Fi,aw),e(ot,rw),e(ot,xi),e(xi,iw),e(xi,Mi),e(Mi,lw),e(xi,dw),e(ot,cw),w(Cs,ot,null),e(ot,pw),e(ot,Xt),w(zi,Xt,null),e(Xt,hw),e(Xt,fn),e(fn,mw),e(fn,yc),e(yc,uw),e(fn,fw),e(fn,xh),e(xh,gw),e(fn,_w),e(Xt,kw),w(Ps,Xt,null),e(Xt,vw),w(As,Xt,null),g(s,If,v),g(s,gn,v),e(gn,Ls),e(Ls,Mh),w(qi,Mh,null),e(gn,yw),e(gn,zh),e(zh,Tw),g(s,Df,v),g(s,nt,v),w(ji,nt,null),e(nt,bw),e(nt,qh),e(qh,ww),e(nt,Ew),e(nt,jh),e(jh,$w),e(nt,Fw),e(nt,Ci),e(Ci,xw),e(Ci,Tc),e(Tc,Mw),e(Ci,zw),e(nt,qw),e(nt,Pi),e(Pi,jw),e(Pi,Ai),e(Ai,Cw),e(Pi,Pw),e(nt,Aw),w(Os,nt,null),e(nt,Lw),e(nt,Mt),w(Li,Mt,null),e(Mt,Ow),e(Mt,_n),e(_n,Nw),e(_n,bc),e(bc,Iw),e(_n,Dw),e(_n,Ch),e(Ch,Sw),e(_n,Ww),e(Mt,Uw),w(Ns,Mt,null),e(Mt,Bw),w(Is,Mt,null),e(Mt,Rw),w(Ds,Mt,null),g(s,Sf,v),g(s,kn,v),e(kn,Ss),e(Ss,Ph),w(Oi,Ph,null),e(kn,Hw),e(kn,Ah),e(Ah,Kw),g(s,Wf,v),g(s,ft,v),w(Ni,ft,null),e(ft,Qw),e(ft,Lh),e(Lh,Vw),e(ft,Jw),e(ft,Ii),e(Ii,Gw),e(Ii,wc),e(wc,Xw),e(Ii,Yw),e(ft,Zw),e(ft,Di),e(Di,eE),e(Di,Si),e(Si,tE),e(Di,oE),e(ft,nE),w(Ws,ft,null),e(ft,sE),e(ft,zt),w(Wi,zt,null),e(zt,aE),e(zt,vn),e(vn,rE),e(vn,Ec),e(Ec,iE),e(vn,lE),e(vn,Oh),e(Oh,dE),e(vn,cE),e(zt,pE),w(Us,zt,null),e(zt,hE),w(Bs,zt,null),e(zt,mE),w(Rs,zt,null),g(s,Uf,v),g(s,yn,v),e(yn,Hs),e(Hs,Nh),w(Ui,Nh,null),e(yn,uE),e(yn,Ih),e(Ih,fE),g(s,Bf,v),g(s,gt,v),w(Bi,gt,null),e(gt,gE),e(gt,Dh),e(Dh,_E),e(gt,kE),e(gt,Ri),e(Ri,vE),e(Ri,$c),e($c,yE),e(Ri,TE),e(gt,bE),e(gt,Hi),e(Hi,wE),e(Hi,Ki),e(Ki,EE),e(Hi,$E),e(gt,FE),w(Ks,gt,null),e(gt,xE),e(gt,Yt),w(Qi,Yt,null),e(Yt,ME),e(Yt,Tn),e(Tn,zE),e(Tn,Fc),e(Fc,qE),e(Tn,jE),e(Tn,Sh),e(Sh,CE),e(Tn,PE),e(Yt,AE),w(Qs,Yt,null),e(Yt,LE),w(Vs,Yt,null),g(s,Rf,v),g(s,bn,v),e(bn,Js),e(Js,Wh),w(Vi,Wh,null),e(bn,OE),e(bn,Uh),e(Uh,NE),g(s,Hf,v),g(s,st,v),w(Ji,st,null),e(st,IE),e(st,Bh),e(Bh,DE),e(st,SE),e(st,Rh),e(Rh,WE),e(st,UE),e(st,Gi),e(Gi,BE),e(Gi,xc),e(xc,RE),e(Gi,HE),e(st,KE),e(st,Xi),e(Xi,QE),e(Xi,Yi),e(Yi,VE),e(Xi,JE),e(st,GE),w(Gs,st,null),e(st,XE),e(st,qt),w(Zi,qt,null),e(qt,YE),e(qt,wn),e(wn,ZE),e(wn,Mc),e(Mc,e1),e(wn,t1),e(wn,Hh),e(Hh,o1),e(wn,n1),e(qt,s1),w(Xs,qt,null),e(qt,a1),w(Ys,qt,null),e(qt,r1),w(Zs,qt,null),g(s,Kf,v),g(s,En,v),e(En,ea),e(ea,Kh),w(el,Kh,null),e(En,i1),e(En,Qh),e(Qh,l1),g(s,Qf,v),g(s,_t,v),w(tl,_t,null),e(_t,d1),e(_t,$n),e($n,c1),e($n,Vh),e(Vh,p1),e($n,h1),e($n,Jh),e(Jh,m1),e($n,u1),e(_t,f1),e(_t,ol),e(ol,g1),e(ol,zc),e(zc,_1),e(ol,k1),e(_t,v1),e(_t,nl),e(nl,y1),e(nl,sl),e(sl,T1),e(nl,b1),e(_t,w1),w(ta,_t,null),e(_t,E1),e(_t,jt),w(al,jt,null),e(jt,$1),e(jt,Fn),e(Fn,F1),e(Fn,qc),e(qc,x1),e(Fn,M1),e(Fn,Gh),e(Gh,z1),e(Fn,q1),e(jt,j1),w(oa,jt,null),e(jt,C1),w(na,jt,null),e(jt,P1),w(sa,jt,null),g(s,Vf,v),g(s,xn,v),e(xn,aa),e(aa,Xh),w(rl,Xh,null),e(xn,A1),e(xn,Yh),e(Yh,L1),g(s,Jf,v),g(s,at,v),w(il,at,null),e(at,O1),e(at,Zh),e(Zh,N1),e(at,I1),e(at,ll),e(ll,D1),e(ll,jc),e(jc,S1),e(ll,W1),e(at,U1),e(at,dl),e(dl,B1),e(dl,cl),e(cl,R1),e(dl,H1),e(at,K1),e(at,em),e(em,Q1),e(at,V1),e(at,fo),e(fo,tm),e(tm,pl),e(pl,J1),e(fo,G1),e(fo,om),e(om,hl),e(hl,X1),e(fo,Y1),e(fo,nm),e(nm,ml),e(ml,Z1),e(fo,e$),e(fo,sm),e(sm,ul),e(ul,t$),e(at,o$),e(at,Zt),w(fl,Zt,null),e(Zt,n$),e(Zt,Mn),e(Mn,s$),e(Mn,am),e(am,a$),e(Mn,r$),e(Mn,rm),e(rm,i$),e(Mn,l$),e(Zt,d$),w(ra,Zt,null),e(Zt,c$),w(ia,Zt,null),g(s,Gf,v),g(s,zn,v),e(zn,la),e(la,im),w(gl,im,null),e(zn,p$),e(zn,lm),e(lm,h$),g(s,Xf,v),g(s,Ze,v),w(_l,Ze,null),e(Ze,m$),e(Ze,dm),e(dm,u$),e(Ze,f$),e(Ze,cm),e(cm,g$),e(Ze,_$),e(Ze,kl),e(kl,k$),e(kl,Cc),e(Cc,v$),e(kl,y$),e(Ze,T$),e(Ze,vl),e(vl,b$),e(vl,yl),e(yl,w$),e(vl,E$),e(Ze,$$),e(Ze,pm),e(pm,F$),e(Ze,x$),e(Ze,go),e(go,hm),e(hm,Tl),e(Tl,M$),e(go,z$),e(go,mm),e(mm,bl),e(bl,q$),e(go,j$),e(go,um),e(um,wl),e(wl,C$),e(go,P$),e(go,fm),e(fm,El),e(El,A$),e(Ze,L$),e(Ze,eo),w($l,eo,null),e(eo,O$),e(eo,qn),e(qn,N$),e(qn,gm),e(gm,I$),e(qn,D$),e(qn,_m),e(_m,S$),e(qn,W$),e(eo,U$),w(da,eo,null),e(eo,B$),w(ca,eo,null),g(s,Yf,v),g(s,jn,v),e(jn,pa),e(pa,km),w(Fl,km,null),e(jn,R$),e(jn,vm),e(vm,H$),g(s,Zf,v),g(s,rt,v),w(xl,rt,null),e(rt,K$),e(rt,ym),e(ym,Q$),e(rt,V$),e(rt,Ml),e(Ml,J$),e(Ml,Pc),e(Pc,G$),e(Ml,X$),e(rt,Y$),e(rt,zl),e(zl,Z$),e(zl,ql),e(ql,e2),e(zl,t2),e(rt,o2),e(rt,Tm),e(Tm,n2),e(rt,s2),e(rt,_o),e(_o,bm),e(bm,jl),e(jl,a2),e(_o,r2),e(_o,wm),e(wm,Cl),e(Cl,i2),e(_o,l2),e(_o,Em),e(Em,Pl),e(Pl,d2),e(_o,c2),e(_o,$m),e($m,Al),e(Al,p2),e(rt,h2),e(rt,to),w(Ll,to,null),e(to,m2),e(to,Cn),e(Cn,u2),e(Cn,Fm),e(Fm,f2),e(Cn,g2),e(Cn,xm),e(xm,_2),e(Cn,k2),e(to,v2),w(ha,to,null),e(to,y2),w(ma,to,null),g(s,eg,v),g(s,Pn,v),e(Pn,ua),e(ua,Mm),w(Ol,Mm,null),e(Pn,T2),e(Pn,zm),e(zm,b2),g(s,tg,v),g(s,it,v),w(Nl,it,null),e(it,w2),e(it,Il),e(Il,E2),e(Il,qm),e(qm,$2),e(Il,F2),e(it,x2),e(it,Dl),e(Dl,M2),e(Dl,Ac),e(Ac,z2),e(Dl,q2),e(it,j2),e(it,Sl),e(Sl,C2),e(Sl,Wl),e(Wl,P2),e(Sl,A2),e(it,L2),e(it,jm),e(jm,O2),e(it,N2),e(it,ko),e(ko,Cm),e(Cm,Ul),e(Ul,I2),e(ko,D2),e(ko,Pm),e(Pm,Bl),e(Bl,S2),e(ko,W2),e(ko,Am),e(Am,Rl),e(Rl,U2),e(ko,B2),e(ko,Lm),e(Lm,Hl),e(Hl,R2),e(it,H2),e(it,oo),w(Kl,oo,null),e(oo,K2),e(oo,An),e(An,Q2),e(An,Om),e(Om,V2),e(An,J2),e(An,Nm),e(Nm,G2),e(An,X2),e(oo,Y2),w(fa,oo,null),e(oo,Z2),w(ga,oo,null),g(s,og,v),g(s,Ln,v),e(Ln,_a),e(_a,Im),w(Ql,Im,null),e(Ln,eF),e(Ln,Dm),e(Dm,tF),g(s,ng,v),g(s,lt,v),w(Vl,lt,null),e(lt,oF),e(lt,Sm),e(Sm,nF),e(lt,sF),e(lt,Jl),e(Jl,aF),e(Jl,Lc),e(Lc,rF),e(Jl,iF),e(lt,lF),e(lt,Gl),e(Gl,dF),e(Gl,Xl),e(Xl,cF),e(Gl,pF),e(lt,hF),e(lt,Wm),e(Wm,mF),e(lt,uF),e(lt,vo),e(vo,Um),e(Um,Yl),e(Yl,fF),e(vo,gF),e(vo,Bm),e(Bm,Zl),e(Zl,_F),e(vo,kF),e(vo,Rm),e(Rm,ed),e(ed,vF),e(vo,yF),e(vo,Hm),e(Hm,td),e(td,TF),e(lt,bF),e(lt,no),w(od,no,null),e(no,wF),e(no,On),e(On,EF),e(On,Km),e(Km,$F),e(On,FF),e(On,Qm),e(Qm,xF),e(On,MF),e(no,zF),w(ka,no,null),e(no,qF),w(va,no,null),g(s,sg,v),g(s,Nn,v),e(Nn,ya),e(ya,Vm),w(nd,Vm,null),e(Nn,jF),e(Nn,Jm),e(Jm,CF),g(s,ag,v),g(s,dt,v),w(sd,dt,null),e(dt,PF),e(dt,Gm),e(Gm,AF),e(dt,LF),e(dt,ad),e(ad,OF),e(ad,Oc),e(Oc,NF),e(ad,IF),e(dt,DF),e(dt,rd),e(rd,SF),e(rd,id),e(id,WF),e(rd,UF),e(dt,BF),e(dt,Xm),e(Xm,RF),e(dt,HF),e(dt,yo),e(yo,Ym),e(Ym,ld),e(ld,KF),e(yo,QF),e(yo,Zm),e(Zm,dd),e(dd,VF),e(yo,JF),e(yo,eu),e(eu,cd),e(cd,GF),e(yo,XF),e(yo,tu),e(tu,pd),e(pd,YF),e(dt,ZF),e(dt,so),w(hd,so,null),e(so,e0),e(so,In),e(In,t0),e(In,ou),e(ou,o0),e(In,n0),e(In,nu),e(nu,s0),e(In,a0),e(so,r0),w(Ta,so,null),e(so,i0),w(ba,so,null),g(s,rg,v),g(s,Dn,v),e(Dn,wa),e(wa,su),w(md,su,null),e(Dn,l0),e(Dn,au),e(au,d0),g(s,ig,v),g(s,et,v),w(ud,et,null),e(et,c0),e(et,ru),e(ru,p0),e(et,h0),e(et,iu),e(iu,m0),e(et,u0),e(et,fd),e(fd,f0),e(fd,Nc),e(Nc,g0),e(fd,_0),e(et,k0),e(et,gd),e(gd,v0),e(gd,_d),e(_d,y0),e(gd,T0),e(et,b0),e(et,lu),e(lu,w0),e(et,E0),e(et,To),e(To,du),e(du,kd),e(kd,$0),e(To,F0),e(To,cu),e(cu,vd),e(vd,x0),e(To,M0),e(To,pu),e(pu,yd),e(yd,z0),e(To,q0),e(To,hu),e(hu,Td),e(Td,j0),e(et,C0),e(et,ao),w(bd,ao,null),e(ao,P0),e(ao,Sn),e(Sn,A0),e(Sn,mu),e(mu,L0),e(Sn,O0),e(Sn,uu),e(uu,N0),e(Sn,I0),e(ao,D0),w(Ea,ao,null),e(ao,S0),w($a,ao,null),g(s,lg,v),g(s,Wn,v),e(Wn,Fa),e(Fa,fu),w(wd,fu,null),e(Wn,W0),e(Wn,gu),e(gu,U0),g(s,dg,v),g(s,ct,v),w(Ed,ct,null),e(ct,B0),e(ct,Un),e(Un,R0),e(Un,_u),e(_u,H0),e(Un,K0),e(Un,ku),e(ku,Q0),e(Un,V0),e(ct,J0),e(ct,$d),e($d,G0),e($d,Ic),e(Ic,X0),e($d,Y0),e(ct,Z0),e(ct,Fd),e(Fd,ex),e(Fd,xd),e(xd,tx),e(Fd,ox),e(ct,nx),e(ct,vu),e(vu,sx),e(ct,ax),e(ct,bo),e(bo,yu),e(yu,Md),e(Md,rx),e(bo,ix),e(bo,Tu),e(Tu,zd),e(zd,lx),e(bo,dx),e(bo,bu),e(bu,qd),e(qd,cx),e(bo,px),e(bo,wu),e(wu,jd),e(jd,hx),e(ct,mx),e(ct,ro),w(Cd,ro,null),e(ro,ux),e(ro,Bn),e(Bn,fx),e(Bn,Eu),e(Eu,gx),e(Bn,_x),e(Bn,$u),e($u,kx),e(Bn,vx),e(ro,yx),w(xa,ro,null),e(ro,Tx),w(Ma,ro,null),cg=!0},p(s,[v]){const Pd={};v&2&&(Pd.$$scope={dirty:v,ctx:s}),Vn.$set(Pd);const Fu={};v&2&&(Fu.$$scope={dirty:v,ctx:s}),Xn.$set(Fu);const xu={};v&2&&(xu.$$scope={dirty:v,ctx:s}),es.$set(xu);const Mu={};v&2&&(Mu.$$scope={dirty:v,ctx:s}),ns.$set(Mu);const Ad={};v&2&&(Ad.$$scope={dirty:v,ctx:s}),ss.$set(Ad);const zu={};v&2&&(zu.$$scope={dirty:v,ctx:s}),rs.$set(zu);const qu={};v&2&&(qu.$$scope={dirty:v,ctx:s}),is.$set(qu);const ju={};v&2&&(ju.$$scope={dirty:v,ctx:s}),ds.$set(ju);const Ld={};v&2&&(Ld.$$scope={dirty:v,ctx:s}),cs.$set(Ld);const Cu={};v&2&&(Cu.$$scope={dirty:v,ctx:s}),hs.$set(Cu);const Pu={};v&2&&(Pu.$$scope={dirty:v,ctx:s}),ms.$set(Pu);const Au={};v&2&&(Au.$$scope={dirty:v,ctx:s}),fs.$set(Au);const Lu={};v&2&&(Lu.$$scope={dirty:v,ctx:s}),gs.$set(Lu);const Ou={};v&2&&(Ou.$$scope={dirty:v,ctx:s}),_s.$set(Ou);const Od={};v&2&&(Od.$$scope={dirty:v,ctx:s}),vs.$set(Od);const Nu={};v&2&&(Nu.$$scope={dirty:v,ctx:s}),ys.$set(Nu);const wo={};v&2&&(wo.$$scope={dirty:v,ctx:s}),bs.$set(wo);const Iu={};v&2&&(Iu.$$scope={dirty:v,ctx:s}),ws.$set(Iu);const Du={};v&2&&(Du.$$scope={dirty:v,ctx:s}),$s.$set(Du);const Su={};v&2&&(Su.$$scope={dirty:v,ctx:s}),Fs.$set(Su);const Rn={};v&2&&(Rn.$$scope={dirty:v,ctx:s}),Ms.$set(Rn);const Wu={};v&2&&(Wu.$$scope={dirty:v,ctx:s}),zs.$set(Wu);const Uu={};v&2&&(Uu.$$scope={dirty:v,ctx:s}),qs.$set(Uu);const Nd={};v&2&&(Nd.$$scope={dirty:v,ctx:s}),Cs.$set(Nd);const Bu={};v&2&&(Bu.$$scope={dirty:v,ctx:s}),Ps.$set(Bu);const Ru={};v&2&&(Ru.$$scope={dirty:v,ctx:s}),As.$set(Ru);const Hu={};v&2&&(Hu.$$scope={dirty:v,ctx:s}),Os.$set(Hu);const Eo={};v&2&&(Eo.$$scope={dirty:v,ctx:s}),Ns.$set(Eo);const $o={};v&2&&($o.$$scope={dirty:v,ctx:s}),Is.$set($o);const Ku={};v&2&&(Ku.$$scope={dirty:v,ctx:s}),Ds.$set(Ku);const Qu={};v&2&&(Qu.$$scope={dirty:v,ctx:s}),Ws.$set(Qu);const Vu={};v&2&&(Vu.$$scope={dirty:v,ctx:s}),Us.$set(Vu);const Hn={};v&2&&(Hn.$$scope={dirty:v,ctx:s}),Bs.$set(Hn);const Ju={};v&2&&(Ju.$$scope={dirty:v,ctx:s}),Rs.$set(Ju);const Gu={};v&2&&(Gu.$$scope={dirty:v,ctx:s}),Ks.$set(Gu);const Id={};v&2&&(Id.$$scope={dirty:v,ctx:s}),Qs.$set(Id);const Xu={};v&2&&(Xu.$$scope={dirty:v,ctx:s}),Vs.$set(Xu);const Yu={};v&2&&(Yu.$$scope={dirty:v,ctx:s}),Gs.$set(Yu);const Zu={};v&2&&(Zu.$$scope={dirty:v,ctx:s}),Xs.$set(Zu);const kt={};v&2&&(kt.$$scope={dirty:v,ctx:s}),Ys.$set(kt);const ef={};v&2&&(ef.$$scope={dirty:v,ctx:s}),Zs.$set(ef);const Dd={};v&2&&(Dd.$$scope={dirty:v,ctx:s}),ta.$set(Dd);const tf={};v&2&&(tf.$$scope={dirty:v,ctx:s}),oa.$set(tf);const Kn={};v&2&&(Kn.$$scope={dirty:v,ctx:s}),na.$set(Kn);const of={};v&2&&(of.$$scope={dirty:v,ctx:s}),sa.$set(of);const Sd={};v&2&&(Sd.$$scope={dirty:v,ctx:s}),ra.$set(Sd);const Dc={};v&2&&(Dc.$$scope={dirty:v,ctx:s}),ia.$set(Dc);const nf={};v&2&&(nf.$$scope={dirty:v,ctx:s}),da.$set(nf);const Sc={};v&2&&(Sc.$$scope={dirty:v,ctx:s}),ca.$set(Sc);const sf={};v&2&&(sf.$$scope={dirty:v,ctx:s}),ha.$set(sf);const Wd={};v&2&&(Wd.$$scope={dirty:v,ctx:s}),ma.$set(Wd);const af={};v&2&&(af.$$scope={dirty:v,ctx:s}),fa.$set(af);const Fo={};v&2&&(Fo.$$scope={dirty:v,ctx:s}),ga.$set(Fo);const rf={};v&2&&(rf.$$scope={dirty:v,ctx:s}),ka.$set(rf);const Qn={};v&2&&(Qn.$$scope={dirty:v,ctx:s}),va.$set(Qn);const lf={};v&2&&(lf.$$scope={dirty:v,ctx:s}),Ta.$set(lf);const df={};v&2&&(df.$$scope={dirty:v,ctx:s}),ba.$set(df);const Ud={};v&2&&(Ud.$$scope={dirty:v,ctx:s}),Ea.$set(Ud);const Bd={};v&2&&(Bd.$$scope={dirty:v,ctx:s}),$a.$set(Bd);const cf={};v&2&&(cf.$$scope={dirty:v,ctx:s}),xa.$set(cf);const Rd={};v&2&&(Rd.$$scope={dirty:v,ctx:s}),Ma.$set(Rd)},i(s){cg||(E(l.$$.fragment,s),E(x.$$.fragment,s),E(We.$$.fragment,s),E(Ue.$$.fragment,s),E(Vn.$$.fragment,s),E(or.$$.fragment,s),E(nr.$$.fragment,s),E(ar.$$.fragment,s),E(ir.$$.fragment,s),E(lr.$$.fragment,s),E(Xn.$$.fragment,s),E(dr.$$.fragment,s),E(pr.$$.fragment,s),E(hr.$$.fragment,s),E(fr.$$.fragment,s),E(_r.$$.fragment,s),E(es.$$.fragment,s),E(kr.$$.fragment,s),E(vr.$$.fragment,s),E(Tr.$$.fragment,s),E(wr.$$.fragment,s),E(Er.$$.fragment,s),E(Mr.$$.fragment,s),E(ns.$$.fragment,s),E(ss.$$.fragment,s),E(zr.$$.fragment,s),E(qr.$$.fragment,s),E(Ar.$$.fragment,s),E(rs.$$.fragment,s),E(is.$$.fragment,s),E(Lr.$$.fragment,s),E(Or.$$.fragment,s),E(Wr.$$.fragment,s),E(ds.$$.fragment,s),E(cs.$$.fragment,s),E(Ur.$$.fragment,s),E(Br.$$.fragment,s),E(Qr.$$.fragment,s),E(hs.$$.fragment,s),E(ms.$$.fragment,s),E(Vr.$$.fragment,s),E(Jr.$$.fragment,s),E(Zr.$$.fragment,s),E(fs.$$.fragment,s),E(gs.$$.fragment,s),E(_s.$$.fragment,s),E(ei.$$.fragment,s),E(ti.$$.fragment,s),E(ai.$$.fragment,s),E(vs.$$.fragment,s),E(ys.$$.fragment,s),E(ri.$$.fragment,s),E(ii.$$.fragment,s),E(pi.$$.fragment,s),E(bs.$$.fragment,s),E(ws.$$.fragment,s),E(hi.$$.fragment,s),E(mi.$$.fragment,s),E(_i.$$.fragment,s),E($s.$$.fragment,s),E(Fs.$$.fragment,s),E(ki.$$.fragment,s),E(vi.$$.fragment,s),E(Ms.$$.fragment,s),E(wi.$$.fragment,s),E(zs.$$.fragment,s),E(qs.$$.fragment,s),E(Ei.$$.fragment,s),E($i.$$.fragment,s),E(Cs.$$.fragment,s),E(zi.$$.fragment,s),E(Ps.$$.fragment,s),E(As.$$.fragment,s),E(qi.$$.fragment,s),E(ji.$$.fragment,s),E(Os.$$.fragment,s),E(Li.$$.fragment,s),E(Ns.$$.fragment,s),E(Is.$$.fragment,s),E(Ds.$$.fragment,s),E(Oi.$$.fragment,s),E(Ni.$$.fragment,s),E(Ws.$$.fragment,s),E(Wi.$$.fragment,s),E(Us.$$.fragment,s),E(Bs.$$.fragment,s),E(Rs.$$.fragment,s),E(Ui.$$.fragment,s),E(Bi.$$.fragment,s),E(Ks.$$.fragment,s),E(Qi.$$.fragment,s),E(Qs.$$.fragment,s),E(Vs.$$.fragment,s),E(Vi.$$.fragment,s),E(Ji.$$.fragment,s),E(Gs.$$.fragment,s),E(Zi.$$.fragment,s),E(Xs.$$.fragment,s),E(Ys.$$.fragment,s),E(Zs.$$.fragment,s),E(el.$$.fragment,s),E(tl.$$.fragment,s),E(ta.$$.fragment,s),E(al.$$.fragment,s),E(oa.$$.fragment,s),E(na.$$.fragment,s),E(sa.$$.fragment,s),E(rl.$$.fragment,s),E(il.$$.fragment,s),E(fl.$$.fragment,s),E(ra.$$.fragment,s),E(ia.$$.fragment,s),E(gl.$$.fragment,s),E(_l.$$.fragment,s),E($l.$$.fragment,s),E(da.$$.fragment,s),E(ca.$$.fragment,s),E(Fl.$$.fragment,s),E(xl.$$.fragment,s),E(Ll.$$.fragment,s),E(ha.$$.fragment,s),E(ma.$$.fragment,s),E(Ol.$$.fragment,s),E(Nl.$$.fragment,s),E(Kl.$$.fragment,s),E(fa.$$.fragment,s),E(ga.$$.fragment,s),E(Ql.$$.fragment,s),E(Vl.$$.fragment,s),E(od.$$.fragment,s),E(ka.$$.fragment,s),E(va.$$.fragment,s),E(nd.$$.fragment,s),E(sd.$$.fragment,s),E(hd.$$.fragment,s),E(Ta.$$.fragment,s),E(ba.$$.fragment,s),E(md.$$.fragment,s),E(ud.$$.fragment,s),E(bd.$$.fragment,s),E(Ea.$$.fragment,s),E($a.$$.fragment,s),E(wd.$$.fragment,s),E(Ed.$$.fragment,s),E(Cd.$$.fragment,s),E(xa.$$.fragment,s),E(Ma.$$.fragment,s),cg=!0)},o(s){$(l.$$.fragment,s),$(x.$$.fragment,s),$(We.$$.fragment,s),$(Ue.$$.fragment,s),$(Vn.$$.fragment,s),$(or.$$.fragment,s),$(nr.$$.fragment,s),$(ar.$$.fragment,s),$(ir.$$.fragment,s),$(lr.$$.fragment,s),$(Xn.$$.fragment,s),$(dr.$$.fragment,s),$(pr.$$.fragment,s),$(hr.$$.fragment,s),$(fr.$$.fragment,s),$(_r.$$.fragment,s),$(es.$$.fragment,s),$(kr.$$.fragment,s),$(vr.$$.fragment,s),$(Tr.$$.fragment,s),$(wr.$$.fragment,s),$(Er.$$.fragment,s),$(Mr.$$.fragment,s),$(ns.$$.fragment,s),$(ss.$$.fragment,s),$(zr.$$.fragment,s),$(qr.$$.fragment,s),$(Ar.$$.fragment,s),$(rs.$$.fragment,s),$(is.$$.fragment,s),$(Lr.$$.fragment,s),$(Or.$$.fragment,s),$(Wr.$$.fragment,s),$(ds.$$.fragment,s),$(cs.$$.fragment,s),$(Ur.$$.fragment,s),$(Br.$$.fragment,s),$(Qr.$$.fragment,s),$(hs.$$.fragment,s),$(ms.$$.fragment,s),$(Vr.$$.fragment,s),$(Jr.$$.fragment,s),$(Zr.$$.fragment,s),$(fs.$$.fragment,s),$(gs.$$.fragment,s),$(_s.$$.fragment,s),$(ei.$$.fragment,s),$(ti.$$.fragment,s),$(ai.$$.fragment,s),$(vs.$$.fragment,s),$(ys.$$.fragment,s),$(ri.$$.fragment,s),$(ii.$$.fragment,s),$(pi.$$.fragment,s),$(bs.$$.fragment,s),$(ws.$$.fragment,s),$(hi.$$.fragment,s),$(mi.$$.fragment,s),$(_i.$$.fragment,s),$($s.$$.fragment,s),$(Fs.$$.fragment,s),$(ki.$$.fragment,s),$(vi.$$.fragment,s),$(Ms.$$.fragment,s),$(wi.$$.fragment,s),$(zs.$$.fragment,s),$(qs.$$.fragment,s),$(Ei.$$.fragment,s),$($i.$$.fragment,s),$(Cs.$$.fragment,s),$(zi.$$.fragment,s),$(Ps.$$.fragment,s),$(As.$$.fragment,s),$(qi.$$.fragment,s),$(ji.$$.fragment,s),$(Os.$$.fragment,s),$(Li.$$.fragment,s),$(Ns.$$.fragment,s),$(Is.$$.fragment,s),$(Ds.$$.fragment,s),$(Oi.$$.fragment,s),$(Ni.$$.fragment,s),$(Ws.$$.fragment,s),$(Wi.$$.fragment,s),$(Us.$$.fragment,s),$(Bs.$$.fragment,s),$(Rs.$$.fragment,s),$(Ui.$$.fragment,s),$(Bi.$$.fragment,s),$(Ks.$$.fragment,s),$(Qi.$$.fragment,s),$(Qs.$$.fragment,s),$(Vs.$$.fragment,s),$(Vi.$$.fragment,s),$(Ji.$$.fragment,s),$(Gs.$$.fragment,s),$(Zi.$$.fragment,s),$(Xs.$$.fragment,s),$(Ys.$$.fragment,s),$(Zs.$$.fragment,s),$(el.$$.fragment,s),$(tl.$$.fragment,s),$(ta.$$.fragment,s),$(al.$$.fragment,s),$(oa.$$.fragment,s),$(na.$$.fragment,s),$(sa.$$.fragment,s),$(rl.$$.fragment,s),$(il.$$.fragment,s),$(fl.$$.fragment,s),$(ra.$$.fragment,s),$(ia.$$.fragment,s),$(gl.$$.fragment,s),$(_l.$$.fragment,s),$($l.$$.fragment,s),$(da.$$.fragment,s),$(ca.$$.fragment,s),$(Fl.$$.fragment,s),$(xl.$$.fragment,s),$(Ll.$$.fragment,s),$(ha.$$.fragment,s),$(ma.$$.fragment,s),$(Ol.$$.fragment,s),$(Nl.$$.fragment,s),$(Kl.$$.fragment,s),$(fa.$$.fragment,s),$(ga.$$.fragment,s),$(Ql.$$.fragment,s),$(Vl.$$.fragment,s),$(od.$$.fragment,s),$(ka.$$.fragment,s),$(va.$$.fragment,s),$(nd.$$.fragment,s),$(sd.$$.fragment,s),$(hd.$$.fragment,s),$(Ta.$$.fragment,s),$(ba.$$.fragment,s),$(md.$$.fragment,s),$(ud.$$.fragment,s),$(bd.$$.fragment,s),$(Ea.$$.fragment,s),$($a.$$.fragment,s),$(wd.$$.fragment,s),$(Ed.$$.fragment,s),$(Cd.$$.fragment,s),$(xa.$$.fragment,s),$(Ma.$$.fragment,s),cg=!1},d(s){t(d),s&&t(k),s&&t(m),F(l),s&&t(he),s&&t(W),F(x),s&&t(me),s&&t(U),s&&t(ue),s&&t(R),s&&t(fe),s&&t(H),s&&t(oe),s&&t(C),s&&t(ge),s&&t(B),s&&t(_e),s&&t(S),s&&t(y),s&&t(q),F(We),s&&t(Ke),s&&t(de),F(Ue),F(Vn),s&&t(pf),s&&t(Wo),F(or),s&&t(hf),s&&t(tt),F(nr),F(ar),F(ir),F(lr),F(Xn),F(dr),s&&t(mf),s&&t(Bo),F(pr),s&&t(uf),s&&t(Tt),F(hr),F(fr),F(_r),F(es),s&&t(ff),s&&t(Ho),F(kr),s&&t(gf),s&&t(Ko),F(vr),s&&t(_f),s&&t(Qo),F(Tr),s&&t(kf),s&&t(Vo),F(wr),s&&t(vf),s&&t(bt),F(Er),F(Mr),F(ns),F(ss),s&&t(yf),s&&t(Go),F(zr),s&&t(Tf),s&&t(pt),F(qr),F(Ar),F(rs),F(is),s&&t(bf),s&&t(Yo),F(Lr),s&&t(wf),s&&t(wt),F(Or),F(Wr),F(ds),F(cs),s&&t(Ef),s&&t(en),F(Ur),s&&t($f),s&&t(ht),F(Br),F(Qr),F(hs),F(ms),s&&t(Ff),s&&t(on),F(Vr),s&&t(xf),s&&t(Et),F(Jr),F(Zr),F(fs),F(gs),F(_s),s&&t(Mf),s&&t(sn),F(ei),s&&t(zf),s&&t($t),F(ti),F(ai),F(vs),F(ys),s&&t(qf),s&&t(rn),F(ri),s&&t(jf),s&&t(mt),F(ii),F(pi),F(bs),F(ws),s&&t(Cf),s&&t(dn),F(hi),s&&t(Pf),s&&t(Ft),F(mi),F(_i),F($s),F(Fs),s&&t(Af),s&&t(hn),F(ki),s&&t(Lf),s&&t(ut),F(vi),F(Ms),F(wi),F(zs),F(qs),s&&t(Of),s&&t(un),F(Ei),s&&t(Nf),s&&t(ot),F($i),F(Cs),F(zi),F(Ps),F(As),s&&t(If),s&&t(gn),F(qi),s&&t(Df),s&&t(nt),F(ji),F(Os),F(Li),F(Ns),F(Is),F(Ds),s&&t(Sf),s&&t(kn),F(Oi),s&&t(Wf),s&&t(ft),F(Ni),F(Ws),F(Wi),F(Us),F(Bs),F(Rs),s&&t(Uf),s&&t(yn),F(Ui),s&&t(Bf),s&&t(gt),F(Bi),F(Ks),F(Qi),F(Qs),F(Vs),s&&t(Rf),s&&t(bn),F(Vi),s&&t(Hf),s&&t(st),F(Ji),F(Gs),F(Zi),F(Xs),F(Ys),F(Zs),s&&t(Kf),s&&t(En),F(el),s&&t(Qf),s&&t(_t),F(tl),F(ta),F(al),F(oa),F(na),F(sa),s&&t(Vf),s&&t(xn),F(rl),s&&t(Jf),s&&t(at),F(il),F(fl),F(ra),F(ia),s&&t(Gf),s&&t(zn),F(gl),s&&t(Xf),s&&t(Ze),F(_l),F($l),F(da),F(ca),s&&t(Yf),s&&t(jn),F(Fl),s&&t(Zf),s&&t(rt),F(xl),F(Ll),F(ha),F(ma),s&&t(eg),s&&t(Pn),F(Ol),s&&t(tg),s&&t(it),F(Nl),F(Kl),F(fa),F(ga),s&&t(og),s&&t(Ln),F(Ql),s&&t(ng),s&&t(lt),F(Vl),F(od),F(ka),F(va),s&&t(sg),s&&t(Nn),F(nd),s&&t(ag),s&&t(dt),F(sd),F(hd),F(Ta),F(ba),s&&t(rg),s&&t(Dn),F(md),s&&t(ig),s&&t(et),F(ud),F(bd),F(Ea),F($a),s&&t(lg),s&&t(Wn),F(wd),s&&t(dg),s&&t(ct),F(Ed),F(Cd),F(xa),F(Ma)}}}const GC={local:"electra",sections:[{local:"overview",title:"Overview"},{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 XC(M){return Wj(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class sP extends Nj{constructor(d){super();Ij(this,d,XC,JC,Dj,{})}}export{sP as default,GC as metadata};
