import{S as Gj,i as Xj,s as Yj,e as o,k as c,w as T,t as r,M as Zj,c as n,d as t,m as p,a,x as b,h as i,b as m,N as Jj,G as e,g,y as w,q as E,o as $,B as F,v as eC,L as Le}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ie}from"../../chunks/Tip-hf-doc-builder.js";import{D as N}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Oe}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as De}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ae}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function tC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Examples:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Examples:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function oC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("sequence pair mask has the following format:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"sequence pair mask has the following format:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function nC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("sequence pair mask has the following format:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"sequence pair mask has the following format:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function sC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function aC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function rC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function iC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Examples:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Examples:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function lC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function dC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function cC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function pC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function hC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function mC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example of single-label classification:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example of single-label classification:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function uC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example of multi-label classification:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example of multi-label classification:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function fC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function gC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function _C(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function kC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function vC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function yC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function TC(x){let d,v,u,f,_,l,h,z,ve,fe,W,de,te,M,ye,K,ce,Ne,G,ae,re,Q,ie,Te,V,be,ge,R,we,le,ne,C,A,pe,Y,_e,he,J,Ee,ke,P,$e,X,se,me,Z,Fe,ue,S,xe,I,Me,ee,L,ze,O,qe,je;return{c(){d=o("p"),v=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),l=c(),h=o("ul"),z=o("li"),ve=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),W=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),M=o("p"),ye=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=o("code"),ce=r("model.fit()"),Ne=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=o("code"),ie=r("fit()"),Te=r(" and "),V=o("code"),be=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),R=o("code"),we=r("Functional"),le=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),C=o("ul"),A=o("li"),pe=r("a single Tensor with "),Y=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),J=o("code"),Ee=r("model(input_ids)"),ke=c(),P=o("li"),$e=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),Z=o("code"),Fe=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),S=o("li"),xe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=o("code"),Me=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),L=o("p"),ze=r(`Note that when creating models and layers with
`),O=o("a"),qe=r("subclassing"),je=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=n(y,"P",{});var q=a(d);v=i(q,"TensorFlow models and layers in "),u=n(q,"CODE",{});var Ke=a(u);f=i(Ke,"transformers"),Ke.forEach(t),_=i(q," accept two formats as input:"),q.forEach(t),l=p(y),h=n(y,"UL",{});var oe=a(h);z=n(oe,"LI",{});var Ce=a(z);ve=i(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),fe=p(oe),W=n(oe,"LI",{});var Qe=a(W);de=i(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(t),oe.forEach(t),te=p(y),M=n(y,"P",{});var j=a(M);ye=i(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=n(j,"CODE",{});var Ve=a(K);ce=i(Ve,"model.fit()"),Ve.forEach(t),Ne=i(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=n(j,"CODE",{});var Je=a(G);ae=i(Je,"model.fit()"),Je.forEach(t),re=i(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=n(j,"CODE",{});var We=a(Q);ie=i(We,"fit()"),We.forEach(t),Te=i(j," and "),V=n(j,"CODE",{});var Ge=a(V);be=i(Ge,"predict()"),Ge.forEach(t),ge=i(j,`, such as when creating your own layers or models with
the Keras `),R=n(j,"CODE",{});var Xe=a(R);we=i(Xe,"Functional"),Xe.forEach(t),le=i(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),ne=p(y),C=n(y,"UL",{});var D=a(C);A=n(D,"LI",{});var U=a(A);pe=i(U,"a single Tensor with "),Y=n(U,"CODE",{});var Se=a(Y);_e=i(Se,"input_ids"),Se.forEach(t),he=i(U," only and nothing else: "),J=n(U,"CODE",{});var Ue=a(J);Ee=i(Ue,"model(input_ids)"),Ue.forEach(t),U.forEach(t),ke=p(D),P=n(D,"LI",{});var H=a(P);$e=i(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=n(H,"CODE",{});var Ye=a(X);se=i(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),me=i(H," or "),Z=n(H,"CODE",{});var Be=a(Z);Fe=i(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),ue=p(D),S=n(D,"LI",{});var Pe=a(S);xe=i(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=n(Pe,"CODE",{});var He=a(I);Me=i(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),Pe.forEach(t),D.forEach(t),ee=p(y),L=n(y,"P",{});var B=a(L);ze=i(B,`Note that when creating models and layers with
`),O=n(B,"A",{href:!0,rel:!0});var Re=a(O);qe=i(Re,"subclassing"),Re.forEach(t),je=i(B,` 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!`),B.forEach(t),this.h()},h(){m(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(O,"rel","nofollow")},m(y,q){g(y,d,q),e(d,v),e(d,u),e(u,f),e(d,_),g(y,l,q),g(y,h,q),e(h,z),e(z,ve),e(h,fe),e(h,W),e(W,de),g(y,te,q),g(y,M,q),e(M,ye),e(M,K),e(K,ce),e(M,Ne),e(M,G),e(G,ae),e(M,re),e(M,Q),e(Q,ie),e(M,Te),e(M,V),e(V,be),e(M,ge),e(M,R),e(R,we),e(M,le),g(y,ne,q),g(y,C,q),e(C,A),e(A,pe),e(A,Y),e(Y,_e),e(A,he),e(A,J),e(J,Ee),e(C,ke),e(C,P),e(P,$e),e(P,X),e(X,se),e(P,me),e(P,Z),e(Z,Fe),e(C,ue),e(C,S),e(S,xe),e(S,I),e(I,Me),g(y,ee,q),g(y,L,q),e(L,ze),e(L,O),e(O,qe),e(L,je)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(te),y&&t(M),y&&t(ne),y&&t(C),y&&t(ee),y&&t(L)}}}function bC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function wC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function EC(x){let d,v,u,f,_,l,h,z,ve,fe,W,de,te,M,ye,K,ce,Ne,G,ae,re,Q,ie,Te,V,be,ge,R,we,le,ne,C,A,pe,Y,_e,he,J,Ee,ke,P,$e,X,se,me,Z,Fe,ue,S,xe,I,Me,ee,L,ze,O,qe,je;return{c(){d=o("p"),v=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),l=c(),h=o("ul"),z=o("li"),ve=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),W=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),M=o("p"),ye=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=o("code"),ce=r("model.fit()"),Ne=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=o("code"),ie=r("fit()"),Te=r(" and "),V=o("code"),be=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),R=o("code"),we=r("Functional"),le=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),C=o("ul"),A=o("li"),pe=r("a single Tensor with "),Y=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),J=o("code"),Ee=r("model(input_ids)"),ke=c(),P=o("li"),$e=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),Z=o("code"),Fe=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),S=o("li"),xe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=o("code"),Me=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),L=o("p"),ze=r(`Note that when creating models and layers with
`),O=o("a"),qe=r("subclassing"),je=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=n(y,"P",{});var q=a(d);v=i(q,"TensorFlow models and layers in "),u=n(q,"CODE",{});var Ke=a(u);f=i(Ke,"transformers"),Ke.forEach(t),_=i(q," accept two formats as input:"),q.forEach(t),l=p(y),h=n(y,"UL",{});var oe=a(h);z=n(oe,"LI",{});var Ce=a(z);ve=i(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),fe=p(oe),W=n(oe,"LI",{});var Qe=a(W);de=i(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(t),oe.forEach(t),te=p(y),M=n(y,"P",{});var j=a(M);ye=i(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=n(j,"CODE",{});var Ve=a(K);ce=i(Ve,"model.fit()"),Ve.forEach(t),Ne=i(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=n(j,"CODE",{});var Je=a(G);ae=i(Je,"model.fit()"),Je.forEach(t),re=i(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=n(j,"CODE",{});var We=a(Q);ie=i(We,"fit()"),We.forEach(t),Te=i(j," and "),V=n(j,"CODE",{});var Ge=a(V);be=i(Ge,"predict()"),Ge.forEach(t),ge=i(j,`, such as when creating your own layers or models with
the Keras `),R=n(j,"CODE",{});var Xe=a(R);we=i(Xe,"Functional"),Xe.forEach(t),le=i(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),ne=p(y),C=n(y,"UL",{});var D=a(C);A=n(D,"LI",{});var U=a(A);pe=i(U,"a single Tensor with "),Y=n(U,"CODE",{});var Se=a(Y);_e=i(Se,"input_ids"),Se.forEach(t),he=i(U," only and nothing else: "),J=n(U,"CODE",{});var Ue=a(J);Ee=i(Ue,"model(input_ids)"),Ue.forEach(t),U.forEach(t),ke=p(D),P=n(D,"LI",{});var H=a(P);$e=i(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=n(H,"CODE",{});var Ye=a(X);se=i(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),me=i(H," or "),Z=n(H,"CODE",{});var Be=a(Z);Fe=i(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),ue=p(D),S=n(D,"LI",{});var Pe=a(S);xe=i(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=n(Pe,"CODE",{});var He=a(I);Me=i(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),Pe.forEach(t),D.forEach(t),ee=p(y),L=n(y,"P",{});var B=a(L);ze=i(B,`Note that when creating models and layers with
`),O=n(B,"A",{href:!0,rel:!0});var Re=a(O);qe=i(Re,"subclassing"),Re.forEach(t),je=i(B,` 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!`),B.forEach(t),this.h()},h(){m(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(O,"rel","nofollow")},m(y,q){g(y,d,q),e(d,v),e(d,u),e(u,f),e(d,_),g(y,l,q),g(y,h,q),e(h,z),e(z,ve),e(h,fe),e(h,W),e(W,de),g(y,te,q),g(y,M,q),e(M,ye),e(M,K),e(K,ce),e(M,Ne),e(M,G),e(G,ae),e(M,re),e(M,Q),e(Q,ie),e(M,Te),e(M,V),e(V,be),e(M,ge),e(M,R),e(R,we),e(M,le),g(y,ne,q),g(y,C,q),e(C,A),e(A,pe),e(A,Y),e(Y,_e),e(A,he),e(A,J),e(J,Ee),e(C,ke),e(C,P),e(P,$e),e(P,X),e(X,se),e(P,me),e(P,Z),e(Z,Fe),e(C,ue),e(C,S),e(S,xe),e(S,I),e(I,Me),g(y,ee,q),g(y,L,q),e(L,ze),e(L,O),e(O,qe),e(L,je)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(te),y&&t(M),y&&t(ne),y&&t(C),y&&t(ee),y&&t(L)}}}function $C(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function FC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Examples:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Examples:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function xC(x){let d,v,u,f,_,l,h,z,ve,fe,W,de,te,M,ye,K,ce,Ne,G,ae,re,Q,ie,Te,V,be,ge,R,we,le,ne,C,A,pe,Y,_e,he,J,Ee,ke,P,$e,X,se,me,Z,Fe,ue,S,xe,I,Me,ee,L,ze,O,qe,je;return{c(){d=o("p"),v=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),l=c(),h=o("ul"),z=o("li"),ve=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),W=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),M=o("p"),ye=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=o("code"),ce=r("model.fit()"),Ne=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=o("code"),ie=r("fit()"),Te=r(" and "),V=o("code"),be=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),R=o("code"),we=r("Functional"),le=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),C=o("ul"),A=o("li"),pe=r("a single Tensor with "),Y=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),J=o("code"),Ee=r("model(input_ids)"),ke=c(),P=o("li"),$e=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),Z=o("code"),Fe=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),S=o("li"),xe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=o("code"),Me=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),L=o("p"),ze=r(`Note that when creating models and layers with
`),O=o("a"),qe=r("subclassing"),je=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=n(y,"P",{});var q=a(d);v=i(q,"TensorFlow models and layers in "),u=n(q,"CODE",{});var Ke=a(u);f=i(Ke,"transformers"),Ke.forEach(t),_=i(q," accept two formats as input:"),q.forEach(t),l=p(y),h=n(y,"UL",{});var oe=a(h);z=n(oe,"LI",{});var Ce=a(z);ve=i(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),fe=p(oe),W=n(oe,"LI",{});var Qe=a(W);de=i(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(t),oe.forEach(t),te=p(y),M=n(y,"P",{});var j=a(M);ye=i(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=n(j,"CODE",{});var Ve=a(K);ce=i(Ve,"model.fit()"),Ve.forEach(t),Ne=i(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=n(j,"CODE",{});var Je=a(G);ae=i(Je,"model.fit()"),Je.forEach(t),re=i(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=n(j,"CODE",{});var We=a(Q);ie=i(We,"fit()"),We.forEach(t),Te=i(j," and "),V=n(j,"CODE",{});var Ge=a(V);be=i(Ge,"predict()"),Ge.forEach(t),ge=i(j,`, such as when creating your own layers or models with
the Keras `),R=n(j,"CODE",{});var Xe=a(R);we=i(Xe,"Functional"),Xe.forEach(t),le=i(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),ne=p(y),C=n(y,"UL",{});var D=a(C);A=n(D,"LI",{});var U=a(A);pe=i(U,"a single Tensor with "),Y=n(U,"CODE",{});var Se=a(Y);_e=i(Se,"input_ids"),Se.forEach(t),he=i(U," only and nothing else: "),J=n(U,"CODE",{});var Ue=a(J);Ee=i(Ue,"model(input_ids)"),Ue.forEach(t),U.forEach(t),ke=p(D),P=n(D,"LI",{});var H=a(P);$e=i(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=n(H,"CODE",{});var Ye=a(X);se=i(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),me=i(H," or "),Z=n(H,"CODE",{});var Be=a(Z);Fe=i(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),ue=p(D),S=n(D,"LI",{});var Pe=a(S);xe=i(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=n(Pe,"CODE",{});var He=a(I);Me=i(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),Pe.forEach(t),D.forEach(t),ee=p(y),L=n(y,"P",{});var B=a(L);ze=i(B,`Note that when creating models and layers with
`),O=n(B,"A",{href:!0,rel:!0});var Re=a(O);qe=i(Re,"subclassing"),Re.forEach(t),je=i(B,` 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!`),B.forEach(t),this.h()},h(){m(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(O,"rel","nofollow")},m(y,q){g(y,d,q),e(d,v),e(d,u),e(u,f),e(d,_),g(y,l,q),g(y,h,q),e(h,z),e(z,ve),e(h,fe),e(h,W),e(W,de),g(y,te,q),g(y,M,q),e(M,ye),e(M,K),e(K,ce),e(M,Ne),e(M,G),e(G,ae),e(M,re),e(M,Q),e(Q,ie),e(M,Te),e(M,V),e(V,be),e(M,ge),e(M,R),e(R,we),e(M,le),g(y,ne,q),g(y,C,q),e(C,A),e(A,pe),e(A,Y),e(Y,_e),e(A,he),e(A,J),e(J,Ee),e(C,ke),e(C,P),e(P,$e),e(P,X),e(X,se),e(P,me),e(P,Z),e(Z,Fe),e(C,ue),e(C,S),e(S,xe),e(S,I),e(I,Me),g(y,ee,q),g(y,L,q),e(L,ze),e(L,O),e(O,qe),e(L,je)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(te),y&&t(M),y&&t(ne),y&&t(C),y&&t(ee),y&&t(L)}}}function MC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function zC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function qC(x){let d,v;return d=new Oe({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(u){b(d.$$.fragment,u)},m(u,f){w(d,u,f),v=!0},p:Le,i(u){v||(E(d.$$.fragment,u),v=!0)},o(u){$(d.$$.fragment,u),v=!1},d(u){F(d,u)}}}function jC(x){let d,v,u,f,_,l,h,z,ve,fe,W,de,te,M,ye,K,ce,Ne,G,ae,re,Q,ie,Te,V,be,ge,R,we,le,ne,C,A,pe,Y,_e,he,J,Ee,ke,P,$e,X,se,me,Z,Fe,ue,S,xe,I,Me,ee,L,ze,O,qe,je;return{c(){d=o("p"),v=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),l=c(),h=o("ul"),z=o("li"),ve=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),W=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),M=o("p"),ye=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=o("code"),ce=r("model.fit()"),Ne=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=o("code"),ie=r("fit()"),Te=r(" and "),V=o("code"),be=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),R=o("code"),we=r("Functional"),le=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),C=o("ul"),A=o("li"),pe=r("a single Tensor with "),Y=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),J=o("code"),Ee=r("model(input_ids)"),ke=c(),P=o("li"),$e=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),Z=o("code"),Fe=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),S=o("li"),xe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=o("code"),Me=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),L=o("p"),ze=r(`Note that when creating models and layers with
`),O=o("a"),qe=r("subclassing"),je=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=n(y,"P",{});var q=a(d);v=i(q,"TensorFlow models and layers in "),u=n(q,"CODE",{});var Ke=a(u);f=i(Ke,"transformers"),Ke.forEach(t),_=i(q," accept two formats as input:"),q.forEach(t),l=p(y),h=n(y,"UL",{});var oe=a(h);z=n(oe,"LI",{});var Ce=a(z);ve=i(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),fe=p(oe),W=n(oe,"LI",{});var Qe=a(W);de=i(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(t),oe.forEach(t),te=p(y),M=n(y,"P",{});var j=a(M);ye=i(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=n(j,"CODE",{});var Ve=a(K);ce=i(Ve,"model.fit()"),Ve.forEach(t),Ne=i(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=n(j,"CODE",{});var Je=a(G);ae=i(Je,"model.fit()"),Je.forEach(t),re=i(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=n(j,"CODE",{});var We=a(Q);ie=i(We,"fit()"),We.forEach(t),Te=i(j," and "),V=n(j,"CODE",{});var Ge=a(V);be=i(Ge,"predict()"),Ge.forEach(t),ge=i(j,`, such as when creating your own layers or models with
the Keras `),R=n(j,"CODE",{});var Xe=a(R);we=i(Xe,"Functional"),Xe.forEach(t),le=i(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),ne=p(y),C=n(y,"UL",{});var D=a(C);A=n(D,"LI",{});var U=a(A);pe=i(U,"a single Tensor with "),Y=n(U,"CODE",{});var Se=a(Y);_e=i(Se,"input_ids"),Se.forEach(t),he=i(U," only and nothing else: "),J=n(U,"CODE",{});var Ue=a(J);Ee=i(Ue,"model(input_ids)"),Ue.forEach(t),U.forEach(t),ke=p(D),P=n(D,"LI",{});var H=a(P);$e=i(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=n(H,"CODE",{});var Ye=a(X);se=i(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),me=i(H," or "),Z=n(H,"CODE",{});var Be=a(Z);Fe=i(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),ue=p(D),S=n(D,"LI",{});var Pe=a(S);xe=i(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=n(Pe,"CODE",{});var He=a(I);Me=i(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),Pe.forEach(t),D.forEach(t),ee=p(y),L=n(y,"P",{});var B=a(L);ze=i(B,`Note that when creating models and layers with
`),O=n(B,"A",{href:!0,rel:!0});var Re=a(O);qe=i(Re,"subclassing"),Re.forEach(t),je=i(B,` 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!`),B.forEach(t),this.h()},h(){m(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(O,"rel","nofollow")},m(y,q){g(y,d,q),e(d,v),e(d,u),e(u,f),e(d,_),g(y,l,q),g(y,h,q),e(h,z),e(z,ve),e(h,fe),e(h,W),e(W,de),g(y,te,q),g(y,M,q),e(M,ye),e(M,K),e(K,ce),e(M,Ne),e(M,G),e(G,ae),e(M,re),e(M,Q),e(Q,ie),e(M,Te),e(M,V),e(V,be),e(M,ge),e(M,R),e(R,we),e(M,le),g(y,ne,q),g(y,C,q),e(C,A),e(A,pe),e(A,Y),e(Y,_e),e(A,he),e(A,J),e(J,Ee),e(C,ke),e(C,P),e(P,$e),e(P,X),e(X,se),e(P,me),e(P,Z),e(Z,Fe),e(C,ue),e(C,S),e(S,xe),e(S,I),e(I,Me),g(y,ee,q),g(y,L,q),e(L,ze),e(L,O),e(O,qe),e(L,je)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(te),y&&t(M),y&&t(ne),y&&t(C),y&&t(ee),y&&t(L)}}}function CC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function PC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function AC(x){let d,v;return d=new Oe({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(u){b(d.$$.fragment,u)},m(u,f){w(d,u,f),v=!0},p:Le,i(u){v||(E(d.$$.fragment,u),v=!0)},o(u){$(d.$$.fragment,u),v=!1},d(u){F(d,u)}}}function LC(x){let d,v,u,f,_,l,h,z,ve,fe,W,de,te,M,ye,K,ce,Ne,G,ae,re,Q,ie,Te,V,be,ge,R,we,le,ne,C,A,pe,Y,_e,he,J,Ee,ke,P,$e,X,se,me,Z,Fe,ue,S,xe,I,Me,ee,L,ze,O,qe,je;return{c(){d=o("p"),v=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),l=c(),h=o("ul"),z=o("li"),ve=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),W=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),M=o("p"),ye=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=o("code"),ce=r("model.fit()"),Ne=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=o("code"),ie=r("fit()"),Te=r(" and "),V=o("code"),be=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),R=o("code"),we=r("Functional"),le=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),C=o("ul"),A=o("li"),pe=r("a single Tensor with "),Y=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),J=o("code"),Ee=r("model(input_ids)"),ke=c(),P=o("li"),$e=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),Z=o("code"),Fe=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),S=o("li"),xe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=o("code"),Me=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),L=o("p"),ze=r(`Note that when creating models and layers with
`),O=o("a"),qe=r("subclassing"),je=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=n(y,"P",{});var q=a(d);v=i(q,"TensorFlow models and layers in "),u=n(q,"CODE",{});var Ke=a(u);f=i(Ke,"transformers"),Ke.forEach(t),_=i(q," accept two formats as input:"),q.forEach(t),l=p(y),h=n(y,"UL",{});var oe=a(h);z=n(oe,"LI",{});var Ce=a(z);ve=i(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),fe=p(oe),W=n(oe,"LI",{});var Qe=a(W);de=i(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(t),oe.forEach(t),te=p(y),M=n(y,"P",{});var j=a(M);ye=i(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=n(j,"CODE",{});var Ve=a(K);ce=i(Ve,"model.fit()"),Ve.forEach(t),Ne=i(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=n(j,"CODE",{});var Je=a(G);ae=i(Je,"model.fit()"),Je.forEach(t),re=i(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=n(j,"CODE",{});var We=a(Q);ie=i(We,"fit()"),We.forEach(t),Te=i(j," and "),V=n(j,"CODE",{});var Ge=a(V);be=i(Ge,"predict()"),Ge.forEach(t),ge=i(j,`, such as when creating your own layers or models with
the Keras `),R=n(j,"CODE",{});var Xe=a(R);we=i(Xe,"Functional"),Xe.forEach(t),le=i(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),ne=p(y),C=n(y,"UL",{});var D=a(C);A=n(D,"LI",{});var U=a(A);pe=i(U,"a single Tensor with "),Y=n(U,"CODE",{});var Se=a(Y);_e=i(Se,"input_ids"),Se.forEach(t),he=i(U," only and nothing else: "),J=n(U,"CODE",{});var Ue=a(J);Ee=i(Ue,"model(input_ids)"),Ue.forEach(t),U.forEach(t),ke=p(D),P=n(D,"LI",{});var H=a(P);$e=i(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=n(H,"CODE",{});var Ye=a(X);se=i(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),me=i(H," or "),Z=n(H,"CODE",{});var Be=a(Z);Fe=i(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),ue=p(D),S=n(D,"LI",{});var Pe=a(S);xe=i(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=n(Pe,"CODE",{});var He=a(I);Me=i(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),Pe.forEach(t),D.forEach(t),ee=p(y),L=n(y,"P",{});var B=a(L);ze=i(B,`Note that when creating models and layers with
`),O=n(B,"A",{href:!0,rel:!0});var Re=a(O);qe=i(Re,"subclassing"),Re.forEach(t),je=i(B,` 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!`),B.forEach(t),this.h()},h(){m(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(O,"rel","nofollow")},m(y,q){g(y,d,q),e(d,v),e(d,u),e(u,f),e(d,_),g(y,l,q),g(y,h,q),e(h,z),e(z,ve),e(h,fe),e(h,W),e(W,de),g(y,te,q),g(y,M,q),e(M,ye),e(M,K),e(K,ce),e(M,Ne),e(M,G),e(G,ae),e(M,re),e(M,Q),e(Q,ie),e(M,Te),e(M,V),e(V,be),e(M,ge),e(M,R),e(R,we),e(M,le),g(y,ne,q),g(y,C,q),e(C,A),e(A,pe),e(A,Y),e(Y,_e),e(A,he),e(A,J),e(J,Ee),e(C,ke),e(C,P),e(P,$e),e(P,X),e(X,se),e(P,me),e(P,Z),e(Z,Fe),e(C,ue),e(C,S),e(S,xe),e(S,I),e(I,Me),g(y,ee,q),g(y,L,q),e(L,ze),e(L,O),e(O,qe),e(L,je)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(te),y&&t(M),y&&t(ne),y&&t(C),y&&t(ee),y&&t(L)}}}function OC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function NC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function IC(x){let d,v,u,f,_,l,h,z,ve,fe,W,de,te,M,ye,K,ce,Ne,G,ae,re,Q,ie,Te,V,be,ge,R,we,le,ne,C,A,pe,Y,_e,he,J,Ee,ke,P,$e,X,se,me,Z,Fe,ue,S,xe,I,Me,ee,L,ze,O,qe,je;return{c(){d=o("p"),v=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),l=c(),h=o("ul"),z=o("li"),ve=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),W=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),M=o("p"),ye=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=o("code"),ce=r("model.fit()"),Ne=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=o("code"),ie=r("fit()"),Te=r(" and "),V=o("code"),be=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),R=o("code"),we=r("Functional"),le=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),C=o("ul"),A=o("li"),pe=r("a single Tensor with "),Y=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),J=o("code"),Ee=r("model(input_ids)"),ke=c(),P=o("li"),$e=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),Z=o("code"),Fe=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),S=o("li"),xe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=o("code"),Me=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),L=o("p"),ze=r(`Note that when creating models and layers with
`),O=o("a"),qe=r("subclassing"),je=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=n(y,"P",{});var q=a(d);v=i(q,"TensorFlow models and layers in "),u=n(q,"CODE",{});var Ke=a(u);f=i(Ke,"transformers"),Ke.forEach(t),_=i(q," accept two formats as input:"),q.forEach(t),l=p(y),h=n(y,"UL",{});var oe=a(h);z=n(oe,"LI",{});var Ce=a(z);ve=i(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),fe=p(oe),W=n(oe,"LI",{});var Qe=a(W);de=i(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(t),oe.forEach(t),te=p(y),M=n(y,"P",{});var j=a(M);ye=i(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=n(j,"CODE",{});var Ve=a(K);ce=i(Ve,"model.fit()"),Ve.forEach(t),Ne=i(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=n(j,"CODE",{});var Je=a(G);ae=i(Je,"model.fit()"),Je.forEach(t),re=i(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=n(j,"CODE",{});var We=a(Q);ie=i(We,"fit()"),We.forEach(t),Te=i(j," and "),V=n(j,"CODE",{});var Ge=a(V);be=i(Ge,"predict()"),Ge.forEach(t),ge=i(j,`, such as when creating your own layers or models with
the Keras `),R=n(j,"CODE",{});var Xe=a(R);we=i(Xe,"Functional"),Xe.forEach(t),le=i(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),ne=p(y),C=n(y,"UL",{});var D=a(C);A=n(D,"LI",{});var U=a(A);pe=i(U,"a single Tensor with "),Y=n(U,"CODE",{});var Se=a(Y);_e=i(Se,"input_ids"),Se.forEach(t),he=i(U," only and nothing else: "),J=n(U,"CODE",{});var Ue=a(J);Ee=i(Ue,"model(input_ids)"),Ue.forEach(t),U.forEach(t),ke=p(D),P=n(D,"LI",{});var H=a(P);$e=i(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=n(H,"CODE",{});var Ye=a(X);se=i(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),me=i(H," or "),Z=n(H,"CODE",{});var Be=a(Z);Fe=i(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),ue=p(D),S=n(D,"LI",{});var Pe=a(S);xe=i(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=n(Pe,"CODE",{});var He=a(I);Me=i(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),Pe.forEach(t),D.forEach(t),ee=p(y),L=n(y,"P",{});var B=a(L);ze=i(B,`Note that when creating models and layers with
`),O=n(B,"A",{href:!0,rel:!0});var Re=a(O);qe=i(Re,"subclassing"),Re.forEach(t),je=i(B,` 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!`),B.forEach(t),this.h()},h(){m(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(O,"rel","nofollow")},m(y,q){g(y,d,q),e(d,v),e(d,u),e(u,f),e(d,_),g(y,l,q),g(y,h,q),e(h,z),e(z,ve),e(h,fe),e(h,W),e(W,de),g(y,te,q),g(y,M,q),e(M,ye),e(M,K),e(K,ce),e(M,Ne),e(M,G),e(G,ae),e(M,re),e(M,Q),e(Q,ie),e(M,Te),e(M,V),e(V,be),e(M,ge),e(M,R),e(R,we),e(M,le),g(y,ne,q),g(y,C,q),e(C,A),e(A,pe),e(A,Y),e(Y,_e),e(A,he),e(A,J),e(J,Ee),e(C,ke),e(C,P),e(P,$e),e(P,X),e(X,se),e(P,me),e(P,Z),e(Z,Fe),e(C,ue),e(C,S),e(S,xe),e(S,I),e(I,Me),g(y,ee,q),g(y,L,q),e(L,ze),e(L,O),e(O,qe),e(L,je)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(te),y&&t(M),y&&t(ne),y&&t(C),y&&t(ee),y&&t(L)}}}function DC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function SC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function WC(x){let d,v;return d=new Oe({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(u){b(d.$$.fragment,u)},m(u,f){w(d,u,f),v=!0},p:Le,i(u){v||(E(d.$$.fragment,u),v=!0)},o(u){$(d.$$.fragment,u),v=!1},d(u){F(d,u)}}}function UC(x){let d,v,u,f,_,l,h,z,ve,fe,W,de,te,M,ye,K,ce,Ne,G,ae,re,Q,ie,Te,V,be,ge,R,we,le,ne,C,A,pe,Y,_e,he,J,Ee,ke,P,$e,X,se,me,Z,Fe,ue,S,xe,I,Me,ee,L,ze,O,qe,je;return{c(){d=o("p"),v=r("TensorFlow models and layers in "),u=o("code"),f=r("transformers"),_=r(" accept two formats as input:"),l=c(),h=o("ul"),z=o("li"),ve=r("having all inputs as keyword arguments (like PyTorch models), or"),fe=c(),W=o("li"),de=r("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),M=o("p"),ye=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=o("code"),ce=r("model.fit()"),Ne=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=o("code"),ae=r("model.fit()"),re=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=o("code"),ie=r("fit()"),Te=r(" and "),V=o("code"),be=r("predict()"),ge=r(`, such as when creating your own layers or models with
the Keras `),R=o("code"),we=r("Functional"),le=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),C=o("ul"),A=o("li"),pe=r("a single Tensor with "),Y=o("code"),_e=r("input_ids"),he=r(" only and nothing else: "),J=o("code"),Ee=r("model(input_ids)"),ke=c(),P=o("li"),$e=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=o("code"),se=r("model([input_ids, attention_mask])"),me=r(" or "),Z=o("code"),Fe=r("model([input_ids, attention_mask, token_type_ids])"),ue=c(),S=o("li"),xe=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=o("code"),Me=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),L=o("p"),ze=r(`Note that when creating models and layers with
`),O=o("a"),qe=r("subclassing"),je=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=n(y,"P",{});var q=a(d);v=i(q,"TensorFlow models and layers in "),u=n(q,"CODE",{});var Ke=a(u);f=i(Ke,"transformers"),Ke.forEach(t),_=i(q," accept two formats as input:"),q.forEach(t),l=p(y),h=n(y,"UL",{});var oe=a(h);z=n(oe,"LI",{});var Ce=a(z);ve=i(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),fe=p(oe),W=n(oe,"LI",{});var Qe=a(W);de=i(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(t),oe.forEach(t),te=p(y),M=n(y,"P",{});var j=a(M);ye=i(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=n(j,"CODE",{});var Ve=a(K);ce=i(Ve,"model.fit()"),Ve.forEach(t),Ne=i(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=n(j,"CODE",{});var Je=a(G);ae=i(Je,"model.fit()"),Je.forEach(t),re=i(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=n(j,"CODE",{});var We=a(Q);ie=i(We,"fit()"),We.forEach(t),Te=i(j," and "),V=n(j,"CODE",{});var Ge=a(V);be=i(Ge,"predict()"),Ge.forEach(t),ge=i(j,`, such as when creating your own layers or models with
the Keras `),R=n(j,"CODE",{});var Xe=a(R);we=i(Xe,"Functional"),Xe.forEach(t),le=i(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),ne=p(y),C=n(y,"UL",{});var D=a(C);A=n(D,"LI",{});var U=a(A);pe=i(U,"a single Tensor with "),Y=n(U,"CODE",{});var Se=a(Y);_e=i(Se,"input_ids"),Se.forEach(t),he=i(U," only and nothing else: "),J=n(U,"CODE",{});var Ue=a(J);Ee=i(Ue,"model(input_ids)"),Ue.forEach(t),U.forEach(t),ke=p(D),P=n(D,"LI",{});var H=a(P);$e=i(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=n(H,"CODE",{});var Ye=a(X);se=i(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),me=i(H," or "),Z=n(H,"CODE",{});var Be=a(Z);Fe=i(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),ue=p(D),S=n(D,"LI",{});var Pe=a(S);xe=i(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=n(Pe,"CODE",{});var He=a(I);Me=i(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),Pe.forEach(t),D.forEach(t),ee=p(y),L=n(y,"P",{});var B=a(L);ze=i(B,`Note that when creating models and layers with
`),O=n(B,"A",{href:!0,rel:!0});var Re=a(O);qe=i(Re,"subclassing"),Re.forEach(t),je=i(B,` 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!`),B.forEach(t),this.h()},h(){m(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(O,"rel","nofollow")},m(y,q){g(y,d,q),e(d,v),e(d,u),e(u,f),e(d,_),g(y,l,q),g(y,h,q),e(h,z),e(z,ve),e(h,fe),e(h,W),e(W,de),g(y,te,q),g(y,M,q),e(M,ye),e(M,K),e(K,ce),e(M,Ne),e(M,G),e(G,ae),e(M,re),e(M,Q),e(Q,ie),e(M,Te),e(M,V),e(V,be),e(M,ge),e(M,R),e(R,we),e(M,le),g(y,ne,q),g(y,C,q),e(C,A),e(A,pe),e(A,Y),e(Y,_e),e(A,he),e(A,J),e(J,Ee),e(C,ke),e(C,P),e(P,$e),e(P,X),e(X,se),e(P,me),e(P,Z),e(Z,Fe),e(C,ue),e(C,S),e(S,xe),e(S,I),e(I,Me),g(y,ee,q),g(y,L,q),e(L,ze),e(L,O),e(O,qe),e(L,je)},d(y){y&&t(d),y&&t(l),y&&t(h),y&&t(te),y&&t(M),y&&t(ne),y&&t(C),y&&t(ee),y&&t(L)}}}function BC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function RC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function HC(x){let d,v;return d=new Oe({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(u){b(d.$$.fragment,u)},m(u,f){w(d,u,f),v=!0},p:Le,i(u){v||(E(d.$$.fragment,u),v=!0)},o(u){$(d.$$.fragment,u),v=!1},d(u){F(d,u)}}}function KC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function QC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function VC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function JC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function GC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function XC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function YC(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function ZC(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function eP(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function tP(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function oP(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function nP(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function sP(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function aP(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function rP(x){let d,v,u,f,_;return{c(){d=o("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n(h,"CODE",{});var z=a(u);f=i(z,"Module"),z.forEach(t),_=i(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,v),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function iP(x){let d,v,u,f,_;return f=new Oe({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=o("p"),v=r("Example:"),u=c(),T(f.$$.fragment)},l(l){d=n(l,"P",{});var h=a(d);v=i(h,"Example:"),h.forEach(t),u=p(l),b(f.$$.fragment,l)},m(l,h){g(l,d,h),e(d,v),g(l,u,h),w(f,l,h),_=!0},p:Le,i(l){_||(E(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function lP(x){let d,v,u,f,_,l,h,z,ve,fe,W,de,te,M,ye,K,ce,Ne,G,ae,re,Q,ie,Te,V,be,ge,R,we,le,ne,C,A,pe,Y,_e,he,J,Ee,ke,P,$e,X,se,me,Z,Fe,ue,S,xe,I,Me,ee,L,ze,O,qe,je,y,q,Ke,oe,Ce,Qe,j,Ve,Je,We,Ge,Xe,D,U,Se,Ue,H,Ye,Be,Pe,He,B,Re,Qd,fk,gk,$p,Vd,_k,kk,Fp,Jd,vk,yk,xp,Gd,Tk,bk,Mp,Xd,wk,Ek,zp,Yd,$k,Of,Uo,Gn,qp,rr,Fk,jp,xk,Nf,Ut,ir,Mk,_o,zk,Zd,qk,jk,ec,Ck,Pk,lr,Ak,Lk,Ok,Bo,Nk,tc,Ik,Dk,oc,Sk,Wk,Uk,Xn,If,Ro,Yn,Cp,dr,Bk,Pp,Rk,Df,tt,cr,Hk,Ap,Kk,Qk,pr,Vk,nc,Jk,Gk,Xk,zo,hr,Yk,Lp,Zk,ev,mr,sc,tv,Op,ov,nv,ac,sv,Np,av,rv,Zn,ur,iv,Ip,lv,dv,Bt,fr,cv,Dp,pv,hv,es,mv,Ho,uv,Sp,fv,gv,Wp,_v,kv,vv,ts,gr,yv,_r,Tv,Up,bv,wv,Sf,Ko,os,Bp,kr,Ev,Rp,$v,Wf,Tt,vr,Fv,yr,xv,Hp,Mv,zv,qv,Tr,jv,rc,Cv,Pv,Av,qo,br,Lv,Kp,Ov,Nv,wr,ic,Iv,Qp,Dv,Sv,lc,Wv,Vp,Uv,Bv,Rt,Er,Rv,Jp,Hv,Kv,ns,Qv,Qo,Vv,Gp,Jv,Gv,Xp,Xv,Yv,Uf,Vo,ss,Yp,$r,Zv,Zp,ey,Bf,Jo,Fr,ty,xr,oy,dc,ny,sy,Rf,Go,Mr,ay,zr,ry,cc,iy,ly,Hf,Xo,as,eh,qr,dy,th,cy,Kf,bt,jr,py,oh,hy,my,Cr,uy,pc,fy,gy,_y,Pr,ky,Ar,vy,yy,Ty,Ht,Lr,by,Yo,wy,hc,Ey,$y,nh,Fy,xy,My,rs,zy,is,Qf,Zo,ls,sh,Or,qy,ah,jy,Vf,pt,Nr,Cy,rh,Py,Ay,ih,Ly,Oy,Ir,Ny,mc,Iy,Dy,Sy,Dr,Wy,Sr,Uy,By,Ry,Kt,Wr,Hy,en,Ky,uc,Qy,Vy,lh,Jy,Gy,Xy,ds,Yy,cs,Jf,tn,ps,dh,Ur,Zy,ch,eT,Gf,wt,Br,tT,Rr,oT,ph,nT,sT,aT,Hr,rT,fc,iT,lT,dT,Kr,cT,Qr,pT,hT,mT,Qt,Vr,uT,on,fT,gc,gT,_T,hh,kT,vT,yT,hs,TT,ms,Xf,nn,us,mh,Jr,bT,uh,wT,Yf,ht,Gr,ET,fh,$T,FT,gh,xT,MT,Xr,zT,_c,qT,jT,CT,Yr,PT,Zr,AT,LT,OT,Vt,ei,NT,sn,IT,kc,DT,ST,_h,WT,UT,BT,fs,RT,gs,Zf,an,_s,kh,ti,HT,vh,KT,eg,Et,oi,QT,yh,VT,JT,ni,GT,vc,XT,YT,ZT,si,eb,ai,tb,ob,nb,Mt,ri,sb,rn,ab,yc,rb,ib,Th,lb,db,cb,ks,pb,vs,hb,ys,tg,ln,Ts,bh,ii,mb,wh,ub,og,$t,li,fb,Eh,gb,_b,di,kb,Tc,vb,yb,Tb,ci,bb,pi,wb,Eb,$b,Jt,hi,Fb,dn,xb,bc,Mb,zb,$h,qb,jb,Cb,bs,Pb,ws,ng,cn,Es,Fh,mi,Ab,xh,Lb,sg,mt,ui,Ob,Mh,Nb,Ib,zh,Db,Sb,fi,Wb,wc,Ub,Bb,Rb,gi,Hb,_i,Kb,Qb,Vb,Gt,ki,Jb,pn,Gb,Ec,Xb,Yb,qh,Zb,e1,t1,$s,o1,Fs,ag,hn,xs,jh,vi,n1,Ch,s1,rg,Ft,yi,a1,mn,r1,Ph,i1,l1,Ah,d1,c1,p1,Ti,h1,$c,m1,u1,f1,bi,g1,wi,_1,k1,v1,Xt,Ei,y1,un,T1,Fc,b1,w1,Lh,E1,$1,F1,Ms,x1,zs,ig,fn,qs,Oh,$i,M1,Nh,z1,lg,ut,Fi,q1,Ih,j1,C1,xi,P1,xc,A1,L1,O1,Mi,N1,zi,I1,D1,S1,js,W1,Yt,qi,U1,gn,B1,Mc,R1,H1,Dh,K1,Q1,V1,Cs,J1,Ps,dg,_n,As,Sh,ji,G1,Wh,X1,cg,ot,Ci,Y1,Uh,Z1,ew,Bh,tw,ow,Pi,nw,zc,sw,aw,rw,Ai,iw,Li,lw,dw,cw,Ls,pw,Zt,Oi,hw,kn,mw,qc,uw,fw,Rh,gw,_w,kw,Os,vw,Ns,pg,vn,Is,Hh,Ni,yw,Kh,Tw,hg,nt,Ii,bw,Qh,ww,Ew,Vh,$w,Fw,Di,xw,jc,Mw,zw,qw,Si,jw,Wi,Cw,Pw,Aw,Ds,Lw,zt,Ui,Ow,yn,Nw,Cc,Iw,Dw,Jh,Sw,Ww,Uw,Ss,Bw,Ws,Rw,Us,mg,Tn,Bs,Gh,Bi,Hw,Xh,Kw,ug,ft,Ri,Qw,Yh,Vw,Jw,Hi,Gw,Pc,Xw,Yw,Zw,Ki,eE,Qi,tE,oE,nE,Rs,sE,qt,Vi,aE,bn,rE,Ac,iE,lE,Zh,dE,cE,pE,Hs,hE,Ks,mE,Qs,fg,wn,Vs,em,Ji,uE,tm,fE,gg,gt,Gi,gE,om,_E,kE,Xi,vE,Lc,yE,TE,bE,Yi,wE,Zi,EE,$E,FE,Js,xE,eo,el,ME,En,zE,Oc,qE,jE,nm,CE,PE,AE,Gs,LE,Xs,_g,$n,Ys,sm,tl,OE,am,NE,kg,st,ol,IE,rm,DE,SE,im,WE,UE,nl,BE,Nc,RE,HE,KE,sl,QE,al,VE,JE,GE,Zs,XE,jt,rl,YE,Fn,ZE,Ic,e2,t2,lm,o2,n2,s2,ea,a2,ta,r2,oa,vg,xn,na,dm,il,i2,cm,l2,yg,_t,ll,d2,Mn,c2,pm,p2,h2,hm,m2,u2,f2,dl,g2,Dc,_2,k2,v2,cl,y2,pl,T2,b2,w2,sa,E2,Ct,hl,$2,zn,F2,Sc,x2,M2,mm,z2,q2,j2,aa,C2,ra,P2,ia,Tg,qn,la,um,ml,A2,fm,L2,bg,at,ul,O2,gm,N2,I2,fl,D2,Wc,S2,W2,U2,gl,B2,_l,R2,H2,K2,_m,Q2,V2,ko,km,kl,J2,G2,vm,vl,X2,Y2,ym,yl,Z2,e$,Tm,Tl,t$,o$,to,bl,n$,jn,s$,bm,a$,r$,wm,i$,l$,d$,da,c$,ca,wg,Cn,pa,Em,wl,p$,$m,h$,Eg,Ze,El,m$,Fm,u$,f$,xm,g$,_$,$l,k$,Uc,v$,y$,T$,Fl,b$,xl,w$,E$,$$,Mm,F$,x$,vo,zm,Ml,M$,z$,qm,zl,q$,j$,jm,ql,C$,P$,Cm,jl,A$,L$,oo,Cl,O$,Pn,N$,Pm,I$,D$,Am,S$,W$,U$,ha,B$,ma,$g,An,ua,Lm,Pl,R$,Om,H$,Fg,rt,Al,K$,Nm,Q$,V$,Ll,J$,Bc,G$,X$,Y$,Ol,Z$,Nl,eF,tF,oF,Im,nF,sF,yo,Dm,Il,aF,rF,Sm,Dl,iF,lF,Wm,Sl,dF,cF,Um,Wl,pF,hF,no,Ul,mF,Ln,uF,Bm,fF,gF,Rm,_F,kF,vF,fa,yF,ga,xg,On,_a,Hm,Bl,TF,Km,bF,Mg,it,Rl,wF,Hl,EF,Qm,$F,FF,xF,Kl,MF,Rc,zF,qF,jF,Ql,CF,Vl,PF,AF,LF,Vm,OF,NF,To,Jm,Jl,IF,DF,Gm,Gl,SF,WF,Xm,Xl,UF,BF,Ym,Yl,RF,HF,so,Zl,KF,Nn,QF,Zm,VF,JF,eu,GF,XF,YF,ka,ZF,va,zg,In,ya,tu,ed,e0,ou,t0,qg,lt,td,o0,nu,n0,s0,od,a0,Hc,r0,i0,l0,nd,d0,sd,c0,p0,h0,su,m0,u0,bo,au,ad,f0,g0,ru,rd,_0,k0,iu,id,v0,y0,lu,ld,T0,b0,ao,dd,w0,Dn,E0,du,$0,F0,cu,x0,M0,z0,Ta,q0,ba,jg,Sn,wa,pu,cd,j0,hu,C0,Cg,dt,pd,P0,mu,A0,L0,hd,O0,Kc,N0,I0,D0,md,S0,ud,W0,U0,B0,uu,R0,H0,wo,fu,fd,K0,Q0,gu,gd,V0,J0,_u,_d,G0,X0,ku,kd,Y0,Z0,ro,vd,e4,Wn,t4,vu,o4,n4,yu,s4,a4,r4,Ea,i4,$a,Pg,Un,Fa,Tu,yd,l4,bu,d4,Ag,et,Td,c4,wu,p4,h4,Eu,m4,u4,bd,f4,Qc,g4,_4,k4,wd,v4,Ed,y4,T4,b4,$u,w4,E4,Eo,Fu,$d,$4,F4,xu,Fd,x4,M4,Mu,xd,z4,q4,zu,Md,j4,C4,io,zd,P4,Bn,A4,qu,L4,O4,ju,N4,I4,D4,xa,S4,Ma,Lg,Rn,za,Cu,qd,W4,Pu,U4,Og,ct,jd,B4,Hn,R4,Au,H4,K4,Lu,Q4,V4,J4,Cd,G4,Vc,X4,Y4,Z4,Pd,ex,Ad,tx,ox,nx,Ou,sx,ax,$o,Nu,Ld,rx,ix,Iu,Od,lx,dx,Du,Nd,cx,px,Su,Id,hx,mx,lo,Dd,ux,Kn,fx,Wu,gx,_x,Uu,kx,vx,yx,qa,Tx,ja,Ng;return l=new De({}),ie=new De({}),H=new De({}),rr=new De({}),ir=new N({props:{name:"class transformers.ElectraConfig",anchor:"transformers.ElectraConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"embedding_size",val:" = 128"},{name:"hidden_size",val:" = 256"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 4"},{name:"intermediate_size",val:" = 1024"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"summary_type",val:" = 'first'"},{name:"summary_use_proj",val:" = True"},{name:"summary_activation",val:" = 'gelu'"},{name:"summary_last_dropout",val:" = 0.1"},{name:"pad_token_id",val:" = 0"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ElectraConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the ELECTRA model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraModel">ElectraModel</a> or <a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraModel">TFElectraModel</a>.`,name:"vocab_size"},{anchor:"transformers.ElectraConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"embedding_size"},{anchor:"transformers.ElectraConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.ElectraConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.ElectraConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.ElectraConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.ElectraConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.ElectraConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.ElectraConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.ElectraConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.ElectraConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraModel">ElectraModel</a> or <a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraModel">TFElectraModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.ElectraConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.ElectraConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ElectraConfig.summary_type",description:`<strong>summary_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;first&quot;</code>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Has to be one of the following options:</p>
<ul>
<li><code>&quot;last&quot;</code>: Take the last token hidden state (like XLNet).</li>
<li><code>&quot;first&quot;</code>: Take the first token hidden state (like BERT).</li>
<li><code>&quot;mean&quot;</code>: Take the mean of all tokens hidden states.</li>
<li><code>&quot;cls_index&quot;</code>: Supply a Tensor of classification token position (like GPT/GPT-2).</li>
<li><code>&quot;attn&quot;</code>: Not implemented now, use multi-head attention.</li>
</ul>`,name:"summary_type"},{anchor:"transformers.ElectraConfig.summary_use_proj",description:`<strong>summary_use_proj</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Whether or not to add a projection after the vector extraction.`,name:"summary_use_proj"},{anchor:"transformers.ElectraConfig.summary_activation",description:`<strong>summary_activation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Pass <code>&quot;gelu&quot;</code> for a gelu activation to the output, any other value will result in no activation.`,name:"summary_activation"},{anchor:"transformers.ElectraConfig.summary_last_dropout",description:`<strong>summary_last_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>The dropout ratio to be used after the projection and activation.`,name:"summary_last_dropout"},{anchor:"transformers.ElectraConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.ElectraConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.ElectraConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/configuration_electra.py#L44"}}),Xn=new Ae({props:{anchor:"transformers.ElectraConfig.example",$$slots:{default:[tC]},$$scope:{ctx:x}}}),dr=new De({}),cr=new N({props:{name:"class transformers.ElectraTokenizer",anchor:"transformers.ElectraTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ElectraTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.ElectraTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.ElectraTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.ElectraTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.ElectraTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.ElectraTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.ElectraTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.ElectraTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.ElectraTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.ElectraTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.ElectraTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original Electra).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/tokenization_electra.py#L93"}}),hr=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.ElectraTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.ElectraTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.ElectraTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/tokenization_electra.py#L223",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ur=new N({props:{name:"convert_tokens_to_string",anchor:"transformers.ElectraTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/tokenization_electra.py#L218"}}),fr=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.ElectraTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.ElectraTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.ElectraTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/tokenization_electra.py#L276",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),es=new Ae({props:{anchor:"transformers.ElectraTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[oC]},$$scope:{ctx:x}}}),gr=new N({props:{name:"get_special_tokens_mask",anchor:"transformers.ElectraTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.ElectraTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.ElectraTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.ElectraTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/tokenization_electra.py#L248",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),kr=new De({}),vr=new N({props:{name:"class transformers.ElectraTokenizerFast",anchor:"transformers.ElectraTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ElectraTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.ElectraTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.ElectraTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.ElectraTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.ElectraTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.ElectraTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.ElectraTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.ElectraTokenizerFast.clean_text",description:`<strong>clean_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the text before tokenization by removing any control characters and replacing all
whitespaces by the classic one.`,name:"clean_text"},{anchor:"transformers.ElectraTokenizerFast.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see <a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">this
issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.ElectraTokenizerFast.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original ELECTRA).`,name:"strip_accents"},{anchor:"transformers.ElectraTokenizerFast.wordpieces_prefix",description:`<strong>wordpieces_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;##&quot;</code>) &#x2014;
The prefix for subwords.`,name:"wordpieces_prefix"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/tokenization_electra_fast.py#L88"}}),br=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.ElectraTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.ElectraTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.ElectraTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/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>
`}}),Er=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.ElectraTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.ElectraTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.ElectraTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/tokenization_electra_fast.py#L200",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ns=new Ae({props:{anchor:"transformers.ElectraTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[nC]},$$scope:{ctx:x}}}),$r=new De({}),Fr=new N({props:{name:"class transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput",anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss of the ELECTRA objective.`,name:"loss"},{anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput.logits",description:`<strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Prediction scores of the head (scores for each token before SoftMax).`,name:"logits"},{anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L701"}}),Mr=new N({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/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L813"}}),qr=new De({}),jr=new N({props:{name:"class transformers.ElectraModel",anchor:"transformers.ElectraModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L813"}}),Lr=new N({props:{name:"forward",anchor:"transformers.ElectraModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ElectraModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L840",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),rs=new Ie({props:{$$slots:{default:[sC]},$$scope:{ctx:x}}}),is=new Ae({props:{anchor:"transformers.ElectraModel.forward.example",$$slots:{default:[aC]},$$scope:{ctx:x}}}),Or=new De({}),Nr=new N({props:{name:"class transformers.ElectraForPreTraining",anchor:"transformers.ElectraForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1062"}}),Wr=new N({props:{name:"forward",anchor:"transformers.ElectraForPreTraining.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ElectraForPreTraining.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForPreTraining.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the ELECTRA loss. Input should be a sequence of tokens (see <code>input_ids</code> docstring)
Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates the token is an original token,</li>
<li>1 indicates the token was replaced.</li>
</ul>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1071",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"
>transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss of the ELECTRA objective.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Prediction scores of the head (scores for each token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"
>transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ds=new Ie({props:{$$slots:{default:[rC]},$$scope:{ctx:x}}}),cs=new Ae({props:{anchor:"transformers.ElectraForPreTraining.forward.example",$$slots:{default:[iC]},$$scope:{ctx:x}}}),Ur=new De({}),Br=new N({props:{name:"class transformers.ElectraForCausalLM",anchor:"transformers.ElectraForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1535"}}),Vr=new N({props:{name:"forward",anchor:"transformers.ElectraForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ElectraForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ElectraForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ElectraForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.ElectraForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.ElectraForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1556",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),hs=new Ie({props:{$$slots:{default:[lC]},$$scope:{ctx:x}}}),ms=new Ae({props:{anchor:"transformers.ElectraForCausalLM.forward.example",$$slots:{default:[dC]},$$scope:{ctx:x}}}),Jr=new De({}),Gr=new N({props:{name:"class transformers.ElectraForMaskedLM",anchor:"transformers.ElectraForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1168"}}),ei=new N({props:{name:"forward",anchor:"transformers.ElectraForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ElectraForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1187",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fs=new Ie({props:{$$slots:{default:[cC]},$$scope:{ctx:x}}}),gs=new Ae({props:{anchor:"transformers.ElectraForMaskedLM.forward.example",$$slots:{default:[pC]},$$scope:{ctx:x}}}),ti=new De({}),oi=new N({props:{name:"class transformers.ElectraForSequenceClassification",anchor:"transformers.ElectraForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L964"}}),ri=new N({props:{name:"forward",anchor:"transformers.ElectraForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ElectraForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L975",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ks=new Ie({props:{$$slots:{default:[hC]},$$scope:{ctx:x}}}),vs=new Ae({props:{anchor:"transformers.ElectraForSequenceClassification.forward.example",$$slots:{default:[mC]},$$scope:{ctx:x}}}),ys=new Ae({props:{anchor:"transformers.ElectraForSequenceClassification.forward.example-2",$$slots:{default:[uC]},$$scope:{ctx:x}}}),ii=new De({}),li=new N({props:{name:"class transformers.ElectraForMultipleChoice",anchor:"transformers.ElectraForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1448"}}),hi=new N({props:{name:"forward",anchor:"transformers.ElectraForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ElectraForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1459",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bs=new Ie({props:{$$slots:{default:[fC]},$$scope:{ctx:x}}}),ws=new Ae({props:{anchor:"transformers.ElectraForMultipleChoice.forward.example",$$slots:{default:[gC]},$$scope:{ctx:x}}}),mi=new De({}),ui=new N({props:{name:"class transformers.ElectraForTokenClassification",anchor:"transformers.ElectraForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1259"}}),ki=new N({props:{name:"forward",anchor:"transformers.ElectraForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ElectraForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1273",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$s=new Ie({props:{$$slots:{default:[_C]},$$scope:{ctx:x}}}),Fs=new Ae({props:{anchor:"transformers.ElectraForTokenClassification.forward.example",$$slots:{default:[kC]},$$scope:{ctx:x}}}),vi=new De({}),yi=new N({props:{name:"class transformers.ElectraForQuestionAnswering",anchor:"transformers.ElectraForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ElectraForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1340"}}),Ei=new N({props:{name:"forward",anchor:"transformers.ElectraForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ElectraForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ElectraForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.ElectraForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_electra.py#L1354",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ms=new Ie({props:{$$slots:{default:[vC]},$$scope:{ctx:x}}}),zs=new Ae({props:{anchor:"transformers.ElectraForQuestionAnswering.forward.example",$$slots:{default:[yC]},$$scope:{ctx:x}}}),$i=new De({}),Fi=new N({props:{name:"class transformers.TFElectraModel",anchor:"transformers.TFElectraModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L938"}}),js=new Ie({props:{$$slots:{default:[TC]},$$scope:{ctx:x}}}),qi=new N({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFElectraModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFElectraModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFElectraModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFElectraModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFElectraModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L944",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Cs=new Ie({props:{$$slots:{default:[bC]},$$scope:{ctx:x}}}),Ps=new Ae({props:{anchor:"transformers.TFElectraModel.call.example",$$slots:{default:[wC]},$$scope:{ctx:x}}}),ji=new De({}),Ci=new N({props:{name:"class transformers.TFElectraForPreTraining",anchor:"transformers.TFElectraForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1034"}}),Ls=new Ie({props:{$$slots:{default:[EC]},$$scope:{ctx:x}}}),Oi=new N({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForPreTraining.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFElectraForPreTraining.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFElectraForPreTraining.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForPreTraining.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForPreTraining.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForPreTraining.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForPreTraining.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForPreTraining.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1041",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput"
>transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>tf.Tensor</code> of shape <code>(1,)</code>) \u2014 Total loss of the ELECTRA objective.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Prediction scores of the head (scores for each token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/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>
`}}),Os=new Ie({props:{$$slots:{default:[$C]},$$scope:{ctx:x}}}),Ns=new Ae({props:{anchor:"transformers.TFElectraForPreTraining.call.example",$$slots:{default:[FC]},$$scope:{ctx:x}}}),Ni=new De({}),Ii=new N({props:{name:"class transformers.TFElectraForMaskedLM",anchor:"transformers.TFElectraForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1149"}}),Ds=new Ie({props:{$$slots:{default:[xC]},$$scope:{ctx:x}}}),Ui=new N({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFElectraForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFElectraForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1171",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ss=new Ie({props:{$$slots:{default:[MC]},$$scope:{ctx:x}}}),Ws=new Ae({props:{anchor:"transformers.TFElectraForMaskedLM.call.example",$$slots:{default:[zC]},$$scope:{ctx:x}}}),Us=new Ae({props:{anchor:"transformers.TFElectraForMaskedLM.call.example-2",$$slots:{default:[qC]},$$scope:{ctx:x}}}),Bi=new De({}),Ri=new N({props:{name:"class transformers.TFElectraForSequenceClassification",anchor:"transformers.TFElectraForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1275"}}),Rs=new Ie({props:{$$slots:{default:[jC]},$$scope:{ctx:x}}}),Vi=new N({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFElectraForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFElectraForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1282",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Hs=new Ie({props:{$$slots:{default:[CC]},$$scope:{ctx:x}}}),Ks=new Ae({props:{anchor:"transformers.TFElectraForSequenceClassification.call.example",$$slots:{default:[PC]},$$scope:{ctx:x}}}),Qs=new Ae({props:{anchor:"transformers.TFElectraForSequenceClassification.call.example-2",$$slots:{default:[AC]},$$scope:{ctx:x}}}),Ji=new De({}),Gi=new N({props:{name:"class transformers.TFElectraForMultipleChoice",anchor:"transformers.TFElectraForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1353"}}),Js=new Ie({props:{$$slots:{default:[LC]},$$scope:{ctx:x}}}),el=new N({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFElectraForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFElectraForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1375",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Gs=new Ie({props:{$$slots:{default:[OC]},$$scope:{ctx:x}}}),Xs=new Ae({props:{anchor:"transformers.TFElectraForMultipleChoice.call.example",$$slots:{default:[NC]},$$scope:{ctx:x}}}),tl=new De({}),ol=new N({props:{name:"class transformers.TFElectraForTokenClassification",anchor:"transformers.TFElectraForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1478"}}),Zs=new Ie({props:{$$slots:{default:[IC]},$$scope:{ctx:x}}}),rl=new N({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFElectraForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFElectraForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1491",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ea=new Ie({props:{$$slots:{default:[DC]},$$scope:{ctx:x}}}),ta=new Ae({props:{anchor:"transformers.TFElectraForTokenClassification.call.example",$$slots:{default:[SC]},$$scope:{ctx:x}}}),oa=new Ae({props:{anchor:"transformers.TFElectraForTokenClassification.call.example-2",$$slots:{default:[WC]},$$scope:{ctx:x}}}),il=new De({}),ll=new N({props:{name:"class transformers.TFElectraForQuestionAnswering",anchor:"transformers.TFElectraForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFElectraForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1562"}}),sa=new Ie({props:{$$slots:{default:[UC]},$$scope:{ctx:x}}}),hl=new N({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFElectraForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFElectraForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFElectraForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFElectraForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFElectraForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFElectraForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFElectraForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFElectraForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFElectraForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFElectraForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_tf_electra.py#L1572",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),aa=new Ie({props:{$$slots:{default:[BC]},$$scope:{ctx:x}}}),ra=new Ae({props:{anchor:"transformers.TFElectraForQuestionAnswering.call.example",$$slots:{default:[RC]},$$scope:{ctx:x}}}),ia=new Ae({props:{anchor:"transformers.TFElectraForQuestionAnswering.call.example-2",$$slots:{default:[HC]},$$scope:{ctx:x}}}),ml=new De({}),ul=new N({props:{name:"class transformers.FlaxElectraModel",anchor:"transformers.FlaxElectraModel",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L920"}}),bl=new N({props:{name:"__call__",anchor:"transformers.FlaxElectraModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),da=new Ie({props:{$$slots:{default:[KC]},$$scope:{ctx:x}}}),ca=new Ae({props:{anchor:"transformers.FlaxElectraModel.__call__.example",$$slots:{default:[QC]},$$scope:{ctx:x}}}),wl=new De({}),El=new N({props:{name:"class transformers.FlaxElectraForPreTraining",anchor:"transformers.FlaxElectraForPreTraining",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L1071"}}),Cl=new N({props:{name:"__call__",anchor:"transformers.FlaxElectraForPreTraining.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForPreTraining.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <code>transformers.models.electra.modeling_flax_electra.FlaxElectraForPreTrainingOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.electra.modeling_flax_electra.FlaxElectraForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ha=new Ie({props:{$$slots:{default:[VC]},$$scope:{ctx:x}}}),ma=new Ae({props:{anchor:"transformers.FlaxElectraForPreTraining.__call__.example",$$slots:{default:[JC]},$$scope:{ctx:x}}}),Pl=new De({}),Al=new N({props:{name:"class transformers.FlaxElectraForCausalLM",anchor:"transformers.FlaxElectraForCausalLM",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L1565"}}),Ul=new N({props:{name:"__call__",anchor:"transformers.FlaxElectraForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForCausalLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fa=new Ie({props:{$$slots:{default:[GC]},$$scope:{ctx:x}}}),ga=new Ae({props:{anchor:"transformers.FlaxElectraForCausalLM.__call__.example",$$slots:{default:[XC]},$$scope:{ctx:x}}}),Bl=new De({}),Rl=new N({props:{name:"class transformers.FlaxElectraForMaskedLM",anchor:"transformers.FlaxElectraForMaskedLM",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L1007"}}),Zl=new N({props:{name:"__call__",anchor:"transformers.FlaxElectraForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ka=new Ie({props:{$$slots:{default:[YC]},$$scope:{ctx:x}}}),va=new Ae({props:{anchor:"transformers.FlaxElectraForMaskedLM.__call__.example",$$slots:{default:[ZC]},$$scope:{ctx:x}}}),ed=new De({}),td=new N({props:{name:"class transformers.FlaxElectraForSequenceClassification",anchor:"transformers.FlaxElectraForSequenceClassification",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L1481"}}),dd=new N({props:{name:"__call__",anchor:"transformers.FlaxElectraForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new Ie({props:{$$slots:{default:[eP]},$$scope:{ctx:x}}}),ba=new Ae({props:{anchor:"transformers.FlaxElectraForSequenceClassification.__call__.example",$$slots:{default:[tP]},$$scope:{ctx:x}}}),cd=new De({}),pd=new N({props:{name:"class transformers.FlaxElectraForMultipleChoice",anchor:"transformers.FlaxElectraForMultipleChoice",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L1313"}}),vd=new N({props:{name:"__call__",anchor:"transformers.FlaxElectraForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ea=new Ie({props:{$$slots:{default:[oP]},$$scope:{ctx:x}}}),$a=new Ae({props:{anchor:"transformers.FlaxElectraForMultipleChoice.__call__.example",$$slots:{default:[nP]},$$scope:{ctx:x}}}),yd=new De({}),Td=new N({props:{name:"class transformers.FlaxElectraForTokenClassification",anchor:"transformers.FlaxElectraForTokenClassification",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L1166"}}),zd=new N({props:{name:"__call__",anchor:"transformers.FlaxElectraForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xa=new Ie({props:{$$slots:{default:[sP]},$$scope:{ctx:x}}}),Ma=new Ae({props:{anchor:"transformers.FlaxElectraForTokenClassification.__call__.example",$$slots:{default:[aP]},$$scope:{ctx:x}}}),qd=new De({}),jd=new N({props:{name:"class transformers.FlaxElectraForQuestionAnswering",anchor:"transformers.FlaxElectraForQuestionAnswering",parameters:[{name:"config",val:": ElectraConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxElectraForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig">ElectraConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L1388"}}),Dd=new N({props:{name:"__call__",anchor:"transformers.FlaxElectraForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxElectraForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/electra/modeling_flax_electra.py#L770",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraConfig"
>ElectraConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qa=new Ie({props:{$$slots:{default:[rP]},$$scope:{ctx:x}}}),ja=new Ae({props:{anchor:"transformers.FlaxElectraForQuestionAnswering.__call__.example",$$slots:{default:[iP]},$$scope:{ctx:x}}}),{c(){d=o("meta"),v=c(),u=o("h1"),f=o("a"),_=o("span"),T(l.$$.fragment),h=c(),z=o("span"),ve=r("ELECTRA"),fe=c(),W=o("div"),de=o("a"),te=o("img"),ye=c(),K=o("a"),ce=o("img"),G=c(),ae=o("h2"),re=o("a"),Q=o("span"),T(ie.$$.fragment),Te=c(),V=o("span"),be=r("Overview"),ge=c(),R=o("p"),we=r("The ELECTRA model was proposed in the paper "),le=o("a"),ne=r(`ELECTRA: Pre-training Text Encoders as Discriminators Rather Than
Generators`),C=r(`. ELECTRA is a new pretraining approach which trains two
transformer models: the generator and the discriminator. The generator\u2019s role is to replace tokens in a sequence, and
is therefore trained as a masked language model. The discriminator, which is the model we\u2019re interested in, tries to
identify which tokens were replaced by the generator in the sequence.`),A=c(),pe=o("p"),Y=r("The abstract from the paper is the following:"),_e=c(),he=o("p"),J=o("em"),Ee=r(`Masked language modeling (MLM) pretraining methods such as BERT corrupt the input by replacing some tokens with [MASK]
and then train a model to reconstruct the original tokens. While they produce good results when transferred to
downstream NLP tasks, they generally require large amounts of compute to be effective. As an alternative, we propose a
more sample-efficient pretraining task called replaced token detection. Instead of masking the input, our approach
corrupts it by replacing some tokens with plausible alternatives sampled from a small generator network. Then, instead
of training a model that predicts the original identities of the corrupted tokens, we train a discriminative model that
predicts whether each token in the corrupted input was replaced by a generator sample or not. Thorough experiments
demonstrate this new pretraining task is more efficient than MLM because the task is defined over all input tokens
rather than just the small subset that was masked out. As a result, the contextual representations learned by our
approach substantially outperform the ones learned by BERT given the same model size, data, and compute. The gains are
particularly strong for small models; for example, we train a model on one GPU for 4 days that outperforms GPT (trained
using 30x more compute) on the GLUE natural language understanding benchmark. Our approach also works well at scale,
where it performs comparably to RoBERTa and XLNet while using less than 1/4 of their compute and outperforms them when
using the same amount of compute.`),ke=c(),P=o("p"),$e=r("Tips:"),X=c(),se=o("ul"),me=o("li"),Z=r(`ELECTRA is the pretraining approach, therefore there is nearly no changes done to the underlying model: BERT. The
only change is the separation of the embedding size and the hidden size: the embedding size is generally smaller,
while the hidden size is larger. An additional projection layer (linear) is used to project the embeddings from their
embedding size to the hidden size. In the case where the embedding size is the same as the hidden size, no projection
layer is used.`),Fe=c(),ue=o("li"),S=r("ELECTRA is a transformer model pretrained with the use of another (small) masked language model. The inputs are corrupted by that language model, which takes an input text that is randomly masked and outputs a text in which ELECTRA has to predict which token is an original and which one has been replaced. Like for GAN training, the small language model is trained for a few steps (but with the original texts as objective, not to fool the ELECTRA model like in a traditional GAN setting) then the ELECTRA model is trained for a few steps."),xe=c(),I=o("li"),Me=r("The ELECTRA checkpoints saved using "),ee=o("a"),L=r("Google Research\u2019s implementation"),ze=r(`
contain both the generator and discriminator. The conversion script requires the user to name which model to export
into the correct architecture. Once converted to the HuggingFace format, these checkpoints may be loaded into all
available ELECTRA models, however. This means that the discriminator may be loaded in the
`),O=o("a"),qe=r("ElectraForMaskedLM"),je=r(` model, and the generator may be loaded in the
`),y=o("a"),q=r("ElectraForPreTraining"),Ke=r(` model (the classification head will be randomly initialized as it
doesn\u2019t exist in the generator).`),oe=c(),Ce=o("p"),Qe=r("This model was contributed by "),j=o("a"),Ve=r("lysandre"),Je=r(". The original code can be found "),We=o("a"),Ge=r("here"),Xe=r("."),D=c(),U=o("h2"),Se=o("a"),Ue=o("span"),T(H.$$.fragment),Ye=c(),Be=o("span"),Pe=r("Documentation resources"),He=c(),B=o("ul"),Re=o("li"),Qd=o("a"),fk=r("Text classification task guide"),gk=c(),$p=o("li"),Vd=o("a"),_k=r("Token classification task guide"),kk=c(),Fp=o("li"),Jd=o("a"),vk=r("Question answering task guide"),yk=c(),xp=o("li"),Gd=o("a"),Tk=r("Causal language modeling task guide"),bk=c(),Mp=o("li"),Xd=o("a"),wk=r("Masked language modeling task guide"),Ek=c(),zp=o("li"),Yd=o("a"),$k=r("Multiple choice task guide"),Of=c(),Uo=o("h2"),Gn=o("a"),qp=o("span"),T(rr.$$.fragment),Fk=c(),jp=o("span"),xk=r("ElectraConfig"),Nf=c(),Ut=o("div"),T(ir.$$.fragment),Mk=c(),_o=o("p"),zk=r("This is the configuration class to store the configuration of a "),Zd=o("a"),qk=r("ElectraModel"),jk=r(" or a "),ec=o("a"),Ck=r("TFElectraModel"),Pk=r(`. It is
used to instantiate a ELECTRA model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the ELECTRA
`),lr=o("a"),Ak=r("google/electra-small-discriminator"),Lk=r(" architecture."),Ok=c(),Bo=o("p"),Nk=r("Configuration objects inherit from "),tc=o("a"),Ik=r("PretrainedConfig"),Dk=r(` and can be used to control the model outputs. Read the
documentation from `),oc=o("a"),Sk=r("PretrainedConfig"),Wk=r(" for more information."),Uk=c(),T(Xn.$$.fragment),If=c(),Ro=o("h2"),Yn=o("a"),Cp=o("span"),T(dr.$$.fragment),Bk=c(),Pp=o("span"),Rk=r("ElectraTokenizer"),Df=c(),tt=o("div"),T(cr.$$.fragment),Hk=c(),Ap=o("p"),Kk=r("Construct a Electra tokenizer. Based on WordPiece."),Qk=c(),pr=o("p"),Vk=r("This tokenizer inherits from "),nc=o("a"),Jk=r("PreTrainedTokenizer"),Gk=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Xk=c(),zo=o("div"),T(hr.$$.fragment),Yk=c(),Lp=o("p"),Zk=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Electra sequence has the following format:`),ev=c(),mr=o("ul"),sc=o("li"),tv=r("single sequence: "),Op=o("code"),ov=r("[CLS] X [SEP]"),nv=c(),ac=o("li"),sv=r("pair of sequences: "),Np=o("code"),av=r("[CLS] A [SEP] B [SEP]"),rv=c(),Zn=o("div"),T(ur.$$.fragment),iv=c(),Ip=o("p"),lv=r("Converts a sequence of tokens (string) in a single string."),dv=c(),Bt=o("div"),T(fr.$$.fragment),cv=c(),Dp=o("p"),pv=r("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Electra"),hv=c(),T(es.$$.fragment),mv=c(),Ho=o("p"),uv=r("If "),Sp=o("code"),fv=r("token_ids_1"),gv=r(" is "),Wp=o("code"),_v=r("None"),kv=r(", this method only returns the first portion of the mask (0s)."),vv=c(),ts=o("div"),T(gr.$$.fragment),yv=c(),_r=o("p"),Tv=r(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Up=o("code"),bv=r("prepare_for_model"),wv=r(" method."),Sf=c(),Ko=o("h2"),os=o("a"),Bp=o("span"),T(kr.$$.fragment),Ev=c(),Rp=o("span"),$v=r("ElectraTokenizerFast"),Wf=c(),Tt=o("div"),T(vr.$$.fragment),Fv=c(),yr=o("p"),xv=r("Construct a \u201Cfast\u201D ELECTRA tokenizer (backed by HuggingFace\u2019s "),Hp=o("em"),Mv=r("tokenizers"),zv=r(" library). Based on WordPiece."),qv=c(),Tr=o("p"),jv=r("This tokenizer inherits from "),rc=o("a"),Cv=r("PreTrainedTokenizerFast"),Pv=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Av=c(),qo=o("div"),T(br.$$.fragment),Lv=c(),Kp=o("p"),Ov=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A ELECTRA sequence has the following format:`),Nv=c(),wr=o("ul"),ic=o("li"),Iv=r("single sequence: "),Qp=o("code"),Dv=r("[CLS] X [SEP]"),Sv=c(),lc=o("li"),Wv=r("pair of sequences: "),Vp=o("code"),Uv=r("[CLS] A [SEP] B [SEP]"),Bv=c(),Rt=o("div"),T(Er.$$.fragment),Rv=c(),Jp=o("p"),Hv=r("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ELECTRA"),Kv=c(),T(ns.$$.fragment),Qv=c(),Qo=o("p"),Vv=r("If "),Gp=o("code"),Jv=r("token_ids_1"),Gv=r(" is "),Xp=o("code"),Xv=r("None"),Yv=r(", this method only returns the first portion of the mask (0s)."),Uf=c(),Vo=o("h2"),ss=o("a"),Yp=o("span"),T($r.$$.fragment),Zv=c(),Zp=o("span"),ey=r("Electra specific outputs"),Bf=c(),Jo=o("div"),T(Fr.$$.fragment),ty=c(),xr=o("p"),oy=r("Output type of "),dc=o("a"),ny=r("ElectraForPreTraining"),sy=r("."),Rf=c(),Go=o("div"),T(Mr.$$.fragment),ay=c(),zr=o("p"),ry=r("Output type of "),cc=o("a"),iy=r("TFElectraForPreTraining"),ly=r("."),Hf=c(),Xo=o("h2"),as=o("a"),eh=o("span"),T(qr.$$.fragment),dy=c(),th=o("span"),cy=r("ElectraModel"),Kf=c(),bt=o("div"),T(jr.$$.fragment),py=c(),oh=o("p"),hy=r("The bare Electra Model transformer outputting raw hidden-states without any specific head on top. Identical to the BERT model except that it uses an additional linear layer between the embedding layer and the encoder if the hidden size and embedding size are different. Both the generator and discriminator checkpoints may be loaded into this model."),my=c(),Cr=o("p"),uy=r("This model inherits from "),pc=o("a"),fy=r("PreTrainedModel"),gy=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.)`),_y=c(),Pr=o("p"),ky=r("This model is also a PyTorch "),Ar=o("a"),vy=r("torch.nn.Module"),yy=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ty=c(),Ht=o("div"),T(Lr.$$.fragment),by=c(),Yo=o("p"),wy=r("The "),hc=o("a"),Ey=r("ElectraModel"),$y=r(" forward method, overrides the "),nh=o("code"),Fy=r("__call__"),xy=r(" special method."),My=c(),T(rs.$$.fragment),zy=c(),T(is.$$.fragment),Qf=c(),Zo=o("h2"),ls=o("a"),sh=o("span"),T(Or.$$.fragment),qy=c(),ah=o("span"),jy=r("ElectraForPreTraining"),Vf=c(),pt=o("div"),T(Nr.$$.fragment),Cy=c(),rh=o("p"),Py=r("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),Ay=c(),ih=o("p"),Ly=r("It is recommended to load the discriminator checkpoint into that model."),Oy=c(),Ir=o("p"),Ny=r("This model inherits from "),mc=o("a"),Iy=r("PreTrainedModel"),Dy=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.)`),Sy=c(),Dr=o("p"),Wy=r("This model is also a PyTorch "),Sr=o("a"),Uy=r("torch.nn.Module"),By=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ry=c(),Kt=o("div"),T(Wr.$$.fragment),Hy=c(),en=o("p"),Ky=r("The "),uc=o("a"),Qy=r("ElectraForPreTraining"),Vy=r(" forward method, overrides the "),lh=o("code"),Jy=r("__call__"),Gy=r(" special method."),Xy=c(),T(ds.$$.fragment),Yy=c(),T(cs.$$.fragment),Jf=c(),tn=o("h2"),ps=o("a"),dh=o("span"),T(Ur.$$.fragment),Zy=c(),ch=o("span"),eT=r("ElectraForCausalLM"),Gf=c(),wt=o("div"),T(Br.$$.fragment),tT=c(),Rr=o("p"),oT=r("ELECTRA Model with a "),ph=o("code"),nT=r("language modeling"),sT=r(" head on top for CLM fine-tuning."),aT=c(),Hr=o("p"),rT=r("This model inherits from "),fc=o("a"),iT=r("PreTrainedModel"),lT=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),dT=c(),Kr=o("p"),cT=r("This model is also a PyTorch "),Qr=o("a"),pT=r("torch.nn.Module"),hT=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),mT=c(),Qt=o("div"),T(Vr.$$.fragment),uT=c(),on=o("p"),fT=r("The "),gc=o("a"),gT=r("ElectraForCausalLM"),_T=r(" forward method, overrides the "),hh=o("code"),kT=r("__call__"),vT=r(" special method."),yT=c(),T(hs.$$.fragment),TT=c(),T(ms.$$.fragment),Xf=c(),nn=o("h2"),us=o("a"),mh=o("span"),T(Jr.$$.fragment),bT=c(),uh=o("span"),wT=r("ElectraForMaskedLM"),Yf=c(),ht=o("div"),T(Gr.$$.fragment),ET=c(),fh=o("p"),$T=r("Electra model with a language modeling head on top."),FT=c(),gh=o("p"),xT=r(`Even though both the discriminator and generator may be loaded into this model, the generator is the only model of
the two to have been trained for the masked language modeling task.`),MT=c(),Xr=o("p"),zT=r("This model inherits from "),_c=o("a"),qT=r("PreTrainedModel"),jT=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.)`),CT=c(),Yr=o("p"),PT=r("This model is also a PyTorch "),Zr=o("a"),AT=r("torch.nn.Module"),LT=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),OT=c(),Vt=o("div"),T(ei.$$.fragment),NT=c(),sn=o("p"),IT=r("The "),kc=o("a"),DT=r("ElectraForMaskedLM"),ST=r(" forward method, overrides the "),_h=o("code"),WT=r("__call__"),UT=r(" special method."),BT=c(),T(fs.$$.fragment),RT=c(),T(gs.$$.fragment),Zf=c(),an=o("h2"),_s=o("a"),kh=o("span"),T(ti.$$.fragment),HT=c(),vh=o("span"),KT=r("ElectraForSequenceClassification"),eg=c(),Et=o("div"),T(oi.$$.fragment),QT=c(),yh=o("p"),VT=r(`ELECTRA Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),JT=c(),ni=o("p"),GT=r("This model inherits from "),vc=o("a"),XT=r("PreTrainedModel"),YT=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.)`),ZT=c(),si=o("p"),eb=r("This model is also a PyTorch "),ai=o("a"),tb=r("torch.nn.Module"),ob=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nb=c(),Mt=o("div"),T(ri.$$.fragment),sb=c(),rn=o("p"),ab=r("The "),yc=o("a"),rb=r("ElectraForSequenceClassification"),ib=r(" forward method, overrides the "),Th=o("code"),lb=r("__call__"),db=r(" special method."),cb=c(),T(ks.$$.fragment),pb=c(),T(vs.$$.fragment),hb=c(),T(ys.$$.fragment),tg=c(),ln=o("h2"),Ts=o("a"),bh=o("span"),T(ii.$$.fragment),mb=c(),wh=o("span"),ub=r("ElectraForMultipleChoice"),og=c(),$t=o("div"),T(li.$$.fragment),fb=c(),Eh=o("p"),gb=r(`ELECTRA Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),_b=c(),di=o("p"),kb=r("This model inherits from "),Tc=o("a"),vb=r("PreTrainedModel"),yb=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.)`),Tb=c(),ci=o("p"),bb=r("This model is also a PyTorch "),pi=o("a"),wb=r("torch.nn.Module"),Eb=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$b=c(),Jt=o("div"),T(hi.$$.fragment),Fb=c(),dn=o("p"),xb=r("The "),bc=o("a"),Mb=r("ElectraForMultipleChoice"),zb=r(" forward method, overrides the "),$h=o("code"),qb=r("__call__"),jb=r(" special method."),Cb=c(),T(bs.$$.fragment),Pb=c(),T(ws.$$.fragment),ng=c(),cn=o("h2"),Es=o("a"),Fh=o("span"),T(mi.$$.fragment),Ab=c(),xh=o("span"),Lb=r("ElectraForTokenClassification"),sg=c(),mt=o("div"),T(ui.$$.fragment),Ob=c(),Mh=o("p"),Nb=r("Electra model with a token classification head on top."),Ib=c(),zh=o("p"),Db=r("Both the discriminator and generator may be loaded into this model."),Sb=c(),fi=o("p"),Wb=r("This model inherits from "),wc=o("a"),Ub=r("PreTrainedModel"),Bb=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.)`),Rb=c(),gi=o("p"),Hb=r("This model is also a PyTorch "),_i=o("a"),Kb=r("torch.nn.Module"),Qb=r(` 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(),Gt=o("div"),T(ki.$$.fragment),Jb=c(),pn=o("p"),Gb=r("The "),Ec=o("a"),Xb=r("ElectraForTokenClassification"),Yb=r(" forward method, overrides the "),qh=o("code"),Zb=r("__call__"),e1=r(" special method."),t1=c(),T($s.$$.fragment),o1=c(),T(Fs.$$.fragment),ag=c(),hn=o("h2"),xs=o("a"),jh=o("span"),T(vi.$$.fragment),n1=c(),Ch=o("span"),s1=r("ElectraForQuestionAnswering"),rg=c(),Ft=o("div"),T(yi.$$.fragment),a1=c(),mn=o("p"),r1=r(`ELECTRA Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Ph=o("code"),i1=r("span start logits"),l1=r(" and "),Ah=o("code"),d1=r("span end logits"),c1=r(")."),p1=c(),Ti=o("p"),h1=r("This model inherits from "),$c=o("a"),m1=r("PreTrainedModel"),u1=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.)`),f1=c(),bi=o("p"),g1=r("This model is also a PyTorch "),wi=o("a"),_1=r("torch.nn.Module"),k1=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),v1=c(),Xt=o("div"),T(Ei.$$.fragment),y1=c(),un=o("p"),T1=r("The "),Fc=o("a"),b1=r("ElectraForQuestionAnswering"),w1=r(" forward method, overrides the "),Lh=o("code"),E1=r("__call__"),$1=r(" special method."),F1=c(),T(Ms.$$.fragment),x1=c(),T(zs.$$.fragment),ig=c(),fn=o("h2"),qs=o("a"),Oh=o("span"),T($i.$$.fragment),M1=c(),Nh=o("span"),z1=r("TFElectraModel"),lg=c(),ut=o("div"),T(Fi.$$.fragment),q1=c(),Ih=o("p"),j1=r("The bare Electra Model transformer outputting raw hidden-states without any specific head on top. Identical to the BERT model except that it uses an additional linear layer between the embedding layer and the encoder if the hidden size and embedding size are different. Both the generator and discriminator checkpoints may be loaded into this model."),C1=c(),xi=o("p"),P1=r("This model inherits from "),xc=o("a"),A1=r("TFPreTrainedModel"),L1=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.)`),O1=c(),Mi=o("p"),N1=r("This model is also a "),zi=o("a"),I1=r("tf.keras.Model"),D1=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),S1=c(),T(js.$$.fragment),W1=c(),Yt=o("div"),T(qi.$$.fragment),U1=c(),gn=o("p"),B1=r("The "),Mc=o("a"),R1=r("TFElectraModel"),H1=r(" forward method, overrides the "),Dh=o("code"),K1=r("__call__"),Q1=r(" special method."),V1=c(),T(Cs.$$.fragment),J1=c(),T(Ps.$$.fragment),dg=c(),_n=o("h2"),As=o("a"),Sh=o("span"),T(ji.$$.fragment),G1=c(),Wh=o("span"),X1=r("TFElectraForPreTraining"),cg=c(),ot=o("div"),T(Ci.$$.fragment),Y1=c(),Uh=o("p"),Z1=r("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),ew=c(),Bh=o("p"),tw=r(`Even though both the discriminator and generator may be loaded into this model, the discriminator is the only model
of the two to have the correct classification head to be used for this model.`),ow=c(),Pi=o("p"),nw=r("This model inherits from "),zc=o("a"),sw=r("TFPreTrainedModel"),aw=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.)`),rw=c(),Ai=o("p"),iw=r("This model is also a "),Li=o("a"),lw=r("tf.keras.Model"),dw=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),cw=c(),T(Ls.$$.fragment),pw=c(),Zt=o("div"),T(Oi.$$.fragment),hw=c(),kn=o("p"),mw=r("The "),qc=o("a"),uw=r("TFElectraForPreTraining"),fw=r(" forward method, overrides the "),Rh=o("code"),gw=r("__call__"),_w=r(" special method."),kw=c(),T(Os.$$.fragment),vw=c(),T(Ns.$$.fragment),pg=c(),vn=o("h2"),Is=o("a"),Hh=o("span"),T(Ni.$$.fragment),yw=c(),Kh=o("span"),Tw=r("TFElectraForMaskedLM"),hg=c(),nt=o("div"),T(Ii.$$.fragment),bw=c(),Qh=o("p"),ww=r("Electra model with a language modeling head on top."),Ew=c(),Vh=o("p"),$w=r(`Even though both the discriminator and generator may be loaded into this model, the generator is the only model of
the two to have been trained for the masked language modeling task.`),Fw=c(),Di=o("p"),xw=r("This model inherits from "),jc=o("a"),Mw=r("TFPreTrainedModel"),zw=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.)`),qw=c(),Si=o("p"),jw=r("This model is also a "),Wi=o("a"),Cw=r("tf.keras.Model"),Pw=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Aw=c(),T(Ds.$$.fragment),Lw=c(),zt=o("div"),T(Ui.$$.fragment),Ow=c(),yn=o("p"),Nw=r("The "),Cc=o("a"),Iw=r("TFElectraForMaskedLM"),Dw=r(" forward method, overrides the "),Jh=o("code"),Sw=r("__call__"),Ww=r(" special method."),Uw=c(),T(Ss.$$.fragment),Bw=c(),T(Ws.$$.fragment),Rw=c(),T(Us.$$.fragment),mg=c(),Tn=o("h2"),Bs=o("a"),Gh=o("span"),T(Bi.$$.fragment),Hw=c(),Xh=o("span"),Kw=r("TFElectraForSequenceClassification"),ug=c(),ft=o("div"),T(Ri.$$.fragment),Qw=c(),Yh=o("p"),Vw=r(`ELECTRA Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Jw=c(),Hi=o("p"),Gw=r("This model inherits from "),Pc=o("a"),Xw=r("TFPreTrainedModel"),Yw=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.)`),Zw=c(),Ki=o("p"),eE=r("This model is also a "),Qi=o("a"),tE=r("tf.keras.Model"),oE=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),nE=c(),T(Rs.$$.fragment),sE=c(),qt=o("div"),T(Vi.$$.fragment),aE=c(),bn=o("p"),rE=r("The "),Ac=o("a"),iE=r("TFElectraForSequenceClassification"),lE=r(" forward method, overrides the "),Zh=o("code"),dE=r("__call__"),cE=r(" special method."),pE=c(),T(Hs.$$.fragment),hE=c(),T(Ks.$$.fragment),mE=c(),T(Qs.$$.fragment),fg=c(),wn=o("h2"),Vs=o("a"),em=o("span"),T(Ji.$$.fragment),uE=c(),tm=o("span"),fE=r("TFElectraForMultipleChoice"),gg=c(),gt=o("div"),T(Gi.$$.fragment),gE=c(),om=o("p"),_E=r(`ELECTRA Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),kE=c(),Xi=o("p"),vE=r("This model inherits from "),Lc=o("a"),yE=r("TFPreTrainedModel"),TE=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),bE=c(),Yi=o("p"),wE=r("This model is also a "),Zi=o("a"),EE=r("tf.keras.Model"),$E=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),FE=c(),T(Js.$$.fragment),xE=c(),eo=o("div"),T(el.$$.fragment),ME=c(),En=o("p"),zE=r("The "),Oc=o("a"),qE=r("TFElectraForMultipleChoice"),jE=r(" forward method, overrides the "),nm=o("code"),CE=r("__call__"),PE=r(" special method."),AE=c(),T(Gs.$$.fragment),LE=c(),T(Xs.$$.fragment),_g=c(),$n=o("h2"),Ys=o("a"),sm=o("span"),T(tl.$$.fragment),OE=c(),am=o("span"),NE=r("TFElectraForTokenClassification"),kg=c(),st=o("div"),T(ol.$$.fragment),IE=c(),rm=o("p"),DE=r("Electra model with a token classification head on top."),SE=c(),im=o("p"),WE=r("Both the discriminator and generator may be loaded into this model."),UE=c(),nl=o("p"),BE=r("This model inherits from "),Nc=o("a"),RE=r("TFPreTrainedModel"),HE=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.)`),KE=c(),sl=o("p"),QE=r("This model is also a "),al=o("a"),VE=r("tf.keras.Model"),JE=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),GE=c(),T(Zs.$$.fragment),XE=c(),jt=o("div"),T(rl.$$.fragment),YE=c(),Fn=o("p"),ZE=r("The "),Ic=o("a"),e2=r("TFElectraForTokenClassification"),t2=r(" forward method, overrides the "),lm=o("code"),o2=r("__call__"),n2=r(" special method."),s2=c(),T(ea.$$.fragment),a2=c(),T(ta.$$.fragment),r2=c(),T(oa.$$.fragment),vg=c(),xn=o("h2"),na=o("a"),dm=o("span"),T(il.$$.fragment),i2=c(),cm=o("span"),l2=r("TFElectraForQuestionAnswering"),yg=c(),_t=o("div"),T(ll.$$.fragment),d2=c(),Mn=o("p"),c2=r(`Electra Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),pm=o("code"),p2=r("span start logits"),h2=r(" and "),hm=o("code"),m2=r("span end logits"),u2=r(")."),f2=c(),dl=o("p"),g2=r("This model inherits from "),Dc=o("a"),_2=r("TFPreTrainedModel"),k2=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.)`),v2=c(),cl=o("p"),y2=r("This model is also a "),pl=o("a"),T2=r("tf.keras.Model"),b2=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),w2=c(),T(sa.$$.fragment),E2=c(),Ct=o("div"),T(hl.$$.fragment),$2=c(),zn=o("p"),F2=r("The "),Sc=o("a"),x2=r("TFElectraForQuestionAnswering"),M2=r(" forward method, overrides the "),mm=o("code"),z2=r("__call__"),q2=r(" special method."),j2=c(),T(aa.$$.fragment),C2=c(),T(ra.$$.fragment),P2=c(),T(ia.$$.fragment),Tg=c(),qn=o("h2"),la=o("a"),um=o("span"),T(ml.$$.fragment),A2=c(),fm=o("span"),L2=r("FlaxElectraModel"),bg=c(),at=o("div"),T(ul.$$.fragment),O2=c(),gm=o("p"),N2=r("The bare Electra Model transformer outputting raw hidden-states without any specific head on top."),I2=c(),fl=o("p"),D2=r("This model inherits from "),Wc=o("a"),S2=r("FlaxPreTrainedModel"),W2=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),U2=c(),gl=o("p"),B2=r(`This model is also a Flax Linen
`),_l=o("a"),R2=r("flax.nn.Module"),H2=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),K2=c(),_m=o("p"),Q2=r("Finally, this model supports inherent JAX features such as:"),V2=c(),ko=o("ul"),km=o("li"),kl=o("a"),J2=r("Just-In-Time (JIT) compilation"),G2=c(),vm=o("li"),vl=o("a"),X2=r("Automatic Differentiation"),Y2=c(),ym=o("li"),yl=o("a"),Z2=r("Vectorization"),e$=c(),Tm=o("li"),Tl=o("a"),t$=r("Parallelization"),o$=c(),to=o("div"),T(bl.$$.fragment),n$=c(),jn=o("p"),s$=r("The "),bm=o("code"),a$=r("FlaxElectraPreTrainedModel"),r$=r(" forward method, overrides the "),wm=o("code"),i$=r("__call__"),l$=r(" special method."),d$=c(),T(da.$$.fragment),c$=c(),T(ca.$$.fragment),wg=c(),Cn=o("h2"),pa=o("a"),Em=o("span"),T(wl.$$.fragment),p$=c(),$m=o("span"),h$=r("FlaxElectraForPreTraining"),Eg=c(),Ze=o("div"),T(El.$$.fragment),m$=c(),Fm=o("p"),u$=r("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),f$=c(),xm=o("p"),g$=r("It is recommended to load the discriminator checkpoint into that model."),_$=c(),$l=o("p"),k$=r("This model inherits from "),Uc=o("a"),v$=r("FlaxPreTrainedModel"),y$=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),T$=c(),Fl=o("p"),b$=r(`This model is also a Flax Linen
`),xl=o("a"),w$=r("flax.nn.Module"),E$=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),$$=c(),Mm=o("p"),F$=r("Finally, this model supports inherent JAX features such as:"),x$=c(),vo=o("ul"),zm=o("li"),Ml=o("a"),M$=r("Just-In-Time (JIT) compilation"),z$=c(),qm=o("li"),zl=o("a"),q$=r("Automatic Differentiation"),j$=c(),jm=o("li"),ql=o("a"),C$=r("Vectorization"),P$=c(),Cm=o("li"),jl=o("a"),A$=r("Parallelization"),L$=c(),oo=o("div"),T(Cl.$$.fragment),O$=c(),Pn=o("p"),N$=r("The "),Pm=o("code"),I$=r("FlaxElectraPreTrainedModel"),D$=r(" forward method, overrides the "),Am=o("code"),S$=r("__call__"),W$=r(" special method."),U$=c(),T(ha.$$.fragment),B$=c(),T(ma.$$.fragment),$g=c(),An=o("h2"),ua=o("a"),Lm=o("span"),T(Pl.$$.fragment),R$=c(),Om=o("span"),H$=r("FlaxElectraForCausalLM"),Fg=c(),rt=o("div"),T(Al.$$.fragment),K$=c(),Nm=o("p"),Q$=r(`Electra Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),V$=c(),Ll=o("p"),J$=r("This model inherits from "),Bc=o("a"),G$=r("FlaxPreTrainedModel"),X$=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Y$=c(),Ol=o("p"),Z$=r(`This model is also a Flax Linen
`),Nl=o("a"),eF=r("flax.nn.Module"),tF=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),oF=c(),Im=o("p"),nF=r("Finally, this model supports inherent JAX features such as:"),sF=c(),yo=o("ul"),Dm=o("li"),Il=o("a"),aF=r("Just-In-Time (JIT) compilation"),rF=c(),Sm=o("li"),Dl=o("a"),iF=r("Automatic Differentiation"),lF=c(),Wm=o("li"),Sl=o("a"),dF=r("Vectorization"),cF=c(),Um=o("li"),Wl=o("a"),pF=r("Parallelization"),hF=c(),no=o("div"),T(Ul.$$.fragment),mF=c(),Ln=o("p"),uF=r("The "),Bm=o("code"),fF=r("FlaxElectraPreTrainedModel"),gF=r(" forward method, overrides the "),Rm=o("code"),_F=r("__call__"),kF=r(" special method."),vF=c(),T(fa.$$.fragment),yF=c(),T(ga.$$.fragment),xg=c(),On=o("h2"),_a=o("a"),Hm=o("span"),T(Bl.$$.fragment),TF=c(),Km=o("span"),bF=r("FlaxElectraForMaskedLM"),Mg=c(),it=o("div"),T(Rl.$$.fragment),wF=c(),Hl=o("p"),EF=r("Electra Model with a "),Qm=o("code"),$F=r("language modeling"),FF=r(" head on top."),xF=c(),Kl=o("p"),MF=r("This model inherits from "),Rc=o("a"),zF=r("FlaxPreTrainedModel"),qF=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),jF=c(),Ql=o("p"),CF=r(`This model is also a Flax Linen
`),Vl=o("a"),PF=r("flax.nn.Module"),AF=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),LF=c(),Vm=o("p"),OF=r("Finally, this model supports inherent JAX features such as:"),NF=c(),To=o("ul"),Jm=o("li"),Jl=o("a"),IF=r("Just-In-Time (JIT) compilation"),DF=c(),Gm=o("li"),Gl=o("a"),SF=r("Automatic Differentiation"),WF=c(),Xm=o("li"),Xl=o("a"),UF=r("Vectorization"),BF=c(),Ym=o("li"),Yl=o("a"),RF=r("Parallelization"),HF=c(),so=o("div"),T(Zl.$$.fragment),KF=c(),Nn=o("p"),QF=r("The "),Zm=o("code"),VF=r("FlaxElectraPreTrainedModel"),JF=r(" forward method, overrides the "),eu=o("code"),GF=r("__call__"),XF=r(" special method."),YF=c(),T(ka.$$.fragment),ZF=c(),T(va.$$.fragment),zg=c(),In=o("h2"),ya=o("a"),tu=o("span"),T(ed.$$.fragment),e0=c(),ou=o("span"),t0=r("FlaxElectraForSequenceClassification"),qg=c(),lt=o("div"),T(td.$$.fragment),o0=c(),nu=o("p"),n0=r(`Electra Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),s0=c(),od=o("p"),a0=r("This model inherits from "),Hc=o("a"),r0=r("FlaxPreTrainedModel"),i0=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),l0=c(),nd=o("p"),d0=r(`This model is also a Flax Linen
`),sd=o("a"),c0=r("flax.nn.Module"),p0=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),h0=c(),su=o("p"),m0=r("Finally, this model supports inherent JAX features such as:"),u0=c(),bo=o("ul"),au=o("li"),ad=o("a"),f0=r("Just-In-Time (JIT) compilation"),g0=c(),ru=o("li"),rd=o("a"),_0=r("Automatic Differentiation"),k0=c(),iu=o("li"),id=o("a"),v0=r("Vectorization"),y0=c(),lu=o("li"),ld=o("a"),T0=r("Parallelization"),b0=c(),ao=o("div"),T(dd.$$.fragment),w0=c(),Dn=o("p"),E0=r("The "),du=o("code"),$0=r("FlaxElectraPreTrainedModel"),F0=r(" forward method, overrides the "),cu=o("code"),x0=r("__call__"),M0=r(" special method."),z0=c(),T(Ta.$$.fragment),q0=c(),T(ba.$$.fragment),jg=c(),Sn=o("h2"),wa=o("a"),pu=o("span"),T(cd.$$.fragment),j0=c(),hu=o("span"),C0=r("FlaxElectraForMultipleChoice"),Cg=c(),dt=o("div"),T(pd.$$.fragment),P0=c(),mu=o("p"),A0=r(`ELECTRA Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),L0=c(),hd=o("p"),O0=r("This model inherits from "),Kc=o("a"),N0=r("FlaxPreTrainedModel"),I0=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),D0=c(),md=o("p"),S0=r(`This model is also a Flax Linen
`),ud=o("a"),W0=r("flax.nn.Module"),U0=r(` 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(),uu=o("p"),R0=r("Finally, this model supports inherent JAX features such as:"),H0=c(),wo=o("ul"),fu=o("li"),fd=o("a"),K0=r("Just-In-Time (JIT) compilation"),Q0=c(),gu=o("li"),gd=o("a"),V0=r("Automatic Differentiation"),J0=c(),_u=o("li"),_d=o("a"),G0=r("Vectorization"),X0=c(),ku=o("li"),kd=o("a"),Y0=r("Parallelization"),Z0=c(),ro=o("div"),T(vd.$$.fragment),e4=c(),Wn=o("p"),t4=r("The "),vu=o("code"),o4=r("FlaxElectraPreTrainedModel"),n4=r(" forward method, overrides the "),yu=o("code"),s4=r("__call__"),a4=r(" special method."),r4=c(),T(Ea.$$.fragment),i4=c(),T($a.$$.fragment),Pg=c(),Un=o("h2"),Fa=o("a"),Tu=o("span"),T(yd.$$.fragment),l4=c(),bu=o("span"),d4=r("FlaxElectraForTokenClassification"),Ag=c(),et=o("div"),T(Td.$$.fragment),c4=c(),wu=o("p"),p4=r("Electra model with a token classification head on top."),h4=c(),Eu=o("p"),m4=r("Both the discriminator and generator may be loaded into this model."),u4=c(),bd=o("p"),f4=r("This model inherits from "),Qc=o("a"),g4=r("FlaxPreTrainedModel"),_4=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),k4=c(),wd=o("p"),v4=r(`This model is also a Flax Linen
`),Ed=o("a"),y4=r("flax.nn.Module"),T4=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),b4=c(),$u=o("p"),w4=r("Finally, this model supports inherent JAX features such as:"),E4=c(),Eo=o("ul"),Fu=o("li"),$d=o("a"),$4=r("Just-In-Time (JIT) compilation"),F4=c(),xu=o("li"),Fd=o("a"),x4=r("Automatic Differentiation"),M4=c(),Mu=o("li"),xd=o("a"),z4=r("Vectorization"),q4=c(),zu=o("li"),Md=o("a"),j4=r("Parallelization"),C4=c(),io=o("div"),T(zd.$$.fragment),P4=c(),Bn=o("p"),A4=r("The "),qu=o("code"),L4=r("FlaxElectraPreTrainedModel"),O4=r(" forward method, overrides the "),ju=o("code"),N4=r("__call__"),I4=r(" special method."),D4=c(),T(xa.$$.fragment),S4=c(),T(Ma.$$.fragment),Lg=c(),Rn=o("h2"),za=o("a"),Cu=o("span"),T(qd.$$.fragment),W4=c(),Pu=o("span"),U4=r("FlaxElectraForQuestionAnswering"),Og=c(),ct=o("div"),T(jd.$$.fragment),B4=c(),Hn=o("p"),R4=r(`ELECTRA Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Au=o("code"),H4=r("span start logits"),K4=r(" and "),Lu=o("code"),Q4=r("span end logits"),V4=r(")."),J4=c(),Cd=o("p"),G4=r("This model inherits from "),Vc=o("a"),X4=r("FlaxPreTrainedModel"),Y4=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Z4=c(),Pd=o("p"),ex=r(`This model is also a Flax Linen
`),Ad=o("a"),tx=r("flax.nn.Module"),ox=r(` 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(),Ou=o("p"),sx=r("Finally, this model supports inherent JAX features such as:"),ax=c(),$o=o("ul"),Nu=o("li"),Ld=o("a"),rx=r("Just-In-Time (JIT) compilation"),ix=c(),Iu=o("li"),Od=o("a"),lx=r("Automatic Differentiation"),dx=c(),Du=o("li"),Nd=o("a"),cx=r("Vectorization"),px=c(),Su=o("li"),Id=o("a"),hx=r("Parallelization"),mx=c(),lo=o("div"),T(Dd.$$.fragment),ux=c(),Kn=o("p"),fx=r("The "),Wu=o("code"),gx=r("FlaxElectraPreTrainedModel"),_x=r(" forward method, overrides the "),Uu=o("code"),kx=r("__call__"),vx=r(" special method."),yx=c(),T(qa.$$.fragment),Tx=c(),T(ja.$$.fragment),this.h()},l(s){const k=Zj('[data-svelte="svelte-1phssyn"]',document.head);d=n(k,"META",{name:!0,content:!0}),k.forEach(t),v=p(s),u=n(s,"H1",{class:!0});var Sd=a(u);f=n(Sd,"A",{id:!0,class:!0,href:!0});var Bu=a(f);_=n(Bu,"SPAN",{});var Ru=a(_);b(l.$$.fragment,Ru),Ru.forEach(t),Bu.forEach(t),h=p(Sd),z=n(Sd,"SPAN",{});var Hu=a(z);ve=i(Hu,"ELECTRA"),Hu.forEach(t),Sd.forEach(t),fe=p(s),W=n(s,"DIV",{class:!0});var Wd=a(W);de=n(Wd,"A",{href:!0});var Ku=a(de);te=n(Ku,"IMG",{alt:!0,src:!0}),Ku.forEach(t),ye=p(Wd),K=n(Wd,"A",{href:!0});var Qu=a(K);ce=n(Qu,"IMG",{alt:!0,src:!0}),Qu.forEach(t),Wd.forEach(t),G=p(s),ae=n(s,"H2",{class:!0});var Ud=a(ae);re=n(Ud,"A",{id:!0,class:!0,href:!0});var Vu=a(re);Q=n(Vu,"SPAN",{});var Ju=a(Q);b(ie.$$.fragment,Ju),Ju.forEach(t),Vu.forEach(t),Te=p(Ud),V=n(Ud,"SPAN",{});var Gu=a(V);be=i(Gu,"Overview"),Gu.forEach(t),Ud.forEach(t),ge=p(s),R=n(s,"P",{});var Bd=a(R);we=i(Bd,"The ELECTRA model was proposed in the paper "),le=n(Bd,"A",{href:!0,rel:!0});var Xu=a(le);ne=i(Xu,`ELECTRA: Pre-training Text Encoders as Discriminators Rather Than
Generators`),Xu.forEach(t),C=i(Bd,`. 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.`),Bd.forEach(t),A=p(s),pe=n(s,"P",{});var Yu=a(pe);Y=i(Yu,"The abstract from the paper is the following:"),Yu.forEach(t),_e=p(s),he=n(s,"P",{});var Zu=a(he);J=n(Zu,"EM",{});var ef=a(J);Ee=i(ef,`Masked language modeling (MLM) pretraining methods such as BERT corrupt the input by replacing some tokens with [MASK]
and then train a model to reconstruct the original tokens. While they produce good results when transferred to
downstream NLP tasks, they generally require large amounts of compute to be effective. As an alternative, we propose a
more sample-efficient pretraining task called replaced token detection. Instead of masking the input, our approach
corrupts it by replacing some tokens with plausible alternatives sampled from a small generator network. Then, instead
of training a model that predicts the original identities of the corrupted tokens, we train a discriminative model that
predicts whether each token in the corrupted input was replaced by a generator sample or not. Thorough experiments
demonstrate this new pretraining task is more efficient than MLM because the task is defined over all input tokens
rather than just the small subset that was masked out. As a result, the contextual representations learned by our
approach substantially outperform the ones learned by BERT given the same model size, data, and compute. The gains are
particularly strong for small models; for example, we train a model on one GPU for 4 days that outperforms GPT (trained
using 30x more compute) on the GLUE natural language understanding benchmark. Our approach also works well at scale,
where it performs comparably to RoBERTa and XLNet while using less than 1/4 of their compute and outperforms them when
using the same amount of compute.`),ef.forEach(t),Zu.forEach(t),ke=p(s),P=n(s,"P",{});var tf=a(P);$e=i(tf,"Tips:"),tf.forEach(t),X=p(s),se=n(s,"UL",{});var Qn=a(se);me=n(Qn,"LI",{});var of=a(me);Z=i(of,`ELECTRA is the pretraining approach, therefore there is nearly no changes done to the underlying model: BERT. The
only change is the separation of the embedding size and the hidden size: the embedding size is generally smaller,
while the hidden size is larger. An additional projection layer (linear) is used to project the embeddings from their
embedding size to the hidden size. In the case where the embedding size is the same as the hidden size, no projection
layer is used.`),of.forEach(t),Fe=p(Qn),ue=n(Qn,"LI",{});var nf=a(ue);S=i(nf,"ELECTRA is a transformer model pretrained with the use of another (small) masked language model. The inputs are corrupted by that language model, which takes an input text that is randomly masked and outputs a text in which ELECTRA has to predict which token is an original and which one has been replaced. Like for GAN training, the small language model is trained for a few steps (but with the original texts as objective, not to fool the ELECTRA model like in a traditional GAN setting) then the ELECTRA model is trained for a few steps."),nf.forEach(t),xe=p(Qn),I=n(Qn,"LI",{});var Fo=a(I);Me=i(Fo,"The ELECTRA checkpoints saved using "),ee=n(Fo,"A",{href:!0,rel:!0});var sf=a(ee);L=i(sf,"Google Research\u2019s implementation"),sf.forEach(t),ze=i(Fo,`
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
`),O=n(Fo,"A",{href:!0});var af=a(O);qe=i(af,"ElectraForMaskedLM"),af.forEach(t),je=i(Fo,` model, and the generator may be loaded in the
`),y=n(Fo,"A",{href:!0});var rf=a(y);q=i(rf,"ElectraForPreTraining"),rf.forEach(t),Ke=i(Fo,` model (the classification head will be randomly initialized as it
doesn\u2019t exist in the generator).`),Fo.forEach(t),Qn.forEach(t),oe=p(s),Ce=n(s,"P",{});var Vn=a(Ce);Qe=i(Vn,"This model was contributed by "),j=n(Vn,"A",{href:!0,rel:!0});var lf=a(j);Ve=i(lf,"lysandre"),lf.forEach(t),Je=i(Vn,". The original code can be found "),We=n(Vn,"A",{href:!0,rel:!0});var df=a(We);Ge=i(df,"here"),df.forEach(t),Xe=i(Vn,"."),Vn.forEach(t),D=p(s),U=n(s,"H2",{class:!0});var Rd=a(U);Se=n(Rd,"A",{id:!0,class:!0,href:!0});var cf=a(Se);Ue=n(cf,"SPAN",{});var pf=a(Ue);b(H.$$.fragment,pf),pf.forEach(t),cf.forEach(t),Ye=p(Rd),Be=n(Rd,"SPAN",{});var hf=a(Be);Pe=i(hf,"Documentation resources"),hf.forEach(t),Rd.forEach(t),He=p(s),B=n(s,"UL",{});var xt=a(B);Re=n(xt,"LI",{});var mf=a(Re);Qd=n(mf,"A",{href:!0});var uf=a(Qd);fk=i(uf,"Text classification task guide"),uf.forEach(t),mf.forEach(t),gk=p(xt),$p=n(xt,"LI",{});var ff=a($p);Vd=n(ff,"A",{href:!0});var gf=a(Vd);_k=i(gf,"Token classification task guide"),gf.forEach(t),ff.forEach(t),kk=p(xt),Fp=n(xt,"LI",{});var _f=a(Fp);Jd=n(_f,"A",{href:!0});var kf=a(Jd);vk=i(kf,"Question answering task guide"),kf.forEach(t),_f.forEach(t),yk=p(xt),xp=n(xt,"LI",{});var vf=a(xp);Gd=n(vf,"A",{href:!0});var yf=a(Gd);Tk=i(yf,"Causal language modeling task guide"),yf.forEach(t),vf.forEach(t),bk=p(xt),Mp=n(xt,"LI",{});var Tf=a(Mp);Xd=n(Tf,"A",{href:!0});var bf=a(Xd);wk=i(bf,"Masked language modeling task guide"),bf.forEach(t),Tf.forEach(t),Ek=p(xt),zp=n(xt,"LI",{});var wf=a(zp);Yd=n(wf,"A",{href:!0});var Ef=a(Yd);$k=i(Ef,"Multiple choice task guide"),Ef.forEach(t),wf.forEach(t),xt.forEach(t),Of=p(s),Uo=n(s,"H2",{class:!0});var Hd=a(Uo);Gn=n(Hd,"A",{id:!0,class:!0,href:!0});var $f=a(Gn);qp=n($f,"SPAN",{});var Ff=a(qp);b(rr.$$.fragment,Ff),Ff.forEach(t),$f.forEach(t),Fk=p(Hd),jp=n(Hd,"SPAN",{});var xf=a(jp);xk=i(xf,"ElectraConfig"),xf.forEach(t),Hd.forEach(t),Nf=p(s),Ut=n(s,"DIV",{class:!0});var xo=a(Ut);b(ir.$$.fragment,xo),Mk=p(xo),_o=n(xo,"P",{});var Mo=a(_o);zk=i(Mo,"This is the configuration class to store the configuration of a "),Zd=n(Mo,"A",{href:!0});var Mf=a(Zd);qk=i(Mf,"ElectraModel"),Mf.forEach(t),jk=i(Mo," or a "),ec=n(Mo,"A",{href:!0});var zf=a(ec);Ck=i(zf,"TFElectraModel"),zf.forEach(t),Pk=i(Mo,`. 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
`),lr=n(Mo,"A",{href:!0,rel:!0});var qf=a(lr);Ak=i(qf,"google/electra-small-discriminator"),qf.forEach(t),Lk=i(Mo," architecture."),Mo.forEach(t),Ok=p(xo),Bo=n(xo,"P",{});var Jn=a(Bo);Nk=i(Jn,"Configuration objects inherit from "),tc=n(Jn,"A",{href:!0});var jf=a(tc);Ik=i(jf,"PretrainedConfig"),jf.forEach(t),Dk=i(Jn,` and can be used to control the model outputs. Read the
documentation from `),oc=n(Jn,"A",{href:!0});var Cf=a(oc);Sk=i(Cf,"PretrainedConfig"),Cf.forEach(t),Wk=i(Jn," for more information."),Jn.forEach(t),Uk=p(xo),b(Xn.$$.fragment,xo),xo.forEach(t),If=p(s),Ro=n(s,"H2",{class:!0});var Kd=a(Ro);Yn=n(Kd,"A",{id:!0,class:!0,href:!0});var Pf=a(Yn);Cp=n(Pf,"SPAN",{});var Af=a(Cp);b(dr.$$.fragment,Af),Af.forEach(t),Pf.forEach(t),Bk=p(Kd),Pp=n(Kd,"SPAN",{});var Lf=a(Pp);Rk=i(Lf,"ElectraTokenizer"),Lf.forEach(t),Kd.forEach(t),Df=p(s),tt=n(s,"DIV",{class:!0});var kt=a(tt);b(cr.$$.fragment,kt),Hk=p(kt),Ap=n(kt,"P",{});var Fx=a(Ap);Kk=i(Fx,"Construct a Electra tokenizer. Based on WordPiece."),Fx.forEach(t),Qk=p(kt),pr=n(kt,"P",{});var Ig=a(pr);Vk=i(Ig,"This tokenizer inherits from "),nc=n(Ig,"A",{href:!0});var xx=a(nc);Jk=i(xx,"PreTrainedTokenizer"),xx.forEach(t),Gk=i(Ig,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ig.forEach(t),Xk=p(kt),zo=n(kt,"DIV",{class:!0});var Jc=a(zo);b(hr.$$.fragment,Jc),Yk=p(Jc),Lp=n(Jc,"P",{});var Mx=a(Lp);Zk=i(Mx,`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:`),Mx.forEach(t),ev=p(Jc),mr=n(Jc,"UL",{});var Dg=a(mr);sc=n(Dg,"LI",{});var bx=a(sc);tv=i(bx,"single sequence: "),Op=n(bx,"CODE",{});var zx=a(Op);ov=i(zx,"[CLS] X [SEP]"),zx.forEach(t),bx.forEach(t),nv=p(Dg),ac=n(Dg,"LI",{});var wx=a(ac);sv=i(wx,"pair of sequences: "),Np=n(wx,"CODE",{});var qx=a(Np);av=i(qx,"[CLS] A [SEP] B [SEP]"),qx.forEach(t),wx.forEach(t),Dg.forEach(t),Jc.forEach(t),rv=p(kt),Zn=n(kt,"DIV",{class:!0});var Sg=a(Zn);b(ur.$$.fragment,Sg),iv=p(Sg),Ip=n(Sg,"P",{});var jx=a(Ip);lv=i(jx,"Converts a sequence of tokens (string) in a single string."),jx.forEach(t),Sg.forEach(t),dv=p(kt),Bt=n(kt,"DIV",{class:!0});var Ca=a(Bt);b(fr.$$.fragment,Ca),cv=p(Ca),Dp=n(Ca,"P",{});var Cx=a(Dp);pv=i(Cx,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Electra"),Cx.forEach(t),hv=p(Ca),b(es.$$.fragment,Ca),mv=p(Ca),Ho=n(Ca,"P",{});var Gc=a(Ho);uv=i(Gc,"If "),Sp=n(Gc,"CODE",{});var Px=a(Sp);fv=i(Px,"token_ids_1"),Px.forEach(t),gv=i(Gc," is "),Wp=n(Gc,"CODE",{});var Ax=a(Wp);_v=i(Ax,"None"),Ax.forEach(t),kv=i(Gc,", this method only returns the first portion of the mask (0s)."),Gc.forEach(t),Ca.forEach(t),vv=p(kt),ts=n(kt,"DIV",{class:!0});var Wg=a(ts);b(gr.$$.fragment,Wg),yv=p(Wg),_r=n(Wg,"P",{});var Ug=a(_r);Tv=i(Ug,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Up=n(Ug,"CODE",{});var Lx=a(Up);bv=i(Lx,"prepare_for_model"),Lx.forEach(t),wv=i(Ug," method."),Ug.forEach(t),Wg.forEach(t),kt.forEach(t),Sf=p(s),Ko=n(s,"H2",{class:!0});var Bg=a(Ko);os=n(Bg,"A",{id:!0,class:!0,href:!0});var Ox=a(os);Bp=n(Ox,"SPAN",{});var Nx=a(Bp);b(kr.$$.fragment,Nx),Nx.forEach(t),Ox.forEach(t),Ev=p(Bg),Rp=n(Bg,"SPAN",{});var Ix=a(Rp);$v=i(Ix,"ElectraTokenizerFast"),Ix.forEach(t),Bg.forEach(t),Wf=p(s),Tt=n(s,"DIV",{class:!0});var jo=a(Tt);b(vr.$$.fragment,jo),Fv=p(jo),yr=n(jo,"P",{});var Rg=a(yr);xv=i(Rg,"Construct a \u201Cfast\u201D ELECTRA tokenizer (backed by HuggingFace\u2019s "),Hp=n(Rg,"EM",{});var Dx=a(Hp);Mv=i(Dx,"tokenizers"),Dx.forEach(t),zv=i(Rg," library). Based on WordPiece."),Rg.forEach(t),qv=p(jo),Tr=n(jo,"P",{});var Hg=a(Tr);jv=i(Hg,"This tokenizer inherits from "),rc=n(Hg,"A",{href:!0});var Sx=a(rc);Cv=i(Sx,"PreTrainedTokenizerFast"),Sx.forEach(t),Pv=i(Hg,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Hg.forEach(t),Av=p(jo),qo=n(jo,"DIV",{class:!0});var Xc=a(qo);b(br.$$.fragment,Xc),Lv=p(Xc),Kp=n(Xc,"P",{});var Wx=a(Kp);Ov=i(Wx,`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:`),Wx.forEach(t),Nv=p(Xc),wr=n(Xc,"UL",{});var Kg=a(wr);ic=n(Kg,"LI",{});var Ex=a(ic);Iv=i(Ex,"single sequence: "),Qp=n(Ex,"CODE",{});var Ux=a(Qp);Dv=i(Ux,"[CLS] X [SEP]"),Ux.forEach(t),Ex.forEach(t),Sv=p(Kg),lc=n(Kg,"LI",{});var $x=a(lc);Wv=i($x,"pair of sequences: "),Vp=n($x,"CODE",{});var Bx=a(Vp);Uv=i(Bx,"[CLS] A [SEP] B [SEP]"),Bx.forEach(t),$x.forEach(t),Kg.forEach(t),Xc.forEach(t),Bv=p(jo),Rt=n(jo,"DIV",{class:!0});var Pa=a(Rt);b(Er.$$.fragment,Pa),Rv=p(Pa),Jp=n(Pa,"P",{});var Rx=a(Jp);Hv=i(Rx,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ELECTRA"),Rx.forEach(t),Kv=p(Pa),b(ns.$$.fragment,Pa),Qv=p(Pa),Qo=n(Pa,"P",{});var Yc=a(Qo);Vv=i(Yc,"If "),Gp=n(Yc,"CODE",{});var Hx=a(Gp);Jv=i(Hx,"token_ids_1"),Hx.forEach(t),Gv=i(Yc," is "),Xp=n(Yc,"CODE",{});var Kx=a(Xp);Xv=i(Kx,"None"),Kx.forEach(t),Yv=i(Yc,", this method only returns the first portion of the mask (0s)."),Yc.forEach(t),Pa.forEach(t),jo.forEach(t),Uf=p(s),Vo=n(s,"H2",{class:!0});var Qg=a(Vo);ss=n(Qg,"A",{id:!0,class:!0,href:!0});var Qx=a(ss);Yp=n(Qx,"SPAN",{});var Vx=a(Yp);b($r.$$.fragment,Vx),Vx.forEach(t),Qx.forEach(t),Zv=p(Qg),Zp=n(Qg,"SPAN",{});var Jx=a(Zp);ey=i(Jx,"Electra specific outputs"),Jx.forEach(t),Qg.forEach(t),Bf=p(s),Jo=n(s,"DIV",{class:!0});var Vg=a(Jo);b(Fr.$$.fragment,Vg),ty=p(Vg),xr=n(Vg,"P",{});var Jg=a(xr);oy=i(Jg,"Output type of "),dc=n(Jg,"A",{href:!0});var Gx=a(dc);ny=i(Gx,"ElectraForPreTraining"),Gx.forEach(t),sy=i(Jg,"."),Jg.forEach(t),Vg.forEach(t),Rf=p(s),Go=n(s,"DIV",{class:!0});var Gg=a(Go);b(Mr.$$.fragment,Gg),ay=p(Gg),zr=n(Gg,"P",{});var Xg=a(zr);ry=i(Xg,"Output type of "),cc=n(Xg,"A",{href:!0});var Xx=a(cc);iy=i(Xx,"TFElectraForPreTraining"),Xx.forEach(t),ly=i(Xg,"."),Xg.forEach(t),Gg.forEach(t),Hf=p(s),Xo=n(s,"H2",{class:!0});var Yg=a(Xo);as=n(Yg,"A",{id:!0,class:!0,href:!0});var Yx=a(as);eh=n(Yx,"SPAN",{});var Zx=a(eh);b(qr.$$.fragment,Zx),Zx.forEach(t),Yx.forEach(t),dy=p(Yg),th=n(Yg,"SPAN",{});var eM=a(th);cy=i(eM,"ElectraModel"),eM.forEach(t),Yg.forEach(t),Kf=p(s),bt=n(s,"DIV",{class:!0});var Co=a(bt);b(jr.$$.fragment,Co),py=p(Co),oh=n(Co,"P",{});var tM=a(oh);hy=i(tM,"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."),tM.forEach(t),my=p(Co),Cr=n(Co,"P",{});var Zg=a(Cr);uy=i(Zg,"This model inherits from "),pc=n(Zg,"A",{href:!0});var oM=a(pc);fy=i(oM,"PreTrainedModel"),oM.forEach(t),gy=i(Zg,`. 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.)`),Zg.forEach(t),_y=p(Co),Pr=n(Co,"P",{});var e_=a(Pr);ky=i(e_,"This model is also a PyTorch "),Ar=n(e_,"A",{href:!0,rel:!0});var nM=a(Ar);vy=i(nM,"torch.nn.Module"),nM.forEach(t),yy=i(e_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),e_.forEach(t),Ty=p(Co),Ht=n(Co,"DIV",{class:!0});var Aa=a(Ht);b(Lr.$$.fragment,Aa),by=p(Aa),Yo=n(Aa,"P",{});var Zc=a(Yo);wy=i(Zc,"The "),hc=n(Zc,"A",{href:!0});var sM=a(hc);Ey=i(sM,"ElectraModel"),sM.forEach(t),$y=i(Zc," forward method, overrides the "),nh=n(Zc,"CODE",{});var aM=a(nh);Fy=i(aM,"__call__"),aM.forEach(t),xy=i(Zc," special method."),Zc.forEach(t),My=p(Aa),b(rs.$$.fragment,Aa),zy=p(Aa),b(is.$$.fragment,Aa),Aa.forEach(t),Co.forEach(t),Qf=p(s),Zo=n(s,"H2",{class:!0});var t_=a(Zo);ls=n(t_,"A",{id:!0,class:!0,href:!0});var rM=a(ls);sh=n(rM,"SPAN",{});var iM=a(sh);b(Or.$$.fragment,iM),iM.forEach(t),rM.forEach(t),qy=p(t_),ah=n(t_,"SPAN",{});var lM=a(ah);jy=i(lM,"ElectraForPreTraining"),lM.forEach(t),t_.forEach(t),Vf=p(s),pt=n(s,"DIV",{class:!0});var co=a(pt);b(Nr.$$.fragment,co),Cy=p(co),rh=n(co,"P",{});var dM=a(rh);Py=i(dM,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),dM.forEach(t),Ay=p(co),ih=n(co,"P",{});var cM=a(ih);Ly=i(cM,"It is recommended to load the discriminator checkpoint into that model."),cM.forEach(t),Oy=p(co),Ir=n(co,"P",{});var o_=a(Ir);Ny=i(o_,"This model inherits from "),mc=n(o_,"A",{href:!0});var pM=a(mc);Iy=i(pM,"PreTrainedModel"),pM.forEach(t),Dy=i(o_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),o_.forEach(t),Sy=p(co),Dr=n(co,"P",{});var n_=a(Dr);Wy=i(n_,"This model is also a PyTorch "),Sr=n(n_,"A",{href:!0,rel:!0});var hM=a(Sr);Uy=i(hM,"torch.nn.Module"),hM.forEach(t),By=i(n_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),n_.forEach(t),Ry=p(co),Kt=n(co,"DIV",{class:!0});var La=a(Kt);b(Wr.$$.fragment,La),Hy=p(La),en=n(La,"P",{});var ep=a(en);Ky=i(ep,"The "),uc=n(ep,"A",{href:!0});var mM=a(uc);Qy=i(mM,"ElectraForPreTraining"),mM.forEach(t),Vy=i(ep," forward method, overrides the "),lh=n(ep,"CODE",{});var uM=a(lh);Jy=i(uM,"__call__"),uM.forEach(t),Gy=i(ep," special method."),ep.forEach(t),Xy=p(La),b(ds.$$.fragment,La),Yy=p(La),b(cs.$$.fragment,La),La.forEach(t),co.forEach(t),Jf=p(s),tn=n(s,"H2",{class:!0});var s_=a(tn);ps=n(s_,"A",{id:!0,class:!0,href:!0});var fM=a(ps);dh=n(fM,"SPAN",{});var gM=a(dh);b(Ur.$$.fragment,gM),gM.forEach(t),fM.forEach(t),Zy=p(s_),ch=n(s_,"SPAN",{});var _M=a(ch);eT=i(_M,"ElectraForCausalLM"),_M.forEach(t),s_.forEach(t),Gf=p(s),wt=n(s,"DIV",{class:!0});var Po=a(wt);b(Br.$$.fragment,Po),tT=p(Po),Rr=n(Po,"P",{});var a_=a(Rr);oT=i(a_,"ELECTRA Model with a "),ph=n(a_,"CODE",{});var kM=a(ph);nT=i(kM,"language modeling"),kM.forEach(t),sT=i(a_," head on top for CLM fine-tuning."),a_.forEach(t),aT=p(Po),Hr=n(Po,"P",{});var r_=a(Hr);rT=i(r_,"This model inherits from "),fc=n(r_,"A",{href:!0});var vM=a(fc);iT=i(vM,"PreTrainedModel"),vM.forEach(t),lT=i(r_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),r_.forEach(t),dT=p(Po),Kr=n(Po,"P",{});var i_=a(Kr);cT=i(i_,"This model is also a PyTorch "),Qr=n(i_,"A",{href:!0,rel:!0});var yM=a(Qr);pT=i(yM,"torch.nn.Module"),yM.forEach(t),hT=i(i_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),i_.forEach(t),mT=p(Po),Qt=n(Po,"DIV",{class:!0});var Oa=a(Qt);b(Vr.$$.fragment,Oa),uT=p(Oa),on=n(Oa,"P",{});var tp=a(on);fT=i(tp,"The "),gc=n(tp,"A",{href:!0});var TM=a(gc);gT=i(TM,"ElectraForCausalLM"),TM.forEach(t),_T=i(tp," forward method, overrides the "),hh=n(tp,"CODE",{});var bM=a(hh);kT=i(bM,"__call__"),bM.forEach(t),vT=i(tp," special method."),tp.forEach(t),yT=p(Oa),b(hs.$$.fragment,Oa),TT=p(Oa),b(ms.$$.fragment,Oa),Oa.forEach(t),Po.forEach(t),Xf=p(s),nn=n(s,"H2",{class:!0});var l_=a(nn);us=n(l_,"A",{id:!0,class:!0,href:!0});var wM=a(us);mh=n(wM,"SPAN",{});var EM=a(mh);b(Jr.$$.fragment,EM),EM.forEach(t),wM.forEach(t),bT=p(l_),uh=n(l_,"SPAN",{});var $M=a(uh);wT=i($M,"ElectraForMaskedLM"),$M.forEach(t),l_.forEach(t),Yf=p(s),ht=n(s,"DIV",{class:!0});var po=a(ht);b(Gr.$$.fragment,po),ET=p(po),fh=n(po,"P",{});var FM=a(fh);$T=i(FM,"Electra model with a language modeling head on top."),FM.forEach(t),FT=p(po),gh=n(po,"P",{});var xM=a(gh);xT=i(xM,`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.`),xM.forEach(t),MT=p(po),Xr=n(po,"P",{});var d_=a(Xr);zT=i(d_,"This model inherits from "),_c=n(d_,"A",{href:!0});var MM=a(_c);qT=i(MM,"PreTrainedModel"),MM.forEach(t),jT=i(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),CT=p(po),Yr=n(po,"P",{});var c_=a(Yr);PT=i(c_,"This model is also a PyTorch "),Zr=n(c_,"A",{href:!0,rel:!0});var zM=a(Zr);AT=i(zM,"torch.nn.Module"),zM.forEach(t),LT=i(c_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),c_.forEach(t),OT=p(po),Vt=n(po,"DIV",{class:!0});var Na=a(Vt);b(ei.$$.fragment,Na),NT=p(Na),sn=n(Na,"P",{});var op=a(sn);IT=i(op,"The "),kc=n(op,"A",{href:!0});var qM=a(kc);DT=i(qM,"ElectraForMaskedLM"),qM.forEach(t),ST=i(op," forward method, overrides the "),_h=n(op,"CODE",{});var jM=a(_h);WT=i(jM,"__call__"),jM.forEach(t),UT=i(op," special method."),op.forEach(t),BT=p(Na),b(fs.$$.fragment,Na),RT=p(Na),b(gs.$$.fragment,Na),Na.forEach(t),po.forEach(t),Zf=p(s),an=n(s,"H2",{class:!0});var p_=a(an);_s=n(p_,"A",{id:!0,class:!0,href:!0});var CM=a(_s);kh=n(CM,"SPAN",{});var PM=a(kh);b(ti.$$.fragment,PM),PM.forEach(t),CM.forEach(t),HT=p(p_),vh=n(p_,"SPAN",{});var AM=a(vh);KT=i(AM,"ElectraForSequenceClassification"),AM.forEach(t),p_.forEach(t),eg=p(s),Et=n(s,"DIV",{class:!0});var Ao=a(Et);b(oi.$$.fragment,Ao),QT=p(Ao),yh=n(Ao,"P",{});var LM=a(yh);VT=i(LM,`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.`),LM.forEach(t),JT=p(Ao),ni=n(Ao,"P",{});var h_=a(ni);GT=i(h_,"This model inherits from "),vc=n(h_,"A",{href:!0});var OM=a(vc);XT=i(OM,"PreTrainedModel"),OM.forEach(t),YT=i(h_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),h_.forEach(t),ZT=p(Ao),si=n(Ao,"P",{});var m_=a(si);eb=i(m_,"This model is also a PyTorch "),ai=n(m_,"A",{href:!0,rel:!0});var NM=a(ai);tb=i(NM,"torch.nn.Module"),NM.forEach(t),ob=i(m_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),m_.forEach(t),nb=p(Ao),Mt=n(Ao,"DIV",{class:!0});var Lo=a(Mt);b(ri.$$.fragment,Lo),sb=p(Lo),rn=n(Lo,"P",{});var np=a(rn);ab=i(np,"The "),yc=n(np,"A",{href:!0});var IM=a(yc);rb=i(IM,"ElectraForSequenceClassification"),IM.forEach(t),ib=i(np," forward method, overrides the "),Th=n(np,"CODE",{});var DM=a(Th);lb=i(DM,"__call__"),DM.forEach(t),db=i(np," special method."),np.forEach(t),cb=p(Lo),b(ks.$$.fragment,Lo),pb=p(Lo),b(vs.$$.fragment,Lo),hb=p(Lo),b(ys.$$.fragment,Lo),Lo.forEach(t),Ao.forEach(t),tg=p(s),ln=n(s,"H2",{class:!0});var u_=a(ln);Ts=n(u_,"A",{id:!0,class:!0,href:!0});var SM=a(Ts);bh=n(SM,"SPAN",{});var WM=a(bh);b(ii.$$.fragment,WM),WM.forEach(t),SM.forEach(t),mb=p(u_),wh=n(u_,"SPAN",{});var UM=a(wh);ub=i(UM,"ElectraForMultipleChoice"),UM.forEach(t),u_.forEach(t),og=p(s),$t=n(s,"DIV",{class:!0});var Oo=a($t);b(li.$$.fragment,Oo),fb=p(Oo),Eh=n(Oo,"P",{});var BM=a(Eh);gb=i(BM,`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.`),BM.forEach(t),_b=p(Oo),di=n(Oo,"P",{});var f_=a(di);kb=i(f_,"This model inherits from "),Tc=n(f_,"A",{href:!0});var RM=a(Tc);vb=i(RM,"PreTrainedModel"),RM.forEach(t),yb=i(f_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),f_.forEach(t),Tb=p(Oo),ci=n(Oo,"P",{});var g_=a(ci);bb=i(g_,"This model is also a PyTorch "),pi=n(g_,"A",{href:!0,rel:!0});var HM=a(pi);wb=i(HM,"torch.nn.Module"),HM.forEach(t),Eb=i(g_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),g_.forEach(t),$b=p(Oo),Jt=n(Oo,"DIV",{class:!0});var Ia=a(Jt);b(hi.$$.fragment,Ia),Fb=p(Ia),dn=n(Ia,"P",{});var sp=a(dn);xb=i(sp,"The "),bc=n(sp,"A",{href:!0});var KM=a(bc);Mb=i(KM,"ElectraForMultipleChoice"),KM.forEach(t),zb=i(sp," forward method, overrides the "),$h=n(sp,"CODE",{});var QM=a($h);qb=i(QM,"__call__"),QM.forEach(t),jb=i(sp," special method."),sp.forEach(t),Cb=p(Ia),b(bs.$$.fragment,Ia),Pb=p(Ia),b(ws.$$.fragment,Ia),Ia.forEach(t),Oo.forEach(t),ng=p(s),cn=n(s,"H2",{class:!0});var __=a(cn);Es=n(__,"A",{id:!0,class:!0,href:!0});var VM=a(Es);Fh=n(VM,"SPAN",{});var JM=a(Fh);b(mi.$$.fragment,JM),JM.forEach(t),VM.forEach(t),Ab=p(__),xh=n(__,"SPAN",{});var GM=a(xh);Lb=i(GM,"ElectraForTokenClassification"),GM.forEach(t),__.forEach(t),sg=p(s),mt=n(s,"DIV",{class:!0});var ho=a(mt);b(ui.$$.fragment,ho),Ob=p(ho),Mh=n(ho,"P",{});var XM=a(Mh);Nb=i(XM,"Electra model with a token classification head on top."),XM.forEach(t),Ib=p(ho),zh=n(ho,"P",{});var YM=a(zh);Db=i(YM,"Both the discriminator and generator may be loaded into this model."),YM.forEach(t),Sb=p(ho),fi=n(ho,"P",{});var k_=a(fi);Wb=i(k_,"This model inherits from "),wc=n(k_,"A",{href:!0});var ZM=a(wc);Ub=i(ZM,"PreTrainedModel"),ZM.forEach(t),Bb=i(k_,`. 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.)`),k_.forEach(t),Rb=p(ho),gi=n(ho,"P",{});var v_=a(gi);Hb=i(v_,"This model is also a PyTorch "),_i=n(v_,"A",{href:!0,rel:!0});var ez=a(_i);Kb=i(ez,"torch.nn.Module"),ez.forEach(t),Qb=i(v_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),v_.forEach(t),Vb=p(ho),Gt=n(ho,"DIV",{class:!0});var Da=a(Gt);b(ki.$$.fragment,Da),Jb=p(Da),pn=n(Da,"P",{});var ap=a(pn);Gb=i(ap,"The "),Ec=n(ap,"A",{href:!0});var tz=a(Ec);Xb=i(tz,"ElectraForTokenClassification"),tz.forEach(t),Yb=i(ap," forward method, overrides the "),qh=n(ap,"CODE",{});var oz=a(qh);Zb=i(oz,"__call__"),oz.forEach(t),e1=i(ap," special method."),ap.forEach(t),t1=p(Da),b($s.$$.fragment,Da),o1=p(Da),b(Fs.$$.fragment,Da),Da.forEach(t),ho.forEach(t),ag=p(s),hn=n(s,"H2",{class:!0});var y_=a(hn);xs=n(y_,"A",{id:!0,class:!0,href:!0});var nz=a(xs);jh=n(nz,"SPAN",{});var sz=a(jh);b(vi.$$.fragment,sz),sz.forEach(t),nz.forEach(t),n1=p(y_),Ch=n(y_,"SPAN",{});var az=a(Ch);s1=i(az,"ElectraForQuestionAnswering"),az.forEach(t),y_.forEach(t),rg=p(s),Ft=n(s,"DIV",{class:!0});var No=a(Ft);b(yi.$$.fragment,No),a1=p(No),mn=n(No,"P",{});var rp=a(mn);r1=i(rp,`ELECTRA Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Ph=n(rp,"CODE",{});var rz=a(Ph);i1=i(rz,"span start logits"),rz.forEach(t),l1=i(rp," and "),Ah=n(rp,"CODE",{});var iz=a(Ah);d1=i(iz,"span end logits"),iz.forEach(t),c1=i(rp,")."),rp.forEach(t),p1=p(No),Ti=n(No,"P",{});var T_=a(Ti);h1=i(T_,"This model inherits from "),$c=n(T_,"A",{href:!0});var lz=a($c);m1=i(lz,"PreTrainedModel"),lz.forEach(t),u1=i(T_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),T_.forEach(t),f1=p(No),bi=n(No,"P",{});var b_=a(bi);g1=i(b_,"This model is also a PyTorch "),wi=n(b_,"A",{href:!0,rel:!0});var dz=a(wi);_1=i(dz,"torch.nn.Module"),dz.forEach(t),k1=i(b_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),b_.forEach(t),v1=p(No),Xt=n(No,"DIV",{class:!0});var Sa=a(Xt);b(Ei.$$.fragment,Sa),y1=p(Sa),un=n(Sa,"P",{});var ip=a(un);T1=i(ip,"The "),Fc=n(ip,"A",{href:!0});var cz=a(Fc);b1=i(cz,"ElectraForQuestionAnswering"),cz.forEach(t),w1=i(ip," forward method, overrides the "),Lh=n(ip,"CODE",{});var pz=a(Lh);E1=i(pz,"__call__"),pz.forEach(t),$1=i(ip," special method."),ip.forEach(t),F1=p(Sa),b(Ms.$$.fragment,Sa),x1=p(Sa),b(zs.$$.fragment,Sa),Sa.forEach(t),No.forEach(t),ig=p(s),fn=n(s,"H2",{class:!0});var w_=a(fn);qs=n(w_,"A",{id:!0,class:!0,href:!0});var hz=a(qs);Oh=n(hz,"SPAN",{});var mz=a(Oh);b($i.$$.fragment,mz),mz.forEach(t),hz.forEach(t),M1=p(w_),Nh=n(w_,"SPAN",{});var uz=a(Nh);z1=i(uz,"TFElectraModel"),uz.forEach(t),w_.forEach(t),lg=p(s),ut=n(s,"DIV",{class:!0});var mo=a(ut);b(Fi.$$.fragment,mo),q1=p(mo),Ih=n(mo,"P",{});var fz=a(Ih);j1=i(fz,"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."),fz.forEach(t),C1=p(mo),xi=n(mo,"P",{});var E_=a(xi);P1=i(E_,"This model inherits from "),xc=n(E_,"A",{href:!0});var gz=a(xc);A1=i(gz,"TFPreTrainedModel"),gz.forEach(t),L1=i(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),O1=p(mo),Mi=n(mo,"P",{});var $_=a(Mi);N1=i($_,"This model is also a "),zi=n($_,"A",{href:!0,rel:!0});var _z=a(zi);I1=i(_z,"tf.keras.Model"),_z.forEach(t),D1=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.`),$_.forEach(t),S1=p(mo),b(js.$$.fragment,mo),W1=p(mo),Yt=n(mo,"DIV",{class:!0});var Wa=a(Yt);b(qi.$$.fragment,Wa),U1=p(Wa),gn=n(Wa,"P",{});var lp=a(gn);B1=i(lp,"The "),Mc=n(lp,"A",{href:!0});var kz=a(Mc);R1=i(kz,"TFElectraModel"),kz.forEach(t),H1=i(lp," forward method, overrides the "),Dh=n(lp,"CODE",{});var vz=a(Dh);K1=i(vz,"__call__"),vz.forEach(t),Q1=i(lp," special method."),lp.forEach(t),V1=p(Wa),b(Cs.$$.fragment,Wa),J1=p(Wa),b(Ps.$$.fragment,Wa),Wa.forEach(t),mo.forEach(t),dg=p(s),_n=n(s,"H2",{class:!0});var F_=a(_n);As=n(F_,"A",{id:!0,class:!0,href:!0});var yz=a(As);Sh=n(yz,"SPAN",{});var Tz=a(Sh);b(ji.$$.fragment,Tz),Tz.forEach(t),yz.forEach(t),G1=p(F_),Wh=n(F_,"SPAN",{});var bz=a(Wh);X1=i(bz,"TFElectraForPreTraining"),bz.forEach(t),F_.forEach(t),cg=p(s),ot=n(s,"DIV",{class:!0});var Pt=a(ot);b(Ci.$$.fragment,Pt),Y1=p(Pt),Uh=n(Pt,"P",{});var wz=a(Uh);Z1=i(wz,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),wz.forEach(t),ew=p(Pt),Bh=n(Pt,"P",{});var Ez=a(Bh);tw=i(Ez,`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.`),Ez.forEach(t),ow=p(Pt),Pi=n(Pt,"P",{});var x_=a(Pi);nw=i(x_,"This model inherits from "),zc=n(x_,"A",{href:!0});var $z=a(zc);sw=i($z,"TFPreTrainedModel"),$z.forEach(t),aw=i(x_,`. 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.)`),x_.forEach(t),rw=p(Pt),Ai=n(Pt,"P",{});var M_=a(Ai);iw=i(M_,"This model is also a "),Li=n(M_,"A",{href:!0,rel:!0});var Fz=a(Li);lw=i(Fz,"tf.keras.Model"),Fz.forEach(t),dw=i(M_,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),M_.forEach(t),cw=p(Pt),b(Ls.$$.fragment,Pt),pw=p(Pt),Zt=n(Pt,"DIV",{class:!0});var Ua=a(Zt);b(Oi.$$.fragment,Ua),hw=p(Ua),kn=n(Ua,"P",{});var dp=a(kn);mw=i(dp,"The "),qc=n(dp,"A",{href:!0});var xz=a(qc);uw=i(xz,"TFElectraForPreTraining"),xz.forEach(t),fw=i(dp," forward method, overrides the "),Rh=n(dp,"CODE",{});var Mz=a(Rh);gw=i(Mz,"__call__"),Mz.forEach(t),_w=i(dp," special method."),dp.forEach(t),kw=p(Ua),b(Os.$$.fragment,Ua),vw=p(Ua),b(Ns.$$.fragment,Ua),Ua.forEach(t),Pt.forEach(t),pg=p(s),vn=n(s,"H2",{class:!0});var z_=a(vn);Is=n(z_,"A",{id:!0,class:!0,href:!0});var zz=a(Is);Hh=n(zz,"SPAN",{});var qz=a(Hh);b(Ni.$$.fragment,qz),qz.forEach(t),zz.forEach(t),yw=p(z_),Kh=n(z_,"SPAN",{});var jz=a(Kh);Tw=i(jz,"TFElectraForMaskedLM"),jz.forEach(t),z_.forEach(t),hg=p(s),nt=n(s,"DIV",{class:!0});var At=a(nt);b(Ii.$$.fragment,At),bw=p(At),Qh=n(At,"P",{});var Cz=a(Qh);ww=i(Cz,"Electra model with a language modeling head on top."),Cz.forEach(t),Ew=p(At),Vh=n(At,"P",{});var Pz=a(Vh);$w=i(Pz,`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.`),Pz.forEach(t),Fw=p(At),Di=n(At,"P",{});var q_=a(Di);xw=i(q_,"This model inherits from "),jc=n(q_,"A",{href:!0});var Az=a(jc);Mw=i(Az,"TFPreTrainedModel"),Az.forEach(t),zw=i(q_,`. 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.)`),q_.forEach(t),qw=p(At),Si=n(At,"P",{});var j_=a(Si);jw=i(j_,"This model is also a "),Wi=n(j_,"A",{href:!0,rel:!0});var Lz=a(Wi);Cw=i(Lz,"tf.keras.Model"),Lz.forEach(t),Pw=i(j_,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),j_.forEach(t),Aw=p(At),b(Ds.$$.fragment,At),Lw=p(At),zt=n(At,"DIV",{class:!0});var Io=a(zt);b(Ui.$$.fragment,Io),Ow=p(Io),yn=n(Io,"P",{});var cp=a(yn);Nw=i(cp,"The "),Cc=n(cp,"A",{href:!0});var Oz=a(Cc);Iw=i(Oz,"TFElectraForMaskedLM"),Oz.forEach(t),Dw=i(cp," forward method, overrides the "),Jh=n(cp,"CODE",{});var Nz=a(Jh);Sw=i(Nz,"__call__"),Nz.forEach(t),Ww=i(cp," special method."),cp.forEach(t),Uw=p(Io),b(Ss.$$.fragment,Io),Bw=p(Io),b(Ws.$$.fragment,Io),Rw=p(Io),b(Us.$$.fragment,Io),Io.forEach(t),At.forEach(t),mg=p(s),Tn=n(s,"H2",{class:!0});var C_=a(Tn);Bs=n(C_,"A",{id:!0,class:!0,href:!0});var Iz=a(Bs);Gh=n(Iz,"SPAN",{});var Dz=a(Gh);b(Bi.$$.fragment,Dz),Dz.forEach(t),Iz.forEach(t),Hw=p(C_),Xh=n(C_,"SPAN",{});var Sz=a(Xh);Kw=i(Sz,"TFElectraForSequenceClassification"),Sz.forEach(t),C_.forEach(t),ug=p(s),ft=n(s,"DIV",{class:!0});var uo=a(ft);b(Ri.$$.fragment,uo),Qw=p(uo),Yh=n(uo,"P",{});var Wz=a(Yh);Vw=i(Wz,`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.`),Wz.forEach(t),Jw=p(uo),Hi=n(uo,"P",{});var P_=a(Hi);Gw=i(P_,"This model inherits from "),Pc=n(P_,"A",{href:!0});var Uz=a(Pc);Xw=i(Uz,"TFPreTrainedModel"),Uz.forEach(t),Yw=i(P_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),P_.forEach(t),Zw=p(uo),Ki=n(uo,"P",{});var A_=a(Ki);eE=i(A_,"This model is also a "),Qi=n(A_,"A",{href:!0,rel:!0});var Bz=a(Qi);tE=i(Bz,"tf.keras.Model"),Bz.forEach(t),oE=i(A_,` 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.`),A_.forEach(t),nE=p(uo),b(Rs.$$.fragment,uo),sE=p(uo),qt=n(uo,"DIV",{class:!0});var Do=a(qt);b(Vi.$$.fragment,Do),aE=p(Do),bn=n(Do,"P",{});var pp=a(bn);rE=i(pp,"The "),Ac=n(pp,"A",{href:!0});var Rz=a(Ac);iE=i(Rz,"TFElectraForSequenceClassification"),Rz.forEach(t),lE=i(pp," forward method, overrides the "),Zh=n(pp,"CODE",{});var Hz=a(Zh);dE=i(Hz,"__call__"),Hz.forEach(t),cE=i(pp," special method."),pp.forEach(t),pE=p(Do),b(Hs.$$.fragment,Do),hE=p(Do),b(Ks.$$.fragment,Do),mE=p(Do),b(Qs.$$.fragment,Do),Do.forEach(t),uo.forEach(t),fg=p(s),wn=n(s,"H2",{class:!0});var L_=a(wn);Vs=n(L_,"A",{id:!0,class:!0,href:!0});var Kz=a(Vs);em=n(Kz,"SPAN",{});var Qz=a(em);b(Ji.$$.fragment,Qz),Qz.forEach(t),Kz.forEach(t),uE=p(L_),tm=n(L_,"SPAN",{});var Vz=a(tm);fE=i(Vz,"TFElectraForMultipleChoice"),Vz.forEach(t),L_.forEach(t),gg=p(s),gt=n(s,"DIV",{class:!0});var fo=a(gt);b(Gi.$$.fragment,fo),gE=p(fo),om=n(fo,"P",{});var Jz=a(om);_E=i(Jz,`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.`),Jz.forEach(t),kE=p(fo),Xi=n(fo,"P",{});var O_=a(Xi);vE=i(O_,"This model inherits from "),Lc=n(O_,"A",{href:!0});var Gz=a(Lc);yE=i(Gz,"TFPreTrainedModel"),Gz.forEach(t),TE=i(O_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),O_.forEach(t),bE=p(fo),Yi=n(fo,"P",{});var N_=a(Yi);wE=i(N_,"This model is also a "),Zi=n(N_,"A",{href:!0,rel:!0});var Xz=a(Zi);EE=i(Xz,"tf.keras.Model"),Xz.forEach(t),$E=i(N_,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),N_.forEach(t),FE=p(fo),b(Js.$$.fragment,fo),xE=p(fo),eo=n(fo,"DIV",{class:!0});var Ba=a(eo);b(el.$$.fragment,Ba),ME=p(Ba),En=n(Ba,"P",{});var hp=a(En);zE=i(hp,"The "),Oc=n(hp,"A",{href:!0});var Yz=a(Oc);qE=i(Yz,"TFElectraForMultipleChoice"),Yz.forEach(t),jE=i(hp," forward method, overrides the "),nm=n(hp,"CODE",{});var Zz=a(nm);CE=i(Zz,"__call__"),Zz.forEach(t),PE=i(hp," special method."),hp.forEach(t),AE=p(Ba),b(Gs.$$.fragment,Ba),LE=p(Ba),b(Xs.$$.fragment,Ba),Ba.forEach(t),fo.forEach(t),_g=p(s),$n=n(s,"H2",{class:!0});var I_=a($n);Ys=n(I_,"A",{id:!0,class:!0,href:!0});var e7=a(Ys);sm=n(e7,"SPAN",{});var t7=a(sm);b(tl.$$.fragment,t7),t7.forEach(t),e7.forEach(t),OE=p(I_),am=n(I_,"SPAN",{});var o7=a(am);NE=i(o7,"TFElectraForTokenClassification"),o7.forEach(t),I_.forEach(t),kg=p(s),st=n(s,"DIV",{class:!0});var Lt=a(st);b(ol.$$.fragment,Lt),IE=p(Lt),rm=n(Lt,"P",{});var n7=a(rm);DE=i(n7,"Electra model with a token classification head on top."),n7.forEach(t),SE=p(Lt),im=n(Lt,"P",{});var s7=a(im);WE=i(s7,"Both the discriminator and generator may be loaded into this model."),s7.forEach(t),UE=p(Lt),nl=n(Lt,"P",{});var D_=a(nl);BE=i(D_,"This model inherits from "),Nc=n(D_,"A",{href:!0});var a7=a(Nc);RE=i(a7,"TFPreTrainedModel"),a7.forEach(t),HE=i(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),KE=p(Lt),sl=n(Lt,"P",{});var S_=a(sl);QE=i(S_,"This model is also a "),al=n(S_,"A",{href:!0,rel:!0});var r7=a(al);VE=i(r7,"tf.keras.Model"),r7.forEach(t),JE=i(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),GE=p(Lt),b(Zs.$$.fragment,Lt),XE=p(Lt),jt=n(Lt,"DIV",{class:!0});var So=a(jt);b(rl.$$.fragment,So),YE=p(So),Fn=n(So,"P",{});var mp=a(Fn);ZE=i(mp,"The "),Ic=n(mp,"A",{href:!0});var i7=a(Ic);e2=i(i7,"TFElectraForTokenClassification"),i7.forEach(t),t2=i(mp," forward method, overrides the "),lm=n(mp,"CODE",{});var l7=a(lm);o2=i(l7,"__call__"),l7.forEach(t),n2=i(mp," special method."),mp.forEach(t),s2=p(So),b(ea.$$.fragment,So),a2=p(So),b(ta.$$.fragment,So),r2=p(So),b(oa.$$.fragment,So),So.forEach(t),Lt.forEach(t),vg=p(s),xn=n(s,"H2",{class:!0});var W_=a(xn);na=n(W_,"A",{id:!0,class:!0,href:!0});var d7=a(na);dm=n(d7,"SPAN",{});var c7=a(dm);b(il.$$.fragment,c7),c7.forEach(t),d7.forEach(t),i2=p(W_),cm=n(W_,"SPAN",{});var p7=a(cm);l2=i(p7,"TFElectraForQuestionAnswering"),p7.forEach(t),W_.forEach(t),yg=p(s),_t=n(s,"DIV",{class:!0});var go=a(_t);b(ll.$$.fragment,go),d2=p(go),Mn=n(go,"P",{});var up=a(Mn);c2=i(up,`Electra Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),pm=n(up,"CODE",{});var h7=a(pm);p2=i(h7,"span start logits"),h7.forEach(t),h2=i(up," and "),hm=n(up,"CODE",{});var m7=a(hm);m2=i(m7,"span end logits"),m7.forEach(t),u2=i(up,")."),up.forEach(t),f2=p(go),dl=n(go,"P",{});var U_=a(dl);g2=i(U_,"This model inherits from "),Dc=n(U_,"A",{href:!0});var u7=a(Dc);_2=i(u7,"TFPreTrainedModel"),u7.forEach(t),k2=i(U_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),U_.forEach(t),v2=p(go),cl=n(go,"P",{});var B_=a(cl);y2=i(B_,"This model is also a "),pl=n(B_,"A",{href:!0,rel:!0});var f7=a(pl);T2=i(f7,"tf.keras.Model"),f7.forEach(t),b2=i(B_,` 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.`),B_.forEach(t),w2=p(go),b(sa.$$.fragment,go),E2=p(go),Ct=n(go,"DIV",{class:!0});var Wo=a(Ct);b(hl.$$.fragment,Wo),$2=p(Wo),zn=n(Wo,"P",{});var fp=a(zn);F2=i(fp,"The "),Sc=n(fp,"A",{href:!0});var g7=a(Sc);x2=i(g7,"TFElectraForQuestionAnswering"),g7.forEach(t),M2=i(fp," forward method, overrides the "),mm=n(fp,"CODE",{});var _7=a(mm);z2=i(_7,"__call__"),_7.forEach(t),q2=i(fp," special method."),fp.forEach(t),j2=p(Wo),b(aa.$$.fragment,Wo),C2=p(Wo),b(ra.$$.fragment,Wo),P2=p(Wo),b(ia.$$.fragment,Wo),Wo.forEach(t),go.forEach(t),Tg=p(s),qn=n(s,"H2",{class:!0});var R_=a(qn);la=n(R_,"A",{id:!0,class:!0,href:!0});var k7=a(la);um=n(k7,"SPAN",{});var v7=a(um);b(ml.$$.fragment,v7),v7.forEach(t),k7.forEach(t),A2=p(R_),fm=n(R_,"SPAN",{});var y7=a(fm);L2=i(y7,"FlaxElectraModel"),y7.forEach(t),R_.forEach(t),bg=p(s),at=n(s,"DIV",{class:!0});var Ot=a(at);b(ul.$$.fragment,Ot),O2=p(Ot),gm=n(Ot,"P",{});var T7=a(gm);N2=i(T7,"The bare Electra Model transformer outputting raw hidden-states without any specific head on top."),T7.forEach(t),I2=p(Ot),fl=n(Ot,"P",{});var H_=a(fl);D2=i(H_,"This model inherits from "),Wc=n(H_,"A",{href:!0});var b7=a(Wc);S2=i(b7,"FlaxPreTrainedModel"),b7.forEach(t),W2=i(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),U2=p(Ot),gl=n(Ot,"P",{});var K_=a(gl);B2=i(K_,`This model is also a Flax Linen
`),_l=n(K_,"A",{href:!0,rel:!0});var w7=a(_l);R2=i(w7,"flax.nn.Module"),w7.forEach(t),H2=i(K_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),K_.forEach(t),K2=p(Ot),_m=n(Ot,"P",{});var E7=a(_m);Q2=i(E7,"Finally, this model supports inherent JAX features such as:"),E7.forEach(t),V2=p(Ot),ko=n(Ot,"UL",{});var Ra=a(ko);km=n(Ra,"LI",{});var $7=a(km);kl=n($7,"A",{href:!0,rel:!0});var F7=a(kl);J2=i(F7,"Just-In-Time (JIT) compilation"),F7.forEach(t),$7.forEach(t),G2=p(Ra),vm=n(Ra,"LI",{});var x7=a(vm);vl=n(x7,"A",{href:!0,rel:!0});var M7=a(vl);X2=i(M7,"Automatic Differentiation"),M7.forEach(t),x7.forEach(t),Y2=p(Ra),ym=n(Ra,"LI",{});var z7=a(ym);yl=n(z7,"A",{href:!0,rel:!0});var q7=a(yl);Z2=i(q7,"Vectorization"),q7.forEach(t),z7.forEach(t),e$=p(Ra),Tm=n(Ra,"LI",{});var j7=a(Tm);Tl=n(j7,"A",{href:!0,rel:!0});var C7=a(Tl);t$=i(C7,"Parallelization"),C7.forEach(t),j7.forEach(t),Ra.forEach(t),o$=p(Ot),to=n(Ot,"DIV",{class:!0});var Ha=a(to);b(bl.$$.fragment,Ha),n$=p(Ha),jn=n(Ha,"P",{});var gp=a(jn);s$=i(gp,"The "),bm=n(gp,"CODE",{});var P7=a(bm);a$=i(P7,"FlaxElectraPreTrainedModel"),P7.forEach(t),r$=i(gp," forward method, overrides the "),wm=n(gp,"CODE",{});var A7=a(wm);i$=i(A7,"__call__"),A7.forEach(t),l$=i(gp," special method."),gp.forEach(t),d$=p(Ha),b(da.$$.fragment,Ha),c$=p(Ha),b(ca.$$.fragment,Ha),Ha.forEach(t),Ot.forEach(t),wg=p(s),Cn=n(s,"H2",{class:!0});var Q_=a(Cn);pa=n(Q_,"A",{id:!0,class:!0,href:!0});var L7=a(pa);Em=n(L7,"SPAN",{});var O7=a(Em);b(wl.$$.fragment,O7),O7.forEach(t),L7.forEach(t),p$=p(Q_),$m=n(Q_,"SPAN",{});var N7=a($m);h$=i(N7,"FlaxElectraForPreTraining"),N7.forEach(t),Q_.forEach(t),Eg=p(s),Ze=n(s,"DIV",{class:!0});var vt=a(Ze);b(El.$$.fragment,vt),m$=p(vt),Fm=n(vt,"P",{});var I7=a(Fm);u$=i(I7,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),I7.forEach(t),f$=p(vt),xm=n(vt,"P",{});var D7=a(xm);g$=i(D7,"It is recommended to load the discriminator checkpoint into that model."),D7.forEach(t),_$=p(vt),$l=n(vt,"P",{});var V_=a($l);k$=i(V_,"This model inherits from "),Uc=n(V_,"A",{href:!0});var S7=a(Uc);v$=i(S7,"FlaxPreTrainedModel"),S7.forEach(t),y$=i(V_,`. 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)`),V_.forEach(t),T$=p(vt),Fl=n(vt,"P",{});var J_=a(Fl);b$=i(J_,`This model is also a Flax Linen
`),xl=n(J_,"A",{href:!0,rel:!0});var W7=a(xl);w$=i(W7,"flax.nn.Module"),W7.forEach(t),E$=i(J_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),J_.forEach(t),$$=p(vt),Mm=n(vt,"P",{});var U7=a(Mm);F$=i(U7,"Finally, this model supports inherent JAX features such as:"),U7.forEach(t),x$=p(vt),vo=n(vt,"UL",{});var Ka=a(vo);zm=n(Ka,"LI",{});var B7=a(zm);Ml=n(B7,"A",{href:!0,rel:!0});var R7=a(Ml);M$=i(R7,"Just-In-Time (JIT) compilation"),R7.forEach(t),B7.forEach(t),z$=p(Ka),qm=n(Ka,"LI",{});var H7=a(qm);zl=n(H7,"A",{href:!0,rel:!0});var K7=a(zl);q$=i(K7,"Automatic Differentiation"),K7.forEach(t),H7.forEach(t),j$=p(Ka),jm=n(Ka,"LI",{});var Q7=a(jm);ql=n(Q7,"A",{href:!0,rel:!0});var V7=a(ql);C$=i(V7,"Vectorization"),V7.forEach(t),Q7.forEach(t),P$=p(Ka),Cm=n(Ka,"LI",{});var J7=a(Cm);jl=n(J7,"A",{href:!0,rel:!0});var G7=a(jl);A$=i(G7,"Parallelization"),G7.forEach(t),J7.forEach(t),Ka.forEach(t),L$=p(vt),oo=n(vt,"DIV",{class:!0});var Qa=a(oo);b(Cl.$$.fragment,Qa),O$=p(Qa),Pn=n(Qa,"P",{});var _p=a(Pn);N$=i(_p,"The "),Pm=n(_p,"CODE",{});var X7=a(Pm);I$=i(X7,"FlaxElectraPreTrainedModel"),X7.forEach(t),D$=i(_p," forward method, overrides the "),Am=n(_p,"CODE",{});var Y7=a(Am);S$=i(Y7,"__call__"),Y7.forEach(t),W$=i(_p," special method."),_p.forEach(t),U$=p(Qa),b(ha.$$.fragment,Qa),B$=p(Qa),b(ma.$$.fragment,Qa),Qa.forEach(t),vt.forEach(t),$g=p(s),An=n(s,"H2",{class:!0});var G_=a(An);ua=n(G_,"A",{id:!0,class:!0,href:!0});var Z7=a(ua);Lm=n(Z7,"SPAN",{});var eq=a(Lm);b(Pl.$$.fragment,eq),eq.forEach(t),Z7.forEach(t),R$=p(G_),Om=n(G_,"SPAN",{});var tq=a(Om);H$=i(tq,"FlaxElectraForCausalLM"),tq.forEach(t),G_.forEach(t),Fg=p(s),rt=n(s,"DIV",{class:!0});var Nt=a(rt);b(Al.$$.fragment,Nt),K$=p(Nt),Nm=n(Nt,"P",{});var oq=a(Nm);Q$=i(oq,`Electra Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),oq.forEach(t),V$=p(Nt),Ll=n(Nt,"P",{});var X_=a(Ll);J$=i(X_,"This model inherits from "),Bc=n(X_,"A",{href:!0});var nq=a(Bc);G$=i(nq,"FlaxPreTrainedModel"),nq.forEach(t),X$=i(X_,`. 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)`),X_.forEach(t),Y$=p(Nt),Ol=n(Nt,"P",{});var Y_=a(Ol);Z$=i(Y_,`This model is also a Flax Linen
`),Nl=n(Y_,"A",{href:!0,rel:!0});var sq=a(Nl);eF=i(sq,"flax.nn.Module"),sq.forEach(t),tF=i(Y_,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Y_.forEach(t),oF=p(Nt),Im=n(Nt,"P",{});var aq=a(Im);nF=i(aq,"Finally, this model supports inherent JAX features such as:"),aq.forEach(t),sF=p(Nt),yo=n(Nt,"UL",{});var Va=a(yo);Dm=n(Va,"LI",{});var rq=a(Dm);Il=n(rq,"A",{href:!0,rel:!0});var iq=a(Il);aF=i(iq,"Just-In-Time (JIT) compilation"),iq.forEach(t),rq.forEach(t),rF=p(Va),Sm=n(Va,"LI",{});var lq=a(Sm);Dl=n(lq,"A",{href:!0,rel:!0});var dq=a(Dl);iF=i(dq,"Automatic Differentiation"),dq.forEach(t),lq.forEach(t),lF=p(Va),Wm=n(Va,"LI",{});var cq=a(Wm);Sl=n(cq,"A",{href:!0,rel:!0});var pq=a(Sl);dF=i(pq,"Vectorization"),pq.forEach(t),cq.forEach(t),cF=p(Va),Um=n(Va,"LI",{});var hq=a(Um);Wl=n(hq,"A",{href:!0,rel:!0});var mq=a(Wl);pF=i(mq,"Parallelization"),mq.forEach(t),hq.forEach(t),Va.forEach(t),hF=p(Nt),no=n(Nt,"DIV",{class:!0});var Ja=a(no);b(Ul.$$.fragment,Ja),mF=p(Ja),Ln=n(Ja,"P",{});var kp=a(Ln);uF=i(kp,"The "),Bm=n(kp,"CODE",{});var uq=a(Bm);fF=i(uq,"FlaxElectraPreTrainedModel"),uq.forEach(t),gF=i(kp," forward method, overrides the "),Rm=n(kp,"CODE",{});var fq=a(Rm);_F=i(fq,"__call__"),fq.forEach(t),kF=i(kp," special method."),kp.forEach(t),vF=p(Ja),b(fa.$$.fragment,Ja),yF=p(Ja),b(ga.$$.fragment,Ja),Ja.forEach(t),Nt.forEach(t),xg=p(s),On=n(s,"H2",{class:!0});var Z_=a(On);_a=n(Z_,"A",{id:!0,class:!0,href:!0});var gq=a(_a);Hm=n(gq,"SPAN",{});var _q=a(Hm);b(Bl.$$.fragment,_q),_q.forEach(t),gq.forEach(t),TF=p(Z_),Km=n(Z_,"SPAN",{});var kq=a(Km);bF=i(kq,"FlaxElectraForMaskedLM"),kq.forEach(t),Z_.forEach(t),Mg=p(s),it=n(s,"DIV",{class:!0});var It=a(it);b(Rl.$$.fragment,It),wF=p(It),Hl=n(It,"P",{});var ek=a(Hl);EF=i(ek,"Electra Model with a "),Qm=n(ek,"CODE",{});var vq=a(Qm);$F=i(vq,"language modeling"),vq.forEach(t),FF=i(ek," head on top."),ek.forEach(t),xF=p(It),Kl=n(It,"P",{});var tk=a(Kl);MF=i(tk,"This model inherits from "),Rc=n(tk,"A",{href:!0});var yq=a(Rc);zF=i(yq,"FlaxPreTrainedModel"),yq.forEach(t),qF=i(tk,`. 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)`),tk.forEach(t),jF=p(It),Ql=n(It,"P",{});var ok=a(Ql);CF=i(ok,`This model is also a Flax Linen
`),Vl=n(ok,"A",{href:!0,rel:!0});var Tq=a(Vl);PF=i(Tq,"flax.nn.Module"),Tq.forEach(t),AF=i(ok,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),ok.forEach(t),LF=p(It),Vm=n(It,"P",{});var bq=a(Vm);OF=i(bq,"Finally, this model supports inherent JAX features such as:"),bq.forEach(t),NF=p(It),To=n(It,"UL",{});var Ga=a(To);Jm=n(Ga,"LI",{});var wq=a(Jm);Jl=n(wq,"A",{href:!0,rel:!0});var Eq=a(Jl);IF=i(Eq,"Just-In-Time (JIT) compilation"),Eq.forEach(t),wq.forEach(t),DF=p(Ga),Gm=n(Ga,"LI",{});var $q=a(Gm);Gl=n($q,"A",{href:!0,rel:!0});var Fq=a(Gl);SF=i(Fq,"Automatic Differentiation"),Fq.forEach(t),$q.forEach(t),WF=p(Ga),Xm=n(Ga,"LI",{});var xq=a(Xm);Xl=n(xq,"A",{href:!0,rel:!0});var Mq=a(Xl);UF=i(Mq,"Vectorization"),Mq.forEach(t),xq.forEach(t),BF=p(Ga),Ym=n(Ga,"LI",{});var zq=a(Ym);Yl=n(zq,"A",{href:!0,rel:!0});var qq=a(Yl);RF=i(qq,"Parallelization"),qq.forEach(t),zq.forEach(t),Ga.forEach(t),HF=p(It),so=n(It,"DIV",{class:!0});var Xa=a(so);b(Zl.$$.fragment,Xa),KF=p(Xa),Nn=n(Xa,"P",{});var vp=a(Nn);QF=i(vp,"The "),Zm=n(vp,"CODE",{});var jq=a(Zm);VF=i(jq,"FlaxElectraPreTrainedModel"),jq.forEach(t),JF=i(vp," forward method, overrides the "),eu=n(vp,"CODE",{});var Cq=a(eu);GF=i(Cq,"__call__"),Cq.forEach(t),XF=i(vp," special method."),vp.forEach(t),YF=p(Xa),b(ka.$$.fragment,Xa),ZF=p(Xa),b(va.$$.fragment,Xa),Xa.forEach(t),It.forEach(t),zg=p(s),In=n(s,"H2",{class:!0});var nk=a(In);ya=n(nk,"A",{id:!0,class:!0,href:!0});var Pq=a(ya);tu=n(Pq,"SPAN",{});var Aq=a(tu);b(ed.$$.fragment,Aq),Aq.forEach(t),Pq.forEach(t),e0=p(nk),ou=n(nk,"SPAN",{});var Lq=a(ou);t0=i(Lq,"FlaxElectraForSequenceClassification"),Lq.forEach(t),nk.forEach(t),qg=p(s),lt=n(s,"DIV",{class:!0});var Dt=a(lt);b(td.$$.fragment,Dt),o0=p(Dt),nu=n(Dt,"P",{});var Oq=a(nu);n0=i(Oq,`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.`),Oq.forEach(t),s0=p(Dt),od=n(Dt,"P",{});var sk=a(od);a0=i(sk,"This model inherits from "),Hc=n(sk,"A",{href:!0});var Nq=a(Hc);r0=i(Nq,"FlaxPreTrainedModel"),Nq.forEach(t),i0=i(sk,`. 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)`),sk.forEach(t),l0=p(Dt),nd=n(Dt,"P",{});var ak=a(nd);d0=i(ak,`This model is also a Flax Linen
`),sd=n(ak,"A",{href:!0,rel:!0});var Iq=a(sd);c0=i(Iq,"flax.nn.Module"),Iq.forEach(t),p0=i(ak,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),ak.forEach(t),h0=p(Dt),su=n(Dt,"P",{});var Dq=a(su);m0=i(Dq,"Finally, this model supports inherent JAX features such as:"),Dq.forEach(t),u0=p(Dt),bo=n(Dt,"UL",{});var Ya=a(bo);au=n(Ya,"LI",{});var Sq=a(au);ad=n(Sq,"A",{href:!0,rel:!0});var Wq=a(ad);f0=i(Wq,"Just-In-Time (JIT) compilation"),Wq.forEach(t),Sq.forEach(t),g0=p(Ya),ru=n(Ya,"LI",{});var Uq=a(ru);rd=n(Uq,"A",{href:!0,rel:!0});var Bq=a(rd);_0=i(Bq,"Automatic Differentiation"),Bq.forEach(t),Uq.forEach(t),k0=p(Ya),iu=n(Ya,"LI",{});var Rq=a(iu);id=n(Rq,"A",{href:!0,rel:!0});var Hq=a(id);v0=i(Hq,"Vectorization"),Hq.forEach(t),Rq.forEach(t),y0=p(Ya),lu=n(Ya,"LI",{});var Kq=a(lu);ld=n(Kq,"A",{href:!0,rel:!0});var Qq=a(ld);T0=i(Qq,"Parallelization"),Qq.forEach(t),Kq.forEach(t),Ya.forEach(t),b0=p(Dt),ao=n(Dt,"DIV",{class:!0});var Za=a(ao);b(dd.$$.fragment,Za),w0=p(Za),Dn=n(Za,"P",{});var yp=a(Dn);E0=i(yp,"The "),du=n(yp,"CODE",{});var Vq=a(du);$0=i(Vq,"FlaxElectraPreTrainedModel"),Vq.forEach(t),F0=i(yp," forward method, overrides the "),cu=n(yp,"CODE",{});var Jq=a(cu);x0=i(Jq,"__call__"),Jq.forEach(t),M0=i(yp," special method."),yp.forEach(t),z0=p(Za),b(Ta.$$.fragment,Za),q0=p(Za),b(ba.$$.fragment,Za),Za.forEach(t),Dt.forEach(t),jg=p(s),Sn=n(s,"H2",{class:!0});var rk=a(Sn);wa=n(rk,"A",{id:!0,class:!0,href:!0});var Gq=a(wa);pu=n(Gq,"SPAN",{});var Xq=a(pu);b(cd.$$.fragment,Xq),Xq.forEach(t),Gq.forEach(t),j0=p(rk),hu=n(rk,"SPAN",{});var Yq=a(hu);C0=i(Yq,"FlaxElectraForMultipleChoice"),Yq.forEach(t),rk.forEach(t),Cg=p(s),dt=n(s,"DIV",{class:!0});var St=a(dt);b(pd.$$.fragment,St),P0=p(St),mu=n(St,"P",{});var Zq=a(mu);A0=i(Zq,`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.`),Zq.forEach(t),L0=p(St),hd=n(St,"P",{});var ik=a(hd);O0=i(ik,"This model inherits from "),Kc=n(ik,"A",{href:!0});var ej=a(Kc);N0=i(ej,"FlaxPreTrainedModel"),ej.forEach(t),I0=i(ik,`. 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)`),ik.forEach(t),D0=p(St),md=n(St,"P",{});var lk=a(md);S0=i(lk,`This model is also a Flax Linen
`),ud=n(lk,"A",{href:!0,rel:!0});var tj=a(ud);W0=i(tj,"flax.nn.Module"),tj.forEach(t),U0=i(lk,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),lk.forEach(t),B0=p(St),uu=n(St,"P",{});var oj=a(uu);R0=i(oj,"Finally, this model supports inherent JAX features such as:"),oj.forEach(t),H0=p(St),wo=n(St,"UL",{});var er=a(wo);fu=n(er,"LI",{});var nj=a(fu);fd=n(nj,"A",{href:!0,rel:!0});var sj=a(fd);K0=i(sj,"Just-In-Time (JIT) compilation"),sj.forEach(t),nj.forEach(t),Q0=p(er),gu=n(er,"LI",{});var aj=a(gu);gd=n(aj,"A",{href:!0,rel:!0});var rj=a(gd);V0=i(rj,"Automatic Differentiation"),rj.forEach(t),aj.forEach(t),J0=p(er),_u=n(er,"LI",{});var ij=a(_u);_d=n(ij,"A",{href:!0,rel:!0});var lj=a(_d);G0=i(lj,"Vectorization"),lj.forEach(t),ij.forEach(t),X0=p(er),ku=n(er,"LI",{});var dj=a(ku);kd=n(dj,"A",{href:!0,rel:!0});var cj=a(kd);Y0=i(cj,"Parallelization"),cj.forEach(t),dj.forEach(t),er.forEach(t),Z0=p(St),ro=n(St,"DIV",{class:!0});var tr=a(ro);b(vd.$$.fragment,tr),e4=p(tr),Wn=n(tr,"P",{});var Tp=a(Wn);t4=i(Tp,"The "),vu=n(Tp,"CODE",{});var pj=a(vu);o4=i(pj,"FlaxElectraPreTrainedModel"),pj.forEach(t),n4=i(Tp," forward method, overrides the "),yu=n(Tp,"CODE",{});var hj=a(yu);s4=i(hj,"__call__"),hj.forEach(t),a4=i(Tp," special method."),Tp.forEach(t),r4=p(tr),b(Ea.$$.fragment,tr),i4=p(tr),b($a.$$.fragment,tr),tr.forEach(t),St.forEach(t),Pg=p(s),Un=n(s,"H2",{class:!0});var dk=a(Un);Fa=n(dk,"A",{id:!0,class:!0,href:!0});var mj=a(Fa);Tu=n(mj,"SPAN",{});var uj=a(Tu);b(yd.$$.fragment,uj),uj.forEach(t),mj.forEach(t),l4=p(dk),bu=n(dk,"SPAN",{});var fj=a(bu);d4=i(fj,"FlaxElectraForTokenClassification"),fj.forEach(t),dk.forEach(t),Ag=p(s),et=n(s,"DIV",{class:!0});var yt=a(et);b(Td.$$.fragment,yt),c4=p(yt),wu=n(yt,"P",{});var gj=a(wu);p4=i(gj,"Electra model with a token classification head on top."),gj.forEach(t),h4=p(yt),Eu=n(yt,"P",{});var _j=a(Eu);m4=i(_j,"Both the discriminator and generator may be loaded into this model."),_j.forEach(t),u4=p(yt),bd=n(yt,"P",{});var ck=a(bd);f4=i(ck,"This model inherits from "),Qc=n(ck,"A",{href:!0});var kj=a(Qc);g4=i(kj,"FlaxPreTrainedModel"),kj.forEach(t),_4=i(ck,`. 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)`),ck.forEach(t),k4=p(yt),wd=n(yt,"P",{});var pk=a(wd);v4=i(pk,`This model is also a Flax Linen
`),Ed=n(pk,"A",{href:!0,rel:!0});var vj=a(Ed);y4=i(vj,"flax.nn.Module"),vj.forEach(t),T4=i(pk,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),pk.forEach(t),b4=p(yt),$u=n(yt,"P",{});var yj=a($u);w4=i(yj,"Finally, this model supports inherent JAX features such as:"),yj.forEach(t),E4=p(yt),Eo=n(yt,"UL",{});var or=a(Eo);Fu=n(or,"LI",{});var Tj=a(Fu);$d=n(Tj,"A",{href:!0,rel:!0});var bj=a($d);$4=i(bj,"Just-In-Time (JIT) compilation"),bj.forEach(t),Tj.forEach(t),F4=p(or),xu=n(or,"LI",{});var wj=a(xu);Fd=n(wj,"A",{href:!0,rel:!0});var Ej=a(Fd);x4=i(Ej,"Automatic Differentiation"),Ej.forEach(t),wj.forEach(t),M4=p(or),Mu=n(or,"LI",{});var $j=a(Mu);xd=n($j,"A",{href:!0,rel:!0});var Fj=a(xd);z4=i(Fj,"Vectorization"),Fj.forEach(t),$j.forEach(t),q4=p(or),zu=n(or,"LI",{});var xj=a(zu);Md=n(xj,"A",{href:!0,rel:!0});var Mj=a(Md);j4=i(Mj,"Parallelization"),Mj.forEach(t),xj.forEach(t),or.forEach(t),C4=p(yt),io=n(yt,"DIV",{class:!0});var nr=a(io);b(zd.$$.fragment,nr),P4=p(nr),Bn=n(nr,"P",{});var bp=a(Bn);A4=i(bp,"The "),qu=n(bp,"CODE",{});var zj=a(qu);L4=i(zj,"FlaxElectraPreTrainedModel"),zj.forEach(t),O4=i(bp," forward method, overrides the "),ju=n(bp,"CODE",{});var qj=a(ju);N4=i(qj,"__call__"),qj.forEach(t),I4=i(bp," special method."),bp.forEach(t),D4=p(nr),b(xa.$$.fragment,nr),S4=p(nr),b(Ma.$$.fragment,nr),nr.forEach(t),yt.forEach(t),Lg=p(s),Rn=n(s,"H2",{class:!0});var hk=a(Rn);za=n(hk,"A",{id:!0,class:!0,href:!0});var jj=a(za);Cu=n(jj,"SPAN",{});var Cj=a(Cu);b(qd.$$.fragment,Cj),Cj.forEach(t),jj.forEach(t),W4=p(hk),Pu=n(hk,"SPAN",{});var Pj=a(Pu);U4=i(Pj,"FlaxElectraForQuestionAnswering"),Pj.forEach(t),hk.forEach(t),Og=p(s),ct=n(s,"DIV",{class:!0});var Wt=a(ct);b(jd.$$.fragment,Wt),B4=p(Wt),Hn=n(Wt,"P",{});var wp=a(Hn);R4=i(wp,`ELECTRA Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Au=n(wp,"CODE",{});var Aj=a(Au);H4=i(Aj,"span start logits"),Aj.forEach(t),K4=i(wp," and "),Lu=n(wp,"CODE",{});var Lj=a(Lu);Q4=i(Lj,"span end logits"),Lj.forEach(t),V4=i(wp,")."),wp.forEach(t),J4=p(Wt),Cd=n(Wt,"P",{});var mk=a(Cd);G4=i(mk,"This model inherits from "),Vc=n(mk,"A",{href:!0});var Oj=a(Vc);X4=i(Oj,"FlaxPreTrainedModel"),Oj.forEach(t),Y4=i(mk,`. 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)`),mk.forEach(t),Z4=p(Wt),Pd=n(Wt,"P",{});var uk=a(Pd);ex=i(uk,`This model is also a Flax Linen
`),Ad=n(uk,"A",{href:!0,rel:!0});var Nj=a(Ad);tx=i(Nj,"flax.nn.Module"),Nj.forEach(t),ox=i(uk,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),uk.forEach(t),nx=p(Wt),Ou=n(Wt,"P",{});var Ij=a(Ou);sx=i(Ij,"Finally, this model supports inherent JAX features such as:"),Ij.forEach(t),ax=p(Wt),$o=n(Wt,"UL",{});var sr=a($o);Nu=n(sr,"LI",{});var Dj=a(Nu);Ld=n(Dj,"A",{href:!0,rel:!0});var Sj=a(Ld);rx=i(Sj,"Just-In-Time (JIT) compilation"),Sj.forEach(t),Dj.forEach(t),ix=p(sr),Iu=n(sr,"LI",{});var Wj=a(Iu);Od=n(Wj,"A",{href:!0,rel:!0});var Uj=a(Od);lx=i(Uj,"Automatic Differentiation"),Uj.forEach(t),Wj.forEach(t),dx=p(sr),Du=n(sr,"LI",{});var Bj=a(Du);Nd=n(Bj,"A",{href:!0,rel:!0});var Rj=a(Nd);cx=i(Rj,"Vectorization"),Rj.forEach(t),Bj.forEach(t),px=p(sr),Su=n(sr,"LI",{});var Hj=a(Su);Id=n(Hj,"A",{href:!0,rel:!0});var Kj=a(Id);hx=i(Kj,"Parallelization"),Kj.forEach(t),Hj.forEach(t),sr.forEach(t),mx=p(Wt),lo=n(Wt,"DIV",{class:!0});var ar=a(lo);b(Dd.$$.fragment,ar),ux=p(ar),Kn=n(ar,"P",{});var Ep=a(Kn);fx=i(Ep,"The "),Wu=n(Ep,"CODE",{});var Qj=a(Wu);gx=i(Qj,"FlaxElectraPreTrainedModel"),Qj.forEach(t),_x=i(Ep," forward method, overrides the "),Uu=n(Ep,"CODE",{});var Vj=a(Uu);kx=i(Vj,"__call__"),Vj.forEach(t),vx=i(Ep," special method."),Ep.forEach(t),yx=p(ar),b(qa.$$.fragment,ar),Tx=p(ar),b(ja.$$.fragment,ar),ar.forEach(t),Wt.forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(dP)),m(f,"id","electra"),m(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(f,"href","#electra"),m(u,"class","relative group"),m(te,"alt","Models"),Jj(te.src,M="https://img.shields.io/badge/All_model_pages-electra-blueviolet")||m(te,"src",M),m(de,"href","https://huggingface.co/models?filter=electra"),m(ce,"alt","Spaces"),Jj(ce.src,Ne="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||m(ce,"src",Ne),m(K,"href","https://huggingface.co/spaces/docs-demos/electra_large_discriminator_squad2_512"),m(W,"class","flex flex-wrap space-x-1"),m(re,"id","overview"),m(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(re,"href","#overview"),m(ae,"class","relative group"),m(le,"href","https://openreview.net/pdf?id=r1xMH1BtvB"),m(le,"rel","nofollow"),m(ee,"href","https://github.com/google-research/electra"),m(ee,"rel","nofollow"),m(O,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForMaskedLM"),m(y,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForPreTraining"),m(j,"href","https://huggingface.co/lysandre"),m(j,"rel","nofollow"),m(We,"href","https://github.com/google-research/electra"),m(We,"rel","nofollow"),m(Se,"id","documentation-resources"),m(Se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Se,"href","#documentation-resources"),m(U,"class","relative group"),m(Qd,"href","./tasks/sequence_classification"),m(Vd,"href","./tasks/token_classification"),m(Jd,"href","./tasks/question_answering"),m(Gd,"href","./tasks/language_modeling"),m(Xd,"href","./tasks/masked_language_modeling"),m(Yd,"href","./tasks/multiple_choice"),m(Gn,"id","transformers.ElectraConfig"),m(Gn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Gn,"href","#transformers.ElectraConfig"),m(Uo,"class","relative group"),m(Zd,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraModel"),m(ec,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraModel"),m(lr,"href","https://huggingface.co/google/electra-small-discriminator"),m(lr,"rel","nofollow"),m(tc,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),m(oc,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),m(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Yn,"id","transformers.ElectraTokenizer"),m(Yn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Yn,"href","#transformers.ElectraTokenizer"),m(Ro,"class","relative group"),m(nc,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Zn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ts,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(os,"id","transformers.ElectraTokenizerFast"),m(os,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(os,"href","#transformers.ElectraTokenizerFast"),m(Ko,"class","relative group"),m(rc,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ss,"id","transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"),m(ss,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ss,"href","#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"),m(Vo,"class","relative group"),m(dc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForPreTraining"),m(Jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(cc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraForPreTraining"),m(Go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(as,"id","transformers.ElectraModel"),m(as,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(as,"href","#transformers.ElectraModel"),m(Xo,"class","relative group"),m(pc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m(Ar,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Ar,"rel","nofollow"),m(hc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraModel"),m(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ls,"id","transformers.ElectraForPreTraining"),m(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"),m(ls,"href","#transformers.ElectraForPreTraining"),m(Zo,"class","relative group"),m(mc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m(Sr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Sr,"rel","nofollow"),m(uc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForPreTraining"),m(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ps,"id","transformers.ElectraForCausalLM"),m(ps,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ps,"href","#transformers.ElectraForCausalLM"),m(tn,"class","relative group"),m(fc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m(Qr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Qr,"rel","nofollow"),m(gc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForCausalLM"),m(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(us,"id","transformers.ElectraForMaskedLM"),m(us,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(us,"href","#transformers.ElectraForMaskedLM"),m(nn,"class","relative group"),m(_c,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m(Zr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Zr,"rel","nofollow"),m(kc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForMaskedLM"),m(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_s,"id","transformers.ElectraForSequenceClassification"),m(_s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(_s,"href","#transformers.ElectraForSequenceClassification"),m(an,"class","relative group"),m(vc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m(ai,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(ai,"rel","nofollow"),m(yc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForSequenceClassification"),m(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ts,"id","transformers.ElectraForMultipleChoice"),m(Ts,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Ts,"href","#transformers.ElectraForMultipleChoice"),m(ln,"class","relative group"),m(Tc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m(pi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(pi,"rel","nofollow"),m(bc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForMultipleChoice"),m(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Es,"id","transformers.ElectraForTokenClassification"),m(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"),m(Es,"href","#transformers.ElectraForTokenClassification"),m(cn,"class","relative group"),m(wc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m(_i,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(_i,"rel","nofollow"),m(Ec,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForTokenClassification"),m(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(xs,"id","transformers.ElectraForQuestionAnswering"),m(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"),m(xs,"href","#transformers.ElectraForQuestionAnswering"),m(hn,"class","relative group"),m($c,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),m(wi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(wi,"rel","nofollow"),m(Fc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.ElectraForQuestionAnswering"),m(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(qs,"id","transformers.TFElectraModel"),m(qs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(qs,"href","#transformers.TFElectraModel"),m(fn,"class","relative group"),m(xc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),m(zi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(zi,"rel","nofollow"),m(Mc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraModel"),m(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(As,"id","transformers.TFElectraForPreTraining"),m(As,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(As,"href","#transformers.TFElectraForPreTraining"),m(_n,"class","relative group"),m(zc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),m(Li,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Li,"rel","nofollow"),m(qc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraForPreTraining"),m(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Is,"id","transformers.TFElectraForMaskedLM"),m(Is,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Is,"href","#transformers.TFElectraForMaskedLM"),m(vn,"class","relative group"),m(jc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),m(Wi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Wi,"rel","nofollow"),m(Cc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraForMaskedLM"),m(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Bs,"id","transformers.TFElectraForSequenceClassification"),m(Bs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Bs,"href","#transformers.TFElectraForSequenceClassification"),m(Tn,"class","relative group"),m(Pc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),m(Qi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Qi,"rel","nofollow"),m(Ac,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraForSequenceClassification"),m(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Vs,"id","transformers.TFElectraForMultipleChoice"),m(Vs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Vs,"href","#transformers.TFElectraForMultipleChoice"),m(wn,"class","relative group"),m(Lc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),m(Zi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Zi,"rel","nofollow"),m(Oc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraForMultipleChoice"),m(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ys,"id","transformers.TFElectraForTokenClassification"),m(Ys,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Ys,"href","#transformers.TFElectraForTokenClassification"),m($n,"class","relative group"),m(Nc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),m(al,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(al,"rel","nofollow"),m(Ic,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraForTokenClassification"),m(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(na,"id","transformers.TFElectraForQuestionAnswering"),m(na,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(na,"href","#transformers.TFElectraForQuestionAnswering"),m(xn,"class","relative group"),m(Dc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),m(pl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(pl,"rel","nofollow"),m(Sc,"href","/docs/transformers/v4.27.1/en/model_doc/electra#transformers.TFElectraForQuestionAnswering"),m(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(la,"id","transformers.FlaxElectraModel"),m(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"),m(la,"href","#transformers.FlaxElectraModel"),m(qn,"class","relative group"),m(Wc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(_l,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(_l,"rel","nofollow"),m(kl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(kl,"rel","nofollow"),m(vl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(vl,"rel","nofollow"),m(yl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(yl,"rel","nofollow"),m(Tl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Tl,"rel","nofollow"),m(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pa,"id","transformers.FlaxElectraForPreTraining"),m(pa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(pa,"href","#transformers.FlaxElectraForPreTraining"),m(Cn,"class","relative group"),m(Uc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(xl,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(xl,"rel","nofollow"),m(Ml,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Ml,"rel","nofollow"),m(zl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(zl,"rel","nofollow"),m(ql,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(ql,"rel","nofollow"),m(jl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(jl,"rel","nofollow"),m(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ua,"id","transformers.FlaxElectraForCausalLM"),m(ua,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ua,"href","#transformers.FlaxElectraForCausalLM"),m(An,"class","relative group"),m(Bc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Nl,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Nl,"rel","nofollow"),m(Il,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Il,"rel","nofollow"),m(Dl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Dl,"rel","nofollow"),m(Sl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Sl,"rel","nofollow"),m(Wl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Wl,"rel","nofollow"),m(no,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_a,"id","transformers.FlaxElectraForMaskedLM"),m(_a,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(_a,"href","#transformers.FlaxElectraForMaskedLM"),m(On,"class","relative group"),m(Rc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Vl,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Vl,"rel","nofollow"),m(Jl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Jl,"rel","nofollow"),m(Gl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Gl,"rel","nofollow"),m(Xl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Xl,"rel","nofollow"),m(Yl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Yl,"rel","nofollow"),m(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ya,"id","transformers.FlaxElectraForSequenceClassification"),m(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"),m(ya,"href","#transformers.FlaxElectraForSequenceClassification"),m(In,"class","relative group"),m(Hc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(sd,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(sd,"rel","nofollow"),m(ad,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(ad,"rel","nofollow"),m(rd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(rd,"rel","nofollow"),m(id,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(id,"rel","nofollow"),m(ld,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(ld,"rel","nofollow"),m(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wa,"id","transformers.FlaxElectraForMultipleChoice"),m(wa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(wa,"href","#transformers.FlaxElectraForMultipleChoice"),m(Sn,"class","relative group"),m(Kc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ud,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(ud,"rel","nofollow"),m(fd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(fd,"rel","nofollow"),m(gd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(gd,"rel","nofollow"),m(_d,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(_d,"rel","nofollow"),m(kd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(kd,"rel","nofollow"),m(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Fa,"id","transformers.FlaxElectraForTokenClassification"),m(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"),m(Fa,"href","#transformers.FlaxElectraForTokenClassification"),m(Un,"class","relative group"),m(Qc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Ed,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Ed,"rel","nofollow"),m($d,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m($d,"rel","nofollow"),m(Fd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Fd,"rel","nofollow"),m(xd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(xd,"rel","nofollow"),m(Md,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Md,"rel","nofollow"),m(io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(za,"id","transformers.FlaxElectraForQuestionAnswering"),m(za,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(za,"href","#transformers.FlaxElectraForQuestionAnswering"),m(Rn,"class","relative group"),m(Vc,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Ad,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Ad,"rel","nofollow"),m(Ld,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Ld,"rel","nofollow"),m(Od,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Od,"rel","nofollow"),m(Nd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Nd,"rel","nofollow"),m(Id,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Id,"rel","nofollow"),m(lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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,k){e(document.head,d),g(s,v,k),g(s,u,k),e(u,f),e(f,_),w(l,_,null),e(u,h),e(u,z),e(z,ve),g(s,fe,k),g(s,W,k),e(W,de),e(de,te),e(W,ye),e(W,K),e(K,ce),g(s,G,k),g(s,ae,k),e(ae,re),e(re,Q),w(ie,Q,null),e(ae,Te),e(ae,V),e(V,be),g(s,ge,k),g(s,R,k),e(R,we),e(R,le),e(le,ne),e(R,C),g(s,A,k),g(s,pe,k),e(pe,Y),g(s,_e,k),g(s,he,k),e(he,J),e(J,Ee),g(s,ke,k),g(s,P,k),e(P,$e),g(s,X,k),g(s,se,k),e(se,me),e(me,Z),e(se,Fe),e(se,ue),e(ue,S),e(se,xe),e(se,I),e(I,Me),e(I,ee),e(ee,L),e(I,ze),e(I,O),e(O,qe),e(I,je),e(I,y),e(y,q),e(I,Ke),g(s,oe,k),g(s,Ce,k),e(Ce,Qe),e(Ce,j),e(j,Ve),e(Ce,Je),e(Ce,We),e(We,Ge),e(Ce,Xe),g(s,D,k),g(s,U,k),e(U,Se),e(Se,Ue),w(H,Ue,null),e(U,Ye),e(U,Be),e(Be,Pe),g(s,He,k),g(s,B,k),e(B,Re),e(Re,Qd),e(Qd,fk),e(B,gk),e(B,$p),e($p,Vd),e(Vd,_k),e(B,kk),e(B,Fp),e(Fp,Jd),e(Jd,vk),e(B,yk),e(B,xp),e(xp,Gd),e(Gd,Tk),e(B,bk),e(B,Mp),e(Mp,Xd),e(Xd,wk),e(B,Ek),e(B,zp),e(zp,Yd),e(Yd,$k),g(s,Of,k),g(s,Uo,k),e(Uo,Gn),e(Gn,qp),w(rr,qp,null),e(Uo,Fk),e(Uo,jp),e(jp,xk),g(s,Nf,k),g(s,Ut,k),w(ir,Ut,null),e(Ut,Mk),e(Ut,_o),e(_o,zk),e(_o,Zd),e(Zd,qk),e(_o,jk),e(_o,ec),e(ec,Ck),e(_o,Pk),e(_o,lr),e(lr,Ak),e(_o,Lk),e(Ut,Ok),e(Ut,Bo),e(Bo,Nk),e(Bo,tc),e(tc,Ik),e(Bo,Dk),e(Bo,oc),e(oc,Sk),e(Bo,Wk),e(Ut,Uk),w(Xn,Ut,null),g(s,If,k),g(s,Ro,k),e(Ro,Yn),e(Yn,Cp),w(dr,Cp,null),e(Ro,Bk),e(Ro,Pp),e(Pp,Rk),g(s,Df,k),g(s,tt,k),w(cr,tt,null),e(tt,Hk),e(tt,Ap),e(Ap,Kk),e(tt,Qk),e(tt,pr),e(pr,Vk),e(pr,nc),e(nc,Jk),e(pr,Gk),e(tt,Xk),e(tt,zo),w(hr,zo,null),e(zo,Yk),e(zo,Lp),e(Lp,Zk),e(zo,ev),e(zo,mr),e(mr,sc),e(sc,tv),e(sc,Op),e(Op,ov),e(mr,nv),e(mr,ac),e(ac,sv),e(ac,Np),e(Np,av),e(tt,rv),e(tt,Zn),w(ur,Zn,null),e(Zn,iv),e(Zn,Ip),e(Ip,lv),e(tt,dv),e(tt,Bt),w(fr,Bt,null),e(Bt,cv),e(Bt,Dp),e(Dp,pv),e(Bt,hv),w(es,Bt,null),e(Bt,mv),e(Bt,Ho),e(Ho,uv),e(Ho,Sp),e(Sp,fv),e(Ho,gv),e(Ho,Wp),e(Wp,_v),e(Ho,kv),e(tt,vv),e(tt,ts),w(gr,ts,null),e(ts,yv),e(ts,_r),e(_r,Tv),e(_r,Up),e(Up,bv),e(_r,wv),g(s,Sf,k),g(s,Ko,k),e(Ko,os),e(os,Bp),w(kr,Bp,null),e(Ko,Ev),e(Ko,Rp),e(Rp,$v),g(s,Wf,k),g(s,Tt,k),w(vr,Tt,null),e(Tt,Fv),e(Tt,yr),e(yr,xv),e(yr,Hp),e(Hp,Mv),e(yr,zv),e(Tt,qv),e(Tt,Tr),e(Tr,jv),e(Tr,rc),e(rc,Cv),e(Tr,Pv),e(Tt,Av),e(Tt,qo),w(br,qo,null),e(qo,Lv),e(qo,Kp),e(Kp,Ov),e(qo,Nv),e(qo,wr),e(wr,ic),e(ic,Iv),e(ic,Qp),e(Qp,Dv),e(wr,Sv),e(wr,lc),e(lc,Wv),e(lc,Vp),e(Vp,Uv),e(Tt,Bv),e(Tt,Rt),w(Er,Rt,null),e(Rt,Rv),e(Rt,Jp),e(Jp,Hv),e(Rt,Kv),w(ns,Rt,null),e(Rt,Qv),e(Rt,Qo),e(Qo,Vv),e(Qo,Gp),e(Gp,Jv),e(Qo,Gv),e(Qo,Xp),e(Xp,Xv),e(Qo,Yv),g(s,Uf,k),g(s,Vo,k),e(Vo,ss),e(ss,Yp),w($r,Yp,null),e(Vo,Zv),e(Vo,Zp),e(Zp,ey),g(s,Bf,k),g(s,Jo,k),w(Fr,Jo,null),e(Jo,ty),e(Jo,xr),e(xr,oy),e(xr,dc),e(dc,ny),e(xr,sy),g(s,Rf,k),g(s,Go,k),w(Mr,Go,null),e(Go,ay),e(Go,zr),e(zr,ry),e(zr,cc),e(cc,iy),e(zr,ly),g(s,Hf,k),g(s,Xo,k),e(Xo,as),e(as,eh),w(qr,eh,null),e(Xo,dy),e(Xo,th),e(th,cy),g(s,Kf,k),g(s,bt,k),w(jr,bt,null),e(bt,py),e(bt,oh),e(oh,hy),e(bt,my),e(bt,Cr),e(Cr,uy),e(Cr,pc),e(pc,fy),e(Cr,gy),e(bt,_y),e(bt,Pr),e(Pr,ky),e(Pr,Ar),e(Ar,vy),e(Pr,yy),e(bt,Ty),e(bt,Ht),w(Lr,Ht,null),e(Ht,by),e(Ht,Yo),e(Yo,wy),e(Yo,hc),e(hc,Ey),e(Yo,$y),e(Yo,nh),e(nh,Fy),e(Yo,xy),e(Ht,My),w(rs,Ht,null),e(Ht,zy),w(is,Ht,null),g(s,Qf,k),g(s,Zo,k),e(Zo,ls),e(ls,sh),w(Or,sh,null),e(Zo,qy),e(Zo,ah),e(ah,jy),g(s,Vf,k),g(s,pt,k),w(Nr,pt,null),e(pt,Cy),e(pt,rh),e(rh,Py),e(pt,Ay),e(pt,ih),e(ih,Ly),e(pt,Oy),e(pt,Ir),e(Ir,Ny),e(Ir,mc),e(mc,Iy),e(Ir,Dy),e(pt,Sy),e(pt,Dr),e(Dr,Wy),e(Dr,Sr),e(Sr,Uy),e(Dr,By),e(pt,Ry),e(pt,Kt),w(Wr,Kt,null),e(Kt,Hy),e(Kt,en),e(en,Ky),e(en,uc),e(uc,Qy),e(en,Vy),e(en,lh),e(lh,Jy),e(en,Gy),e(Kt,Xy),w(ds,Kt,null),e(Kt,Yy),w(cs,Kt,null),g(s,Jf,k),g(s,tn,k),e(tn,ps),e(ps,dh),w(Ur,dh,null),e(tn,Zy),e(tn,ch),e(ch,eT),g(s,Gf,k),g(s,wt,k),w(Br,wt,null),e(wt,tT),e(wt,Rr),e(Rr,oT),e(Rr,ph),e(ph,nT),e(Rr,sT),e(wt,aT),e(wt,Hr),e(Hr,rT),e(Hr,fc),e(fc,iT),e(Hr,lT),e(wt,dT),e(wt,Kr),e(Kr,cT),e(Kr,Qr),e(Qr,pT),e(Kr,hT),e(wt,mT),e(wt,Qt),w(Vr,Qt,null),e(Qt,uT),e(Qt,on),e(on,fT),e(on,gc),e(gc,gT),e(on,_T),e(on,hh),e(hh,kT),e(on,vT),e(Qt,yT),w(hs,Qt,null),e(Qt,TT),w(ms,Qt,null),g(s,Xf,k),g(s,nn,k),e(nn,us),e(us,mh),w(Jr,mh,null),e(nn,bT),e(nn,uh),e(uh,wT),g(s,Yf,k),g(s,ht,k),w(Gr,ht,null),e(ht,ET),e(ht,fh),e(fh,$T),e(ht,FT),e(ht,gh),e(gh,xT),e(ht,MT),e(ht,Xr),e(Xr,zT),e(Xr,_c),e(_c,qT),e(Xr,jT),e(ht,CT),e(ht,Yr),e(Yr,PT),e(Yr,Zr),e(Zr,AT),e(Yr,LT),e(ht,OT),e(ht,Vt),w(ei,Vt,null),e(Vt,NT),e(Vt,sn),e(sn,IT),e(sn,kc),e(kc,DT),e(sn,ST),e(sn,_h),e(_h,WT),e(sn,UT),e(Vt,BT),w(fs,Vt,null),e(Vt,RT),w(gs,Vt,null),g(s,Zf,k),g(s,an,k),e(an,_s),e(_s,kh),w(ti,kh,null),e(an,HT),e(an,vh),e(vh,KT),g(s,eg,k),g(s,Et,k),w(oi,Et,null),e(Et,QT),e(Et,yh),e(yh,VT),e(Et,JT),e(Et,ni),e(ni,GT),e(ni,vc),e(vc,XT),e(ni,YT),e(Et,ZT),e(Et,si),e(si,eb),e(si,ai),e(ai,tb),e(si,ob),e(Et,nb),e(Et,Mt),w(ri,Mt,null),e(Mt,sb),e(Mt,rn),e(rn,ab),e(rn,yc),e(yc,rb),e(rn,ib),e(rn,Th),e(Th,lb),e(rn,db),e(Mt,cb),w(ks,Mt,null),e(Mt,pb),w(vs,Mt,null),e(Mt,hb),w(ys,Mt,null),g(s,tg,k),g(s,ln,k),e(ln,Ts),e(Ts,bh),w(ii,bh,null),e(ln,mb),e(ln,wh),e(wh,ub),g(s,og,k),g(s,$t,k),w(li,$t,null),e($t,fb),e($t,Eh),e(Eh,gb),e($t,_b),e($t,di),e(di,kb),e(di,Tc),e(Tc,vb),e(di,yb),e($t,Tb),e($t,ci),e(ci,bb),e(ci,pi),e(pi,wb),e(ci,Eb),e($t,$b),e($t,Jt),w(hi,Jt,null),e(Jt,Fb),e(Jt,dn),e(dn,xb),e(dn,bc),e(bc,Mb),e(dn,zb),e(dn,$h),e($h,qb),e(dn,jb),e(Jt,Cb),w(bs,Jt,null),e(Jt,Pb),w(ws,Jt,null),g(s,ng,k),g(s,cn,k),e(cn,Es),e(Es,Fh),w(mi,Fh,null),e(cn,Ab),e(cn,xh),e(xh,Lb),g(s,sg,k),g(s,mt,k),w(ui,mt,null),e(mt,Ob),e(mt,Mh),e(Mh,Nb),e(mt,Ib),e(mt,zh),e(zh,Db),e(mt,Sb),e(mt,fi),e(fi,Wb),e(fi,wc),e(wc,Ub),e(fi,Bb),e(mt,Rb),e(mt,gi),e(gi,Hb),e(gi,_i),e(_i,Kb),e(gi,Qb),e(mt,Vb),e(mt,Gt),w(ki,Gt,null),e(Gt,Jb),e(Gt,pn),e(pn,Gb),e(pn,Ec),e(Ec,Xb),e(pn,Yb),e(pn,qh),e(qh,Zb),e(pn,e1),e(Gt,t1),w($s,Gt,null),e(Gt,o1),w(Fs,Gt,null),g(s,ag,k),g(s,hn,k),e(hn,xs),e(xs,jh),w(vi,jh,null),e(hn,n1),e(hn,Ch),e(Ch,s1),g(s,rg,k),g(s,Ft,k),w(yi,Ft,null),e(Ft,a1),e(Ft,mn),e(mn,r1),e(mn,Ph),e(Ph,i1),e(mn,l1),e(mn,Ah),e(Ah,d1),e(mn,c1),e(Ft,p1),e(Ft,Ti),e(Ti,h1),e(Ti,$c),e($c,m1),e(Ti,u1),e(Ft,f1),e(Ft,bi),e(bi,g1),e(bi,wi),e(wi,_1),e(bi,k1),e(Ft,v1),e(Ft,Xt),w(Ei,Xt,null),e(Xt,y1),e(Xt,un),e(un,T1),e(un,Fc),e(Fc,b1),e(un,w1),e(un,Lh),e(Lh,E1),e(un,$1),e(Xt,F1),w(Ms,Xt,null),e(Xt,x1),w(zs,Xt,null),g(s,ig,k),g(s,fn,k),e(fn,qs),e(qs,Oh),w($i,Oh,null),e(fn,M1),e(fn,Nh),e(Nh,z1),g(s,lg,k),g(s,ut,k),w(Fi,ut,null),e(ut,q1),e(ut,Ih),e(Ih,j1),e(ut,C1),e(ut,xi),e(xi,P1),e(xi,xc),e(xc,A1),e(xi,L1),e(ut,O1),e(ut,Mi),e(Mi,N1),e(Mi,zi),e(zi,I1),e(Mi,D1),e(ut,S1),w(js,ut,null),e(ut,W1),e(ut,Yt),w(qi,Yt,null),e(Yt,U1),e(Yt,gn),e(gn,B1),e(gn,Mc),e(Mc,R1),e(gn,H1),e(gn,Dh),e(Dh,K1),e(gn,Q1),e(Yt,V1),w(Cs,Yt,null),e(Yt,J1),w(Ps,Yt,null),g(s,dg,k),g(s,_n,k),e(_n,As),e(As,Sh),w(ji,Sh,null),e(_n,G1),e(_n,Wh),e(Wh,X1),g(s,cg,k),g(s,ot,k),w(Ci,ot,null),e(ot,Y1),e(ot,Uh),e(Uh,Z1),e(ot,ew),e(ot,Bh),e(Bh,tw),e(ot,ow),e(ot,Pi),e(Pi,nw),e(Pi,zc),e(zc,sw),e(Pi,aw),e(ot,rw),e(ot,Ai),e(Ai,iw),e(Ai,Li),e(Li,lw),e(Ai,dw),e(ot,cw),w(Ls,ot,null),e(ot,pw),e(ot,Zt),w(Oi,Zt,null),e(Zt,hw),e(Zt,kn),e(kn,mw),e(kn,qc),e(qc,uw),e(kn,fw),e(kn,Rh),e(Rh,gw),e(kn,_w),e(Zt,kw),w(Os,Zt,null),e(Zt,vw),w(Ns,Zt,null),g(s,pg,k),g(s,vn,k),e(vn,Is),e(Is,Hh),w(Ni,Hh,null),e(vn,yw),e(vn,Kh),e(Kh,Tw),g(s,hg,k),g(s,nt,k),w(Ii,nt,null),e(nt,bw),e(nt,Qh),e(Qh,ww),e(nt,Ew),e(nt,Vh),e(Vh,$w),e(nt,Fw),e(nt,Di),e(Di,xw),e(Di,jc),e(jc,Mw),e(Di,zw),e(nt,qw),e(nt,Si),e(Si,jw),e(Si,Wi),e(Wi,Cw),e(Si,Pw),e(nt,Aw),w(Ds,nt,null),e(nt,Lw),e(nt,zt),w(Ui,zt,null),e(zt,Ow),e(zt,yn),e(yn,Nw),e(yn,Cc),e(Cc,Iw),e(yn,Dw),e(yn,Jh),e(Jh,Sw),e(yn,Ww),e(zt,Uw),w(Ss,zt,null),e(zt,Bw),w(Ws,zt,null),e(zt,Rw),w(Us,zt,null),g(s,mg,k),g(s,Tn,k),e(Tn,Bs),e(Bs,Gh),w(Bi,Gh,null),e(Tn,Hw),e(Tn,Xh),e(Xh,Kw),g(s,ug,k),g(s,ft,k),w(Ri,ft,null),e(ft,Qw),e(ft,Yh),e(Yh,Vw),e(ft,Jw),e(ft,Hi),e(Hi,Gw),e(Hi,Pc),e(Pc,Xw),e(Hi,Yw),e(ft,Zw),e(ft,Ki),e(Ki,eE),e(Ki,Qi),e(Qi,tE),e(Ki,oE),e(ft,nE),w(Rs,ft,null),e(ft,sE),e(ft,qt),w(Vi,qt,null),e(qt,aE),e(qt,bn),e(bn,rE),e(bn,Ac),e(Ac,iE),e(bn,lE),e(bn,Zh),e(Zh,dE),e(bn,cE),e(qt,pE),w(Hs,qt,null),e(qt,hE),w(Ks,qt,null),e(qt,mE),w(Qs,qt,null),g(s,fg,k),g(s,wn,k),e(wn,Vs),e(Vs,em),w(Ji,em,null),e(wn,uE),e(wn,tm),e(tm,fE),g(s,gg,k),g(s,gt,k),w(Gi,gt,null),e(gt,gE),e(gt,om),e(om,_E),e(gt,kE),e(gt,Xi),e(Xi,vE),e(Xi,Lc),e(Lc,yE),e(Xi,TE),e(gt,bE),e(gt,Yi),e(Yi,wE),e(Yi,Zi),e(Zi,EE),e(Yi,$E),e(gt,FE),w(Js,gt,null),e(gt,xE),e(gt,eo),w(el,eo,null),e(eo,ME),e(eo,En),e(En,zE),e(En,Oc),e(Oc,qE),e(En,jE),e(En,nm),e(nm,CE),e(En,PE),e(eo,AE),w(Gs,eo,null),e(eo,LE),w(Xs,eo,null),g(s,_g,k),g(s,$n,k),e($n,Ys),e(Ys,sm),w(tl,sm,null),e($n,OE),e($n,am),e(am,NE),g(s,kg,k),g(s,st,k),w(ol,st,null),e(st,IE),e(st,rm),e(rm,DE),e(st,SE),e(st,im),e(im,WE),e(st,UE),e(st,nl),e(nl,BE),e(nl,Nc),e(Nc,RE),e(nl,HE),e(st,KE),e(st,sl),e(sl,QE),e(sl,al),e(al,VE),e(sl,JE),e(st,GE),w(Zs,st,null),e(st,XE),e(st,jt),w(rl,jt,null),e(jt,YE),e(jt,Fn),e(Fn,ZE),e(Fn,Ic),e(Ic,e2),e(Fn,t2),e(Fn,lm),e(lm,o2),e(Fn,n2),e(jt,s2),w(ea,jt,null),e(jt,a2),w(ta,jt,null),e(jt,r2),w(oa,jt,null),g(s,vg,k),g(s,xn,k),e(xn,na),e(na,dm),w(il,dm,null),e(xn,i2),e(xn,cm),e(cm,l2),g(s,yg,k),g(s,_t,k),w(ll,_t,null),e(_t,d2),e(_t,Mn),e(Mn,c2),e(Mn,pm),e(pm,p2),e(Mn,h2),e(Mn,hm),e(hm,m2),e(Mn,u2),e(_t,f2),e(_t,dl),e(dl,g2),e(dl,Dc),e(Dc,_2),e(dl,k2),e(_t,v2),e(_t,cl),e(cl,y2),e(cl,pl),e(pl,T2),e(cl,b2),e(_t,w2),w(sa,_t,null),e(_t,E2),e(_t,Ct),w(hl,Ct,null),e(Ct,$2),e(Ct,zn),e(zn,F2),e(zn,Sc),e(Sc,x2),e(zn,M2),e(zn,mm),e(mm,z2),e(zn,q2),e(Ct,j2),w(aa,Ct,null),e(Ct,C2),w(ra,Ct,null),e(Ct,P2),w(ia,Ct,null),g(s,Tg,k),g(s,qn,k),e(qn,la),e(la,um),w(ml,um,null),e(qn,A2),e(qn,fm),e(fm,L2),g(s,bg,k),g(s,at,k),w(ul,at,null),e(at,O2),e(at,gm),e(gm,N2),e(at,I2),e(at,fl),e(fl,D2),e(fl,Wc),e(Wc,S2),e(fl,W2),e(at,U2),e(at,gl),e(gl,B2),e(gl,_l),e(_l,R2),e(gl,H2),e(at,K2),e(at,_m),e(_m,Q2),e(at,V2),e(at,ko),e(ko,km),e(km,kl),e(kl,J2),e(ko,G2),e(ko,vm),e(vm,vl),e(vl,X2),e(ko,Y2),e(ko,ym),e(ym,yl),e(yl,Z2),e(ko,e$),e(ko,Tm),e(Tm,Tl),e(Tl,t$),e(at,o$),e(at,to),w(bl,to,null),e(to,n$),e(to,jn),e(jn,s$),e(jn,bm),e(bm,a$),e(jn,r$),e(jn,wm),e(wm,i$),e(jn,l$),e(to,d$),w(da,to,null),e(to,c$),w(ca,to,null),g(s,wg,k),g(s,Cn,k),e(Cn,pa),e(pa,Em),w(wl,Em,null),e(Cn,p$),e(Cn,$m),e($m,h$),g(s,Eg,k),g(s,Ze,k),w(El,Ze,null),e(Ze,m$),e(Ze,Fm),e(Fm,u$),e(Ze,f$),e(Ze,xm),e(xm,g$),e(Ze,_$),e(Ze,$l),e($l,k$),e($l,Uc),e(Uc,v$),e($l,y$),e(Ze,T$),e(Ze,Fl),e(Fl,b$),e(Fl,xl),e(xl,w$),e(Fl,E$),e(Ze,$$),e(Ze,Mm),e(Mm,F$),e(Ze,x$),e(Ze,vo),e(vo,zm),e(zm,Ml),e(Ml,M$),e(vo,z$),e(vo,qm),e(qm,zl),e(zl,q$),e(vo,j$),e(vo,jm),e(jm,ql),e(ql,C$),e(vo,P$),e(vo,Cm),e(Cm,jl),e(jl,A$),e(Ze,L$),e(Ze,oo),w(Cl,oo,null),e(oo,O$),e(oo,Pn),e(Pn,N$),e(Pn,Pm),e(Pm,I$),e(Pn,D$),e(Pn,Am),e(Am,S$),e(Pn,W$),e(oo,U$),w(ha,oo,null),e(oo,B$),w(ma,oo,null),g(s,$g,k),g(s,An,k),e(An,ua),e(ua,Lm),w(Pl,Lm,null),e(An,R$),e(An,Om),e(Om,H$),g(s,Fg,k),g(s,rt,k),w(Al,rt,null),e(rt,K$),e(rt,Nm),e(Nm,Q$),e(rt,V$),e(rt,Ll),e(Ll,J$),e(Ll,Bc),e(Bc,G$),e(Ll,X$),e(rt,Y$),e(rt,Ol),e(Ol,Z$),e(Ol,Nl),e(Nl,eF),e(Ol,tF),e(rt,oF),e(rt,Im),e(Im,nF),e(rt,sF),e(rt,yo),e(yo,Dm),e(Dm,Il),e(Il,aF),e(yo,rF),e(yo,Sm),e(Sm,Dl),e(Dl,iF),e(yo,lF),e(yo,Wm),e(Wm,Sl),e(Sl,dF),e(yo,cF),e(yo,Um),e(Um,Wl),e(Wl,pF),e(rt,hF),e(rt,no),w(Ul,no,null),e(no,mF),e(no,Ln),e(Ln,uF),e(Ln,Bm),e(Bm,fF),e(Ln,gF),e(Ln,Rm),e(Rm,_F),e(Ln,kF),e(no,vF),w(fa,no,null),e(no,yF),w(ga,no,null),g(s,xg,k),g(s,On,k),e(On,_a),e(_a,Hm),w(Bl,Hm,null),e(On,TF),e(On,Km),e(Km,bF),g(s,Mg,k),g(s,it,k),w(Rl,it,null),e(it,wF),e(it,Hl),e(Hl,EF),e(Hl,Qm),e(Qm,$F),e(Hl,FF),e(it,xF),e(it,Kl),e(Kl,MF),e(Kl,Rc),e(Rc,zF),e(Kl,qF),e(it,jF),e(it,Ql),e(Ql,CF),e(Ql,Vl),e(Vl,PF),e(Ql,AF),e(it,LF),e(it,Vm),e(Vm,OF),e(it,NF),e(it,To),e(To,Jm),e(Jm,Jl),e(Jl,IF),e(To,DF),e(To,Gm),e(Gm,Gl),e(Gl,SF),e(To,WF),e(To,Xm),e(Xm,Xl),e(Xl,UF),e(To,BF),e(To,Ym),e(Ym,Yl),e(Yl,RF),e(it,HF),e(it,so),w(Zl,so,null),e(so,KF),e(so,Nn),e(Nn,QF),e(Nn,Zm),e(Zm,VF),e(Nn,JF),e(Nn,eu),e(eu,GF),e(Nn,XF),e(so,YF),w(ka,so,null),e(so,ZF),w(va,so,null),g(s,zg,k),g(s,In,k),e(In,ya),e(ya,tu),w(ed,tu,null),e(In,e0),e(In,ou),e(ou,t0),g(s,qg,k),g(s,lt,k),w(td,lt,null),e(lt,o0),e(lt,nu),e(nu,n0),e(lt,s0),e(lt,od),e(od,a0),e(od,Hc),e(Hc,r0),e(od,i0),e(lt,l0),e(lt,nd),e(nd,d0),e(nd,sd),e(sd,c0),e(nd,p0),e(lt,h0),e(lt,su),e(su,m0),e(lt,u0),e(lt,bo),e(bo,au),e(au,ad),e(ad,f0),e(bo,g0),e(bo,ru),e(ru,rd),e(rd,_0),e(bo,k0),e(bo,iu),e(iu,id),e(id,v0),e(bo,y0),e(bo,lu),e(lu,ld),e(ld,T0),e(lt,b0),e(lt,ao),w(dd,ao,null),e(ao,w0),e(ao,Dn),e(Dn,E0),e(Dn,du),e(du,$0),e(Dn,F0),e(Dn,cu),e(cu,x0),e(Dn,M0),e(ao,z0),w(Ta,ao,null),e(ao,q0),w(ba,ao,null),g(s,jg,k),g(s,Sn,k),e(Sn,wa),e(wa,pu),w(cd,pu,null),e(Sn,j0),e(Sn,hu),e(hu,C0),g(s,Cg,k),g(s,dt,k),w(pd,dt,null),e(dt,P0),e(dt,mu),e(mu,A0),e(dt,L0),e(dt,hd),e(hd,O0),e(hd,Kc),e(Kc,N0),e(hd,I0),e(dt,D0),e(dt,md),e(md,S0),e(md,ud),e(ud,W0),e(md,U0),e(dt,B0),e(dt,uu),e(uu,R0),e(dt,H0),e(dt,wo),e(wo,fu),e(fu,fd),e(fd,K0),e(wo,Q0),e(wo,gu),e(gu,gd),e(gd,V0),e(wo,J0),e(wo,_u),e(_u,_d),e(_d,G0),e(wo,X0),e(wo,ku),e(ku,kd),e(kd,Y0),e(dt,Z0),e(dt,ro),w(vd,ro,null),e(ro,e4),e(ro,Wn),e(Wn,t4),e(Wn,vu),e(vu,o4),e(Wn,n4),e(Wn,yu),e(yu,s4),e(Wn,a4),e(ro,r4),w(Ea,ro,null),e(ro,i4),w($a,ro,null),g(s,Pg,k),g(s,Un,k),e(Un,Fa),e(Fa,Tu),w(yd,Tu,null),e(Un,l4),e(Un,bu),e(bu,d4),g(s,Ag,k),g(s,et,k),w(Td,et,null),e(et,c4),e(et,wu),e(wu,p4),e(et,h4),e(et,Eu),e(Eu,m4),e(et,u4),e(et,bd),e(bd,f4),e(bd,Qc),e(Qc,g4),e(bd,_4),e(et,k4),e(et,wd),e(wd,v4),e(wd,Ed),e(Ed,y4),e(wd,T4),e(et,b4),e(et,$u),e($u,w4),e(et,E4),e(et,Eo),e(Eo,Fu),e(Fu,$d),e($d,$4),e(Eo,F4),e(Eo,xu),e(xu,Fd),e(Fd,x4),e(Eo,M4),e(Eo,Mu),e(Mu,xd),e(xd,z4),e(Eo,q4),e(Eo,zu),e(zu,Md),e(Md,j4),e(et,C4),e(et,io),w(zd,io,null),e(io,P4),e(io,Bn),e(Bn,A4),e(Bn,qu),e(qu,L4),e(Bn,O4),e(Bn,ju),e(ju,N4),e(Bn,I4),e(io,D4),w(xa,io,null),e(io,S4),w(Ma,io,null),g(s,Lg,k),g(s,Rn,k),e(Rn,za),e(za,Cu),w(qd,Cu,null),e(Rn,W4),e(Rn,Pu),e(Pu,U4),g(s,Og,k),g(s,ct,k),w(jd,ct,null),e(ct,B4),e(ct,Hn),e(Hn,R4),e(Hn,Au),e(Au,H4),e(Hn,K4),e(Hn,Lu),e(Lu,Q4),e(Hn,V4),e(ct,J4),e(ct,Cd),e(Cd,G4),e(Cd,Vc),e(Vc,X4),e(Cd,Y4),e(ct,Z4),e(ct,Pd),e(Pd,ex),e(Pd,Ad),e(Ad,tx),e(Pd,ox),e(ct,nx),e(ct,Ou),e(Ou,sx),e(ct,ax),e(ct,$o),e($o,Nu),e(Nu,Ld),e(Ld,rx),e($o,ix),e($o,Iu),e(Iu,Od),e(Od,lx),e($o,dx),e($o,Du),e(Du,Nd),e(Nd,cx),e($o,px),e($o,Su),e(Su,Id),e(Id,hx),e(ct,mx),e(ct,lo),w(Dd,lo,null),e(lo,ux),e(lo,Kn),e(Kn,fx),e(Kn,Wu),e(Wu,gx),e(Kn,_x),e(Kn,Uu),e(Uu,kx),e(Kn,vx),e(lo,yx),w(qa,lo,null),e(lo,Tx),w(ja,lo,null),Ng=!0},p(s,[k]){const Sd={};k&2&&(Sd.$$scope={dirty:k,ctx:s}),Xn.$set(Sd);const Bu={};k&2&&(Bu.$$scope={dirty:k,ctx:s}),es.$set(Bu);const Ru={};k&2&&(Ru.$$scope={dirty:k,ctx:s}),ns.$set(Ru);const Hu={};k&2&&(Hu.$$scope={dirty:k,ctx:s}),rs.$set(Hu);const Wd={};k&2&&(Wd.$$scope={dirty:k,ctx:s}),is.$set(Wd);const Ku={};k&2&&(Ku.$$scope={dirty:k,ctx:s}),ds.$set(Ku);const Qu={};k&2&&(Qu.$$scope={dirty:k,ctx:s}),cs.$set(Qu);const Ud={};k&2&&(Ud.$$scope={dirty:k,ctx:s}),hs.$set(Ud);const Vu={};k&2&&(Vu.$$scope={dirty:k,ctx:s}),ms.$set(Vu);const Ju={};k&2&&(Ju.$$scope={dirty:k,ctx:s}),fs.$set(Ju);const Gu={};k&2&&(Gu.$$scope={dirty:k,ctx:s}),gs.$set(Gu);const Bd={};k&2&&(Bd.$$scope={dirty:k,ctx:s}),ks.$set(Bd);const Xu={};k&2&&(Xu.$$scope={dirty:k,ctx:s}),vs.$set(Xu);const Yu={};k&2&&(Yu.$$scope={dirty:k,ctx:s}),ys.$set(Yu);const Zu={};k&2&&(Zu.$$scope={dirty:k,ctx:s}),bs.$set(Zu);const ef={};k&2&&(ef.$$scope={dirty:k,ctx:s}),ws.$set(ef);const tf={};k&2&&(tf.$$scope={dirty:k,ctx:s}),$s.$set(tf);const Qn={};k&2&&(Qn.$$scope={dirty:k,ctx:s}),Fs.$set(Qn);const of={};k&2&&(of.$$scope={dirty:k,ctx:s}),Ms.$set(of);const nf={};k&2&&(nf.$$scope={dirty:k,ctx:s}),zs.$set(nf);const Fo={};k&2&&(Fo.$$scope={dirty:k,ctx:s}),js.$set(Fo);const sf={};k&2&&(sf.$$scope={dirty:k,ctx:s}),Cs.$set(sf);const af={};k&2&&(af.$$scope={dirty:k,ctx:s}),Ps.$set(af);const rf={};k&2&&(rf.$$scope={dirty:k,ctx:s}),Ls.$set(rf);const Vn={};k&2&&(Vn.$$scope={dirty:k,ctx:s}),Os.$set(Vn);const lf={};k&2&&(lf.$$scope={dirty:k,ctx:s}),Ns.$set(lf);const df={};k&2&&(df.$$scope={dirty:k,ctx:s}),Ds.$set(df);const Rd={};k&2&&(Rd.$$scope={dirty:k,ctx:s}),Ss.$set(Rd);const cf={};k&2&&(cf.$$scope={dirty:k,ctx:s}),Ws.$set(cf);const pf={};k&2&&(pf.$$scope={dirty:k,ctx:s}),Us.$set(pf);const hf={};k&2&&(hf.$$scope={dirty:k,ctx:s}),Rs.$set(hf);const xt={};k&2&&(xt.$$scope={dirty:k,ctx:s}),Hs.$set(xt);const mf={};k&2&&(mf.$$scope={dirty:k,ctx:s}),Ks.$set(mf);const uf={};k&2&&(uf.$$scope={dirty:k,ctx:s}),Qs.$set(uf);const ff={};k&2&&(ff.$$scope={dirty:k,ctx:s}),Js.$set(ff);const gf={};k&2&&(gf.$$scope={dirty:k,ctx:s}),Gs.$set(gf);const _f={};k&2&&(_f.$$scope={dirty:k,ctx:s}),Xs.$set(_f);const kf={};k&2&&(kf.$$scope={dirty:k,ctx:s}),Zs.$set(kf);const vf={};k&2&&(vf.$$scope={dirty:k,ctx:s}),ea.$set(vf);const yf={};k&2&&(yf.$$scope={dirty:k,ctx:s}),ta.$set(yf);const Tf={};k&2&&(Tf.$$scope={dirty:k,ctx:s}),oa.$set(Tf);const bf={};k&2&&(bf.$$scope={dirty:k,ctx:s}),sa.$set(bf);const wf={};k&2&&(wf.$$scope={dirty:k,ctx:s}),aa.$set(wf);const Ef={};k&2&&(Ef.$$scope={dirty:k,ctx:s}),ra.$set(Ef);const Hd={};k&2&&(Hd.$$scope={dirty:k,ctx:s}),ia.$set(Hd);const $f={};k&2&&($f.$$scope={dirty:k,ctx:s}),da.$set($f);const Ff={};k&2&&(Ff.$$scope={dirty:k,ctx:s}),ca.$set(Ff);const xf={};k&2&&(xf.$$scope={dirty:k,ctx:s}),ha.$set(xf);const xo={};k&2&&(xo.$$scope={dirty:k,ctx:s}),ma.$set(xo);const Mo={};k&2&&(Mo.$$scope={dirty:k,ctx:s}),fa.$set(Mo);const Mf={};k&2&&(Mf.$$scope={dirty:k,ctx:s}),ga.$set(Mf);const zf={};k&2&&(zf.$$scope={dirty:k,ctx:s}),ka.$set(zf);const qf={};k&2&&(qf.$$scope={dirty:k,ctx:s}),va.$set(qf);const Jn={};k&2&&(Jn.$$scope={dirty:k,ctx:s}),Ta.$set(Jn);const jf={};k&2&&(jf.$$scope={dirty:k,ctx:s}),ba.$set(jf);const Cf={};k&2&&(Cf.$$scope={dirty:k,ctx:s}),Ea.$set(Cf);const Kd={};k&2&&(Kd.$$scope={dirty:k,ctx:s}),$a.$set(Kd);const Pf={};k&2&&(Pf.$$scope={dirty:k,ctx:s}),xa.$set(Pf);const Af={};k&2&&(Af.$$scope={dirty:k,ctx:s}),Ma.$set(Af);const Lf={};k&2&&(Lf.$$scope={dirty:k,ctx:s}),qa.$set(Lf);const kt={};k&2&&(kt.$$scope={dirty:k,ctx:s}),ja.$set(kt)},i(s){Ng||(E(l.$$.fragment,s),E(ie.$$.fragment,s),E(H.$$.fragment,s),E(rr.$$.fragment,s),E(ir.$$.fragment,s),E(Xn.$$.fragment,s),E(dr.$$.fragment,s),E(cr.$$.fragment,s),E(hr.$$.fragment,s),E(ur.$$.fragment,s),E(fr.$$.fragment,s),E(es.$$.fragment,s),E(gr.$$.fragment,s),E(kr.$$.fragment,s),E(vr.$$.fragment,s),E(br.$$.fragment,s),E(Er.$$.fragment,s),E(ns.$$.fragment,s),E($r.$$.fragment,s),E(Fr.$$.fragment,s),E(Mr.$$.fragment,s),E(qr.$$.fragment,s),E(jr.$$.fragment,s),E(Lr.$$.fragment,s),E(rs.$$.fragment,s),E(is.$$.fragment,s),E(Or.$$.fragment,s),E(Nr.$$.fragment,s),E(Wr.$$.fragment,s),E(ds.$$.fragment,s),E(cs.$$.fragment,s),E(Ur.$$.fragment,s),E(Br.$$.fragment,s),E(Vr.$$.fragment,s),E(hs.$$.fragment,s),E(ms.$$.fragment,s),E(Jr.$$.fragment,s),E(Gr.$$.fragment,s),E(ei.$$.fragment,s),E(fs.$$.fragment,s),E(gs.$$.fragment,s),E(ti.$$.fragment,s),E(oi.$$.fragment,s),E(ri.$$.fragment,s),E(ks.$$.fragment,s),E(vs.$$.fragment,s),E(ys.$$.fragment,s),E(ii.$$.fragment,s),E(li.$$.fragment,s),E(hi.$$.fragment,s),E(bs.$$.fragment,s),E(ws.$$.fragment,s),E(mi.$$.fragment,s),E(ui.$$.fragment,s),E(ki.$$.fragment,s),E($s.$$.fragment,s),E(Fs.$$.fragment,s),E(vi.$$.fragment,s),E(yi.$$.fragment,s),E(Ei.$$.fragment,s),E(Ms.$$.fragment,s),E(zs.$$.fragment,s),E($i.$$.fragment,s),E(Fi.$$.fragment,s),E(js.$$.fragment,s),E(qi.$$.fragment,s),E(Cs.$$.fragment,s),E(Ps.$$.fragment,s),E(ji.$$.fragment,s),E(Ci.$$.fragment,s),E(Ls.$$.fragment,s),E(Oi.$$.fragment,s),E(Os.$$.fragment,s),E(Ns.$$.fragment,s),E(Ni.$$.fragment,s),E(Ii.$$.fragment,s),E(Ds.$$.fragment,s),E(Ui.$$.fragment,s),E(Ss.$$.fragment,s),E(Ws.$$.fragment,s),E(Us.$$.fragment,s),E(Bi.$$.fragment,s),E(Ri.$$.fragment,s),E(Rs.$$.fragment,s),E(Vi.$$.fragment,s),E(Hs.$$.fragment,s),E(Ks.$$.fragment,s),E(Qs.$$.fragment,s),E(Ji.$$.fragment,s),E(Gi.$$.fragment,s),E(Js.$$.fragment,s),E(el.$$.fragment,s),E(Gs.$$.fragment,s),E(Xs.$$.fragment,s),E(tl.$$.fragment,s),E(ol.$$.fragment,s),E(Zs.$$.fragment,s),E(rl.$$.fragment,s),E(ea.$$.fragment,s),E(ta.$$.fragment,s),E(oa.$$.fragment,s),E(il.$$.fragment,s),E(ll.$$.fragment,s),E(sa.$$.fragment,s),E(hl.$$.fragment,s),E(aa.$$.fragment,s),E(ra.$$.fragment,s),E(ia.$$.fragment,s),E(ml.$$.fragment,s),E(ul.$$.fragment,s),E(bl.$$.fragment,s),E(da.$$.fragment,s),E(ca.$$.fragment,s),E(wl.$$.fragment,s),E(El.$$.fragment,s),E(Cl.$$.fragment,s),E(ha.$$.fragment,s),E(ma.$$.fragment,s),E(Pl.$$.fragment,s),E(Al.$$.fragment,s),E(Ul.$$.fragment,s),E(fa.$$.fragment,s),E(ga.$$.fragment,s),E(Bl.$$.fragment,s),E(Rl.$$.fragment,s),E(Zl.$$.fragment,s),E(ka.$$.fragment,s),E(va.$$.fragment,s),E(ed.$$.fragment,s),E(td.$$.fragment,s),E(dd.$$.fragment,s),E(Ta.$$.fragment,s),E(ba.$$.fragment,s),E(cd.$$.fragment,s),E(pd.$$.fragment,s),E(vd.$$.fragment,s),E(Ea.$$.fragment,s),E($a.$$.fragment,s),E(yd.$$.fragment,s),E(Td.$$.fragment,s),E(zd.$$.fragment,s),E(xa.$$.fragment,s),E(Ma.$$.fragment,s),E(qd.$$.fragment,s),E(jd.$$.fragment,s),E(Dd.$$.fragment,s),E(qa.$$.fragment,s),E(ja.$$.fragment,s),Ng=!0)},o(s){$(l.$$.fragment,s),$(ie.$$.fragment,s),$(H.$$.fragment,s),$(rr.$$.fragment,s),$(ir.$$.fragment,s),$(Xn.$$.fragment,s),$(dr.$$.fragment,s),$(cr.$$.fragment,s),$(hr.$$.fragment,s),$(ur.$$.fragment,s),$(fr.$$.fragment,s),$(es.$$.fragment,s),$(gr.$$.fragment,s),$(kr.$$.fragment,s),$(vr.$$.fragment,s),$(br.$$.fragment,s),$(Er.$$.fragment,s),$(ns.$$.fragment,s),$($r.$$.fragment,s),$(Fr.$$.fragment,s),$(Mr.$$.fragment,s),$(qr.$$.fragment,s),$(jr.$$.fragment,s),$(Lr.$$.fragment,s),$(rs.$$.fragment,s),$(is.$$.fragment,s),$(Or.$$.fragment,s),$(Nr.$$.fragment,s),$(Wr.$$.fragment,s),$(ds.$$.fragment,s),$(cs.$$.fragment,s),$(Ur.$$.fragment,s),$(Br.$$.fragment,s),$(Vr.$$.fragment,s),$(hs.$$.fragment,s),$(ms.$$.fragment,s),$(Jr.$$.fragment,s),$(Gr.$$.fragment,s),$(ei.$$.fragment,s),$(fs.$$.fragment,s),$(gs.$$.fragment,s),$(ti.$$.fragment,s),$(oi.$$.fragment,s),$(ri.$$.fragment,s),$(ks.$$.fragment,s),$(vs.$$.fragment,s),$(ys.$$.fragment,s),$(ii.$$.fragment,s),$(li.$$.fragment,s),$(hi.$$.fragment,s),$(bs.$$.fragment,s),$(ws.$$.fragment,s),$(mi.$$.fragment,s),$(ui.$$.fragment,s),$(ki.$$.fragment,s),$($s.$$.fragment,s),$(Fs.$$.fragment,s),$(vi.$$.fragment,s),$(yi.$$.fragment,s),$(Ei.$$.fragment,s),$(Ms.$$.fragment,s),$(zs.$$.fragment,s),$($i.$$.fragment,s),$(Fi.$$.fragment,s),$(js.$$.fragment,s),$(qi.$$.fragment,s),$(Cs.$$.fragment,s),$(Ps.$$.fragment,s),$(ji.$$.fragment,s),$(Ci.$$.fragment,s),$(Ls.$$.fragment,s),$(Oi.$$.fragment,s),$(Os.$$.fragment,s),$(Ns.$$.fragment,s),$(Ni.$$.fragment,s),$(Ii.$$.fragment,s),$(Ds.$$.fragment,s),$(Ui.$$.fragment,s),$(Ss.$$.fragment,s),$(Ws.$$.fragment,s),$(Us.$$.fragment,s),$(Bi.$$.fragment,s),$(Ri.$$.fragment,s),$(Rs.$$.fragment,s),$(Vi.$$.fragment,s),$(Hs.$$.fragment,s),$(Ks.$$.fragment,s),$(Qs.$$.fragment,s),$(Ji.$$.fragment,s),$(Gi.$$.fragment,s),$(Js.$$.fragment,s),$(el.$$.fragment,s),$(Gs.$$.fragment,s),$(Xs.$$.fragment,s),$(tl.$$.fragment,s),$(ol.$$.fragment,s),$(Zs.$$.fragment,s),$(rl.$$.fragment,s),$(ea.$$.fragment,s),$(ta.$$.fragment,s),$(oa.$$.fragment,s),$(il.$$.fragment,s),$(ll.$$.fragment,s),$(sa.$$.fragment,s),$(hl.$$.fragment,s),$(aa.$$.fragment,s),$(ra.$$.fragment,s),$(ia.$$.fragment,s),$(ml.$$.fragment,s),$(ul.$$.fragment,s),$(bl.$$.fragment,s),$(da.$$.fragment,s),$(ca.$$.fragment,s),$(wl.$$.fragment,s),$(El.$$.fragment,s),$(Cl.$$.fragment,s),$(ha.$$.fragment,s),$(ma.$$.fragment,s),$(Pl.$$.fragment,s),$(Al.$$.fragment,s),$(Ul.$$.fragment,s),$(fa.$$.fragment,s),$(ga.$$.fragment,s),$(Bl.$$.fragment,s),$(Rl.$$.fragment,s),$(Zl.$$.fragment,s),$(ka.$$.fragment,s),$(va.$$.fragment,s),$(ed.$$.fragment,s),$(td.$$.fragment,s),$(dd.$$.fragment,s),$(Ta.$$.fragment,s),$(ba.$$.fragment,s),$(cd.$$.fragment,s),$(pd.$$.fragment,s),$(vd.$$.fragment,s),$(Ea.$$.fragment,s),$($a.$$.fragment,s),$(yd.$$.fragment,s),$(Td.$$.fragment,s),$(zd.$$.fragment,s),$(xa.$$.fragment,s),$(Ma.$$.fragment,s),$(qd.$$.fragment,s),$(jd.$$.fragment,s),$(Dd.$$.fragment,s),$(qa.$$.fragment,s),$(ja.$$.fragment,s),Ng=!1},d(s){t(d),s&&t(v),s&&t(u),F(l),s&&t(fe),s&&t(W),s&&t(G),s&&t(ae),F(ie),s&&t(ge),s&&t(R),s&&t(A),s&&t(pe),s&&t(_e),s&&t(he),s&&t(ke),s&&t(P),s&&t(X),s&&t(se),s&&t(oe),s&&t(Ce),s&&t(D),s&&t(U),F(H),s&&t(He),s&&t(B),s&&t(Of),s&&t(Uo),F(rr),s&&t(Nf),s&&t(Ut),F(ir),F(Xn),s&&t(If),s&&t(Ro),F(dr),s&&t(Df),s&&t(tt),F(cr),F(hr),F(ur),F(fr),F(es),F(gr),s&&t(Sf),s&&t(Ko),F(kr),s&&t(Wf),s&&t(Tt),F(vr),F(br),F(Er),F(ns),s&&t(Uf),s&&t(Vo),F($r),s&&t(Bf),s&&t(Jo),F(Fr),s&&t(Rf),s&&t(Go),F(Mr),s&&t(Hf),s&&t(Xo),F(qr),s&&t(Kf),s&&t(bt),F(jr),F(Lr),F(rs),F(is),s&&t(Qf),s&&t(Zo),F(Or),s&&t(Vf),s&&t(pt),F(Nr),F(Wr),F(ds),F(cs),s&&t(Jf),s&&t(tn),F(Ur),s&&t(Gf),s&&t(wt),F(Br),F(Vr),F(hs),F(ms),s&&t(Xf),s&&t(nn),F(Jr),s&&t(Yf),s&&t(ht),F(Gr),F(ei),F(fs),F(gs),s&&t(Zf),s&&t(an),F(ti),s&&t(eg),s&&t(Et),F(oi),F(ri),F(ks),F(vs),F(ys),s&&t(tg),s&&t(ln),F(ii),s&&t(og),s&&t($t),F(li),F(hi),F(bs),F(ws),s&&t(ng),s&&t(cn),F(mi),s&&t(sg),s&&t(mt),F(ui),F(ki),F($s),F(Fs),s&&t(ag),s&&t(hn),F(vi),s&&t(rg),s&&t(Ft),F(yi),F(Ei),F(Ms),F(zs),s&&t(ig),s&&t(fn),F($i),s&&t(lg),s&&t(ut),F(Fi),F(js),F(qi),F(Cs),F(Ps),s&&t(dg),s&&t(_n),F(ji),s&&t(cg),s&&t(ot),F(Ci),F(Ls),F(Oi),F(Os),F(Ns),s&&t(pg),s&&t(vn),F(Ni),s&&t(hg),s&&t(nt),F(Ii),F(Ds),F(Ui),F(Ss),F(Ws),F(Us),s&&t(mg),s&&t(Tn),F(Bi),s&&t(ug),s&&t(ft),F(Ri),F(Rs),F(Vi),F(Hs),F(Ks),F(Qs),s&&t(fg),s&&t(wn),F(Ji),s&&t(gg),s&&t(gt),F(Gi),F(Js),F(el),F(Gs),F(Xs),s&&t(_g),s&&t($n),F(tl),s&&t(kg),s&&t(st),F(ol),F(Zs),F(rl),F(ea),F(ta),F(oa),s&&t(vg),s&&t(xn),F(il),s&&t(yg),s&&t(_t),F(ll),F(sa),F(hl),F(aa),F(ra),F(ia),s&&t(Tg),s&&t(qn),F(ml),s&&t(bg),s&&t(at),F(ul),F(bl),F(da),F(ca),s&&t(wg),s&&t(Cn),F(wl),s&&t(Eg),s&&t(Ze),F(El),F(Cl),F(ha),F(ma),s&&t($g),s&&t(An),F(Pl),s&&t(Fg),s&&t(rt),F(Al),F(Ul),F(fa),F(ga),s&&t(xg),s&&t(On),F(Bl),s&&t(Mg),s&&t(it),F(Rl),F(Zl),F(ka),F(va),s&&t(zg),s&&t(In),F(ed),s&&t(qg),s&&t(lt),F(td),F(dd),F(Ta),F(ba),s&&t(jg),s&&t(Sn),F(cd),s&&t(Cg),s&&t(dt),F(pd),F(vd),F(Ea),F($a),s&&t(Pg),s&&t(Un),F(yd),s&&t(Ag),s&&t(et),F(Td),F(zd),F(xa),F(Ma),s&&t(Lg),s&&t(Rn),F(qd),s&&t(Og),s&&t(ct),F(jd),F(Dd),F(qa),F(ja)}}}const dP={local:"electra",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.ElectraConfig",title:"ElectraConfig"},{local:"transformers.ElectraTokenizer",title:"ElectraTokenizer"},{local:"transformers.ElectraTokenizerFast",title:"ElectraTokenizerFast"},{local:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput",title:"Electra specific outputs"},{local:"transformers.ElectraModel",title:"ElectraModel"},{local:"transformers.ElectraForPreTraining",title:"ElectraForPreTraining"},{local:"transformers.ElectraForCausalLM",title:"ElectraForCausalLM"},{local:"transformers.ElectraForMaskedLM",title:"ElectraForMaskedLM"},{local:"transformers.ElectraForSequenceClassification",title:"ElectraForSequenceClassification"},{local:"transformers.ElectraForMultipleChoice",title:"ElectraForMultipleChoice"},{local:"transformers.ElectraForTokenClassification",title:"ElectraForTokenClassification"},{local:"transformers.ElectraForQuestionAnswering",title:"ElectraForQuestionAnswering"},{local:"transformers.TFElectraModel",title:"TFElectraModel"},{local:"transformers.TFElectraForPreTraining",title:"TFElectraForPreTraining"},{local:"transformers.TFElectraForMaskedLM",title:"TFElectraForMaskedLM"},{local:"transformers.TFElectraForSequenceClassification",title:"TFElectraForSequenceClassification"},{local:"transformers.TFElectraForMultipleChoice",title:"TFElectraForMultipleChoice"},{local:"transformers.TFElectraForTokenClassification",title:"TFElectraForTokenClassification"},{local:"transformers.TFElectraForQuestionAnswering",title:"TFElectraForQuestionAnswering"},{local:"transformers.FlaxElectraModel",title:"FlaxElectraModel"},{local:"transformers.FlaxElectraForPreTraining",title:"FlaxElectraForPreTraining"},{local:"transformers.FlaxElectraForCausalLM",title:"FlaxElectraForCausalLM"},{local:"transformers.FlaxElectraForMaskedLM",title:"FlaxElectraForMaskedLM"},{local:"transformers.FlaxElectraForSequenceClassification",title:"FlaxElectraForSequenceClassification"},{local:"transformers.FlaxElectraForMultipleChoice",title:"FlaxElectraForMultipleChoice"},{local:"transformers.FlaxElectraForTokenClassification",title:"FlaxElectraForTokenClassification"},{local:"transformers.FlaxElectraForQuestionAnswering",title:"FlaxElectraForQuestionAnswering"}],title:"ELECTRA"};function cP(x){return eC(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _P extends Gj{constructor(d){super();Xj(this,d,cP,lP,Yj,{})}}export{_P as default,dP as metadata};
