import{S as t5,i as o5,s as n5,e as n,k as l,w as T,t as r,M as s5,c as s,d as t,m as d,a,x as E,h as i,b as c,F as e,g as m,y as w,q as b,o as y,B as F}from"../../chunks/vendor-4833417e.js";import{T as Te}from"../../chunks/Tip-fffd6df1.js";import{D}from"../../chunks/Docstring-4f315ed9.js";import{C as qe}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as we}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function a5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function r5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function i5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function l5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function d5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function c5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function p5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function h5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function m5(j){let p,$,g,v,k,_,u,M,pe,K,x,ee,O,oe,he,S,me,le,J,L,ne,X,q,C,ae,R,de,re,W,ue,ce,P,fe,B,te,ie,H,ge,G,I,se,U,_e;return{c(){p=n("p"),$=r("TF 2.0 models accepts two formats as inputs:"),g=l(),v=n("ul"),k=n("li"),_=r("having all inputs as keyword arguments (like PyTorch models), or"),u=l(),M=n("li"),pe=r("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),x=n("p"),ee=r("This second option is useful when using "),O=n("code"),oe=r("tf.keras.Model.fit"),he=r(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),me=r("model(inputs)"),le=r("."),J=l(),L=n("p"),ne=r(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),X=l(),q=n("ul"),C=n("li"),ae=r("a single Tensor with "),R=n("code"),de=r("input_ids"),re=r(" only and nothing else: "),W=n("code"),ue=r("model(inputs_ids)"),ce=l(),P=n("li"),fe=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=n("code"),te=r("model([input_ids, attention_mask])"),ie=r(" or "),H=n("code"),ge=r("model([input_ids, attention_mask, token_type_ids])"),G=l(),I=n("li"),se=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=n("code"),_e=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(h){p=s(h,"P",{});var z=a(p);$=i(z,"TF 2.0 models accepts two formats as inputs:"),z.forEach(t),g=d(h),v=s(h,"UL",{});var Y=a(v);k=s(Y,"LI",{});var be=a(k);_=i(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),u=d(Y),M=s(Y,"LI",{});var $e=a(M);pe=i($e,"having all inputs as a list, tuple or dict in the first positional arguments."),$e.forEach(t),Y.forEach(t),K=d(h),x=s(h,"P",{});var N=a(x);ee=i(N,"This second option is useful when using "),O=s(N,"CODE",{});var ye=a(O);oe=i(ye,"tf.keras.Model.fit"),ye.forEach(t),he=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var ve=a(S);me=i(ve,"model(inputs)"),ve.forEach(t),le=i(N,"."),N.forEach(t),J=d(h),L=s(h,"P",{});var Me=a(L);ne=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Me.forEach(t),X=d(h),q=s(h,"UL",{});var A=a(q);C=s(A,"LI",{});var Q=a(C);ae=i(Q,"a single Tensor with "),R=s(Q,"CODE",{});var ze=a(R);de=i(ze,"input_ids"),ze.forEach(t),re=i(Q," only and nothing else: "),W=s(Q,"CODE",{});var Ee=a(W);ue=i(Ee,"model(inputs_ids)"),Ee.forEach(t),Q.forEach(t),ce=d(A),P=s(A,"LI",{});var V=a(P);fe=i(V,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=s(V,"CODE",{});var xe=a(B);te=i(xe,"model([input_ids, attention_mask])"),xe.forEach(t),ie=i(V," or "),H=s(V,"CODE",{});var Fe=a(H);ge=i(Fe,"model([input_ids, attention_mask, token_type_ids])"),Fe.forEach(t),V.forEach(t),G=d(A),I=s(A,"LI",{});var Z=a(I);se=i(Z,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=s(Z,"CODE",{});var ke=a(U);_e=i(ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ke.forEach(t),Z.forEach(t),A.forEach(t)},m(h,z){m(h,p,z),e(p,$),m(h,g,z),m(h,v,z),e(v,k),e(k,_),e(v,u),e(v,M),e(M,pe),m(h,K,z),m(h,x,z),e(x,ee),e(x,O),e(O,oe),e(x,he),e(x,S),e(S,me),e(x,le),m(h,J,z),m(h,L,z),e(L,ne),m(h,X,z),m(h,q,z),e(q,C),e(C,ae),e(C,R),e(R,de),e(C,re),e(C,W),e(W,ue),e(q,ce),e(q,P),e(P,fe),e(P,B),e(B,te),e(P,ie),e(P,H),e(H,ge),e(q,G),e(q,I),e(I,se),e(I,U),e(U,_e)},d(h){h&&t(p),h&&t(g),h&&t(v),h&&t(K),h&&t(x),h&&t(J),h&&t(L),h&&t(X),h&&t(q)}}}function u5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function f5(j){let p,$,g,v,k,_,u,M,pe,K,x,ee,O,oe,he,S,me,le,J,L,ne,X,q,C,ae,R,de,re,W,ue,ce,P,fe,B,te,ie,H,ge,G,I,se,U,_e;return{c(){p=n("p"),$=r("TF 2.0 models accepts two formats as inputs:"),g=l(),v=n("ul"),k=n("li"),_=r("having all inputs as keyword arguments (like PyTorch models), or"),u=l(),M=n("li"),pe=r("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),x=n("p"),ee=r("This second option is useful when using "),O=n("code"),oe=r("tf.keras.Model.fit"),he=r(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),me=r("model(inputs)"),le=r("."),J=l(),L=n("p"),ne=r(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),X=l(),q=n("ul"),C=n("li"),ae=r("a single Tensor with "),R=n("code"),de=r("input_ids"),re=r(" only and nothing else: "),W=n("code"),ue=r("model(inputs_ids)"),ce=l(),P=n("li"),fe=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=n("code"),te=r("model([input_ids, attention_mask])"),ie=r(" or "),H=n("code"),ge=r("model([input_ids, attention_mask, token_type_ids])"),G=l(),I=n("li"),se=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=n("code"),_e=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(h){p=s(h,"P",{});var z=a(p);$=i(z,"TF 2.0 models accepts two formats as inputs:"),z.forEach(t),g=d(h),v=s(h,"UL",{});var Y=a(v);k=s(Y,"LI",{});var be=a(k);_=i(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),u=d(Y),M=s(Y,"LI",{});var $e=a(M);pe=i($e,"having all inputs as a list, tuple or dict in the first positional arguments."),$e.forEach(t),Y.forEach(t),K=d(h),x=s(h,"P",{});var N=a(x);ee=i(N,"This second option is useful when using "),O=s(N,"CODE",{});var ye=a(O);oe=i(ye,"tf.keras.Model.fit"),ye.forEach(t),he=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var ve=a(S);me=i(ve,"model(inputs)"),ve.forEach(t),le=i(N,"."),N.forEach(t),J=d(h),L=s(h,"P",{});var Me=a(L);ne=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Me.forEach(t),X=d(h),q=s(h,"UL",{});var A=a(q);C=s(A,"LI",{});var Q=a(C);ae=i(Q,"a single Tensor with "),R=s(Q,"CODE",{});var ze=a(R);de=i(ze,"input_ids"),ze.forEach(t),re=i(Q," only and nothing else: "),W=s(Q,"CODE",{});var Ee=a(W);ue=i(Ee,"model(inputs_ids)"),Ee.forEach(t),Q.forEach(t),ce=d(A),P=s(A,"LI",{});var V=a(P);fe=i(V,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=s(V,"CODE",{});var xe=a(B);te=i(xe,"model([input_ids, attention_mask])"),xe.forEach(t),ie=i(V," or "),H=s(V,"CODE",{});var Fe=a(H);ge=i(Fe,"model([input_ids, attention_mask, token_type_ids])"),Fe.forEach(t),V.forEach(t),G=d(A),I=s(A,"LI",{});var Z=a(I);se=i(Z,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=s(Z,"CODE",{});var ke=a(U);_e=i(ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ke.forEach(t),Z.forEach(t),A.forEach(t)},m(h,z){m(h,p,z),e(p,$),m(h,g,z),m(h,v,z),e(v,k),e(k,_),e(v,u),e(v,M),e(M,pe),m(h,K,z),m(h,x,z),e(x,ee),e(x,O),e(O,oe),e(x,he),e(x,S),e(S,me),e(x,le),m(h,J,z),m(h,L,z),e(L,ne),m(h,X,z),m(h,q,z),e(q,C),e(C,ae),e(C,R),e(R,de),e(C,re),e(C,W),e(W,ue),e(q,ce),e(q,P),e(P,fe),e(P,B),e(B,te),e(P,ie),e(P,H),e(H,ge),e(q,G),e(q,I),e(I,se),e(I,U),e(U,_e)},d(h){h&&t(p),h&&t(g),h&&t(v),h&&t(K),h&&t(x),h&&t(J),h&&t(L),h&&t(X),h&&t(q)}}}function g5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function _5(j){let p,$,g,v,k,_,u,M,pe,K,x,ee,O,oe,he,S,me,le,J,L,ne,X,q,C,ae,R,de,re,W,ue,ce,P,fe,B,te,ie,H,ge,G,I,se,U,_e;return{c(){p=n("p"),$=r("TF 2.0 models accepts two formats as inputs:"),g=l(),v=n("ul"),k=n("li"),_=r("having all inputs as keyword arguments (like PyTorch models), or"),u=l(),M=n("li"),pe=r("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),x=n("p"),ee=r("This second option is useful when using "),O=n("code"),oe=r("tf.keras.Model.fit"),he=r(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),me=r("model(inputs)"),le=r("."),J=l(),L=n("p"),ne=r(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),X=l(),q=n("ul"),C=n("li"),ae=r("a single Tensor with "),R=n("code"),de=r("input_ids"),re=r(" only and nothing else: "),W=n("code"),ue=r("model(inputs_ids)"),ce=l(),P=n("li"),fe=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=n("code"),te=r("model([input_ids, attention_mask])"),ie=r(" or "),H=n("code"),ge=r("model([input_ids, attention_mask, token_type_ids])"),G=l(),I=n("li"),se=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=n("code"),_e=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(h){p=s(h,"P",{});var z=a(p);$=i(z,"TF 2.0 models accepts two formats as inputs:"),z.forEach(t),g=d(h),v=s(h,"UL",{});var Y=a(v);k=s(Y,"LI",{});var be=a(k);_=i(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),u=d(Y),M=s(Y,"LI",{});var $e=a(M);pe=i($e,"having all inputs as a list, tuple or dict in the first positional arguments."),$e.forEach(t),Y.forEach(t),K=d(h),x=s(h,"P",{});var N=a(x);ee=i(N,"This second option is useful when using "),O=s(N,"CODE",{});var ye=a(O);oe=i(ye,"tf.keras.Model.fit"),ye.forEach(t),he=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var ve=a(S);me=i(ve,"model(inputs)"),ve.forEach(t),le=i(N,"."),N.forEach(t),J=d(h),L=s(h,"P",{});var Me=a(L);ne=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Me.forEach(t),X=d(h),q=s(h,"UL",{});var A=a(q);C=s(A,"LI",{});var Q=a(C);ae=i(Q,"a single Tensor with "),R=s(Q,"CODE",{});var ze=a(R);de=i(ze,"input_ids"),ze.forEach(t),re=i(Q," only and nothing else: "),W=s(Q,"CODE",{});var Ee=a(W);ue=i(Ee,"model(inputs_ids)"),Ee.forEach(t),Q.forEach(t),ce=d(A),P=s(A,"LI",{});var V=a(P);fe=i(V,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=s(V,"CODE",{});var xe=a(B);te=i(xe,"model([input_ids, attention_mask])"),xe.forEach(t),ie=i(V," or "),H=s(V,"CODE",{});var Fe=a(H);ge=i(Fe,"model([input_ids, attention_mask, token_type_ids])"),Fe.forEach(t),V.forEach(t),G=d(A),I=s(A,"LI",{});var Z=a(I);se=i(Z,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=s(Z,"CODE",{});var ke=a(U);_e=i(ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ke.forEach(t),Z.forEach(t),A.forEach(t)},m(h,z){m(h,p,z),e(p,$),m(h,g,z),m(h,v,z),e(v,k),e(k,_),e(v,u),e(v,M),e(M,pe),m(h,K,z),m(h,x,z),e(x,ee),e(x,O),e(O,oe),e(x,he),e(x,S),e(S,me),e(x,le),m(h,J,z),m(h,L,z),e(L,ne),m(h,X,z),m(h,q,z),e(q,C),e(C,ae),e(C,R),e(R,de),e(C,re),e(C,W),e(W,ue),e(q,ce),e(q,P),e(P,fe),e(P,B),e(B,te),e(P,ie),e(P,H),e(H,ge),e(q,G),e(q,I),e(I,se),e(I,U),e(U,_e)},d(h){h&&t(p),h&&t(g),h&&t(v),h&&t(K),h&&t(x),h&&t(J),h&&t(L),h&&t(X),h&&t(q)}}}function v5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function k5(j){let p,$,g,v,k,_,u,M,pe,K,x,ee,O,oe,he,S,me,le,J,L,ne,X,q,C,ae,R,de,re,W,ue,ce,P,fe,B,te,ie,H,ge,G,I,se,U,_e;return{c(){p=n("p"),$=r("TF 2.0 models accepts two formats as inputs:"),g=l(),v=n("ul"),k=n("li"),_=r("having all inputs as keyword arguments (like PyTorch models), or"),u=l(),M=n("li"),pe=r("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),x=n("p"),ee=r("This second option is useful when using "),O=n("code"),oe=r("tf.keras.Model.fit"),he=r(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),me=r("model(inputs)"),le=r("."),J=l(),L=n("p"),ne=r(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),X=l(),q=n("ul"),C=n("li"),ae=r("a single Tensor with "),R=n("code"),de=r("input_ids"),re=r(" only and nothing else: "),W=n("code"),ue=r("model(inputs_ids)"),ce=l(),P=n("li"),fe=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=n("code"),te=r("model([input_ids, attention_mask])"),ie=r(" or "),H=n("code"),ge=r("model([input_ids, attention_mask, token_type_ids])"),G=l(),I=n("li"),se=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=n("code"),_e=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(h){p=s(h,"P",{});var z=a(p);$=i(z,"TF 2.0 models accepts two formats as inputs:"),z.forEach(t),g=d(h),v=s(h,"UL",{});var Y=a(v);k=s(Y,"LI",{});var be=a(k);_=i(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),u=d(Y),M=s(Y,"LI",{});var $e=a(M);pe=i($e,"having all inputs as a list, tuple or dict in the first positional arguments."),$e.forEach(t),Y.forEach(t),K=d(h),x=s(h,"P",{});var N=a(x);ee=i(N,"This second option is useful when using "),O=s(N,"CODE",{});var ye=a(O);oe=i(ye,"tf.keras.Model.fit"),ye.forEach(t),he=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var ve=a(S);me=i(ve,"model(inputs)"),ve.forEach(t),le=i(N,"."),N.forEach(t),J=d(h),L=s(h,"P",{});var Me=a(L);ne=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Me.forEach(t),X=d(h),q=s(h,"UL",{});var A=a(q);C=s(A,"LI",{});var Q=a(C);ae=i(Q,"a single Tensor with "),R=s(Q,"CODE",{});var ze=a(R);de=i(ze,"input_ids"),ze.forEach(t),re=i(Q," only and nothing else: "),W=s(Q,"CODE",{});var Ee=a(W);ue=i(Ee,"model(inputs_ids)"),Ee.forEach(t),Q.forEach(t),ce=d(A),P=s(A,"LI",{});var V=a(P);fe=i(V,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=s(V,"CODE",{});var xe=a(B);te=i(xe,"model([input_ids, attention_mask])"),xe.forEach(t),ie=i(V," or "),H=s(V,"CODE",{});var Fe=a(H);ge=i(Fe,"model([input_ids, attention_mask, token_type_ids])"),Fe.forEach(t),V.forEach(t),G=d(A),I=s(A,"LI",{});var Z=a(I);se=i(Z,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=s(Z,"CODE",{});var ke=a(U);_e=i(ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ke.forEach(t),Z.forEach(t),A.forEach(t)},m(h,z){m(h,p,z),e(p,$),m(h,g,z),m(h,v,z),e(v,k),e(k,_),e(v,u),e(v,M),e(M,pe),m(h,K,z),m(h,x,z),e(x,ee),e(x,O),e(O,oe),e(x,he),e(x,S),e(S,me),e(x,le),m(h,J,z),m(h,L,z),e(L,ne),m(h,X,z),m(h,q,z),e(q,C),e(C,ae),e(C,R),e(R,de),e(C,re),e(C,W),e(W,ue),e(q,ce),e(q,P),e(P,fe),e(P,B),e(B,te),e(P,ie),e(P,H),e(H,ge),e(q,G),e(q,I),e(I,se),e(I,U),e(U,_e)},d(h){h&&t(p),h&&t(g),h&&t(v),h&&t(K),h&&t(x),h&&t(J),h&&t(L),h&&t(X),h&&t(q)}}}function T5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function E5(j){let p,$,g,v,k,_,u,M,pe,K,x,ee,O,oe,he,S,me,le,J,L,ne,X,q,C,ae,R,de,re,W,ue,ce,P,fe,B,te,ie,H,ge,G,I,se,U,_e;return{c(){p=n("p"),$=r("TF 2.0 models accepts two formats as inputs:"),g=l(),v=n("ul"),k=n("li"),_=r("having all inputs as keyword arguments (like PyTorch models), or"),u=l(),M=n("li"),pe=r("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),x=n("p"),ee=r("This second option is useful when using "),O=n("code"),oe=r("tf.keras.Model.fit"),he=r(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),me=r("model(inputs)"),le=r("."),J=l(),L=n("p"),ne=r(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),X=l(),q=n("ul"),C=n("li"),ae=r("a single Tensor with "),R=n("code"),de=r("input_ids"),re=r(" only and nothing else: "),W=n("code"),ue=r("model(inputs_ids)"),ce=l(),P=n("li"),fe=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=n("code"),te=r("model([input_ids, attention_mask])"),ie=r(" or "),H=n("code"),ge=r("model([input_ids, attention_mask, token_type_ids])"),G=l(),I=n("li"),se=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=n("code"),_e=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(h){p=s(h,"P",{});var z=a(p);$=i(z,"TF 2.0 models accepts two formats as inputs:"),z.forEach(t),g=d(h),v=s(h,"UL",{});var Y=a(v);k=s(Y,"LI",{});var be=a(k);_=i(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),u=d(Y),M=s(Y,"LI",{});var $e=a(M);pe=i($e,"having all inputs as a list, tuple or dict in the first positional arguments."),$e.forEach(t),Y.forEach(t),K=d(h),x=s(h,"P",{});var N=a(x);ee=i(N,"This second option is useful when using "),O=s(N,"CODE",{});var ye=a(O);oe=i(ye,"tf.keras.Model.fit"),ye.forEach(t),he=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var ve=a(S);me=i(ve,"model(inputs)"),ve.forEach(t),le=i(N,"."),N.forEach(t),J=d(h),L=s(h,"P",{});var Me=a(L);ne=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Me.forEach(t),X=d(h),q=s(h,"UL",{});var A=a(q);C=s(A,"LI",{});var Q=a(C);ae=i(Q,"a single Tensor with "),R=s(Q,"CODE",{});var ze=a(R);de=i(ze,"input_ids"),ze.forEach(t),re=i(Q," only and nothing else: "),W=s(Q,"CODE",{});var Ee=a(W);ue=i(Ee,"model(inputs_ids)"),Ee.forEach(t),Q.forEach(t),ce=d(A),P=s(A,"LI",{});var V=a(P);fe=i(V,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=s(V,"CODE",{});var xe=a(B);te=i(xe,"model([input_ids, attention_mask])"),xe.forEach(t),ie=i(V," or "),H=s(V,"CODE",{});var Fe=a(H);ge=i(Fe,"model([input_ids, attention_mask, token_type_ids])"),Fe.forEach(t),V.forEach(t),G=d(A),I=s(A,"LI",{});var Z=a(I);se=i(Z,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=s(Z,"CODE",{});var ke=a(U);_e=i(ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ke.forEach(t),Z.forEach(t),A.forEach(t)},m(h,z){m(h,p,z),e(p,$),m(h,g,z),m(h,v,z),e(v,k),e(k,_),e(v,u),e(v,M),e(M,pe),m(h,K,z),m(h,x,z),e(x,ee),e(x,O),e(O,oe),e(x,he),e(x,S),e(S,me),e(x,le),m(h,J,z),m(h,L,z),e(L,ne),m(h,X,z),m(h,q,z),e(q,C),e(C,ae),e(C,R),e(R,de),e(C,re),e(C,W),e(W,ue),e(q,ce),e(q,P),e(P,fe),e(P,B),e(B,te),e(P,ie),e(P,H),e(H,ge),e(q,G),e(q,I),e(I,se),e(I,U),e(U,_e)},d(h){h&&t(p),h&&t(g),h&&t(v),h&&t(K),h&&t(x),h&&t(J),h&&t(L),h&&t(X),h&&t(q)}}}function w5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function b5(j){let p,$,g,v,k,_,u,M,pe,K,x,ee,O,oe,he,S,me,le,J,L,ne,X,q,C,ae,R,de,re,W,ue,ce,P,fe,B,te,ie,H,ge,G,I,se,U,_e;return{c(){p=n("p"),$=r("TF 2.0 models accepts two formats as inputs:"),g=l(),v=n("ul"),k=n("li"),_=r("having all inputs as keyword arguments (like PyTorch models), or"),u=l(),M=n("li"),pe=r("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),x=n("p"),ee=r("This second option is useful when using "),O=n("code"),oe=r("tf.keras.Model.fit"),he=r(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),me=r("model(inputs)"),le=r("."),J=l(),L=n("p"),ne=r(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),X=l(),q=n("ul"),C=n("li"),ae=r("a single Tensor with "),R=n("code"),de=r("input_ids"),re=r(" only and nothing else: "),W=n("code"),ue=r("model(inputs_ids)"),ce=l(),P=n("li"),fe=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=n("code"),te=r("model([input_ids, attention_mask])"),ie=r(" or "),H=n("code"),ge=r("model([input_ids, attention_mask, token_type_ids])"),G=l(),I=n("li"),se=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=n("code"),_e=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(h){p=s(h,"P",{});var z=a(p);$=i(z,"TF 2.0 models accepts two formats as inputs:"),z.forEach(t),g=d(h),v=s(h,"UL",{});var Y=a(v);k=s(Y,"LI",{});var be=a(k);_=i(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),u=d(Y),M=s(Y,"LI",{});var $e=a(M);pe=i($e,"having all inputs as a list, tuple or dict in the first positional arguments."),$e.forEach(t),Y.forEach(t),K=d(h),x=s(h,"P",{});var N=a(x);ee=i(N,"This second option is useful when using "),O=s(N,"CODE",{});var ye=a(O);oe=i(ye,"tf.keras.Model.fit"),ye.forEach(t),he=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var ve=a(S);me=i(ve,"model(inputs)"),ve.forEach(t),le=i(N,"."),N.forEach(t),J=d(h),L=s(h,"P",{});var Me=a(L);ne=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Me.forEach(t),X=d(h),q=s(h,"UL",{});var A=a(q);C=s(A,"LI",{});var Q=a(C);ae=i(Q,"a single Tensor with "),R=s(Q,"CODE",{});var ze=a(R);de=i(ze,"input_ids"),ze.forEach(t),re=i(Q," only and nothing else: "),W=s(Q,"CODE",{});var Ee=a(W);ue=i(Ee,"model(inputs_ids)"),Ee.forEach(t),Q.forEach(t),ce=d(A),P=s(A,"LI",{});var V=a(P);fe=i(V,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=s(V,"CODE",{});var xe=a(B);te=i(xe,"model([input_ids, attention_mask])"),xe.forEach(t),ie=i(V," or "),H=s(V,"CODE",{});var Fe=a(H);ge=i(Fe,"model([input_ids, attention_mask, token_type_ids])"),Fe.forEach(t),V.forEach(t),G=d(A),I=s(A,"LI",{});var Z=a(I);se=i(Z,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=s(Z,"CODE",{});var ke=a(U);_e=i(ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ke.forEach(t),Z.forEach(t),A.forEach(t)},m(h,z){m(h,p,z),e(p,$),m(h,g,z),m(h,v,z),e(v,k),e(k,_),e(v,u),e(v,M),e(M,pe),m(h,K,z),m(h,x,z),e(x,ee),e(x,O),e(O,oe),e(x,he),e(x,S),e(S,me),e(x,le),m(h,J,z),m(h,L,z),e(L,ne),m(h,X,z),m(h,q,z),e(q,C),e(C,ae),e(C,R),e(R,de),e(C,re),e(C,W),e(W,ue),e(q,ce),e(q,P),e(P,fe),e(P,B),e(B,te),e(P,ie),e(P,H),e(H,ge),e(q,G),e(q,I),e(I,se),e(I,U),e(U,_e)},d(h){h&&t(p),h&&t(g),h&&t(v),h&&t(K),h&&t(x),h&&t(J),h&&t(L),h&&t(X),h&&t(q)}}}function y5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function F5(j){let p,$,g,v,k,_,u,M,pe,K,x,ee,O,oe,he,S,me,le,J,L,ne,X,q,C,ae,R,de,re,W,ue,ce,P,fe,B,te,ie,H,ge,G,I,se,U,_e;return{c(){p=n("p"),$=r("TF 2.0 models accepts two formats as inputs:"),g=l(),v=n("ul"),k=n("li"),_=r("having all inputs as keyword arguments (like PyTorch models), or"),u=l(),M=n("li"),pe=r("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),x=n("p"),ee=r("This second option is useful when using "),O=n("code"),oe=r("tf.keras.Model.fit"),he=r(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),me=r("model(inputs)"),le=r("."),J=l(),L=n("p"),ne=r(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),X=l(),q=n("ul"),C=n("li"),ae=r("a single Tensor with "),R=n("code"),de=r("input_ids"),re=r(" only and nothing else: "),W=n("code"),ue=r("model(inputs_ids)"),ce=l(),P=n("li"),fe=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=n("code"),te=r("model([input_ids, attention_mask])"),ie=r(" or "),H=n("code"),ge=r("model([input_ids, attention_mask, token_type_ids])"),G=l(),I=n("li"),se=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=n("code"),_e=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(h){p=s(h,"P",{});var z=a(p);$=i(z,"TF 2.0 models accepts two formats as inputs:"),z.forEach(t),g=d(h),v=s(h,"UL",{});var Y=a(v);k=s(Y,"LI",{});var be=a(k);_=i(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),u=d(Y),M=s(Y,"LI",{});var $e=a(M);pe=i($e,"having all inputs as a list, tuple or dict in the first positional arguments."),$e.forEach(t),Y.forEach(t),K=d(h),x=s(h,"P",{});var N=a(x);ee=i(N,"This second option is useful when using "),O=s(N,"CODE",{});var ye=a(O);oe=i(ye,"tf.keras.Model.fit"),ye.forEach(t),he=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var ve=a(S);me=i(ve,"model(inputs)"),ve.forEach(t),le=i(N,"."),N.forEach(t),J=d(h),L=s(h,"P",{});var Me=a(L);ne=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Me.forEach(t),X=d(h),q=s(h,"UL",{});var A=a(q);C=s(A,"LI",{});var Q=a(C);ae=i(Q,"a single Tensor with "),R=s(Q,"CODE",{});var ze=a(R);de=i(ze,"input_ids"),ze.forEach(t),re=i(Q," only and nothing else: "),W=s(Q,"CODE",{});var Ee=a(W);ue=i(Ee,"model(inputs_ids)"),Ee.forEach(t),Q.forEach(t),ce=d(A),P=s(A,"LI",{});var V=a(P);fe=i(V,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),B=s(V,"CODE",{});var xe=a(B);te=i(xe,"model([input_ids, attention_mask])"),xe.forEach(t),ie=i(V," or "),H=s(V,"CODE",{});var Fe=a(H);ge=i(Fe,"model([input_ids, attention_mask, token_type_ids])"),Fe.forEach(t),V.forEach(t),G=d(A),I=s(A,"LI",{});var Z=a(I);se=i(Z,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),U=s(Z,"CODE",{});var ke=a(U);_e=i(ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ke.forEach(t),Z.forEach(t),A.forEach(t)},m(h,z){m(h,p,z),e(p,$),m(h,g,z),m(h,v,z),e(v,k),e(k,_),e(v,u),e(v,M),e(M,pe),m(h,K,z),m(h,x,z),e(x,ee),e(x,O),e(O,oe),e(x,he),e(x,S),e(S,me),e(x,le),m(h,J,z),m(h,L,z),e(L,ne),m(h,X,z),m(h,q,z),e(q,C),e(C,ae),e(C,R),e(R,de),e(C,re),e(C,W),e(W,ue),e(q,ce),e(q,P),e(P,fe),e(P,B),e(B,te),e(P,ie),e(P,H),e(H,ge),e(q,G),e(q,I),e(I,se),e(I,U),e(U,_e)},d(h){h&&t(p),h&&t(g),h&&t(v),h&&t(K),h&&t(x),h&&t(J),h&&t(L),h&&t(X),h&&t(q)}}}function $5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function M5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function z5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function x5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function q5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function P5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function C5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function j5(j){let p,$,g,v,k;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),v=r("Module"),k=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(_){p=s(_,"P",{});var u=a(p);$=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var M=a(g);v=i(M,"Module"),M.forEach(t),k=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(_,u){m(_,p,u),e(p,$),e(p,g),e(g,v),e(p,k)},d(_){_&&t(p)}}}function A5(j){let p,$,g,v,k,_,u,M,pe,K,x,ee,O,oe,he,S,me,le,J,L,ne,X,q,C,ae,R,de,re,W,ue,ce,P,fe,B,te,ie,H,ge,G,I,se,U,_e,h,z,Y,be,$e,N,ye,ve,Me,A,Q,ze,Ee,V,xe,Fe,Z,ke,Kd,Ds,eg,Gd,tg,qm,Xe,Os,og,Rt,ng,zl,sg,ag,xl,rg,ig,Ss,lg,dg,cg,$o,pg,ql,hg,mg,Pl,ug,fg,gg,Xd,_g,vg,Ws,Pm,Mo,Mn,Yd,Bs,kg,Zd,Tg,Cm,jt,Rs,Eg,ec,wg,bg,zn,Cl,yg,Fg,jl,$g,Mg,zg,Hs,xg,Al,qg,Pg,jm,zo,xn,tc,Us,Cg,oc,jg,Am,At,Qs,Ag,Vs,Lg,nc,Ig,Ng,Dg,qn,Ll,Og,Sg,Il,Wg,Bg,Rg,Js,Hg,Nl,Ug,Qg,Lm,xo,Pn,sc,Ks,Vg,ac,Jg,Im,qo,Gs,Kg,Xs,Gg,Dl,Xg,Yg,Nm,Po,Ys,Zg,Zs,e_,Ol,t_,o_,Dm,Co,Cn,rc,ea,n_,ic,s_,Om,Ye,ta,a_,lc,r_,i_,oa,l_,Sl,d_,c_,p_,na,h_,sa,m_,u_,f_,nt,aa,g_,jo,__,Wl,v_,k_,dc,T_,E_,w_,jn,b_,cc,y_,F_,ra,Sm,Ao,An,pc,ia,$_,hc,M_,Wm,Be,la,z_,mc,x_,q_,uc,P_,C_,da,j_,Bl,A_,L_,I_,ca,N_,pa,D_,O_,S_,st,ha,W_,Lo,B_,Rl,R_,H_,fc,U_,Q_,V_,Ln,J_,gc,K_,G_,ma,Bm,Io,In,_c,ua,X_,vc,Y_,Rm,Ze,fa,Z_,ga,ev,kc,tv,ov,nv,_a,sv,Hl,av,rv,iv,va,lv,ka,dv,cv,pv,at,Ta,hv,No,mv,Ul,uv,fv,Tc,gv,_v,vv,Nn,kv,Ec,Tv,Ev,Ea,Hm,Do,Dn,wc,wa,wv,bc,bv,Um,Re,ba,yv,yc,Fv,$v,Fc,Mv,zv,ya,xv,Ql,qv,Pv,Cv,Fa,jv,$a,Av,Lv,Iv,rt,Ma,Nv,Oo,Dv,Vl,Ov,Sv,$c,Wv,Bv,Rv,On,Hv,Mc,Uv,Qv,za,Qm,So,Sn,zc,xa,Vv,xc,Jv,Vm,et,qa,Kv,qc,Gv,Xv,Pa,Yv,Jl,Zv,ek,tk,Ca,ok,ja,nk,sk,ak,We,Aa,rk,Wo,ik,Kl,lk,dk,Pc,ck,pk,hk,Wn,mk,Cc,uk,fk,La,gk,jc,_k,vk,Ia,Jm,Bo,Bn,Ac,Na,kk,Lc,Tk,Km,tt,Da,Ek,Ic,wk,bk,Oa,yk,Gl,Fk,$k,Mk,Sa,zk,Wa,xk,qk,Pk,it,Ba,Ck,Ro,jk,Xl,Ak,Lk,Nc,Ik,Nk,Dk,Rn,Ok,Dc,Sk,Wk,Ra,Gm,Ho,Hn,Oc,Ha,Bk,Sc,Rk,Xm,He,Ua,Hk,Wc,Uk,Qk,Bc,Vk,Jk,Qa,Kk,Yl,Gk,Xk,Yk,Va,Zk,Ja,eT,tT,oT,lt,Ka,nT,Uo,sT,Zl,aT,rT,Rc,iT,lT,dT,Un,cT,Hc,pT,hT,Ga,Ym,Qo,Qn,Uc,Xa,mT,Qc,uT,Zm,ot,Ya,fT,Vo,gT,Vc,_T,vT,Jc,kT,TT,ET,Za,wT,ed,bT,yT,FT,er,$T,tr,MT,zT,xT,dt,or,qT,Jo,PT,td,CT,jT,Kc,AT,LT,IT,Vn,NT,Gc,DT,OT,nr,eu,Ko,Jn,Xc,sr,ST,Yc,WT,tu,Ue,ar,BT,Zc,RT,HT,rr,UT,od,QT,VT,JT,ir,KT,lr,GT,XT,YT,Kn,ZT,ct,dr,e1,Go,t1,nd,o1,n1,ep,s1,a1,r1,Gn,i1,tp,l1,d1,cr,ou,Xo,Xn,op,pr,c1,np,p1,nu,je,hr,h1,sp,m1,u1,ap,f1,g1,mr,_1,sd,v1,k1,T1,ur,E1,fr,w1,b1,y1,Yn,F1,pt,gr,$1,Yo,M1,ad,z1,x1,rp,q1,P1,C1,Zn,j1,ip,A1,L1,_r,su,Zo,es,lp,vr,I1,dp,N1,au,Ae,kr,D1,cp,O1,S1,pp,W1,B1,Tr,R1,rd,H1,U1,Q1,Er,V1,wr,J1,K1,G1,ts,X1,ht,br,Y1,en,Z1,id,eE,tE,hp,oE,nE,sE,os,aE,mp,rE,iE,yr,ru,tn,ns,up,Fr,lE,fp,dE,iu,Qe,$r,cE,gp,pE,hE,Mr,mE,ld,uE,fE,gE,zr,_E,xr,vE,kE,TE,ss,EE,mt,qr,wE,on,bE,dd,yE,FE,_p,$E,ME,zE,as,xE,vp,qE,PE,Pr,lu,nn,rs,kp,Cr,CE,Tp,jE,du,Ve,jr,AE,Ep,LE,IE,Ar,NE,cd,DE,OE,SE,Lr,WE,Ir,BE,RE,HE,is,UE,ut,Nr,QE,sn,VE,pd,JE,KE,wp,GE,XE,YE,ls,ZE,bp,ew,tw,Dr,cu,an,ds,yp,Or,ow,Fp,nw,pu,Le,Sr,sw,$p,aw,rw,Mp,iw,lw,Wr,dw,hd,cw,pw,hw,Br,mw,Rr,uw,fw,gw,cs,_w,ft,Hr,vw,rn,kw,md,Tw,Ew,zp,ww,bw,yw,ps,Fw,xp,$w,Mw,Ur,hu,ln,hs,qp,Qr,zw,Pp,xw,mu,Je,Vr,qw,dn,Pw,Cp,Cw,jw,jp,Aw,Lw,Iw,Jr,Nw,ud,Dw,Ow,Sw,Kr,Ww,Gr,Bw,Rw,Hw,ms,Uw,gt,Xr,Qw,cn,Vw,fd,Jw,Kw,Ap,Gw,Xw,Yw,us,Zw,Lp,eb,tb,Yr,uu,pn,fs,Ip,Zr,ob,Np,nb,fu,Ie,ei,sb,Dp,ab,rb,ti,ib,gd,lb,db,cb,oi,pb,ni,hb,mb,ub,Op,fb,gb,Ht,Sp,si,_b,vb,Wp,ai,kb,Tb,Bp,ri,Eb,wb,Rp,ii,bb,yb,_t,li,Fb,hn,$b,Hp,Mb,zb,Up,xb,qb,Pb,gs,Cb,Qp,jb,Ab,di,gu,mn,_s,Vp,ci,Lb,Jp,Ib,_u,Pe,pi,Nb,Kp,Db,Ob,Gp,Sb,Wb,hi,Bb,_d,Rb,Hb,Ub,mi,Qb,ui,Vb,Jb,Kb,Xp,Gb,Xb,Ut,Yp,fi,Yb,Zb,Zp,gi,ey,ty,eh,_i,oy,ny,th,vi,sy,ay,vt,ki,ry,un,iy,oh,ly,dy,nh,cy,py,hy,vs,my,sh,uy,fy,Ti,vu,fn,ks,ah,Ei,gy,rh,_y,ku,Ne,wi,vy,bi,ky,ih,Ty,Ey,wy,yi,by,vd,yy,Fy,$y,Fi,My,$i,zy,xy,qy,lh,Py,Cy,Qt,dh,Mi,jy,Ay,ch,zi,Ly,Iy,ph,xi,Ny,Dy,hh,qi,Oy,Sy,kt,Pi,Wy,gn,By,mh,Ry,Hy,uh,Uy,Qy,Vy,Ts,Jy,fh,Ky,Gy,Ci,Tu,_n,Es,gh,ji,Xy,_h,Yy,Eu,De,Ai,Zy,vh,eF,tF,Li,oF,kd,nF,sF,aF,Ii,rF,Ni,iF,lF,dF,kh,cF,pF,Vt,Th,Di,hF,mF,Eh,Oi,uF,fF,wh,Si,gF,_F,bh,Wi,vF,kF,Tt,Bi,TF,vn,EF,yh,wF,bF,Fh,yF,FF,$F,ws,MF,$h,zF,xF,Ri,wu,kn,bs,Mh,Hi,qF,zh,PF,bu,Oe,Ui,CF,xh,jF,AF,Qi,LF,Td,IF,NF,DF,Vi,OF,Ji,SF,WF,BF,qh,RF,HF,Jt,Ph,Ki,UF,QF,Ch,Gi,VF,JF,jh,Xi,KF,GF,Ah,Yi,XF,YF,Et,Zi,ZF,Tn,e$,Lh,t$,o$,Ih,n$,s$,a$,ys,r$,Nh,i$,l$,el,yu,En,Fs,Dh,tl,d$,Oh,c$,Fu,Ce,ol,p$,Sh,h$,m$,Wh,u$,f$,nl,g$,Ed,_$,v$,k$,sl,T$,al,E$,w$,b$,Bh,y$,F$,Kt,Rh,rl,$$,M$,Hh,il,z$,x$,Uh,ll,q$,P$,Qh,dl,C$,j$,wt,cl,A$,wn,L$,Vh,I$,N$,Jh,D$,O$,S$,$s,W$,Kh,B$,R$,pl,$u,bn,Ms,Gh,hl,H$,Xh,U$,Mu,Se,ml,Q$,yn,V$,Yh,J$,K$,Zh,G$,X$,Y$,ul,Z$,wd,e2,t2,o2,fl,n2,gl,s2,a2,r2,em,i2,l2,Gt,tm,_l,d2,c2,om,vl,p2,h2,nm,kl,m2,u2,sm,Tl,f2,g2,bt,El,_2,Fn,v2,am,k2,T2,rm,E2,w2,b2,zs,y2,im,F2,$2,wl,zu;return _=new we({}),oe=new we({}),Ds=new we({}),Os=new D({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:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/configuration_electra.py#L38",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/pr_15839/en/model_doc/electra#transformers.ElectraModel">ElectraModel</a> or <a href="/docs/transformers/pr_15839/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/pr_15839/en/model_doc/electra#transformers.ElectraModel">ElectraModel</a> or <a href="/docs/transformers/pr_15839/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"}]}}),Ws=new qe({props:{code:`from transformers import ElectraModel, ElectraConfig

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

# Initializing a model 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> ElectraModel, ElectraConfig

<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 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`}}),Bs=new we({}),Rs=new D({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:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/tokenization_electra.py#L52"}}),Us=new we({}),Qs=new D({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:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/tokenization_electra_fast.py#L61"}}),Ks=new we({}),Gs=new D({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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L697",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"}]}}),Ys=new D({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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L825",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"}]}}),ea=new we({}),ta=new D({props:{name:"class transformers.ElectraModel",anchor:"transformers.ElectraModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L809",parametersDescription:[{anchor:"transformers.ElectraModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),aa=new D({props:{name:"forward",anchor:"transformers.ElectraModel.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"past_key_values",val:" = None"},{name:"use_cache",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L836",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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>
<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/pr_15839/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),jn=new Te({props:{$$slots:{default:[a5]},$$scope:{ctx:j}}}),ra=new qe({props:{code:`from transformers import ElectraTokenizer, ElectraModel
import torch

tokenizer = ElectraTokenizer.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> ElectraTokenizer, 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 = ElectraTokenizer.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`}}),ia=new we({}),la=new D({props:{name:"class transformers.ElectraForPreTraining",anchor:"transformers.ElectraForPreTraining",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1058",parametersDescription:[{anchor:"transformers.ElectraForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),ha=new D({props:{name:"forward",anchor:"transformers.ElectraForPreTraining.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1067",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/model_doc/electra#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"
>transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ln=new Te({props:{$$slots:{default:[r5]},$$scope:{ctx:j}}}),ma=new qe({props:{code:`from transformers import ElectraTokenizer, ElectraForPreTraining
import torch

tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = ElectraForPreTraining.from_pretrained("google/electra-small-discriminator")

input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute", add_special_tokens=True)).unsqueeze(
    0
)  # Batch size 1
logits = model(input_ids).logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ElectraTokenizer, ElectraForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor(tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">True</span>)).unsqueeze(
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>)  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(input_ids).logits`}}),ua=new we({}),fa=new D({props:{name:"class transformers.ElectraForCausalLM",anchor:"transformers.ElectraForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1515",parametersDescription:[{anchor:"transformers.ElectraForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Ta=new D({props:{name:"forward",anchor:"transformers.ElectraForCausalLM.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"labels",val:" = None"},{name:"past_key_values",val:" = None"},{name:"use_cache",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1534",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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>
<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/pr_15839/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Nn=new Te({props:{$$slots:{default:[i5]},$$scope:{ctx:j}}}),Ea=new qe({props:{code:`from transformers import ElectraTokenizer, ElectraForCausalLM, ElectraConfig
import torch

tokenizer = ElectraTokenizer.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> ElectraTokenizer, 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 = ElectraTokenizer.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`}}),wa=new we({}),ba=new D({props:{name:"class transformers.ElectraForMaskedLM",anchor:"transformers.ElectraForMaskedLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1155",parametersDescription:[{anchor:"transformers.ElectraForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Ma=new D({props:{name:"forward",anchor:"transformers.ElectraForMaskedLM.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1172",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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/pr_15839/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),On=new Te({props:{$$slots:{default:[l5]},$$scope:{ctx:j}}}),za=new qe({props:{code:`from transformers import ElectraTokenizer, ElectraForMaskedLM
import torch

tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = ElectraForMaskedLM.from_pretrained("google/electra-small-discriminator")

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

outputs = model(**inputs, labels=labels)
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> ElectraTokenizer, 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 = ElectraTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForMaskedLM.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;pt&quot;</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>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),xa=new we({}),qa=new D({props:{name:"class transformers.ElectraForSequenceClassification",anchor:"transformers.ElectraForSequenceClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L961",parametersDescription:[{anchor:"transformers.ElectraForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Aa=new D({props:{name:"forward",anchor:"transformers.ElectraForSequenceClassification.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L972",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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/pr_15839/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wn=new Te({props:{$$slots:{default:[d5]},$$scope:{ctx:j}}}),La=new qe({props:{code:`import torch
from transformers import ElectraTokenizer, ElectraForSequenceClassification

torch.manual_seed(0)
tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = ElectraForSequenceClassification.from_pretrained("google/electra-small-discriminator", num_labels=2)

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
labels = torch.tensor([1]).unsqueeze(0)  # Batch size 1
outputs = model(**inputs, labels=labels)
loss = outputs.loss
logits = outputs.logits
list(logits.shape)
`,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> ElectraTokenizer, ElectraForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>torch.manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>, num_labels=<span class="hljs-number">2</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>labels = torch.tensor([<span class="hljs-number">1</span>]).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
`}}),Ia=new qe({props:{code:`import torch
from transformers import ElectraTokenizer, ElectraForSequenceClassification

torch.manual_seed(0)
tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = ElectraForSequenceClassification.from_pretrained("google/electra-small-discriminator", problem_type="multi_label_classification", num_labels=2)

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
labels = torch.tensor([[1, 1]], dtype=torch.float)  # need dtype=float for BCEWithLogitsLoss
outputs = model(**inputs, labels=labels)
loss = outputs.loss
list(logits.shape)
`,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> ElectraTokenizer, ElectraForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>torch.manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>, num_labels=<span class="hljs-number">2</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>labels = torch.tensor([[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>]], dtype=torch.<span class="hljs-built_in">float</span>)  <span class="hljs-comment"># need dtype=float for BCEWithLogitsLoss</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
`}}),Na=new we({}),Da=new D({props:{name:"class transformers.ElectraForMultipleChoice",anchor:"transformers.ElectraForMultipleChoice",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1427",parametersDescription:[{anchor:"transformers.ElectraForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Ba=new D({props:{name:"forward",anchor:"transformers.ElectraForMultipleChoice.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1438",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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/pr_15839/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Rn=new Te({props:{$$slots:{default:[c5]},$$scope:{ctx:j}}}),Ra=new qe({props:{code:`from transformers import ElectraTokenizer, ElectraForMultipleChoice
import torch

tokenizer = ElectraTokenizer.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> ElectraTokenizer, 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 = ElectraTokenizer.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`}}),Ha=new we({}),Ua=new D({props:{name:"class transformers.ElectraForTokenClassification",anchor:"transformers.ElectraForTokenClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1242",parametersDescription:[{anchor:"transformers.ElectraForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Ka=new D({props:{name:"forward",anchor:"transformers.ElectraForTokenClassification.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1256",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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/pr_15839/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Un=new Te({props:{$$slots:{default:[p5]},$$scope:{ctx:j}}}),Ga=new qe({props:{code:`from transformers import ElectraTokenizer, ElectraForTokenClassification
import torch

tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = ElectraForTokenClassification.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
labels = torch.tensor([1] * inputs["input_ids"].size(1)).unsqueeze(0)  # Batch size 1

outputs = model(**inputs, labels=labels)
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> ElectraTokenizer, 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 = ElectraTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForTokenClassification.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>labels = torch.tensor([<span class="hljs-number">1</span>] * inputs[<span class="hljs-string">&quot;input_ids&quot;</span>].size(<span class="hljs-number">1</span>)).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),Xa=new we({}),Ya=new D({props:{name:"class transformers.ElectraForQuestionAnswering",anchor:"transformers.ElectraForQuestionAnswering",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1322",parametersDescription:[{anchor:"transformers.ElectraForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),or=new D({props:{name:"forward",anchor:"transformers.ElectraForQuestionAnswering.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"start_positions",val:" = None"},{name:"end_positions",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_electra.py#L1336",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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/pr_15839/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vn=new Te({props:{$$slots:{default:[h5]},$$scope:{ctx:j}}}),nr=new qe({props:{code:`from transformers import ElectraTokenizer, ElectraForQuestionAnswering
import torch

torch.manual_seed(0)
tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = ElectraForQuestionAnswering.from_pretrained("google/electra-small-discriminator")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
inputs = tokenizer(question, text, return_tensors="pt")
start_positions = torch.tensor([1])
end_positions = torch.tensor([3])

outputs = model(**inputs, start_positions=start_positions, end_positions=end_positions)
loss = outputs.loss
round(loss.item(), 2)


start_scores = outputs.start_logits
list(start_scores.shape)


end_scores = outputs.end_logits
list(end_scores.shape)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ElectraTokenizer, ElectraForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>torch.manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ElectraForQuestionAnswering.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;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_positions = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>end_positions = torch.tensor([<span class="hljs-number">3</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=start_positions, end_positions=end_positions)
<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-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(start_scores.shape)


<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(end_scores.shape)
`}}),sr=new we({}),ar=new D({props:{name:"class transformers.TFElectraModel",anchor:"transformers.TFElectraModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L945",parametersDescription:[{anchor:"transformers.TFElectraModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Kn=new Te({props:{$$slots:{default:[m5]},$$scope:{ctx:j}}}),dr=new D({props:{name:"call",anchor:"transformers.TFElectraModel.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"past_key_values",val:" = None"},{name:"use_cache",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L951",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Gn=new Te({props:{$$slots:{default:[u5]},$$scope:{ctx:j}}}),cr=new qe({props:{code:`from transformers import ElectraTokenizer, TFElectraModel
import tensorflow as tf

tokenizer = ElectraTokenizer.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> ElectraTokenizer, 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 = ElectraTokenizer.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`}}),pr=new we({}),hr=new D({props:{name:"class transformers.TFElectraForPreTraining",anchor:"transformers.TFElectraForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1061",parametersDescription:[{anchor:"transformers.TFElectraForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Yn=new Te({props:{$$slots:{default:[f5]},$$scope:{ctx:j}}}),gr=new D({props:{name:"call",anchor:"transformers.TFElectraForPreTraining.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1068",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/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>
`}}),Zn=new Te({props:{$$slots:{default:[g5]},$$scope:{ctx:j}}}),_r=new qe({props:{code:`import tensorflow as tf
from transformers import ElectraTokenizer, TFElectraForPreTraining

tokenizer = ElectraTokenizer.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> ElectraTokenizer, TFElectraForPreTraining

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.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>]`}}),vr=new we({}),kr=new D({props:{name:"class transformers.TFElectraForMaskedLM",anchor:"transformers.TFElectraForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1191",parametersDescription:[{anchor:"transformers.TFElectraForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),ts=new Te({props:{$$slots:{default:[_5]},$$scope:{ctx:j}}}),br=new D({props:{name:"call",anchor:"transformers.TFElectraForMaskedLM.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1213",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),os=new Te({props:{$$slots:{default:[v5]},$$scope:{ctx:j}}}),yr=new qe({props:{code:`from transformers import ElectraTokenizer, TFElectraForMaskedLM
import tensorflow as tf

tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = TFElectraForMaskedLM.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="tf")
inputs["labels"] = tokenizer("The capital of France is Paris.", return_tensors="tf")["input_ids"]

outputs = model(inputs)
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> ElectraTokenizer, 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 = ElectraTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForMaskedLM.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;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = 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>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),Fr=new we({}),$r=new D({props:{name:"class transformers.TFElectraForSequenceClassification",anchor:"transformers.TFElectraForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1331",parametersDescription:[{anchor:"transformers.TFElectraForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),ss=new Te({props:{$$slots:{default:[k5]},$$scope:{ctx:j}}}),qr=new D({props:{name:"call",anchor:"transformers.TFElectraForSequenceClassification.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1338",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),as=new Te({props:{$$slots:{default:[T5]},$$scope:{ctx:j}}}),Pr=new qe({props:{code:`from transformers import ElectraTokenizer, TFElectraForSequenceClassification
import tensorflow as tf

tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = TFElectraForSequenceClassification.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
inputs["labels"] = tf.reshape(tf.constant(1), (-1, 1))  # Batch size 1

outputs = model(inputs)
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> ElectraTokenizer, 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 = ElectraTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForSequenceClassification.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>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = tf.reshape(tf.constant(<span class="hljs-number">1</span>), (-<span class="hljs-number">1</span>, <span class="hljs-number">1</span>))  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),Cr=new we({}),jr=new D({props:{name:"class transformers.TFElectraForMultipleChoice",anchor:"transformers.TFElectraForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1424",parametersDescription:[{anchor:"transformers.TFElectraForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),is=new Te({props:{$$slots:{default:[E5]},$$scope:{ctx:j}}}),Nr=new D({props:{name:"call",anchor:"transformers.TFElectraForMultipleChoice.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1446",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ls=new Te({props:{$$slots:{default:[w5]},$$scope:{ctx:j}}}),Dr=new qe({props:{code:`from transformers import ElectraTokenizer, TFElectraForMultipleChoice
import tensorflow as tf

tokenizer = ElectraTokenizer.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> ElectraTokenizer, 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 = ElectraTokenizer.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`}}),Or=new we({}),Sr=new D({props:{name:"class transformers.TFElectraForTokenClassification",anchor:"transformers.TFElectraForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1572",parametersDescription:[{anchor:"transformers.TFElectraForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),cs=new Te({props:{$$slots:{default:[b5]},$$scope:{ctx:j}}}),Hr=new D({props:{name:"call",anchor:"transformers.TFElectraForTokenClassification.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1585",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ps=new Te({props:{$$slots:{default:[y5]},$$scope:{ctx:j}}}),Ur=new qe({props:{code:`from transformers import ElectraTokenizer, TFElectraForTokenClassification
import tensorflow as tf

tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = TFElectraForTokenClassification.from_pretrained("google/electra-small-discriminator")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
input_ids = inputs["input_ids"]
inputs["labels"] = tf.reshape(
    tf.constant([1] * tf.size(input_ids).numpy()), (-1, tf.size(input_ids))
)  # Batch size 1

outputs = model(inputs)
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> ElectraTokenizer, 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 = ElectraTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForTokenClassification.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>input_ids = inputs[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = tf.reshape(
<span class="hljs-meta">... </span>    tf.constant([<span class="hljs-number">1</span>] * tf.size(input_ids).numpy()), (-<span class="hljs-number">1</span>, tf.size(input_ids))
<span class="hljs-meta">&gt;&gt;&gt; </span>)  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),Qr=new we({}),Vr=new D({props:{name:"class transformers.TFElectraForQuestionAnswering",anchor:"transformers.TFElectraForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1671",parametersDescription:[{anchor:"transformers.TFElectraForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),ms=new Te({props:{$$slots:{default:[F5]},$$scope:{ctx:j}}}),Xr=new D({props:{name:"call",anchor:"transformers.TFElectraForQuestionAnswering.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"start_positions",val:" = None"},{name:"end_positions",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_tf_electra.py#L1681",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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),us=new Te({props:{$$slots:{default:[$5]},$$scope:{ctx:j}}}),Yr=new qe({props:{code:`from transformers import ElectraTokenizer, TFElectraForQuestionAnswering
import tensorflow as tf

tokenizer = ElectraTokenizer.from_pretrained("google/electra-small-discriminator")
model = TFElectraForQuestionAnswering.from_pretrained("google/electra-small-discriminator")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
input_dict = tokenizer(question, text, return_tensors="tf")
outputs = model(input_dict)
start_logits = outputs.start_logits
end_logits = outputs.end_logits

all_tokens = tokenizer.convert_ids_to_tokens(input_dict["input_ids"].numpy()[0])
answer = " ".join(all_tokens[tf.math.argmax(start_logits, 1)[0] : tf.math.argmax(end_logits, 1)[0] + 1])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ElectraTokenizer, 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 = ElectraTokenizer.from_pretrained(<span class="hljs-string">&quot;google/electra-small-discriminator&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFElectraForQuestionAnswering.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>input_dict = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_dict)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_logits = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_logits = outputs.end_logits

<span class="hljs-meta">&gt;&gt;&gt; </span>all_tokens = tokenizer.convert_ids_to_tokens(input_dict[<span class="hljs-string">&quot;input_ids&quot;</span>].numpy()[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer = <span class="hljs-string">&quot; &quot;</span>.join(all_tokens[tf.math.argmax(start_logits, <span class="hljs-number">1</span>)[<span class="hljs-number">0</span>] : tf.math.argmax(end_logits, <span class="hljs-number">1</span>)[<span class="hljs-number">0</span>] + <span class="hljs-number">1</span>])`}}),Zr=new we({}),ei=new D({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L663",parametersDescription:[{anchor:"transformers.FlaxElectraModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),li=new D({props:{name:"__call__",anchor:"transformers.FlaxElectraPreTrainedModel.__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:"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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L565",parametersDescription:[{anchor:"transformers.FlaxElectraPreTrainedModel.__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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),gs=new Te({props:{$$slots:{default:[M5]},$$scope:{ctx:j}}}),di=new qe({props:{code:`from transformers import ElectraTokenizer, FlaxElectraModel

tokenizer = ElectraTokenizer.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> ElectraTokenizer, FlaxElectraModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.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`}}),ci=new we({}),pi=new D({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L812",parametersDescription:[{anchor:"transformers.FlaxElectraForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),ki=new D({props:{name:"__call__",anchor:"transformers.FlaxElectraPreTrainedModel.__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:"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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L565",parametersDescription:[{anchor:"transformers.FlaxElectraPreTrainedModel.__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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],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/pr_15839/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>
`}}),vs=new Te({props:{$$slots:{default:[z5]},$$scope:{ctx:j}}}),Ti=new qe({props:{code:`from transformers import ElectraTokenizer, FlaxElectraForPreTraining

tokenizer = ElectraTokenizer.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> ElectraTokenizer, FlaxElectraForPreTraining

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.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`}}),Ei=new we({}),wi=new D({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L749",parametersDescription:[{anchor:"transformers.FlaxElectraForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Pi=new D({props:{name:"__call__",anchor:"transformers.FlaxElectraPreTrainedModel.__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:"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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L565",parametersDescription:[{anchor:"transformers.FlaxElectraPreTrainedModel.__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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ts=new Te({props:{$$slots:{default:[x5]},$$scope:{ctx:j}}}),Ci=new qe({props:{code:`from transformers import ElectraTokenizer, FlaxElectraForMaskedLM

tokenizer = ElectraTokenizer.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> ElectraTokenizer, FlaxElectraForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.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`}}),ji=new we({}),Ai=new D({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L1213",parametersDescription:[{anchor:"transformers.FlaxElectraForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Bi=new D({props:{name:"__call__",anchor:"transformers.FlaxElectraPreTrainedModel.__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:"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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L565",parametersDescription:[{anchor:"transformers.FlaxElectraPreTrainedModel.__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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ws=new Te({props:{$$slots:{default:[q5]},$$scope:{ctx:j}}}),Ri=new qe({props:{code:`from transformers import ElectraTokenizer, FlaxElectraForSequenceClassification

tokenizer = ElectraTokenizer.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> ElectraTokenizer, FlaxElectraForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.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`}}),Hi=new we({}),Ui=new D({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L1049",parametersDescription:[{anchor:"transformers.FlaxElectraForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Zi=new D({props:{name:"__call__",anchor:"transformers.FlaxElectraPreTrainedModel.__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:"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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L565",parametersDescription:[{anchor:"transformers.FlaxElectraPreTrainedModel.__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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ys=new Te({props:{$$slots:{default:[P5]},$$scope:{ctx:j}}}),el=new qe({props:{code:`from transformers import ElectraTokenizer, FlaxElectraForMultipleChoice

tokenizer = ElectraTokenizer.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> ElectraTokenizer, FlaxElectraForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.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`}}),tl=new we({}),ol=new D({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L904",parametersDescription:[{anchor:"transformers.FlaxElectraForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),cl=new D({props:{name:"__call__",anchor:"transformers.FlaxElectraPreTrainedModel.__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:"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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L565",parametersDescription:[{anchor:"transformers.FlaxElectraPreTrainedModel.__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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$s=new Te({props:{$$slots:{default:[C5]},$$scope:{ctx:j}}}),pl=new qe({props:{code:`from transformers import ElectraTokenizer, FlaxElectraForTokenClassification

tokenizer = ElectraTokenizer.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> ElectraTokenizer, FlaxElectraForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.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`}}),hl=new we({}),ml=new D({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L1122",parametersDescription:[{anchor:"transformers.FlaxElectraForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),El=new D({props:{name:"__call__",anchor:"transformers.FlaxElectraPreTrainedModel.__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:"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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/electra/modeling_flax_electra.py#L565",parametersDescription:[{anchor:"transformers.FlaxElectraPreTrainedModel.__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/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer">ElectraTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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.FlaxElectraPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zs=new Te({props:{$$slots:{default:[j5]},$$scope:{ctx:j}}}),wl=new qe({props:{code:`from transformers import ElectraTokenizer, FlaxElectraForQuestionAnswering

tokenizer = ElectraTokenizer.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> ElectraTokenizer, FlaxElectraForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = ElectraTokenizer.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(){p=n("meta"),$=l(),g=n("h1"),v=n("a"),k=n("span"),T(_.$$.fragment),u=l(),M=n("span"),pe=r("ELECTRA"),K=l(),x=n("h2"),ee=n("a"),O=n("span"),T(oe.$$.fragment),he=l(),S=n("span"),me=r("Overview"),le=l(),J=n("p"),L=r("The ELECTRA model was proposed in the paper "),ne=n("a"),X=r(`ELECTRA: Pre-training Text Encoders as Discriminators Rather Than
Generators`),q=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.`),C=l(),ae=n("p"),R=r("The abstract from the paper is the following:"),de=l(),re=n("p"),W=n("em"),ue=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.`),ce=l(),P=n("p"),fe=r("Tips:"),B=l(),te=n("ul"),ie=n("li"),H=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.`),ge=l(),G=n("li"),I=r("The ELECTRA checkpoints saved using "),se=n("a"),U=r("Google Research\u2019s implementation"),_e=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
`),h=n("a"),z=r("ElectraForMaskedLM"),Y=r(` model, and the generator may be loaded in the
`),be=n("a"),$e=r("ElectraForPreTraining"),N=r(` model (the classification head will be randomly initialized as it
doesn\u2019t exist in the generator).`),ye=l(),ve=n("p"),Me=r("This model was contributed by "),A=n("a"),Q=r("lysandre"),ze=r(". The original code can be found "),Ee=n("a"),V=r("here"),xe=r("."),Fe=l(),Z=n("h2"),ke=n("a"),Kd=n("span"),T(Ds.$$.fragment),eg=l(),Gd=n("span"),tg=r("ElectraConfig"),qm=l(),Xe=n("div"),T(Os.$$.fragment),og=l(),Rt=n("p"),ng=r("This is the configuration class to store the configuration of a "),zl=n("a"),sg=r("ElectraModel"),ag=r(" or a "),xl=n("a"),rg=r("TFElectraModel"),ig=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
`),Ss=n("a"),lg=r("google/electra-small-discriminator"),dg=r(" architecture."),cg=l(),$o=n("p"),pg=r("Configuration objects inherit from "),ql=n("a"),hg=r("PretrainedConfig"),mg=r(` and can be used to control the model outputs. Read the
documentation from `),Pl=n("a"),ug=r("PretrainedConfig"),fg=r(" for more information."),gg=l(),Xd=n("p"),_g=r("Examples:"),vg=l(),T(Ws.$$.fragment),Pm=l(),Mo=n("h2"),Mn=n("a"),Yd=n("span"),T(Bs.$$.fragment),kg=l(),Zd=n("span"),Tg=r("ElectraTokenizer"),Cm=l(),jt=n("div"),T(Rs.$$.fragment),Eg=l(),ec=n("p"),wg=r("Construct an ELECTRA tokenizer."),bg=l(),zn=n("p"),Cl=n("a"),yg=r("ElectraTokenizer"),Fg=r(" is identical to "),jl=n("a"),$g=r("BertTokenizer"),Mg=r(` and runs end-to-end tokenization: punctuation splitting and
wordpiece.`),zg=l(),Hs=n("p"),xg=r("Refer to superclass "),Al=n("a"),qg=r("BertTokenizer"),Pg=r(" for usage examples and documentation concerning parameters."),jm=l(),zo=n("h2"),xn=n("a"),tc=n("span"),T(Us.$$.fragment),Cg=l(),oc=n("span"),jg=r("ElectraTokenizerFast"),Am=l(),At=n("div"),T(Qs.$$.fragment),Ag=l(),Vs=n("p"),Lg=r("Construct a \u201Cfast\u201D ELECTRA tokenizer (backed by HuggingFace\u2019s "),nc=n("em"),Ig=r("tokenizers"),Ng=r(" library)."),Dg=l(),qn=n("p"),Ll=n("a"),Og=r("ElectraTokenizerFast"),Sg=r(" is identical to "),Il=n("a"),Wg=r("BertTokenizerFast"),Bg=r(` and runs end-to-end tokenization: punctuation
splitting and wordpiece.`),Rg=l(),Js=n("p"),Hg=r("Refer to superclass "),Nl=n("a"),Ug=r("BertTokenizerFast"),Qg=r(" for usage examples and documentation concerning parameters."),Lm=l(),xo=n("h2"),Pn=n("a"),sc=n("span"),T(Ks.$$.fragment),Vg=l(),ac=n("span"),Jg=r("Electra specific outputs"),Im=l(),qo=n("div"),T(Gs.$$.fragment),Kg=l(),Xs=n("p"),Gg=r("Output type of "),Dl=n("a"),Xg=r("ElectraForPreTraining"),Yg=r("."),Nm=l(),Po=n("div"),T(Ys.$$.fragment),Zg=l(),Zs=n("p"),e_=r("Output type of "),Ol=n("a"),t_=r("TFElectraForPreTraining"),o_=r("."),Dm=l(),Co=n("h2"),Cn=n("a"),rc=n("span"),T(ea.$$.fragment),n_=l(),ic=n("span"),s_=r("ElectraModel"),Om=l(),Ye=n("div"),T(ta.$$.fragment),a_=l(),lc=n("p"),r_=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."),i_=l(),oa=n("p"),l_=r("This model inherits from "),Sl=n("a"),d_=r("PreTrainedModel"),c_=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.)`),p_=l(),na=n("p"),h_=r("This model is also a PyTorch "),sa=n("a"),m_=r("torch.nn.Module"),u_=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),f_=l(),nt=n("div"),T(aa.$$.fragment),g_=l(),jo=n("p"),__=r("The "),Wl=n("a"),v_=r("ElectraModel"),k_=r(" forward method, overrides the "),dc=n("code"),T_=r("__call__"),E_=r(" special method."),w_=l(),T(jn.$$.fragment),b_=l(),cc=n("p"),y_=r("Example:"),F_=l(),T(ra.$$.fragment),Sm=l(),Ao=n("h2"),An=n("a"),pc=n("span"),T(ia.$$.fragment),$_=l(),hc=n("span"),M_=r("ElectraForPreTraining"),Wm=l(),Be=n("div"),T(la.$$.fragment),z_=l(),mc=n("p"),x_=r("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),q_=l(),uc=n("p"),P_=r("It is recommended to load the discriminator checkpoint into that model."),C_=l(),da=n("p"),j_=r("This model inherits from "),Bl=n("a"),A_=r("PreTrainedModel"),L_=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),I_=l(),ca=n("p"),N_=r("This model is also a PyTorch "),pa=n("a"),D_=r("torch.nn.Module"),O_=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),S_=l(),st=n("div"),T(ha.$$.fragment),W_=l(),Lo=n("p"),B_=r("The "),Rl=n("a"),R_=r("ElectraForPreTraining"),H_=r(" forward method, overrides the "),fc=n("code"),U_=r("__call__"),Q_=r(" special method."),V_=l(),T(Ln.$$.fragment),J_=l(),gc=n("p"),K_=r("Examples:"),G_=l(),T(ma.$$.fragment),Bm=l(),Io=n("h2"),In=n("a"),_c=n("span"),T(ua.$$.fragment),X_=l(),vc=n("span"),Y_=r("ElectraForCausalLM"),Rm=l(),Ze=n("div"),T(fa.$$.fragment),Z_=l(),ga=n("p"),ev=r("ELECTRA Model with a "),kc=n("code"),tv=r("language modeling"),ov=r(" head on top for CLM fine-tuning."),nv=l(),_a=n("p"),sv=r("This model inherits from "),Hl=n("a"),av=r("PreTrainedModel"),rv=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.)`),iv=l(),va=n("p"),lv=r("This model is also a PyTorch "),ka=n("a"),dv=r("torch.nn.Module"),cv=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),pv=l(),at=n("div"),T(Ta.$$.fragment),hv=l(),No=n("p"),mv=r("The "),Ul=n("a"),uv=r("ElectraForCausalLM"),fv=r(" forward method, overrides the "),Tc=n("code"),gv=r("__call__"),_v=r(" special method."),vv=l(),T(Nn.$$.fragment),kv=l(),Ec=n("p"),Tv=r("Example:"),Ev=l(),T(Ea.$$.fragment),Hm=l(),Do=n("h2"),Dn=n("a"),wc=n("span"),T(wa.$$.fragment),wv=l(),bc=n("span"),bv=r("ElectraForMaskedLM"),Um=l(),Re=n("div"),T(ba.$$.fragment),yv=l(),yc=n("p"),Fv=r("Electra model with a language modeling head on top."),$v=l(),Fc=n("p"),Mv=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.`),zv=l(),ya=n("p"),xv=r("This model inherits from "),Ql=n("a"),qv=r("PreTrainedModel"),Pv=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.)`),Cv=l(),Fa=n("p"),jv=r("This model is also a PyTorch "),$a=n("a"),Av=r("torch.nn.Module"),Lv=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Iv=l(),rt=n("div"),T(Ma.$$.fragment),Nv=l(),Oo=n("p"),Dv=r("The "),Vl=n("a"),Ov=r("ElectraForMaskedLM"),Sv=r(" forward method, overrides the "),$c=n("code"),Wv=r("__call__"),Bv=r(" special method."),Rv=l(),T(On.$$.fragment),Hv=l(),Mc=n("p"),Uv=r("Example:"),Qv=l(),T(za.$$.fragment),Qm=l(),So=n("h2"),Sn=n("a"),zc=n("span"),T(xa.$$.fragment),Vv=l(),xc=n("span"),Jv=r("ElectraForSequenceClassification"),Vm=l(),et=n("div"),T(qa.$$.fragment),Kv=l(),qc=n("p"),Gv=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.`),Xv=l(),Pa=n("p"),Yv=r("This model inherits from "),Jl=n("a"),Zv=r("PreTrainedModel"),ek=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),tk=l(),Ca=n("p"),ok=r("This model is also a PyTorch "),ja=n("a"),nk=r("torch.nn.Module"),sk=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ak=l(),We=n("div"),T(Aa.$$.fragment),rk=l(),Wo=n("p"),ik=r("The "),Kl=n("a"),lk=r("ElectraForSequenceClassification"),dk=r(" forward method, overrides the "),Pc=n("code"),ck=r("__call__"),pk=r(" special method."),hk=l(),T(Wn.$$.fragment),mk=l(),Cc=n("p"),uk=r("Example of single-label classification:"),fk=l(),T(La.$$.fragment),gk=l(),jc=n("p"),_k=r("Example of multi-label classification:"),vk=l(),T(Ia.$$.fragment),Jm=l(),Bo=n("h2"),Bn=n("a"),Ac=n("span"),T(Na.$$.fragment),kk=l(),Lc=n("span"),Tk=r("ElectraForMultipleChoice"),Km=l(),tt=n("div"),T(Da.$$.fragment),Ek=l(),Ic=n("p"),wk=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.`),bk=l(),Oa=n("p"),yk=r("This model inherits from "),Gl=n("a"),Fk=r("PreTrainedModel"),$k=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.)`),Mk=l(),Sa=n("p"),zk=r("This model is also a PyTorch "),Wa=n("a"),xk=r("torch.nn.Module"),qk=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pk=l(),it=n("div"),T(Ba.$$.fragment),Ck=l(),Ro=n("p"),jk=r("The "),Xl=n("a"),Ak=r("ElectraForMultipleChoice"),Lk=r(" forward method, overrides the "),Nc=n("code"),Ik=r("__call__"),Nk=r(" special method."),Dk=l(),T(Rn.$$.fragment),Ok=l(),Dc=n("p"),Sk=r("Example:"),Wk=l(),T(Ra.$$.fragment),Gm=l(),Ho=n("h2"),Hn=n("a"),Oc=n("span"),T(Ha.$$.fragment),Bk=l(),Sc=n("span"),Rk=r("ElectraForTokenClassification"),Xm=l(),He=n("div"),T(Ua.$$.fragment),Hk=l(),Wc=n("p"),Uk=r("Electra model with a token classification head on top."),Qk=l(),Bc=n("p"),Vk=r("Both the discriminator and generator may be loaded into this model."),Jk=l(),Qa=n("p"),Kk=r("This model inherits from "),Yl=n("a"),Gk=r("PreTrainedModel"),Xk=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.)`),Yk=l(),Va=n("p"),Zk=r("This model is also a PyTorch "),Ja=n("a"),eT=r("torch.nn.Module"),tT=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=l(),lt=n("div"),T(Ka.$$.fragment),nT=l(),Uo=n("p"),sT=r("The "),Zl=n("a"),aT=r("ElectraForTokenClassification"),rT=r(" forward method, overrides the "),Rc=n("code"),iT=r("__call__"),lT=r(" special method."),dT=l(),T(Un.$$.fragment),cT=l(),Hc=n("p"),pT=r("Example:"),hT=l(),T(Ga.$$.fragment),Ym=l(),Qo=n("h2"),Qn=n("a"),Uc=n("span"),T(Xa.$$.fragment),mT=l(),Qc=n("span"),uT=r("ElectraForQuestionAnswering"),Zm=l(),ot=n("div"),T(Ya.$$.fragment),fT=l(),Vo=n("p"),gT=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 `),Vc=n("code"),_T=r("span start logits"),vT=r(" and "),Jc=n("code"),kT=r("span end logits"),TT=r(")."),ET=l(),Za=n("p"),wT=r("This model inherits from "),ed=n("a"),bT=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.)`),FT=l(),er=n("p"),$T=r("This model is also a PyTorch "),tr=n("a"),MT=r("torch.nn.Module"),zT=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),xT=l(),dt=n("div"),T(or.$$.fragment),qT=l(),Jo=n("p"),PT=r("The "),td=n("a"),CT=r("ElectraForQuestionAnswering"),jT=r(" forward method, overrides the "),Kc=n("code"),AT=r("__call__"),LT=r(" special method."),IT=l(),T(Vn.$$.fragment),NT=l(),Gc=n("p"),DT=r("Example:"),OT=l(),T(nr.$$.fragment),eu=l(),Ko=n("h2"),Jn=n("a"),Xc=n("span"),T(sr.$$.fragment),ST=l(),Yc=n("span"),WT=r("TFElectraModel"),tu=l(),Ue=n("div"),T(ar.$$.fragment),BT=l(),Zc=n("p"),RT=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."),HT=l(),rr=n("p"),UT=r("This model inherits from "),od=n("a"),QT=r("TFPreTrainedModel"),VT=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),JT=l(),ir=n("p"),KT=r("This model is also a "),lr=n("a"),GT=r("tf.keras.Model"),XT=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.`),YT=l(),T(Kn.$$.fragment),ZT=l(),ct=n("div"),T(dr.$$.fragment),e1=l(),Go=n("p"),t1=r("The "),nd=n("a"),o1=r("TFElectraModel"),n1=r(" forward method, overrides the "),ep=n("code"),s1=r("__call__"),a1=r(" special method."),r1=l(),T(Gn.$$.fragment),i1=l(),tp=n("p"),l1=r("Example:"),d1=l(),T(cr.$$.fragment),ou=l(),Xo=n("h2"),Xn=n("a"),op=n("span"),T(pr.$$.fragment),c1=l(),np=n("span"),p1=r("TFElectraForPreTraining"),nu=l(),je=n("div"),T(hr.$$.fragment),h1=l(),sp=n("p"),m1=r("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),u1=l(),ap=n("p"),f1=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.`),g1=l(),mr=n("p"),_1=r("This model inherits from "),sd=n("a"),v1=r("TFPreTrainedModel"),k1=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.)`),T1=l(),ur=n("p"),E1=r("This model is also a "),fr=n("a"),w1=r("tf.keras.Model"),b1=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.`),y1=l(),T(Yn.$$.fragment),F1=l(),pt=n("div"),T(gr.$$.fragment),$1=l(),Yo=n("p"),M1=r("The "),ad=n("a"),z1=r("TFElectraForPreTraining"),x1=r(" forward method, overrides the "),rp=n("code"),q1=r("__call__"),P1=r(" special method."),C1=l(),T(Zn.$$.fragment),j1=l(),ip=n("p"),A1=r("Examples:"),L1=l(),T(_r.$$.fragment),su=l(),Zo=n("h2"),es=n("a"),lp=n("span"),T(vr.$$.fragment),I1=l(),dp=n("span"),N1=r("TFElectraForMaskedLM"),au=l(),Ae=n("div"),T(kr.$$.fragment),D1=l(),cp=n("p"),O1=r("Electra model with a language modeling head on top."),S1=l(),pp=n("p"),W1=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.`),B1=l(),Tr=n("p"),R1=r("This model inherits from "),rd=n("a"),H1=r("TFPreTrainedModel"),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.)`),Q1=l(),Er=n("p"),V1=r("This model is also a "),wr=n("a"),J1=r("tf.keras.Model"),K1=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.`),G1=l(),T(ts.$$.fragment),X1=l(),ht=n("div"),T(br.$$.fragment),Y1=l(),en=n("p"),Z1=r("The "),id=n("a"),eE=r("TFElectraForMaskedLM"),tE=r(" forward method, overrides the "),hp=n("code"),oE=r("__call__"),nE=r(" special method."),sE=l(),T(os.$$.fragment),aE=l(),mp=n("p"),rE=r("Example:"),iE=l(),T(yr.$$.fragment),ru=l(),tn=n("h2"),ns=n("a"),up=n("span"),T(Fr.$$.fragment),lE=l(),fp=n("span"),dE=r("TFElectraForSequenceClassification"),iu=l(),Qe=n("div"),T($r.$$.fragment),cE=l(),gp=n("p"),pE=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.`),hE=l(),Mr=n("p"),mE=r("This model inherits from "),ld=n("a"),uE=r("TFPreTrainedModel"),fE=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.)`),gE=l(),zr=n("p"),_E=r("This model is also a "),xr=n("a"),vE=r("tf.keras.Model"),kE=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),TE=l(),T(ss.$$.fragment),EE=l(),mt=n("div"),T(qr.$$.fragment),wE=l(),on=n("p"),bE=r("The "),dd=n("a"),yE=r("TFElectraForSequenceClassification"),FE=r(" forward method, overrides the "),_p=n("code"),$E=r("__call__"),ME=r(" special method."),zE=l(),T(as.$$.fragment),xE=l(),vp=n("p"),qE=r("Example:"),PE=l(),T(Pr.$$.fragment),lu=l(),nn=n("h2"),rs=n("a"),kp=n("span"),T(Cr.$$.fragment),CE=l(),Tp=n("span"),jE=r("TFElectraForMultipleChoice"),du=l(),Ve=n("div"),T(jr.$$.fragment),AE=l(),Ep=n("p"),LE=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.`),IE=l(),Ar=n("p"),NE=r("This model inherits from "),cd=n("a"),DE=r("TFPreTrainedModel"),OE=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.)`),SE=l(),Lr=n("p"),WE=r("This model is also a "),Ir=n("a"),BE=r("tf.keras.Model"),RE=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.`),HE=l(),T(is.$$.fragment),UE=l(),ut=n("div"),T(Nr.$$.fragment),QE=l(),sn=n("p"),VE=r("The "),pd=n("a"),JE=r("TFElectraForMultipleChoice"),KE=r(" forward method, overrides the "),wp=n("code"),GE=r("__call__"),XE=r(" special method."),YE=l(),T(ls.$$.fragment),ZE=l(),bp=n("p"),ew=r("Example:"),tw=l(),T(Dr.$$.fragment),cu=l(),an=n("h2"),ds=n("a"),yp=n("span"),T(Or.$$.fragment),ow=l(),Fp=n("span"),nw=r("TFElectraForTokenClassification"),pu=l(),Le=n("div"),T(Sr.$$.fragment),sw=l(),$p=n("p"),aw=r("Electra model with a token classification head on top."),rw=l(),Mp=n("p"),iw=r("Both the discriminator and generator may be loaded into this model."),lw=l(),Wr=n("p"),dw=r("This model inherits from "),hd=n("a"),cw=r("TFPreTrainedModel"),pw=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.)`),hw=l(),Br=n("p"),mw=r("This model is also a "),Rr=n("a"),uw=r("tf.keras.Model"),fw=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),gw=l(),T(cs.$$.fragment),_w=l(),ft=n("div"),T(Hr.$$.fragment),vw=l(),rn=n("p"),kw=r("The "),md=n("a"),Tw=r("TFElectraForTokenClassification"),Ew=r(" forward method, overrides the "),zp=n("code"),ww=r("__call__"),bw=r(" special method."),yw=l(),T(ps.$$.fragment),Fw=l(),xp=n("p"),$w=r("Example:"),Mw=l(),T(Ur.$$.fragment),hu=l(),ln=n("h2"),hs=n("a"),qp=n("span"),T(Qr.$$.fragment),zw=l(),Pp=n("span"),xw=r("TFElectraForQuestionAnswering"),mu=l(),Je=n("div"),T(Vr.$$.fragment),qw=l(),dn=n("p"),Pw=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 `),Cp=n("code"),Cw=r("span start logits"),jw=r(" and "),jp=n("code"),Aw=r("span end logits"),Lw=r(")."),Iw=l(),Jr=n("p"),Nw=r("This model inherits from "),ud=n("a"),Dw=r("TFPreTrainedModel"),Ow=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.)`),Sw=l(),Kr=n("p"),Ww=r("This model is also a "),Gr=n("a"),Bw=r("tf.keras.Model"),Rw=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.`),Hw=l(),T(ms.$$.fragment),Uw=l(),gt=n("div"),T(Xr.$$.fragment),Qw=l(),cn=n("p"),Vw=r("The "),fd=n("a"),Jw=r("TFElectraForQuestionAnswering"),Kw=r(" forward method, overrides the "),Ap=n("code"),Gw=r("__call__"),Xw=r(" special method."),Yw=l(),T(us.$$.fragment),Zw=l(),Lp=n("p"),eb=r("Example:"),tb=l(),T(Yr.$$.fragment),uu=l(),pn=n("h2"),fs=n("a"),Ip=n("span"),T(Zr.$$.fragment),ob=l(),Np=n("span"),nb=r("FlaxElectraModel"),fu=l(),Ie=n("div"),T(ei.$$.fragment),sb=l(),Dp=n("p"),ab=r("The bare Electra Model transformer outputting raw hidden-states without any specific head on top."),rb=l(),ti=n("p"),ib=r("This model inherits from "),gd=n("a"),lb=r("FlaxPreTrainedModel"),db=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)`),cb=l(),oi=n("p"),pb=r(`This model is also a Flax Linen
`),ni=n("a"),hb=r("flax.nn.Module"),mb=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),ub=l(),Op=n("p"),fb=r("Finally, this model supports inherent JAX features such as:"),gb=l(),Ht=n("ul"),Sp=n("li"),si=n("a"),_b=r("Just-In-Time (JIT) compilation"),vb=l(),Wp=n("li"),ai=n("a"),kb=r("Automatic Differentiation"),Tb=l(),Bp=n("li"),ri=n("a"),Eb=r("Vectorization"),wb=l(),Rp=n("li"),ii=n("a"),bb=r("Parallelization"),yb=l(),_t=n("div"),T(li.$$.fragment),Fb=l(),hn=n("p"),$b=r("The "),Hp=n("code"),Mb=r("FlaxElectraPreTrainedModel"),zb=r("forward method, overrides the "),Up=n("code"),xb=r("__call__"),qb=r(" special method."),Pb=l(),T(gs.$$.fragment),Cb=l(),Qp=n("p"),jb=r("Example:"),Ab=l(),T(di.$$.fragment),gu=l(),mn=n("h2"),_s=n("a"),Vp=n("span"),T(ci.$$.fragment),Lb=l(),Jp=n("span"),Ib=r("FlaxElectraForPreTraining"),_u=l(),Pe=n("div"),T(pi.$$.fragment),Nb=l(),Kp=n("p"),Db=r("Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),Ob=l(),Gp=n("p"),Sb=r("It is recommended to load the discriminator checkpoint into that model."),Wb=l(),hi=n("p"),Bb=r("This model inherits from "),_d=n("a"),Rb=r("FlaxPreTrainedModel"),Hb=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)`),Ub=l(),mi=n("p"),Qb=r(`This model is also a Flax Linen
`),ui=n("a"),Vb=r("flax.nn.Module"),Jb=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Kb=l(),Xp=n("p"),Gb=r("Finally, this model supports inherent JAX features such as:"),Xb=l(),Ut=n("ul"),Yp=n("li"),fi=n("a"),Yb=r("Just-In-Time (JIT) compilation"),Zb=l(),Zp=n("li"),gi=n("a"),ey=r("Automatic Differentiation"),ty=l(),eh=n("li"),_i=n("a"),oy=r("Vectorization"),ny=l(),th=n("li"),vi=n("a"),sy=r("Parallelization"),ay=l(),vt=n("div"),T(ki.$$.fragment),ry=l(),un=n("p"),iy=r("The "),oh=n("code"),ly=r("FlaxElectraPreTrainedModel"),dy=r("forward method, overrides the "),nh=n("code"),cy=r("__call__"),py=r(" special method."),hy=l(),T(vs.$$.fragment),my=l(),sh=n("p"),uy=r("Example:"),fy=l(),T(Ti.$$.fragment),vu=l(),fn=n("h2"),ks=n("a"),ah=n("span"),T(Ei.$$.fragment),gy=l(),rh=n("span"),_y=r("FlaxElectraForMaskedLM"),ku=l(),Ne=n("div"),T(wi.$$.fragment),vy=l(),bi=n("p"),ky=r("Electra Model with a "),ih=n("code"),Ty=r("language modeling"),Ey=r(" head on top."),wy=l(),yi=n("p"),by=r("This model inherits from "),vd=n("a"),yy=r("FlaxPreTrainedModel"),Fy=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=l(),Fi=n("p"),My=r(`This model is also a Flax Linen
`),$i=n("a"),zy=r("flax.nn.Module"),xy=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),qy=l(),lh=n("p"),Py=r("Finally, this model supports inherent JAX features such as:"),Cy=l(),Qt=n("ul"),dh=n("li"),Mi=n("a"),jy=r("Just-In-Time (JIT) compilation"),Ay=l(),ch=n("li"),zi=n("a"),Ly=r("Automatic Differentiation"),Iy=l(),ph=n("li"),xi=n("a"),Ny=r("Vectorization"),Dy=l(),hh=n("li"),qi=n("a"),Oy=r("Parallelization"),Sy=l(),kt=n("div"),T(Pi.$$.fragment),Wy=l(),gn=n("p"),By=r("The "),mh=n("code"),Ry=r("FlaxElectraPreTrainedModel"),Hy=r("forward method, overrides the "),uh=n("code"),Uy=r("__call__"),Qy=r(" special method."),Vy=l(),T(Ts.$$.fragment),Jy=l(),fh=n("p"),Ky=r("Example:"),Gy=l(),T(Ci.$$.fragment),Tu=l(),_n=n("h2"),Es=n("a"),gh=n("span"),T(ji.$$.fragment),Xy=l(),_h=n("span"),Yy=r("FlaxElectraForSequenceClassification"),Eu=l(),De=n("div"),T(Ai.$$.fragment),Zy=l(),vh=n("p"),eF=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.`),tF=l(),Li=n("p"),oF=r("This model inherits from "),kd=n("a"),nF=r("FlaxPreTrainedModel"),sF=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)`),aF=l(),Ii=n("p"),rF=r(`This model is also a Flax Linen
`),Ni=n("a"),iF=r("flax.nn.Module"),lF=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),dF=l(),kh=n("p"),cF=r("Finally, this model supports inherent JAX features such as:"),pF=l(),Vt=n("ul"),Th=n("li"),Di=n("a"),hF=r("Just-In-Time (JIT) compilation"),mF=l(),Eh=n("li"),Oi=n("a"),uF=r("Automatic Differentiation"),fF=l(),wh=n("li"),Si=n("a"),gF=r("Vectorization"),_F=l(),bh=n("li"),Wi=n("a"),vF=r("Parallelization"),kF=l(),Tt=n("div"),T(Bi.$$.fragment),TF=l(),vn=n("p"),EF=r("The "),yh=n("code"),wF=r("FlaxElectraPreTrainedModel"),bF=r("forward method, overrides the "),Fh=n("code"),yF=r("__call__"),FF=r(" special method."),$F=l(),T(ws.$$.fragment),MF=l(),$h=n("p"),zF=r("Example:"),xF=l(),T(Ri.$$.fragment),wu=l(),kn=n("h2"),bs=n("a"),Mh=n("span"),T(Hi.$$.fragment),qF=l(),zh=n("span"),PF=r("FlaxElectraForMultipleChoice"),bu=l(),Oe=n("div"),T(Ui.$$.fragment),CF=l(),xh=n("p"),jF=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.`),AF=l(),Qi=n("p"),LF=r("This model inherits from "),Td=n("a"),IF=r("FlaxPreTrainedModel"),NF=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)`),DF=l(),Vi=n("p"),OF=r(`This model is also a Flax Linen
`),Ji=n("a"),SF=r("flax.nn.Module"),WF=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),BF=l(),qh=n("p"),RF=r("Finally, this model supports inherent JAX features such as:"),HF=l(),Jt=n("ul"),Ph=n("li"),Ki=n("a"),UF=r("Just-In-Time (JIT) compilation"),QF=l(),Ch=n("li"),Gi=n("a"),VF=r("Automatic Differentiation"),JF=l(),jh=n("li"),Xi=n("a"),KF=r("Vectorization"),GF=l(),Ah=n("li"),Yi=n("a"),XF=r("Parallelization"),YF=l(),Et=n("div"),T(Zi.$$.fragment),ZF=l(),Tn=n("p"),e$=r("The "),Lh=n("code"),t$=r("FlaxElectraPreTrainedModel"),o$=r("forward method, overrides the "),Ih=n("code"),n$=r("__call__"),s$=r(" special method."),a$=l(),T(ys.$$.fragment),r$=l(),Nh=n("p"),i$=r("Example:"),l$=l(),T(el.$$.fragment),yu=l(),En=n("h2"),Fs=n("a"),Dh=n("span"),T(tl.$$.fragment),d$=l(),Oh=n("span"),c$=r("FlaxElectraForTokenClassification"),Fu=l(),Ce=n("div"),T(ol.$$.fragment),p$=l(),Sh=n("p"),h$=r("Electra model with a token classification head on top."),m$=l(),Wh=n("p"),u$=r("Both the discriminator and generator may be loaded into this model."),f$=l(),nl=n("p"),g$=r("This model inherits from "),Ed=n("a"),_$=r("FlaxPreTrainedModel"),v$=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)`),k$=l(),sl=n("p"),T$=r(`This model is also a Flax Linen
`),al=n("a"),E$=r("flax.nn.Module"),w$=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),b$=l(),Bh=n("p"),y$=r("Finally, this model supports inherent JAX features such as:"),F$=l(),Kt=n("ul"),Rh=n("li"),rl=n("a"),$$=r("Just-In-Time (JIT) compilation"),M$=l(),Hh=n("li"),il=n("a"),z$=r("Automatic Differentiation"),x$=l(),Uh=n("li"),ll=n("a"),q$=r("Vectorization"),P$=l(),Qh=n("li"),dl=n("a"),C$=r("Parallelization"),j$=l(),wt=n("div"),T(cl.$$.fragment),A$=l(),wn=n("p"),L$=r("The "),Vh=n("code"),I$=r("FlaxElectraPreTrainedModel"),N$=r("forward method, overrides the "),Jh=n("code"),D$=r("__call__"),O$=r(" special method."),S$=l(),T($s.$$.fragment),W$=l(),Kh=n("p"),B$=r("Example:"),R$=l(),T(pl.$$.fragment),$u=l(),bn=n("h2"),Ms=n("a"),Gh=n("span"),T(hl.$$.fragment),H$=l(),Xh=n("span"),U$=r("FlaxElectraForQuestionAnswering"),Mu=l(),Se=n("div"),T(ml.$$.fragment),Q$=l(),yn=n("p"),V$=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 `),Yh=n("code"),J$=r("span start logits"),K$=r(" and "),Zh=n("code"),G$=r("span end logits"),X$=r(")."),Y$=l(),ul=n("p"),Z$=r("This model inherits from "),wd=n("a"),e2=r("FlaxPreTrainedModel"),t2=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)`),o2=l(),fl=n("p"),n2=r(`This model is also a Flax Linen
`),gl=n("a"),s2=r("flax.nn.Module"),a2=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),r2=l(),em=n("p"),i2=r("Finally, this model supports inherent JAX features such as:"),l2=l(),Gt=n("ul"),tm=n("li"),_l=n("a"),d2=r("Just-In-Time (JIT) compilation"),c2=l(),om=n("li"),vl=n("a"),p2=r("Automatic Differentiation"),h2=l(),nm=n("li"),kl=n("a"),m2=r("Vectorization"),u2=l(),sm=n("li"),Tl=n("a"),f2=r("Parallelization"),g2=l(),bt=n("div"),T(El.$$.fragment),_2=l(),Fn=n("p"),v2=r("The "),am=n("code"),k2=r("FlaxElectraPreTrainedModel"),T2=r("forward method, overrides the "),rm=n("code"),E2=r("__call__"),w2=r(" special method."),b2=l(),T(zs.$$.fragment),y2=l(),im=n("p"),F2=r("Example:"),$2=l(),T(wl.$$.fragment),this.h()},l(o){const f=s5('[data-svelte="svelte-1phssyn"]',document.head);p=s(f,"META",{name:!0,content:!0}),f.forEach(t),$=d(o),g=s(o,"H1",{class:!0});var bl=a(g);v=s(bl,"A",{id:!0,class:!0,href:!0});var lm=a(v);k=s(lm,"SPAN",{});var dm=a(k);E(_.$$.fragment,dm),dm.forEach(t),lm.forEach(t),u=d(bl),M=s(bl,"SPAN",{});var cm=a(M);pe=i(cm,"ELECTRA"),cm.forEach(t),bl.forEach(t),K=d(o),x=s(o,"H2",{class:!0});var yl=a(x);ee=s(yl,"A",{id:!0,class:!0,href:!0});var pm=a(ee);O=s(pm,"SPAN",{});var hm=a(O);E(oe.$$.fragment,hm),hm.forEach(t),pm.forEach(t),he=d(yl),S=s(yl,"SPAN",{});var mm=a(S);me=i(mm,"Overview"),mm.forEach(t),yl.forEach(t),le=d(o),J=s(o,"P",{});var Fl=a(J);L=i(Fl,"The ELECTRA model was proposed in the paper "),ne=s(Fl,"A",{href:!0,rel:!0});var um=a(ne);X=i(um,`ELECTRA: Pre-training Text Encoders as Discriminators Rather Than
Generators`),um.forEach(t),q=i(Fl,`. 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.`),Fl.forEach(t),C=d(o),ae=s(o,"P",{});var fm=a(ae);R=i(fm,"The abstract from the paper is the following:"),fm.forEach(t),de=d(o),re=s(o,"P",{});var gm=a(re);W=s(gm,"EM",{});var _m=a(W);ue=i(_m,`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.`),_m.forEach(t),gm.forEach(t),ce=d(o),P=s(o,"P",{});var vm=a(P);fe=i(vm,"Tips:"),vm.forEach(t),B=d(o),te=s(o,"UL",{});var $l=a(te);ie=s($l,"LI",{});var km=a(ie);H=i(km,`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.`),km.forEach(t),ge=d($l),G=s($l,"LI",{});var Xt=a(G);I=i(Xt,"The ELECTRA checkpoints saved using "),se=s(Xt,"A",{href:!0,rel:!0});var Tm=a(se);U=i(Tm,"Google Research\u2019s implementation"),Tm.forEach(t),_e=i(Xt,`
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
`),h=s(Xt,"A",{href:!0});var Em=a(h);z=i(Em,"ElectraForMaskedLM"),Em.forEach(t),Y=i(Xt,` model, and the generator may be loaded in the
`),be=s(Xt,"A",{href:!0});var wm=a(be);$e=i(wm,"ElectraForPreTraining"),wm.forEach(t),N=i(Xt,` model (the classification head will be randomly initialized as it
doesn\u2019t exist in the generator).`),Xt.forEach(t),$l.forEach(t),ye=d(o),ve=s(o,"P",{});var $n=a(ve);Me=i($n,"This model was contributed by "),A=s($n,"A",{href:!0,rel:!0});var bm=a(A);Q=i(bm,"lysandre"),bm.forEach(t),ze=i($n,". The original code can be found "),Ee=s($n,"A",{href:!0,rel:!0});var ym=a(Ee);V=i(ym,"here"),ym.forEach(t),xe=i($n,"."),$n.forEach(t),Fe=d(o),Z=s(o,"H2",{class:!0});var Ml=a(Z);ke=s(Ml,"A",{id:!0,class:!0,href:!0});var Fm=a(ke);Kd=s(Fm,"SPAN",{});var $m=a(Kd);E(Ds.$$.fragment,$m),$m.forEach(t),Fm.forEach(t),eg=d(Ml),Gd=s(Ml,"SPAN",{});var Mm=a(Gd);tg=i(Mm,"ElectraConfig"),Mm.forEach(t),Ml.forEach(t),qm=d(o),Xe=s(o,"DIV",{class:!0});var Lt=a(Xe);E(Os.$$.fragment,Lt),og=d(Lt),Rt=s(Lt,"P",{});var Yt=a(Rt);ng=i(Yt,"This is the configuration class to store the configuration of a "),zl=s(Yt,"A",{href:!0});var M2=a(zl);sg=i(M2,"ElectraModel"),M2.forEach(t),ag=i(Yt," or a "),xl=s(Yt,"A",{href:!0});var z2=a(xl);rg=i(z2,"TFElectraModel"),z2.forEach(t),ig=i(Yt,`. 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
`),Ss=s(Yt,"A",{href:!0,rel:!0});var x2=a(Ss);lg=i(x2,"google/electra-small-discriminator"),x2.forEach(t),dg=i(Yt," architecture."),Yt.forEach(t),cg=d(Lt),$o=s(Lt,"P",{});var bd=a($o);pg=i(bd,"Configuration objects inherit from "),ql=s(bd,"A",{href:!0});var q2=a(ql);hg=i(q2,"PretrainedConfig"),q2.forEach(t),mg=i(bd,` and can be used to control the model outputs. Read the
documentation from `),Pl=s(bd,"A",{href:!0});var P2=a(Pl);ug=i(P2,"PretrainedConfig"),P2.forEach(t),fg=i(bd," for more information."),bd.forEach(t),gg=d(Lt),Xd=s(Lt,"P",{});var C2=a(Xd);_g=i(C2,"Examples:"),C2.forEach(t),vg=d(Lt),E(Ws.$$.fragment,Lt),Lt.forEach(t),Pm=d(o),Mo=s(o,"H2",{class:!0});var xu=a(Mo);Mn=s(xu,"A",{id:!0,class:!0,href:!0});var j2=a(Mn);Yd=s(j2,"SPAN",{});var A2=a(Yd);E(Bs.$$.fragment,A2),A2.forEach(t),j2.forEach(t),kg=d(xu),Zd=s(xu,"SPAN",{});var L2=a(Zd);Tg=i(L2,"ElectraTokenizer"),L2.forEach(t),xu.forEach(t),Cm=d(o),jt=s(o,"DIV",{class:!0});var xs=a(jt);E(Rs.$$.fragment,xs),Eg=d(xs),ec=s(xs,"P",{});var I2=a(ec);wg=i(I2,"Construct an ELECTRA tokenizer."),I2.forEach(t),bg=d(xs),zn=s(xs,"P",{});var zm=a(zn);Cl=s(zm,"A",{href:!0});var N2=a(Cl);yg=i(N2,"ElectraTokenizer"),N2.forEach(t),Fg=i(zm," is identical to "),jl=s(zm,"A",{href:!0});var D2=a(jl);$g=i(D2,"BertTokenizer"),D2.forEach(t),Mg=i(zm,` and runs end-to-end tokenization: punctuation splitting and
wordpiece.`),zm.forEach(t),zg=d(xs),Hs=s(xs,"P",{});var qu=a(Hs);xg=i(qu,"Refer to superclass "),Al=s(qu,"A",{href:!0});var O2=a(Al);qg=i(O2,"BertTokenizer"),O2.forEach(t),Pg=i(qu," for usage examples and documentation concerning parameters."),qu.forEach(t),xs.forEach(t),jm=d(o),zo=s(o,"H2",{class:!0});var Pu=a(zo);xn=s(Pu,"A",{id:!0,class:!0,href:!0});var S2=a(xn);tc=s(S2,"SPAN",{});var W2=a(tc);E(Us.$$.fragment,W2),W2.forEach(t),S2.forEach(t),Cg=d(Pu),oc=s(Pu,"SPAN",{});var B2=a(oc);jg=i(B2,"ElectraTokenizerFast"),B2.forEach(t),Pu.forEach(t),Am=d(o),At=s(o,"DIV",{class:!0});var qs=a(At);E(Qs.$$.fragment,qs),Ag=d(qs),Vs=s(qs,"P",{});var Cu=a(Vs);Lg=i(Cu,"Construct a \u201Cfast\u201D ELECTRA tokenizer (backed by HuggingFace\u2019s "),nc=s(Cu,"EM",{});var R2=a(nc);Ig=i(R2,"tokenizers"),R2.forEach(t),Ng=i(Cu," library)."),Cu.forEach(t),Dg=d(qs),qn=s(qs,"P",{});var xm=a(qn);Ll=s(xm,"A",{href:!0});var H2=a(Ll);Og=i(H2,"ElectraTokenizerFast"),H2.forEach(t),Sg=i(xm," is identical to "),Il=s(xm,"A",{href:!0});var U2=a(Il);Wg=i(U2,"BertTokenizerFast"),U2.forEach(t),Bg=i(xm,` and runs end-to-end tokenization: punctuation
splitting and wordpiece.`),xm.forEach(t),Rg=d(qs),Js=s(qs,"P",{});var ju=a(Js);Hg=i(ju,"Refer to superclass "),Nl=s(ju,"A",{href:!0});var Q2=a(Nl);Ug=i(Q2,"BertTokenizerFast"),Q2.forEach(t),Qg=i(ju," for usage examples and documentation concerning parameters."),ju.forEach(t),qs.forEach(t),Lm=d(o),xo=s(o,"H2",{class:!0});var Au=a(xo);Pn=s(Au,"A",{id:!0,class:!0,href:!0});var V2=a(Pn);sc=s(V2,"SPAN",{});var J2=a(sc);E(Ks.$$.fragment,J2),J2.forEach(t),V2.forEach(t),Vg=d(Au),ac=s(Au,"SPAN",{});var K2=a(ac);Jg=i(K2,"Electra specific outputs"),K2.forEach(t),Au.forEach(t),Im=d(o),qo=s(o,"DIV",{class:!0});var Lu=a(qo);E(Gs.$$.fragment,Lu),Kg=d(Lu),Xs=s(Lu,"P",{});var Iu=a(Xs);Gg=i(Iu,"Output type of "),Dl=s(Iu,"A",{href:!0});var G2=a(Dl);Xg=i(G2,"ElectraForPreTraining"),G2.forEach(t),Yg=i(Iu,"."),Iu.forEach(t),Lu.forEach(t),Nm=d(o),Po=s(o,"DIV",{class:!0});var Nu=a(Po);E(Ys.$$.fragment,Nu),Zg=d(Nu),Zs=s(Nu,"P",{});var Du=a(Zs);e_=i(Du,"Output type of "),Ol=s(Du,"A",{href:!0});var X2=a(Ol);t_=i(X2,"TFElectraForPreTraining"),X2.forEach(t),o_=i(Du,"."),Du.forEach(t),Nu.forEach(t),Dm=d(o),Co=s(o,"H2",{class:!0});var Ou=a(Co);Cn=s(Ou,"A",{id:!0,class:!0,href:!0});var Y2=a(Cn);rc=s(Y2,"SPAN",{});var Z2=a(rc);E(ea.$$.fragment,Z2),Z2.forEach(t),Y2.forEach(t),n_=d(Ou),ic=s(Ou,"SPAN",{});var e0=a(ic);s_=i(e0,"ElectraModel"),e0.forEach(t),Ou.forEach(t),Om=d(o),Ye=s(o,"DIV",{class:!0});var Zt=a(Ye);E(ta.$$.fragment,Zt),a_=d(Zt),lc=s(Zt,"P",{});var t0=a(lc);r_=i(t0,"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."),t0.forEach(t),i_=d(Zt),oa=s(Zt,"P",{});var Su=a(oa);l_=i(Su,"This model inherits from "),Sl=s(Su,"A",{href:!0});var o0=a(Sl);d_=i(o0,"PreTrainedModel"),o0.forEach(t),c_=i(Su,`. 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.)`),Su.forEach(t),p_=d(Zt),na=s(Zt,"P",{});var Wu=a(na);h_=i(Wu,"This model is also a PyTorch "),sa=s(Wu,"A",{href:!0,rel:!0});var n0=a(sa);m_=i(n0,"torch.nn.Module"),n0.forEach(t),u_=i(Wu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Wu.forEach(t),f_=d(Zt),nt=s(Zt,"DIV",{class:!0});var eo=a(nt);E(aa.$$.fragment,eo),g_=d(eo),jo=s(eo,"P",{});var yd=a(jo);__=i(yd,"The "),Wl=s(yd,"A",{href:!0});var s0=a(Wl);v_=i(s0,"ElectraModel"),s0.forEach(t),k_=i(yd," forward method, overrides the "),dc=s(yd,"CODE",{});var a0=a(dc);T_=i(a0,"__call__"),a0.forEach(t),E_=i(yd," special method."),yd.forEach(t),w_=d(eo),E(jn.$$.fragment,eo),b_=d(eo),cc=s(eo,"P",{});var r0=a(cc);y_=i(r0,"Example:"),r0.forEach(t),F_=d(eo),E(ra.$$.fragment,eo),eo.forEach(t),Zt.forEach(t),Sm=d(o),Ao=s(o,"H2",{class:!0});var Bu=a(Ao);An=s(Bu,"A",{id:!0,class:!0,href:!0});var i0=a(An);pc=s(i0,"SPAN",{});var l0=a(pc);E(ia.$$.fragment,l0),l0.forEach(t),i0.forEach(t),$_=d(Bu),hc=s(Bu,"SPAN",{});var d0=a(hc);M_=i(d0,"ElectraForPreTraining"),d0.forEach(t),Bu.forEach(t),Wm=d(o),Be=s(o,"DIV",{class:!0});var It=a(Be);E(la.$$.fragment,It),z_=d(It),mc=s(It,"P",{});var c0=a(mc);x_=i(c0,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),c0.forEach(t),q_=d(It),uc=s(It,"P",{});var p0=a(uc);P_=i(p0,"It is recommended to load the discriminator checkpoint into that model."),p0.forEach(t),C_=d(It),da=s(It,"P",{});var Ru=a(da);j_=i(Ru,"This model inherits from "),Bl=s(Ru,"A",{href:!0});var h0=a(Bl);A_=i(h0,"PreTrainedModel"),h0.forEach(t),L_=i(Ru,`. 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.)`),Ru.forEach(t),I_=d(It),ca=s(It,"P",{});var Hu=a(ca);N_=i(Hu,"This model is also a PyTorch "),pa=s(Hu,"A",{href:!0,rel:!0});var m0=a(pa);D_=i(m0,"torch.nn.Module"),m0.forEach(t),O_=i(Hu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hu.forEach(t),S_=d(It),st=s(It,"DIV",{class:!0});var to=a(st);E(ha.$$.fragment,to),W_=d(to),Lo=s(to,"P",{});var Fd=a(Lo);B_=i(Fd,"The "),Rl=s(Fd,"A",{href:!0});var u0=a(Rl);R_=i(u0,"ElectraForPreTraining"),u0.forEach(t),H_=i(Fd," forward method, overrides the "),fc=s(Fd,"CODE",{});var f0=a(fc);U_=i(f0,"__call__"),f0.forEach(t),Q_=i(Fd," special method."),Fd.forEach(t),V_=d(to),E(Ln.$$.fragment,to),J_=d(to),gc=s(to,"P",{});var g0=a(gc);K_=i(g0,"Examples:"),g0.forEach(t),G_=d(to),E(ma.$$.fragment,to),to.forEach(t),It.forEach(t),Bm=d(o),Io=s(o,"H2",{class:!0});var Uu=a(Io);In=s(Uu,"A",{id:!0,class:!0,href:!0});var _0=a(In);_c=s(_0,"SPAN",{});var v0=a(_c);E(ua.$$.fragment,v0),v0.forEach(t),_0.forEach(t),X_=d(Uu),vc=s(Uu,"SPAN",{});var k0=a(vc);Y_=i(k0,"ElectraForCausalLM"),k0.forEach(t),Uu.forEach(t),Rm=d(o),Ze=s(o,"DIV",{class:!0});var oo=a(Ze);E(fa.$$.fragment,oo),Z_=d(oo),ga=s(oo,"P",{});var Qu=a(ga);ev=i(Qu,"ELECTRA Model with a "),kc=s(Qu,"CODE",{});var T0=a(kc);tv=i(T0,"language modeling"),T0.forEach(t),ov=i(Qu," head on top for CLM fine-tuning."),Qu.forEach(t),nv=d(oo),_a=s(oo,"P",{});var Vu=a(_a);sv=i(Vu,"This model inherits from "),Hl=s(Vu,"A",{href:!0});var E0=a(Hl);av=i(E0,"PreTrainedModel"),E0.forEach(t),rv=i(Vu,`. 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.)`),Vu.forEach(t),iv=d(oo),va=s(oo,"P",{});var Ju=a(va);lv=i(Ju,"This model is also a PyTorch "),ka=s(Ju,"A",{href:!0,rel:!0});var w0=a(ka);dv=i(w0,"torch.nn.Module"),w0.forEach(t),cv=i(Ju,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ju.forEach(t),pv=d(oo),at=s(oo,"DIV",{class:!0});var no=a(at);E(Ta.$$.fragment,no),hv=d(no),No=s(no,"P",{});var $d=a(No);mv=i($d,"The "),Ul=s($d,"A",{href:!0});var b0=a(Ul);uv=i(b0,"ElectraForCausalLM"),b0.forEach(t),fv=i($d," forward method, overrides the "),Tc=s($d,"CODE",{});var y0=a(Tc);gv=i(y0,"__call__"),y0.forEach(t),_v=i($d," special method."),$d.forEach(t),vv=d(no),E(Nn.$$.fragment,no),kv=d(no),Ec=s(no,"P",{});var F0=a(Ec);Tv=i(F0,"Example:"),F0.forEach(t),Ev=d(no),E(Ea.$$.fragment,no),no.forEach(t),oo.forEach(t),Hm=d(o),Do=s(o,"H2",{class:!0});var Ku=a(Do);Dn=s(Ku,"A",{id:!0,class:!0,href:!0});var $0=a(Dn);wc=s($0,"SPAN",{});var M0=a(wc);E(wa.$$.fragment,M0),M0.forEach(t),$0.forEach(t),wv=d(Ku),bc=s(Ku,"SPAN",{});var z0=a(bc);bv=i(z0,"ElectraForMaskedLM"),z0.forEach(t),Ku.forEach(t),Um=d(o),Re=s(o,"DIV",{class:!0});var Nt=a(Re);E(ba.$$.fragment,Nt),yv=d(Nt),yc=s(Nt,"P",{});var x0=a(yc);Fv=i(x0,"Electra model with a language modeling head on top."),x0.forEach(t),$v=d(Nt),Fc=s(Nt,"P",{});var q0=a(Fc);Mv=i(q0,`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.`),q0.forEach(t),zv=d(Nt),ya=s(Nt,"P",{});var Gu=a(ya);xv=i(Gu,"This model inherits from "),Ql=s(Gu,"A",{href:!0});var P0=a(Ql);qv=i(P0,"PreTrainedModel"),P0.forEach(t),Pv=i(Gu,`. 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.)`),Gu.forEach(t),Cv=d(Nt),Fa=s(Nt,"P",{});var Xu=a(Fa);jv=i(Xu,"This model is also a PyTorch "),$a=s(Xu,"A",{href:!0,rel:!0});var C0=a($a);Av=i(C0,"torch.nn.Module"),C0.forEach(t),Lv=i(Xu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xu.forEach(t),Iv=d(Nt),rt=s(Nt,"DIV",{class:!0});var so=a(rt);E(Ma.$$.fragment,so),Nv=d(so),Oo=s(so,"P",{});var Md=a(Oo);Dv=i(Md,"The "),Vl=s(Md,"A",{href:!0});var j0=a(Vl);Ov=i(j0,"ElectraForMaskedLM"),j0.forEach(t),Sv=i(Md," forward method, overrides the "),$c=s(Md,"CODE",{});var A0=a($c);Wv=i(A0,"__call__"),A0.forEach(t),Bv=i(Md," special method."),Md.forEach(t),Rv=d(so),E(On.$$.fragment,so),Hv=d(so),Mc=s(so,"P",{});var L0=a(Mc);Uv=i(L0,"Example:"),L0.forEach(t),Qv=d(so),E(za.$$.fragment,so),so.forEach(t),Nt.forEach(t),Qm=d(o),So=s(o,"H2",{class:!0});var Yu=a(So);Sn=s(Yu,"A",{id:!0,class:!0,href:!0});var I0=a(Sn);zc=s(I0,"SPAN",{});var N0=a(zc);E(xa.$$.fragment,N0),N0.forEach(t),I0.forEach(t),Vv=d(Yu),xc=s(Yu,"SPAN",{});var D0=a(xc);Jv=i(D0,"ElectraForSequenceClassification"),D0.forEach(t),Yu.forEach(t),Vm=d(o),et=s(o,"DIV",{class:!0});var ao=a(et);E(qa.$$.fragment,ao),Kv=d(ao),qc=s(ao,"P",{});var O0=a(qc);Gv=i(O0,`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.`),O0.forEach(t),Xv=d(ao),Pa=s(ao,"P",{});var Zu=a(Pa);Yv=i(Zu,"This model inherits from "),Jl=s(Zu,"A",{href:!0});var S0=a(Jl);Zv=i(S0,"PreTrainedModel"),S0.forEach(t),ek=i(Zu,`. 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.)`),Zu.forEach(t),tk=d(ao),Ca=s(ao,"P",{});var ef=a(Ca);ok=i(ef,"This model is also a PyTorch "),ja=s(ef,"A",{href:!0,rel:!0});var W0=a(ja);nk=i(W0,"torch.nn.Module"),W0.forEach(t),sk=i(ef,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ef.forEach(t),ak=d(ao),We=s(ao,"DIV",{class:!0});var yt=a(We);E(Aa.$$.fragment,yt),rk=d(yt),Wo=s(yt,"P",{});var zd=a(Wo);ik=i(zd,"The "),Kl=s(zd,"A",{href:!0});var B0=a(Kl);lk=i(B0,"ElectraForSequenceClassification"),B0.forEach(t),dk=i(zd," forward method, overrides the "),Pc=s(zd,"CODE",{});var R0=a(Pc);ck=i(R0,"__call__"),R0.forEach(t),pk=i(zd," special method."),zd.forEach(t),hk=d(yt),E(Wn.$$.fragment,yt),mk=d(yt),Cc=s(yt,"P",{});var H0=a(Cc);uk=i(H0,"Example of single-label classification:"),H0.forEach(t),fk=d(yt),E(La.$$.fragment,yt),gk=d(yt),jc=s(yt,"P",{});var U0=a(jc);_k=i(U0,"Example of multi-label classification:"),U0.forEach(t),vk=d(yt),E(Ia.$$.fragment,yt),yt.forEach(t),ao.forEach(t),Jm=d(o),Bo=s(o,"H2",{class:!0});var tf=a(Bo);Bn=s(tf,"A",{id:!0,class:!0,href:!0});var Q0=a(Bn);Ac=s(Q0,"SPAN",{});var V0=a(Ac);E(Na.$$.fragment,V0),V0.forEach(t),Q0.forEach(t),kk=d(tf),Lc=s(tf,"SPAN",{});var J0=a(Lc);Tk=i(J0,"ElectraForMultipleChoice"),J0.forEach(t),tf.forEach(t),Km=d(o),tt=s(o,"DIV",{class:!0});var ro=a(tt);E(Da.$$.fragment,ro),Ek=d(ro),Ic=s(ro,"P",{});var K0=a(Ic);wk=i(K0,`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.`),K0.forEach(t),bk=d(ro),Oa=s(ro,"P",{});var of=a(Oa);yk=i(of,"This model inherits from "),Gl=s(of,"A",{href:!0});var G0=a(Gl);Fk=i(G0,"PreTrainedModel"),G0.forEach(t),$k=i(of,`. 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.)`),of.forEach(t),Mk=d(ro),Sa=s(ro,"P",{});var nf=a(Sa);zk=i(nf,"This model is also a PyTorch "),Wa=s(nf,"A",{href:!0,rel:!0});var X0=a(Wa);xk=i(X0,"torch.nn.Module"),X0.forEach(t),qk=i(nf,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nf.forEach(t),Pk=d(ro),it=s(ro,"DIV",{class:!0});var io=a(it);E(Ba.$$.fragment,io),Ck=d(io),Ro=s(io,"P",{});var xd=a(Ro);jk=i(xd,"The "),Xl=s(xd,"A",{href:!0});var Y0=a(Xl);Ak=i(Y0,"ElectraForMultipleChoice"),Y0.forEach(t),Lk=i(xd," forward method, overrides the "),Nc=s(xd,"CODE",{});var Z0=a(Nc);Ik=i(Z0,"__call__"),Z0.forEach(t),Nk=i(xd," special method."),xd.forEach(t),Dk=d(io),E(Rn.$$.fragment,io),Ok=d(io),Dc=s(io,"P",{});var eM=a(Dc);Sk=i(eM,"Example:"),eM.forEach(t),Wk=d(io),E(Ra.$$.fragment,io),io.forEach(t),ro.forEach(t),Gm=d(o),Ho=s(o,"H2",{class:!0});var sf=a(Ho);Hn=s(sf,"A",{id:!0,class:!0,href:!0});var tM=a(Hn);Oc=s(tM,"SPAN",{});var oM=a(Oc);E(Ha.$$.fragment,oM),oM.forEach(t),tM.forEach(t),Bk=d(sf),Sc=s(sf,"SPAN",{});var nM=a(Sc);Rk=i(nM,"ElectraForTokenClassification"),nM.forEach(t),sf.forEach(t),Xm=d(o),He=s(o,"DIV",{class:!0});var Dt=a(He);E(Ua.$$.fragment,Dt),Hk=d(Dt),Wc=s(Dt,"P",{});var sM=a(Wc);Uk=i(sM,"Electra model with a token classification head on top."),sM.forEach(t),Qk=d(Dt),Bc=s(Dt,"P",{});var aM=a(Bc);Vk=i(aM,"Both the discriminator and generator may be loaded into this model."),aM.forEach(t),Jk=d(Dt),Qa=s(Dt,"P",{});var af=a(Qa);Kk=i(af,"This model inherits from "),Yl=s(af,"A",{href:!0});var rM=a(Yl);Gk=i(rM,"PreTrainedModel"),rM.forEach(t),Xk=i(af,`. 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.)`),af.forEach(t),Yk=d(Dt),Va=s(Dt,"P",{});var rf=a(Va);Zk=i(rf,"This model is also a PyTorch "),Ja=s(rf,"A",{href:!0,rel:!0});var iM=a(Ja);eT=i(iM,"torch.nn.Module"),iM.forEach(t),tT=i(rf,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rf.forEach(t),oT=d(Dt),lt=s(Dt,"DIV",{class:!0});var lo=a(lt);E(Ka.$$.fragment,lo),nT=d(lo),Uo=s(lo,"P",{});var qd=a(Uo);sT=i(qd,"The "),Zl=s(qd,"A",{href:!0});var lM=a(Zl);aT=i(lM,"ElectraForTokenClassification"),lM.forEach(t),rT=i(qd," forward method, overrides the "),Rc=s(qd,"CODE",{});var dM=a(Rc);iT=i(dM,"__call__"),dM.forEach(t),lT=i(qd," special method."),qd.forEach(t),dT=d(lo),E(Un.$$.fragment,lo),cT=d(lo),Hc=s(lo,"P",{});var cM=a(Hc);pT=i(cM,"Example:"),cM.forEach(t),hT=d(lo),E(Ga.$$.fragment,lo),lo.forEach(t),Dt.forEach(t),Ym=d(o),Qo=s(o,"H2",{class:!0});var lf=a(Qo);Qn=s(lf,"A",{id:!0,class:!0,href:!0});var pM=a(Qn);Uc=s(pM,"SPAN",{});var hM=a(Uc);E(Xa.$$.fragment,hM),hM.forEach(t),pM.forEach(t),mT=d(lf),Qc=s(lf,"SPAN",{});var mM=a(Qc);uT=i(mM,"ElectraForQuestionAnswering"),mM.forEach(t),lf.forEach(t),Zm=d(o),ot=s(o,"DIV",{class:!0});var co=a(ot);E(Ya.$$.fragment,co),fT=d(co),Vo=s(co,"P",{});var Pd=a(Vo);gT=i(Pd,`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 `),Vc=s(Pd,"CODE",{});var uM=a(Vc);_T=i(uM,"span start logits"),uM.forEach(t),vT=i(Pd," and "),Jc=s(Pd,"CODE",{});var fM=a(Jc);kT=i(fM,"span end logits"),fM.forEach(t),TT=i(Pd,")."),Pd.forEach(t),ET=d(co),Za=s(co,"P",{});var df=a(Za);wT=i(df,"This model inherits from "),ed=s(df,"A",{href:!0});var gM=a(ed);bT=i(gM,"PreTrainedModel"),gM.forEach(t),yT=i(df,`. 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.)`),df.forEach(t),FT=d(co),er=s(co,"P",{});var cf=a(er);$T=i(cf,"This model is also a PyTorch "),tr=s(cf,"A",{href:!0,rel:!0});var _M=a(tr);MT=i(_M,"torch.nn.Module"),_M.forEach(t),zT=i(cf,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cf.forEach(t),xT=d(co),dt=s(co,"DIV",{class:!0});var po=a(dt);E(or.$$.fragment,po),qT=d(po),Jo=s(po,"P",{});var Cd=a(Jo);PT=i(Cd,"The "),td=s(Cd,"A",{href:!0});var vM=a(td);CT=i(vM,"ElectraForQuestionAnswering"),vM.forEach(t),jT=i(Cd," forward method, overrides the "),Kc=s(Cd,"CODE",{});var kM=a(Kc);AT=i(kM,"__call__"),kM.forEach(t),LT=i(Cd," special method."),Cd.forEach(t),IT=d(po),E(Vn.$$.fragment,po),NT=d(po),Gc=s(po,"P",{});var TM=a(Gc);DT=i(TM,"Example:"),TM.forEach(t),OT=d(po),E(nr.$$.fragment,po),po.forEach(t),co.forEach(t),eu=d(o),Ko=s(o,"H2",{class:!0});var pf=a(Ko);Jn=s(pf,"A",{id:!0,class:!0,href:!0});var EM=a(Jn);Xc=s(EM,"SPAN",{});var wM=a(Xc);E(sr.$$.fragment,wM),wM.forEach(t),EM.forEach(t),ST=d(pf),Yc=s(pf,"SPAN",{});var bM=a(Yc);WT=i(bM,"TFElectraModel"),bM.forEach(t),pf.forEach(t),tu=d(o),Ue=s(o,"DIV",{class:!0});var Ot=a(Ue);E(ar.$$.fragment,Ot),BT=d(Ot),Zc=s(Ot,"P",{});var yM=a(Zc);RT=i(yM,"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."),yM.forEach(t),HT=d(Ot),rr=s(Ot,"P",{});var hf=a(rr);UT=i(hf,"This model inherits from "),od=s(hf,"A",{href:!0});var FM=a(od);QT=i(FM,"TFPreTrainedModel"),FM.forEach(t),VT=i(hf,`. 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.)`),hf.forEach(t),JT=d(Ot),ir=s(Ot,"P",{});var mf=a(ir);KT=i(mf,"This model is also a "),lr=s(mf,"A",{href:!0,rel:!0});var $M=a(lr);GT=i($M,"tf.keras.Model"),$M.forEach(t),XT=i(mf,` 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.`),mf.forEach(t),YT=d(Ot),E(Kn.$$.fragment,Ot),ZT=d(Ot),ct=s(Ot,"DIV",{class:!0});var ho=a(ct);E(dr.$$.fragment,ho),e1=d(ho),Go=s(ho,"P",{});var jd=a(Go);t1=i(jd,"The "),nd=s(jd,"A",{href:!0});var MM=a(nd);o1=i(MM,"TFElectraModel"),MM.forEach(t),n1=i(jd," forward method, overrides the "),ep=s(jd,"CODE",{});var zM=a(ep);s1=i(zM,"__call__"),zM.forEach(t),a1=i(jd," special method."),jd.forEach(t),r1=d(ho),E(Gn.$$.fragment,ho),i1=d(ho),tp=s(ho,"P",{});var xM=a(tp);l1=i(xM,"Example:"),xM.forEach(t),d1=d(ho),E(cr.$$.fragment,ho),ho.forEach(t),Ot.forEach(t),ou=d(o),Xo=s(o,"H2",{class:!0});var uf=a(Xo);Xn=s(uf,"A",{id:!0,class:!0,href:!0});var qM=a(Xn);op=s(qM,"SPAN",{});var PM=a(op);E(pr.$$.fragment,PM),PM.forEach(t),qM.forEach(t),c1=d(uf),np=s(uf,"SPAN",{});var CM=a(np);p1=i(CM,"TFElectraForPreTraining"),CM.forEach(t),uf.forEach(t),nu=d(o),je=s(o,"DIV",{class:!0});var Ft=a(je);E(hr.$$.fragment,Ft),h1=d(Ft),sp=s(Ft,"P",{});var jM=a(sp);m1=i(jM,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),jM.forEach(t),u1=d(Ft),ap=s(Ft,"P",{});var AM=a(ap);f1=i(AM,`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.`),AM.forEach(t),g1=d(Ft),mr=s(Ft,"P",{});var ff=a(mr);_1=i(ff,"This model inherits from "),sd=s(ff,"A",{href:!0});var LM=a(sd);v1=i(LM,"TFPreTrainedModel"),LM.forEach(t),k1=i(ff,`. 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.)`),ff.forEach(t),T1=d(Ft),ur=s(Ft,"P",{});var gf=a(ur);E1=i(gf,"This model is also a "),fr=s(gf,"A",{href:!0,rel:!0});var IM=a(fr);w1=i(IM,"tf.keras.Model"),IM.forEach(t),b1=i(gf,` 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.`),gf.forEach(t),y1=d(Ft),E(Yn.$$.fragment,Ft),F1=d(Ft),pt=s(Ft,"DIV",{class:!0});var mo=a(pt);E(gr.$$.fragment,mo),$1=d(mo),Yo=s(mo,"P",{});var Ad=a(Yo);M1=i(Ad,"The "),ad=s(Ad,"A",{href:!0});var NM=a(ad);z1=i(NM,"TFElectraForPreTraining"),NM.forEach(t),x1=i(Ad," forward method, overrides the "),rp=s(Ad,"CODE",{});var DM=a(rp);q1=i(DM,"__call__"),DM.forEach(t),P1=i(Ad," special method."),Ad.forEach(t),C1=d(mo),E(Zn.$$.fragment,mo),j1=d(mo),ip=s(mo,"P",{});var OM=a(ip);A1=i(OM,"Examples:"),OM.forEach(t),L1=d(mo),E(_r.$$.fragment,mo),mo.forEach(t),Ft.forEach(t),su=d(o),Zo=s(o,"H2",{class:!0});var _f=a(Zo);es=s(_f,"A",{id:!0,class:!0,href:!0});var SM=a(es);lp=s(SM,"SPAN",{});var WM=a(lp);E(vr.$$.fragment,WM),WM.forEach(t),SM.forEach(t),I1=d(_f),dp=s(_f,"SPAN",{});var BM=a(dp);N1=i(BM,"TFElectraForMaskedLM"),BM.forEach(t),_f.forEach(t),au=d(o),Ae=s(o,"DIV",{class:!0});var $t=a(Ae);E(kr.$$.fragment,$t),D1=d($t),cp=s($t,"P",{});var RM=a(cp);O1=i(RM,"Electra model with a language modeling head on top."),RM.forEach(t),S1=d($t),pp=s($t,"P",{});var HM=a(pp);W1=i(HM,`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.`),HM.forEach(t),B1=d($t),Tr=s($t,"P",{});var vf=a(Tr);R1=i(vf,"This model inherits from "),rd=s(vf,"A",{href:!0});var UM=a(rd);H1=i(UM,"TFPreTrainedModel"),UM.forEach(t),U1=i(vf,`. 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.)`),vf.forEach(t),Q1=d($t),Er=s($t,"P",{});var kf=a(Er);V1=i(kf,"This model is also a "),wr=s(kf,"A",{href:!0,rel:!0});var QM=a(wr);J1=i(QM,"tf.keras.Model"),QM.forEach(t),K1=i(kf,` 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.`),kf.forEach(t),G1=d($t),E(ts.$$.fragment,$t),X1=d($t),ht=s($t,"DIV",{class:!0});var uo=a(ht);E(br.$$.fragment,uo),Y1=d(uo),en=s(uo,"P",{});var Ld=a(en);Z1=i(Ld,"The "),id=s(Ld,"A",{href:!0});var VM=a(id);eE=i(VM,"TFElectraForMaskedLM"),VM.forEach(t),tE=i(Ld," forward method, overrides the "),hp=s(Ld,"CODE",{});var JM=a(hp);oE=i(JM,"__call__"),JM.forEach(t),nE=i(Ld," special method."),Ld.forEach(t),sE=d(uo),E(os.$$.fragment,uo),aE=d(uo),mp=s(uo,"P",{});var KM=a(mp);rE=i(KM,"Example:"),KM.forEach(t),iE=d(uo),E(yr.$$.fragment,uo),uo.forEach(t),$t.forEach(t),ru=d(o),tn=s(o,"H2",{class:!0});var Tf=a(tn);ns=s(Tf,"A",{id:!0,class:!0,href:!0});var GM=a(ns);up=s(GM,"SPAN",{});var XM=a(up);E(Fr.$$.fragment,XM),XM.forEach(t),GM.forEach(t),lE=d(Tf),fp=s(Tf,"SPAN",{});var YM=a(fp);dE=i(YM,"TFElectraForSequenceClassification"),YM.forEach(t),Tf.forEach(t),iu=d(o),Qe=s(o,"DIV",{class:!0});var St=a(Qe);E($r.$$.fragment,St),cE=d(St),gp=s(St,"P",{});var ZM=a(gp);pE=i(ZM,`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.`),ZM.forEach(t),hE=d(St),Mr=s(St,"P",{});var Ef=a(Mr);mE=i(Ef,"This model inherits from "),ld=s(Ef,"A",{href:!0});var ez=a(ld);uE=i(ez,"TFPreTrainedModel"),ez.forEach(t),fE=i(Ef,`. 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.)`),Ef.forEach(t),gE=d(St),zr=s(St,"P",{});var wf=a(zr);_E=i(wf,"This model is also a "),xr=s(wf,"A",{href:!0,rel:!0});var tz=a(xr);vE=i(tz,"tf.keras.Model"),tz.forEach(t),kE=i(wf,` 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.`),wf.forEach(t),TE=d(St),E(ss.$$.fragment,St),EE=d(St),mt=s(St,"DIV",{class:!0});var fo=a(mt);E(qr.$$.fragment,fo),wE=d(fo),on=s(fo,"P",{});var Id=a(on);bE=i(Id,"The "),dd=s(Id,"A",{href:!0});var oz=a(dd);yE=i(oz,"TFElectraForSequenceClassification"),oz.forEach(t),FE=i(Id," forward method, overrides the "),_p=s(Id,"CODE",{});var nz=a(_p);$E=i(nz,"__call__"),nz.forEach(t),ME=i(Id," special method."),Id.forEach(t),zE=d(fo),E(as.$$.fragment,fo),xE=d(fo),vp=s(fo,"P",{});var sz=a(vp);qE=i(sz,"Example:"),sz.forEach(t),PE=d(fo),E(Pr.$$.fragment,fo),fo.forEach(t),St.forEach(t),lu=d(o),nn=s(o,"H2",{class:!0});var bf=a(nn);rs=s(bf,"A",{id:!0,class:!0,href:!0});var az=a(rs);kp=s(az,"SPAN",{});var rz=a(kp);E(Cr.$$.fragment,rz),rz.forEach(t),az.forEach(t),CE=d(bf),Tp=s(bf,"SPAN",{});var iz=a(Tp);jE=i(iz,"TFElectraForMultipleChoice"),iz.forEach(t),bf.forEach(t),du=d(o),Ve=s(o,"DIV",{class:!0});var Wt=a(Ve);E(jr.$$.fragment,Wt),AE=d(Wt),Ep=s(Wt,"P",{});var lz=a(Ep);LE=i(lz,`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.`),lz.forEach(t),IE=d(Wt),Ar=s(Wt,"P",{});var yf=a(Ar);NE=i(yf,"This model inherits from "),cd=s(yf,"A",{href:!0});var dz=a(cd);DE=i(dz,"TFPreTrainedModel"),dz.forEach(t),OE=i(yf,`. 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.)`),yf.forEach(t),SE=d(Wt),Lr=s(Wt,"P",{});var Ff=a(Lr);WE=i(Ff,"This model is also a "),Ir=s(Ff,"A",{href:!0,rel:!0});var cz=a(Ir);BE=i(cz,"tf.keras.Model"),cz.forEach(t),RE=i(Ff,` 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.`),Ff.forEach(t),HE=d(Wt),E(is.$$.fragment,Wt),UE=d(Wt),ut=s(Wt,"DIV",{class:!0});var go=a(ut);E(Nr.$$.fragment,go),QE=d(go),sn=s(go,"P",{});var Nd=a(sn);VE=i(Nd,"The "),pd=s(Nd,"A",{href:!0});var pz=a(pd);JE=i(pz,"TFElectraForMultipleChoice"),pz.forEach(t),KE=i(Nd," forward method, overrides the "),wp=s(Nd,"CODE",{});var hz=a(wp);GE=i(hz,"__call__"),hz.forEach(t),XE=i(Nd," special method."),Nd.forEach(t),YE=d(go),E(ls.$$.fragment,go),ZE=d(go),bp=s(go,"P",{});var mz=a(bp);ew=i(mz,"Example:"),mz.forEach(t),tw=d(go),E(Dr.$$.fragment,go),go.forEach(t),Wt.forEach(t),cu=d(o),an=s(o,"H2",{class:!0});var $f=a(an);ds=s($f,"A",{id:!0,class:!0,href:!0});var uz=a(ds);yp=s(uz,"SPAN",{});var fz=a(yp);E(Or.$$.fragment,fz),fz.forEach(t),uz.forEach(t),ow=d($f),Fp=s($f,"SPAN",{});var gz=a(Fp);nw=i(gz,"TFElectraForTokenClassification"),gz.forEach(t),$f.forEach(t),pu=d(o),Le=s(o,"DIV",{class:!0});var Mt=a(Le);E(Sr.$$.fragment,Mt),sw=d(Mt),$p=s(Mt,"P",{});var _z=a($p);aw=i(_z,"Electra model with a token classification head on top."),_z.forEach(t),rw=d(Mt),Mp=s(Mt,"P",{});var vz=a(Mp);iw=i(vz,"Both the discriminator and generator may be loaded into this model."),vz.forEach(t),lw=d(Mt),Wr=s(Mt,"P",{});var Mf=a(Wr);dw=i(Mf,"This model inherits from "),hd=s(Mf,"A",{href:!0});var kz=a(hd);cw=i(kz,"TFPreTrainedModel"),kz.forEach(t),pw=i(Mf,`. 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.)`),Mf.forEach(t),hw=d(Mt),Br=s(Mt,"P",{});var zf=a(Br);mw=i(zf,"This model is also a "),Rr=s(zf,"A",{href:!0,rel:!0});var Tz=a(Rr);uw=i(Tz,"tf.keras.Model"),Tz.forEach(t),fw=i(zf,` 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.`),zf.forEach(t),gw=d(Mt),E(cs.$$.fragment,Mt),_w=d(Mt),ft=s(Mt,"DIV",{class:!0});var _o=a(ft);E(Hr.$$.fragment,_o),vw=d(_o),rn=s(_o,"P",{});var Dd=a(rn);kw=i(Dd,"The "),md=s(Dd,"A",{href:!0});var Ez=a(md);Tw=i(Ez,"TFElectraForTokenClassification"),Ez.forEach(t),Ew=i(Dd," forward method, overrides the "),zp=s(Dd,"CODE",{});var wz=a(zp);ww=i(wz,"__call__"),wz.forEach(t),bw=i(Dd," special method."),Dd.forEach(t),yw=d(_o),E(ps.$$.fragment,_o),Fw=d(_o),xp=s(_o,"P",{});var bz=a(xp);$w=i(bz,"Example:"),bz.forEach(t),Mw=d(_o),E(Ur.$$.fragment,_o),_o.forEach(t),Mt.forEach(t),hu=d(o),ln=s(o,"H2",{class:!0});var xf=a(ln);hs=s(xf,"A",{id:!0,class:!0,href:!0});var yz=a(hs);qp=s(yz,"SPAN",{});var Fz=a(qp);E(Qr.$$.fragment,Fz),Fz.forEach(t),yz.forEach(t),zw=d(xf),Pp=s(xf,"SPAN",{});var $z=a(Pp);xw=i($z,"TFElectraForQuestionAnswering"),$z.forEach(t),xf.forEach(t),mu=d(o),Je=s(o,"DIV",{class:!0});var Bt=a(Je);E(Vr.$$.fragment,Bt),qw=d(Bt),dn=s(Bt,"P",{});var Od=a(dn);Pw=i(Od,`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 `),Cp=s(Od,"CODE",{});var Mz=a(Cp);Cw=i(Mz,"span start logits"),Mz.forEach(t),jw=i(Od," and "),jp=s(Od,"CODE",{});var zz=a(jp);Aw=i(zz,"span end logits"),zz.forEach(t),Lw=i(Od,")."),Od.forEach(t),Iw=d(Bt),Jr=s(Bt,"P",{});var qf=a(Jr);Nw=i(qf,"This model inherits from "),ud=s(qf,"A",{href:!0});var xz=a(ud);Dw=i(xz,"TFPreTrainedModel"),xz.forEach(t),Ow=i(qf,`. 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.)`),qf.forEach(t),Sw=d(Bt),Kr=s(Bt,"P",{});var Pf=a(Kr);Ww=i(Pf,"This model is also a "),Gr=s(Pf,"A",{href:!0,rel:!0});var qz=a(Gr);Bw=i(qz,"tf.keras.Model"),qz.forEach(t),Rw=i(Pf,` 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.`),Pf.forEach(t),Hw=d(Bt),E(ms.$$.fragment,Bt),Uw=d(Bt),gt=s(Bt,"DIV",{class:!0});var vo=a(gt);E(Xr.$$.fragment,vo),Qw=d(vo),cn=s(vo,"P",{});var Sd=a(cn);Vw=i(Sd,"The "),fd=s(Sd,"A",{href:!0});var Pz=a(fd);Jw=i(Pz,"TFElectraForQuestionAnswering"),Pz.forEach(t),Kw=i(Sd," forward method, overrides the "),Ap=s(Sd,"CODE",{});var Cz=a(Ap);Gw=i(Cz,"__call__"),Cz.forEach(t),Xw=i(Sd," special method."),Sd.forEach(t),Yw=d(vo),E(us.$$.fragment,vo),Zw=d(vo),Lp=s(vo,"P",{});var jz=a(Lp);eb=i(jz,"Example:"),jz.forEach(t),tb=d(vo),E(Yr.$$.fragment,vo),vo.forEach(t),Bt.forEach(t),uu=d(o),pn=s(o,"H2",{class:!0});var Cf=a(pn);fs=s(Cf,"A",{id:!0,class:!0,href:!0});var Az=a(fs);Ip=s(Az,"SPAN",{});var Lz=a(Ip);E(Zr.$$.fragment,Lz),Lz.forEach(t),Az.forEach(t),ob=d(Cf),Np=s(Cf,"SPAN",{});var Iz=a(Np);nb=i(Iz,"FlaxElectraModel"),Iz.forEach(t),Cf.forEach(t),fu=d(o),Ie=s(o,"DIV",{class:!0});var zt=a(Ie);E(ei.$$.fragment,zt),sb=d(zt),Dp=s(zt,"P",{});var Nz=a(Dp);ab=i(Nz,"The bare Electra Model transformer outputting raw hidden-states without any specific head on top."),Nz.forEach(t),rb=d(zt),ti=s(zt,"P",{});var jf=a(ti);ib=i(jf,"This model inherits from "),gd=s(jf,"A",{href:!0});var Dz=a(gd);lb=i(Dz,"FlaxPreTrainedModel"),Dz.forEach(t),db=i(jf,`. 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.forEach(t),cb=d(zt),oi=s(zt,"P",{});var Af=a(oi);pb=i(Af,`This model is also a Flax Linen
`),ni=s(Af,"A",{href:!0,rel:!0});var Oz=a(ni);hb=i(Oz,"flax.nn.Module"),Oz.forEach(t),mb=i(Af,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Af.forEach(t),ub=d(zt),Op=s(zt,"P",{});var Sz=a(Op);fb=i(Sz,"Finally, this model supports inherent JAX features such as:"),Sz.forEach(t),gb=d(zt),Ht=s(zt,"UL",{});var Ps=a(Ht);Sp=s(Ps,"LI",{});var Wz=a(Sp);si=s(Wz,"A",{href:!0,rel:!0});var Bz=a(si);_b=i(Bz,"Just-In-Time (JIT) compilation"),Bz.forEach(t),Wz.forEach(t),vb=d(Ps),Wp=s(Ps,"LI",{});var Rz=a(Wp);ai=s(Rz,"A",{href:!0,rel:!0});var Hz=a(ai);kb=i(Hz,"Automatic Differentiation"),Hz.forEach(t),Rz.forEach(t),Tb=d(Ps),Bp=s(Ps,"LI",{});var Uz=a(Bp);ri=s(Uz,"A",{href:!0,rel:!0});var Qz=a(ri);Eb=i(Qz,"Vectorization"),Qz.forEach(t),Uz.forEach(t),wb=d(Ps),Rp=s(Ps,"LI",{});var Vz=a(Rp);ii=s(Vz,"A",{href:!0,rel:!0});var Jz=a(ii);bb=i(Jz,"Parallelization"),Jz.forEach(t),Vz.forEach(t),Ps.forEach(t),yb=d(zt),_t=s(zt,"DIV",{class:!0});var ko=a(_t);E(li.$$.fragment,ko),Fb=d(ko),hn=s(ko,"P",{});var Wd=a(hn);$b=i(Wd,"The "),Hp=s(Wd,"CODE",{});var Kz=a(Hp);Mb=i(Kz,"FlaxElectraPreTrainedModel"),Kz.forEach(t),zb=i(Wd,"forward method, overrides the "),Up=s(Wd,"CODE",{});var Gz=a(Up);xb=i(Gz,"__call__"),Gz.forEach(t),qb=i(Wd," special method."),Wd.forEach(t),Pb=d(ko),E(gs.$$.fragment,ko),Cb=d(ko),Qp=s(ko,"P",{});var Xz=a(Qp);jb=i(Xz,"Example:"),Xz.forEach(t),Ab=d(ko),E(di.$$.fragment,ko),ko.forEach(t),zt.forEach(t),gu=d(o),mn=s(o,"H2",{class:!0});var Lf=a(mn);_s=s(Lf,"A",{id:!0,class:!0,href:!0});var Yz=a(_s);Vp=s(Yz,"SPAN",{});var Zz=a(Vp);E(ci.$$.fragment,Zz),Zz.forEach(t),Yz.forEach(t),Lb=d(Lf),Jp=s(Lf,"SPAN",{});var e3=a(Jp);Ib=i(e3,"FlaxElectraForPreTraining"),e3.forEach(t),Lf.forEach(t),_u=d(o),Pe=s(o,"DIV",{class:!0});var Ke=a(Pe);E(pi.$$.fragment,Ke),Nb=d(Ke),Kp=s(Ke,"P",{});var t3=a(Kp);Db=i(t3,"Electra model with a binary classification head on top as used during pretraining for identifying generated tokens."),t3.forEach(t),Ob=d(Ke),Gp=s(Ke,"P",{});var o3=a(Gp);Sb=i(o3,"It is recommended to load the discriminator checkpoint into that model."),o3.forEach(t),Wb=d(Ke),hi=s(Ke,"P",{});var If=a(hi);Bb=i(If,"This model inherits from "),_d=s(If,"A",{href:!0});var n3=a(_d);Rb=i(n3,"FlaxPreTrainedModel"),n3.forEach(t),Hb=i(If,`. 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)`),If.forEach(t),Ub=d(Ke),mi=s(Ke,"P",{});var Nf=a(mi);Qb=i(Nf,`This model is also a Flax Linen
`),ui=s(Nf,"A",{href:!0,rel:!0});var s3=a(ui);Vb=i(s3,"flax.nn.Module"),s3.forEach(t),Jb=i(Nf,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Nf.forEach(t),Kb=d(Ke),Xp=s(Ke,"P",{});var a3=a(Xp);Gb=i(a3,"Finally, this model supports inherent JAX features such as:"),a3.forEach(t),Xb=d(Ke),Ut=s(Ke,"UL",{});var Cs=a(Ut);Yp=s(Cs,"LI",{});var r3=a(Yp);fi=s(r3,"A",{href:!0,rel:!0});var i3=a(fi);Yb=i(i3,"Just-In-Time (JIT) compilation"),i3.forEach(t),r3.forEach(t),Zb=d(Cs),Zp=s(Cs,"LI",{});var l3=a(Zp);gi=s(l3,"A",{href:!0,rel:!0});var d3=a(gi);ey=i(d3,"Automatic Differentiation"),d3.forEach(t),l3.forEach(t),ty=d(Cs),eh=s(Cs,"LI",{});var c3=a(eh);_i=s(c3,"A",{href:!0,rel:!0});var p3=a(_i);oy=i(p3,"Vectorization"),p3.forEach(t),c3.forEach(t),ny=d(Cs),th=s(Cs,"LI",{});var h3=a(th);vi=s(h3,"A",{href:!0,rel:!0});var m3=a(vi);sy=i(m3,"Parallelization"),m3.forEach(t),h3.forEach(t),Cs.forEach(t),ay=d(Ke),vt=s(Ke,"DIV",{class:!0});var To=a(vt);E(ki.$$.fragment,To),ry=d(To),un=s(To,"P",{});var Bd=a(un);iy=i(Bd,"The "),oh=s(Bd,"CODE",{});var u3=a(oh);ly=i(u3,"FlaxElectraPreTrainedModel"),u3.forEach(t),dy=i(Bd,"forward method, overrides the "),nh=s(Bd,"CODE",{});var f3=a(nh);cy=i(f3,"__call__"),f3.forEach(t),py=i(Bd," special method."),Bd.forEach(t),hy=d(To),E(vs.$$.fragment,To),my=d(To),sh=s(To,"P",{});var g3=a(sh);uy=i(g3,"Example:"),g3.forEach(t),fy=d(To),E(Ti.$$.fragment,To),To.forEach(t),Ke.forEach(t),vu=d(o),fn=s(o,"H2",{class:!0});var Df=a(fn);ks=s(Df,"A",{id:!0,class:!0,href:!0});var _3=a(ks);ah=s(_3,"SPAN",{});var v3=a(ah);E(Ei.$$.fragment,v3),v3.forEach(t),_3.forEach(t),gy=d(Df),rh=s(Df,"SPAN",{});var k3=a(rh);_y=i(k3,"FlaxElectraForMaskedLM"),k3.forEach(t),Df.forEach(t),ku=d(o),Ne=s(o,"DIV",{class:!0});var xt=a(Ne);E(wi.$$.fragment,xt),vy=d(xt),bi=s(xt,"P",{});var Of=a(bi);ky=i(Of,"Electra Model with a "),ih=s(Of,"CODE",{});var T3=a(ih);Ty=i(T3,"language modeling"),T3.forEach(t),Ey=i(Of," head on top."),Of.forEach(t),wy=d(xt),yi=s(xt,"P",{});var Sf=a(yi);by=i(Sf,"This model inherits from "),vd=s(Sf,"A",{href:!0});var E3=a(vd);yy=i(E3,"FlaxPreTrainedModel"),E3.forEach(t),Fy=i(Sf,`. 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)`),Sf.forEach(t),$y=d(xt),Fi=s(xt,"P",{});var Wf=a(Fi);My=i(Wf,`This model is also a Flax Linen
`),$i=s(Wf,"A",{href:!0,rel:!0});var w3=a($i);zy=i(w3,"flax.nn.Module"),w3.forEach(t),xy=i(Wf,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Wf.forEach(t),qy=d(xt),lh=s(xt,"P",{});var b3=a(lh);Py=i(b3,"Finally, this model supports inherent JAX features such as:"),b3.forEach(t),Cy=d(xt),Qt=s(xt,"UL",{});var js=a(Qt);dh=s(js,"LI",{});var y3=a(dh);Mi=s(y3,"A",{href:!0,rel:!0});var F3=a(Mi);jy=i(F3,"Just-In-Time (JIT) compilation"),F3.forEach(t),y3.forEach(t),Ay=d(js),ch=s(js,"LI",{});var $3=a(ch);zi=s($3,"A",{href:!0,rel:!0});var M3=a(zi);Ly=i(M3,"Automatic Differentiation"),M3.forEach(t),$3.forEach(t),Iy=d(js),ph=s(js,"LI",{});var z3=a(ph);xi=s(z3,"A",{href:!0,rel:!0});var x3=a(xi);Ny=i(x3,"Vectorization"),x3.forEach(t),z3.forEach(t),Dy=d(js),hh=s(js,"LI",{});var q3=a(hh);qi=s(q3,"A",{href:!0,rel:!0});var P3=a(qi);Oy=i(P3,"Parallelization"),P3.forEach(t),q3.forEach(t),js.forEach(t),Sy=d(xt),kt=s(xt,"DIV",{class:!0});var Eo=a(kt);E(Pi.$$.fragment,Eo),Wy=d(Eo),gn=s(Eo,"P",{});var Rd=a(gn);By=i(Rd,"The "),mh=s(Rd,"CODE",{});var C3=a(mh);Ry=i(C3,"FlaxElectraPreTrainedModel"),C3.forEach(t),Hy=i(Rd,"forward method, overrides the "),uh=s(Rd,"CODE",{});var j3=a(uh);Uy=i(j3,"__call__"),j3.forEach(t),Qy=i(Rd," special method."),Rd.forEach(t),Vy=d(Eo),E(Ts.$$.fragment,Eo),Jy=d(Eo),fh=s(Eo,"P",{});var A3=a(fh);Ky=i(A3,"Example:"),A3.forEach(t),Gy=d(Eo),E(Ci.$$.fragment,Eo),Eo.forEach(t),xt.forEach(t),Tu=d(o),_n=s(o,"H2",{class:!0});var Bf=a(_n);Es=s(Bf,"A",{id:!0,class:!0,href:!0});var L3=a(Es);gh=s(L3,"SPAN",{});var I3=a(gh);E(ji.$$.fragment,I3),I3.forEach(t),L3.forEach(t),Xy=d(Bf),_h=s(Bf,"SPAN",{});var N3=a(_h);Yy=i(N3,"FlaxElectraForSequenceClassification"),N3.forEach(t),Bf.forEach(t),Eu=d(o),De=s(o,"DIV",{class:!0});var qt=a(De);E(Ai.$$.fragment,qt),Zy=d(qt),vh=s(qt,"P",{});var D3=a(vh);eF=i(D3,`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.`),D3.forEach(t),tF=d(qt),Li=s(qt,"P",{});var Rf=a(Li);oF=i(Rf,"This model inherits from "),kd=s(Rf,"A",{href:!0});var O3=a(kd);nF=i(O3,"FlaxPreTrainedModel"),O3.forEach(t),sF=i(Rf,`. 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)`),Rf.forEach(t),aF=d(qt),Ii=s(qt,"P",{});var Hf=a(Ii);rF=i(Hf,`This model is also a Flax Linen
`),Ni=s(Hf,"A",{href:!0,rel:!0});var S3=a(Ni);iF=i(S3,"flax.nn.Module"),S3.forEach(t),lF=i(Hf,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Hf.forEach(t),dF=d(qt),kh=s(qt,"P",{});var W3=a(kh);cF=i(W3,"Finally, this model supports inherent JAX features such as:"),W3.forEach(t),pF=d(qt),Vt=s(qt,"UL",{});var As=a(Vt);Th=s(As,"LI",{});var B3=a(Th);Di=s(B3,"A",{href:!0,rel:!0});var R3=a(Di);hF=i(R3,"Just-In-Time (JIT) compilation"),R3.forEach(t),B3.forEach(t),mF=d(As),Eh=s(As,"LI",{});var H3=a(Eh);Oi=s(H3,"A",{href:!0,rel:!0});var U3=a(Oi);uF=i(U3,"Automatic Differentiation"),U3.forEach(t),H3.forEach(t),fF=d(As),wh=s(As,"LI",{});var Q3=a(wh);Si=s(Q3,"A",{href:!0,rel:!0});var V3=a(Si);gF=i(V3,"Vectorization"),V3.forEach(t),Q3.forEach(t),_F=d(As),bh=s(As,"LI",{});var J3=a(bh);Wi=s(J3,"A",{href:!0,rel:!0});var K3=a(Wi);vF=i(K3,"Parallelization"),K3.forEach(t),J3.forEach(t),As.forEach(t),kF=d(qt),Tt=s(qt,"DIV",{class:!0});var wo=a(Tt);E(Bi.$$.fragment,wo),TF=d(wo),vn=s(wo,"P",{});var Hd=a(vn);EF=i(Hd,"The "),yh=s(Hd,"CODE",{});var G3=a(yh);wF=i(G3,"FlaxElectraPreTrainedModel"),G3.forEach(t),bF=i(Hd,"forward method, overrides the "),Fh=s(Hd,"CODE",{});var X3=a(Fh);yF=i(X3,"__call__"),X3.forEach(t),FF=i(Hd," special method."),Hd.forEach(t),$F=d(wo),E(ws.$$.fragment,wo),MF=d(wo),$h=s(wo,"P",{});var Y3=a($h);zF=i(Y3,"Example:"),Y3.forEach(t),xF=d(wo),E(Ri.$$.fragment,wo),wo.forEach(t),qt.forEach(t),wu=d(o),kn=s(o,"H2",{class:!0});var Uf=a(kn);bs=s(Uf,"A",{id:!0,class:!0,href:!0});var Z3=a(bs);Mh=s(Z3,"SPAN",{});var ex=a(Mh);E(Hi.$$.fragment,ex),ex.forEach(t),Z3.forEach(t),qF=d(Uf),zh=s(Uf,"SPAN",{});var tx=a(zh);PF=i(tx,"FlaxElectraForMultipleChoice"),tx.forEach(t),Uf.forEach(t),bu=d(o),Oe=s(o,"DIV",{class:!0});var Pt=a(Oe);E(Ui.$$.fragment,Pt),CF=d(Pt),xh=s(Pt,"P",{});var ox=a(xh);jF=i(ox,`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.`),ox.forEach(t),AF=d(Pt),Qi=s(Pt,"P",{});var Qf=a(Qi);LF=i(Qf,"This model inherits from "),Td=s(Qf,"A",{href:!0});var nx=a(Td);IF=i(nx,"FlaxPreTrainedModel"),nx.forEach(t),NF=i(Qf,`. 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)`),Qf.forEach(t),DF=d(Pt),Vi=s(Pt,"P",{});var Vf=a(Vi);OF=i(Vf,`This model is also a Flax Linen
`),Ji=s(Vf,"A",{href:!0,rel:!0});var sx=a(Ji);SF=i(sx,"flax.nn.Module"),sx.forEach(t),WF=i(Vf,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Vf.forEach(t),BF=d(Pt),qh=s(Pt,"P",{});var ax=a(qh);RF=i(ax,"Finally, this model supports inherent JAX features such as:"),ax.forEach(t),HF=d(Pt),Jt=s(Pt,"UL",{});var Ls=a(Jt);Ph=s(Ls,"LI",{});var rx=a(Ph);Ki=s(rx,"A",{href:!0,rel:!0});var ix=a(Ki);UF=i(ix,"Just-In-Time (JIT) compilation"),ix.forEach(t),rx.forEach(t),QF=d(Ls),Ch=s(Ls,"LI",{});var lx=a(Ch);Gi=s(lx,"A",{href:!0,rel:!0});var dx=a(Gi);VF=i(dx,"Automatic Differentiation"),dx.forEach(t),lx.forEach(t),JF=d(Ls),jh=s(Ls,"LI",{});var cx=a(jh);Xi=s(cx,"A",{href:!0,rel:!0});var px=a(Xi);KF=i(px,"Vectorization"),px.forEach(t),cx.forEach(t),GF=d(Ls),Ah=s(Ls,"LI",{});var hx=a(Ah);Yi=s(hx,"A",{href:!0,rel:!0});var mx=a(Yi);XF=i(mx,"Parallelization"),mx.forEach(t),hx.forEach(t),Ls.forEach(t),YF=d(Pt),Et=s(Pt,"DIV",{class:!0});var bo=a(Et);E(Zi.$$.fragment,bo),ZF=d(bo),Tn=s(bo,"P",{});var Ud=a(Tn);e$=i(Ud,"The "),Lh=s(Ud,"CODE",{});var ux=a(Lh);t$=i(ux,"FlaxElectraPreTrainedModel"),ux.forEach(t),o$=i(Ud,"forward method, overrides the "),Ih=s(Ud,"CODE",{});var fx=a(Ih);n$=i(fx,"__call__"),fx.forEach(t),s$=i(Ud," special method."),Ud.forEach(t),a$=d(bo),E(ys.$$.fragment,bo),r$=d(bo),Nh=s(bo,"P",{});var gx=a(Nh);i$=i(gx,"Example:"),gx.forEach(t),l$=d(bo),E(el.$$.fragment,bo),bo.forEach(t),Pt.forEach(t),yu=d(o),En=s(o,"H2",{class:!0});var Jf=a(En);Fs=s(Jf,"A",{id:!0,class:!0,href:!0});var _x=a(Fs);Dh=s(_x,"SPAN",{});var vx=a(Dh);E(tl.$$.fragment,vx),vx.forEach(t),_x.forEach(t),d$=d(Jf),Oh=s(Jf,"SPAN",{});var kx=a(Oh);c$=i(kx,"FlaxElectraForTokenClassification"),kx.forEach(t),Jf.forEach(t),Fu=d(o),Ce=s(o,"DIV",{class:!0});var Ge=a(Ce);E(ol.$$.fragment,Ge),p$=d(Ge),Sh=s(Ge,"P",{});var Tx=a(Sh);h$=i(Tx,"Electra model with a token classification head on top."),Tx.forEach(t),m$=d(Ge),Wh=s(Ge,"P",{});var Ex=a(Wh);u$=i(Ex,"Both the discriminator and generator may be loaded into this model."),Ex.forEach(t),f$=d(Ge),nl=s(Ge,"P",{});var Kf=a(nl);g$=i(Kf,"This model inherits from "),Ed=s(Kf,"A",{href:!0});var wx=a(Ed);_$=i(wx,"FlaxPreTrainedModel"),wx.forEach(t),v$=i(Kf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Kf.forEach(t),k$=d(Ge),sl=s(Ge,"P",{});var Gf=a(sl);T$=i(Gf,`This model is also a Flax Linen
`),al=s(Gf,"A",{href:!0,rel:!0});var bx=a(al);E$=i(bx,"flax.nn.Module"),bx.forEach(t),w$=i(Gf,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Gf.forEach(t),b$=d(Ge),Bh=s(Ge,"P",{});var yx=a(Bh);y$=i(yx,"Finally, this model supports inherent JAX features such as:"),yx.forEach(t),F$=d(Ge),Kt=s(Ge,"UL",{});var Is=a(Kt);Rh=s(Is,"LI",{});var Fx=a(Rh);rl=s(Fx,"A",{href:!0,rel:!0});var $x=a(rl);$$=i($x,"Just-In-Time (JIT) compilation"),$x.forEach(t),Fx.forEach(t),M$=d(Is),Hh=s(Is,"LI",{});var Mx=a(Hh);il=s(Mx,"A",{href:!0,rel:!0});var zx=a(il);z$=i(zx,"Automatic Differentiation"),zx.forEach(t),Mx.forEach(t),x$=d(Is),Uh=s(Is,"LI",{});var xx=a(Uh);ll=s(xx,"A",{href:!0,rel:!0});var qx=a(ll);q$=i(qx,"Vectorization"),qx.forEach(t),xx.forEach(t),P$=d(Is),Qh=s(Is,"LI",{});var Px=a(Qh);dl=s(Px,"A",{href:!0,rel:!0});var Cx=a(dl);C$=i(Cx,"Parallelization"),Cx.forEach(t),Px.forEach(t),Is.forEach(t),j$=d(Ge),wt=s(Ge,"DIV",{class:!0});var yo=a(wt);E(cl.$$.fragment,yo),A$=d(yo),wn=s(yo,"P",{});var Qd=a(wn);L$=i(Qd,"The "),Vh=s(Qd,"CODE",{});var jx=a(Vh);I$=i(jx,"FlaxElectraPreTrainedModel"),jx.forEach(t),N$=i(Qd,"forward method, overrides the "),Jh=s(Qd,"CODE",{});var Ax=a(Jh);D$=i(Ax,"__call__"),Ax.forEach(t),O$=i(Qd," special method."),Qd.forEach(t),S$=d(yo),E($s.$$.fragment,yo),W$=d(yo),Kh=s(yo,"P",{});var Lx=a(Kh);B$=i(Lx,"Example:"),Lx.forEach(t),R$=d(yo),E(pl.$$.fragment,yo),yo.forEach(t),Ge.forEach(t),$u=d(o),bn=s(o,"H2",{class:!0});var Xf=a(bn);Ms=s(Xf,"A",{id:!0,class:!0,href:!0});var Ix=a(Ms);Gh=s(Ix,"SPAN",{});var Nx=a(Gh);E(hl.$$.fragment,Nx),Nx.forEach(t),Ix.forEach(t),H$=d(Xf),Xh=s(Xf,"SPAN",{});var Dx=a(Xh);U$=i(Dx,"FlaxElectraForQuestionAnswering"),Dx.forEach(t),Xf.forEach(t),Mu=d(o),Se=s(o,"DIV",{class:!0});var Ct=a(Se);E(ml.$$.fragment,Ct),Q$=d(Ct),yn=s(Ct,"P",{});var Vd=a(yn);V$=i(Vd,`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 `),Yh=s(Vd,"CODE",{});var Ox=a(Yh);J$=i(Ox,"span start logits"),Ox.forEach(t),K$=i(Vd," and "),Zh=s(Vd,"CODE",{});var Sx=a(Zh);G$=i(Sx,"span end logits"),Sx.forEach(t),X$=i(Vd,")."),Vd.forEach(t),Y$=d(Ct),ul=s(Ct,"P",{});var Yf=a(ul);Z$=i(Yf,"This model inherits from "),wd=s(Yf,"A",{href:!0});var Wx=a(wd);e2=i(Wx,"FlaxPreTrainedModel"),Wx.forEach(t),t2=i(Yf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Yf.forEach(t),o2=d(Ct),fl=s(Ct,"P",{});var Zf=a(fl);n2=i(Zf,`This model is also a Flax Linen
`),gl=s(Zf,"A",{href:!0,rel:!0});var Bx=a(gl);s2=i(Bx,"flax.nn.Module"),Bx.forEach(t),a2=i(Zf,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Zf.forEach(t),r2=d(Ct),em=s(Ct,"P",{});var Rx=a(em);i2=i(Rx,"Finally, this model supports inherent JAX features such as:"),Rx.forEach(t),l2=d(Ct),Gt=s(Ct,"UL",{});var Ns=a(Gt);tm=s(Ns,"LI",{});var Hx=a(tm);_l=s(Hx,"A",{href:!0,rel:!0});var Ux=a(_l);d2=i(Ux,"Just-In-Time (JIT) compilation"),Ux.forEach(t),Hx.forEach(t),c2=d(Ns),om=s(Ns,"LI",{});var Qx=a(om);vl=s(Qx,"A",{href:!0,rel:!0});var Vx=a(vl);p2=i(Vx,"Automatic Differentiation"),Vx.forEach(t),Qx.forEach(t),h2=d(Ns),nm=s(Ns,"LI",{});var Jx=a(nm);kl=s(Jx,"A",{href:!0,rel:!0});var Kx=a(kl);m2=i(Kx,"Vectorization"),Kx.forEach(t),Jx.forEach(t),u2=d(Ns),sm=s(Ns,"LI",{});var Gx=a(sm);Tl=s(Gx,"A",{href:!0,rel:!0});var Xx=a(Tl);f2=i(Xx,"Parallelization"),Xx.forEach(t),Gx.forEach(t),Ns.forEach(t),g2=d(Ct),bt=s(Ct,"DIV",{class:!0});var Fo=a(bt);E(El.$$.fragment,Fo),_2=d(Fo),Fn=s(Fo,"P",{});var Jd=a(Fn);v2=i(Jd,"The "),am=s(Jd,"CODE",{});var Yx=a(am);k2=i(Yx,"FlaxElectraPreTrainedModel"),Yx.forEach(t),T2=i(Jd,"forward method, overrides the "),rm=s(Jd,"CODE",{});var Zx=a(rm);E2=i(Zx,"__call__"),Zx.forEach(t),w2=i(Jd," special method."),Jd.forEach(t),b2=d(Fo),E(zs.$$.fragment,Fo),y2=d(Fo),im=s(Fo,"P",{});var e5=a(im);F2=i(e5,"Example:"),e5.forEach(t),$2=d(Fo),E(wl.$$.fragment,Fo),Fo.forEach(t),Ct.forEach(t),this.h()},h(){c(p,"name","hf:doc:metadata"),c(p,"content",JSON.stringify(L5)),c(v,"id","electra"),c(v,"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"),c(v,"href","#electra"),c(g,"class","relative group"),c(ee,"id","overview"),c(ee,"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"),c(ee,"href","#overview"),c(x,"class","relative group"),c(ne,"href","https://openreview.net/pdf?id=r1xMH1BtvB"),c(ne,"rel","nofollow"),c(se,"href","https://github.com/google-research/electra"),c(se,"rel","nofollow"),c(h,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForMaskedLM"),c(be,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForPreTraining"),c(A,"href","https://huggingface.co/lysandre"),c(A,"rel","nofollow"),c(Ee,"href","https://github.com/google-research/electra"),c(Ee,"rel","nofollow"),c(ke,"id","transformers.ElectraConfig"),c(ke,"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"),c(ke,"href","#transformers.ElectraConfig"),c(Z,"class","relative group"),c(zl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraModel"),c(xl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.TFElectraModel"),c(Ss,"href","https://huggingface.co/google/electra-small-discriminator"),c(Ss,"rel","nofollow"),c(ql,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),c(Pl,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),c(Xe,"class","docstring"),c(Mn,"id","transformers.ElectraTokenizer"),c(Mn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Mn,"href","#transformers.ElectraTokenizer"),c(Mo,"class","relative group"),c(Cl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraTokenizer"),c(jl,"href","/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizer"),c(Al,"href","/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizer"),c(jt,"class","docstring"),c(xn,"id","transformers.ElectraTokenizerFast"),c(xn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(xn,"href","#transformers.ElectraTokenizerFast"),c(zo,"class","relative group"),c(Ll,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraTokenizerFast"),c(Il,"href","/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizerFast"),c(Nl,"href","/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizerFast"),c(At,"class","docstring"),c(Pn,"id","transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"),c(Pn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Pn,"href","#transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput"),c(xo,"class","relative group"),c(Dl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForPreTraining"),c(qo,"class","docstring"),c(Ol,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.TFElectraForPreTraining"),c(Po,"class","docstring"),c(Cn,"id","transformers.ElectraModel"),c(Cn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Cn,"href","#transformers.ElectraModel"),c(Co,"class","relative group"),c(Sl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),c(sa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(sa,"rel","nofollow"),c(Wl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraModel"),c(nt,"class","docstring"),c(Ye,"class","docstring"),c(An,"id","transformers.ElectraForPreTraining"),c(An,"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"),c(An,"href","#transformers.ElectraForPreTraining"),c(Ao,"class","relative group"),c(Bl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),c(pa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(pa,"rel","nofollow"),c(Rl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForPreTraining"),c(st,"class","docstring"),c(Be,"class","docstring"),c(In,"id","transformers.ElectraForCausalLM"),c(In,"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"),c(In,"href","#transformers.ElectraForCausalLM"),c(Io,"class","relative group"),c(Hl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),c(ka,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ka,"rel","nofollow"),c(Ul,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForCausalLM"),c(at,"class","docstring"),c(Ze,"class","docstring"),c(Dn,"id","transformers.ElectraForMaskedLM"),c(Dn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Dn,"href","#transformers.ElectraForMaskedLM"),c(Do,"class","relative group"),c(Ql,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),c($a,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c($a,"rel","nofollow"),c(Vl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForMaskedLM"),c(rt,"class","docstring"),c(Re,"class","docstring"),c(Sn,"id","transformers.ElectraForSequenceClassification"),c(Sn,"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"),c(Sn,"href","#transformers.ElectraForSequenceClassification"),c(So,"class","relative group"),c(Jl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),c(ja,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ja,"rel","nofollow"),c(Kl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForSequenceClassification"),c(We,"class","docstring"),c(et,"class","docstring"),c(Bn,"id","transformers.ElectraForMultipleChoice"),c(Bn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Bn,"href","#transformers.ElectraForMultipleChoice"),c(Bo,"class","relative group"),c(Gl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),c(Wa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Wa,"rel","nofollow"),c(Xl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForMultipleChoice"),c(it,"class","docstring"),c(tt,"class","docstring"),c(Hn,"id","transformers.ElectraForTokenClassification"),c(Hn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Hn,"href","#transformers.ElectraForTokenClassification"),c(Ho,"class","relative group"),c(Yl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),c(Ja,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ja,"rel","nofollow"),c(Zl,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForTokenClassification"),c(lt,"class","docstring"),c(He,"class","docstring"),c(Qn,"id","transformers.ElectraForQuestionAnswering"),c(Qn,"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"),c(Qn,"href","#transformers.ElectraForQuestionAnswering"),c(Qo,"class","relative group"),c(ed,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),c(tr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(tr,"rel","nofollow"),c(td,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.ElectraForQuestionAnswering"),c(dt,"class","docstring"),c(ot,"class","docstring"),c(Jn,"id","transformers.TFElectraModel"),c(Jn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Jn,"href","#transformers.TFElectraModel"),c(Ko,"class","relative group"),c(od,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(lr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(lr,"rel","nofollow"),c(nd,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.TFElectraModel"),c(ct,"class","docstring"),c(Ue,"class","docstring"),c(Xn,"id","transformers.TFElectraForPreTraining"),c(Xn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Xn,"href","#transformers.TFElectraForPreTraining"),c(Xo,"class","relative group"),c(sd,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(fr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(fr,"rel","nofollow"),c(ad,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.TFElectraForPreTraining"),c(pt,"class","docstring"),c(je,"class","docstring"),c(es,"id","transformers.TFElectraForMaskedLM"),c(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"),c(es,"href","#transformers.TFElectraForMaskedLM"),c(Zo,"class","relative group"),c(rd,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(wr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(wr,"rel","nofollow"),c(id,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.TFElectraForMaskedLM"),c(ht,"class","docstring"),c(Ae,"class","docstring"),c(ns,"id","transformers.TFElectraForSequenceClassification"),c(ns,"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"),c(ns,"href","#transformers.TFElectraForSequenceClassification"),c(tn,"class","relative group"),c(ld,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(xr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(xr,"rel","nofollow"),c(dd,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.TFElectraForSequenceClassification"),c(mt,"class","docstring"),c(Qe,"class","docstring"),c(rs,"id","transformers.TFElectraForMultipleChoice"),c(rs,"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"),c(rs,"href","#transformers.TFElectraForMultipleChoice"),c(nn,"class","relative group"),c(cd,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(Ir,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Ir,"rel","nofollow"),c(pd,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.TFElectraForMultipleChoice"),c(ut,"class","docstring"),c(Ve,"class","docstring"),c(ds,"id","transformers.TFElectraForTokenClassification"),c(ds,"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"),c(ds,"href","#transformers.TFElectraForTokenClassification"),c(an,"class","relative group"),c(hd,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(Rr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Rr,"rel","nofollow"),c(md,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.TFElectraForTokenClassification"),c(ft,"class","docstring"),c(Le,"class","docstring"),c(hs,"id","transformers.TFElectraForQuestionAnswering"),c(hs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(hs,"href","#transformers.TFElectraForQuestionAnswering"),c(ln,"class","relative group"),c(ud,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(Gr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Gr,"rel","nofollow"),c(fd,"href","/docs/transformers/pr_15839/en/model_doc/electra#transformers.TFElectraForQuestionAnswering"),c(gt,"class","docstring"),c(Je,"class","docstring"),c(fs,"id","transformers.FlaxElectraModel"),c(fs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(fs,"href","#transformers.FlaxElectraModel"),c(pn,"class","relative group"),c(gd,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(ni,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),c(ni,"rel","nofollow"),c(si,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(si,"rel","nofollow"),c(ai,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(ai,"rel","nofollow"),c(ri,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ri,"rel","nofollow"),c(ii,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(ii,"rel","nofollow"),c(_t,"class","docstring"),c(Ie,"class","docstring"),c(_s,"id","transformers.FlaxElectraForPreTraining"),c(_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"),c(_s,"href","#transformers.FlaxElectraForPreTraining"),c(mn,"class","relative group"),c(_d,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(ui,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),c(ui,"rel","nofollow"),c(fi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(fi,"rel","nofollow"),c(gi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(gi,"rel","nofollow"),c(_i,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(_i,"rel","nofollow"),c(vi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(vi,"rel","nofollow"),c(vt,"class","docstring"),c(Pe,"class","docstring"),c(ks,"id","transformers.FlaxElectraForMaskedLM"),c(ks,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ks,"href","#transformers.FlaxElectraForMaskedLM"),c(fn,"class","relative group"),c(vd,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c($i,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),c($i,"rel","nofollow"),c(Mi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Mi,"rel","nofollow"),c(zi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(zi,"rel","nofollow"),c(xi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(xi,"rel","nofollow"),c(qi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(qi,"rel","nofollow"),c(kt,"class","docstring"),c(Ne,"class","docstring"),c(Es,"id","transformers.FlaxElectraForSequenceClassification"),c(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"),c(Es,"href","#transformers.FlaxElectraForSequenceClassification"),c(_n,"class","relative group"),c(kd,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Ni,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),c(Ni,"rel","nofollow"),c(Di,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Di,"rel","nofollow"),c(Oi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Oi,"rel","nofollow"),c(Si,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Si,"rel","nofollow"),c(Wi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Wi,"rel","nofollow"),c(Tt,"class","docstring"),c(De,"class","docstring"),c(bs,"id","transformers.FlaxElectraForMultipleChoice"),c(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"),c(bs,"href","#transformers.FlaxElectraForMultipleChoice"),c(kn,"class","relative group"),c(Td,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Ji,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),c(Ji,"rel","nofollow"),c(Ki,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Ki,"rel","nofollow"),c(Gi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Gi,"rel","nofollow"),c(Xi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Xi,"rel","nofollow"),c(Yi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Yi,"rel","nofollow"),c(Et,"class","docstring"),c(Oe,"class","docstring"),c(Fs,"id","transformers.FlaxElectraForTokenClassification"),c(Fs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Fs,"href","#transformers.FlaxElectraForTokenClassification"),c(En,"class","relative group"),c(Ed,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(al,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),c(al,"rel","nofollow"),c(rl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(rl,"rel","nofollow"),c(il,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(il,"rel","nofollow"),c(ll,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ll,"rel","nofollow"),c(dl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(dl,"rel","nofollow"),c(wt,"class","docstring"),c(Ce,"class","docstring"),c(Ms,"id","transformers.FlaxElectraForQuestionAnswering"),c(Ms,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ms,"href","#transformers.FlaxElectraForQuestionAnswering"),c(bn,"class","relative group"),c(wd,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(gl,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),c(gl,"rel","nofollow"),c(_l,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(_l,"rel","nofollow"),c(vl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(vl,"rel","nofollow"),c(kl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(kl,"rel","nofollow"),c(Tl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Tl,"rel","nofollow"),c(bt,"class","docstring"),c(Se,"class","docstring")},m(o,f){e(document.head,p),m(o,$,f),m(o,g,f),e(g,v),e(v,k),w(_,k,null),e(g,u),e(g,M),e(M,pe),m(o,K,f),m(o,x,f),e(x,ee),e(ee,O),w(oe,O,null),e(x,he),e(x,S),e(S,me),m(o,le,f),m(o,J,f),e(J,L),e(J,ne),e(ne,X),e(J,q),m(o,C,f),m(o,ae,f),e(ae,R),m(o,de,f),m(o,re,f),e(re,W),e(W,ue),m(o,ce,f),m(o,P,f),e(P,fe),m(o,B,f),m(o,te,f),e(te,ie),e(ie,H),e(te,ge),e(te,G),e(G,I),e(G,se),e(se,U),e(G,_e),e(G,h),e(h,z),e(G,Y),e(G,be),e(be,$e),e(G,N),m(o,ye,f),m(o,ve,f),e(ve,Me),e(ve,A),e(A,Q),e(ve,ze),e(ve,Ee),e(Ee,V),e(ve,xe),m(o,Fe,f),m(o,Z,f),e(Z,ke),e(ke,Kd),w(Ds,Kd,null),e(Z,eg),e(Z,Gd),e(Gd,tg),m(o,qm,f),m(o,Xe,f),w(Os,Xe,null),e(Xe,og),e(Xe,Rt),e(Rt,ng),e(Rt,zl),e(zl,sg),e(Rt,ag),e(Rt,xl),e(xl,rg),e(Rt,ig),e(Rt,Ss),e(Ss,lg),e(Rt,dg),e(Xe,cg),e(Xe,$o),e($o,pg),e($o,ql),e(ql,hg),e($o,mg),e($o,Pl),e(Pl,ug),e($o,fg),e(Xe,gg),e(Xe,Xd),e(Xd,_g),e(Xe,vg),w(Ws,Xe,null),m(o,Pm,f),m(o,Mo,f),e(Mo,Mn),e(Mn,Yd),w(Bs,Yd,null),e(Mo,kg),e(Mo,Zd),e(Zd,Tg),m(o,Cm,f),m(o,jt,f),w(Rs,jt,null),e(jt,Eg),e(jt,ec),e(ec,wg),e(jt,bg),e(jt,zn),e(zn,Cl),e(Cl,yg),e(zn,Fg),e(zn,jl),e(jl,$g),e(zn,Mg),e(jt,zg),e(jt,Hs),e(Hs,xg),e(Hs,Al),e(Al,qg),e(Hs,Pg),m(o,jm,f),m(o,zo,f),e(zo,xn),e(xn,tc),w(Us,tc,null),e(zo,Cg),e(zo,oc),e(oc,jg),m(o,Am,f),m(o,At,f),w(Qs,At,null),e(At,Ag),e(At,Vs),e(Vs,Lg),e(Vs,nc),e(nc,Ig),e(Vs,Ng),e(At,Dg),e(At,qn),e(qn,Ll),e(Ll,Og),e(qn,Sg),e(qn,Il),e(Il,Wg),e(qn,Bg),e(At,Rg),e(At,Js),e(Js,Hg),e(Js,Nl),e(Nl,Ug),e(Js,Qg),m(o,Lm,f),m(o,xo,f),e(xo,Pn),e(Pn,sc),w(Ks,sc,null),e(xo,Vg),e(xo,ac),e(ac,Jg),m(o,Im,f),m(o,qo,f),w(Gs,qo,null),e(qo,Kg),e(qo,Xs),e(Xs,Gg),e(Xs,Dl),e(Dl,Xg),e(Xs,Yg),m(o,Nm,f),m(o,Po,f),w(Ys,Po,null),e(Po,Zg),e(Po,Zs),e(Zs,e_),e(Zs,Ol),e(Ol,t_),e(Zs,o_),m(o,Dm,f),m(o,Co,f),e(Co,Cn),e(Cn,rc),w(ea,rc,null),e(Co,n_),e(Co,ic),e(ic,s_),m(o,Om,f),m(o,Ye,f),w(ta,Ye,null),e(Ye,a_),e(Ye,lc),e(lc,r_),e(Ye,i_),e(Ye,oa),e(oa,l_),e(oa,Sl),e(Sl,d_),e(oa,c_),e(Ye,p_),e(Ye,na),e(na,h_),e(na,sa),e(sa,m_),e(na,u_),e(Ye,f_),e(Ye,nt),w(aa,nt,null),e(nt,g_),e(nt,jo),e(jo,__),e(jo,Wl),e(Wl,v_),e(jo,k_),e(jo,dc),e(dc,T_),e(jo,E_),e(nt,w_),w(jn,nt,null),e(nt,b_),e(nt,cc),e(cc,y_),e(nt,F_),w(ra,nt,null),m(o,Sm,f),m(o,Ao,f),e(Ao,An),e(An,pc),w(ia,pc,null),e(Ao,$_),e(Ao,hc),e(hc,M_),m(o,Wm,f),m(o,Be,f),w(la,Be,null),e(Be,z_),e(Be,mc),e(mc,x_),e(Be,q_),e(Be,uc),e(uc,P_),e(Be,C_),e(Be,da),e(da,j_),e(da,Bl),e(Bl,A_),e(da,L_),e(Be,I_),e(Be,ca),e(ca,N_),e(ca,pa),e(pa,D_),e(ca,O_),e(Be,S_),e(Be,st),w(ha,st,null),e(st,W_),e(st,Lo),e(Lo,B_),e(Lo,Rl),e(Rl,R_),e(Lo,H_),e(Lo,fc),e(fc,U_),e(Lo,Q_),e(st,V_),w(Ln,st,null),e(st,J_),e(st,gc),e(gc,K_),e(st,G_),w(ma,st,null),m(o,Bm,f),m(o,Io,f),e(Io,In),e(In,_c),w(ua,_c,null),e(Io,X_),e(Io,vc),e(vc,Y_),m(o,Rm,f),m(o,Ze,f),w(fa,Ze,null),e(Ze,Z_),e(Ze,ga),e(ga,ev),e(ga,kc),e(kc,tv),e(ga,ov),e(Ze,nv),e(Ze,_a),e(_a,sv),e(_a,Hl),e(Hl,av),e(_a,rv),e(Ze,iv),e(Ze,va),e(va,lv),e(va,ka),e(ka,dv),e(va,cv),e(Ze,pv),e(Ze,at),w(Ta,at,null),e(at,hv),e(at,No),e(No,mv),e(No,Ul),e(Ul,uv),e(No,fv),e(No,Tc),e(Tc,gv),e(No,_v),e(at,vv),w(Nn,at,null),e(at,kv),e(at,Ec),e(Ec,Tv),e(at,Ev),w(Ea,at,null),m(o,Hm,f),m(o,Do,f),e(Do,Dn),e(Dn,wc),w(wa,wc,null),e(Do,wv),e(Do,bc),e(bc,bv),m(o,Um,f),m(o,Re,f),w(ba,Re,null),e(Re,yv),e(Re,yc),e(yc,Fv),e(Re,$v),e(Re,Fc),e(Fc,Mv),e(Re,zv),e(Re,ya),e(ya,xv),e(ya,Ql),e(Ql,qv),e(ya,Pv),e(Re,Cv),e(Re,Fa),e(Fa,jv),e(Fa,$a),e($a,Av),e(Fa,Lv),e(Re,Iv),e(Re,rt),w(Ma,rt,null),e(rt,Nv),e(rt,Oo),e(Oo,Dv),e(Oo,Vl),e(Vl,Ov),e(Oo,Sv),e(Oo,$c),e($c,Wv),e(Oo,Bv),e(rt,Rv),w(On,rt,null),e(rt,Hv),e(rt,Mc),e(Mc,Uv),e(rt,Qv),w(za,rt,null),m(o,Qm,f),m(o,So,f),e(So,Sn),e(Sn,zc),w(xa,zc,null),e(So,Vv),e(So,xc),e(xc,Jv),m(o,Vm,f),m(o,et,f),w(qa,et,null),e(et,Kv),e(et,qc),e(qc,Gv),e(et,Xv),e(et,Pa),e(Pa,Yv),e(Pa,Jl),e(Jl,Zv),e(Pa,ek),e(et,tk),e(et,Ca),e(Ca,ok),e(Ca,ja),e(ja,nk),e(Ca,sk),e(et,ak),e(et,We),w(Aa,We,null),e(We,rk),e(We,Wo),e(Wo,ik),e(Wo,Kl),e(Kl,lk),e(Wo,dk),e(Wo,Pc),e(Pc,ck),e(Wo,pk),e(We,hk),w(Wn,We,null),e(We,mk),e(We,Cc),e(Cc,uk),e(We,fk),w(La,We,null),e(We,gk),e(We,jc),e(jc,_k),e(We,vk),w(Ia,We,null),m(o,Jm,f),m(o,Bo,f),e(Bo,Bn),e(Bn,Ac),w(Na,Ac,null),e(Bo,kk),e(Bo,Lc),e(Lc,Tk),m(o,Km,f),m(o,tt,f),w(Da,tt,null),e(tt,Ek),e(tt,Ic),e(Ic,wk),e(tt,bk),e(tt,Oa),e(Oa,yk),e(Oa,Gl),e(Gl,Fk),e(Oa,$k),e(tt,Mk),e(tt,Sa),e(Sa,zk),e(Sa,Wa),e(Wa,xk),e(Sa,qk),e(tt,Pk),e(tt,it),w(Ba,it,null),e(it,Ck),e(it,Ro),e(Ro,jk),e(Ro,Xl),e(Xl,Ak),e(Ro,Lk),e(Ro,Nc),e(Nc,Ik),e(Ro,Nk),e(it,Dk),w(Rn,it,null),e(it,Ok),e(it,Dc),e(Dc,Sk),e(it,Wk),w(Ra,it,null),m(o,Gm,f),m(o,Ho,f),e(Ho,Hn),e(Hn,Oc),w(Ha,Oc,null),e(Ho,Bk),e(Ho,Sc),e(Sc,Rk),m(o,Xm,f),m(o,He,f),w(Ua,He,null),e(He,Hk),e(He,Wc),e(Wc,Uk),e(He,Qk),e(He,Bc),e(Bc,Vk),e(He,Jk),e(He,Qa),e(Qa,Kk),e(Qa,Yl),e(Yl,Gk),e(Qa,Xk),e(He,Yk),e(He,Va),e(Va,Zk),e(Va,Ja),e(Ja,eT),e(Va,tT),e(He,oT),e(He,lt),w(Ka,lt,null),e(lt,nT),e(lt,Uo),e(Uo,sT),e(Uo,Zl),e(Zl,aT),e(Uo,rT),e(Uo,Rc),e(Rc,iT),e(Uo,lT),e(lt,dT),w(Un,lt,null),e(lt,cT),e(lt,Hc),e(Hc,pT),e(lt,hT),w(Ga,lt,null),m(o,Ym,f),m(o,Qo,f),e(Qo,Qn),e(Qn,Uc),w(Xa,Uc,null),e(Qo,mT),e(Qo,Qc),e(Qc,uT),m(o,Zm,f),m(o,ot,f),w(Ya,ot,null),e(ot,fT),e(ot,Vo),e(Vo,gT),e(Vo,Vc),e(Vc,_T),e(Vo,vT),e(Vo,Jc),e(Jc,kT),e(Vo,TT),e(ot,ET),e(ot,Za),e(Za,wT),e(Za,ed),e(ed,bT),e(Za,yT),e(ot,FT),e(ot,er),e(er,$T),e(er,tr),e(tr,MT),e(er,zT),e(ot,xT),e(ot,dt),w(or,dt,null),e(dt,qT),e(dt,Jo),e(Jo,PT),e(Jo,td),e(td,CT),e(Jo,jT),e(Jo,Kc),e(Kc,AT),e(Jo,LT),e(dt,IT),w(Vn,dt,null),e(dt,NT),e(dt,Gc),e(Gc,DT),e(dt,OT),w(nr,dt,null),m(o,eu,f),m(o,Ko,f),e(Ko,Jn),e(Jn,Xc),w(sr,Xc,null),e(Ko,ST),e(Ko,Yc),e(Yc,WT),m(o,tu,f),m(o,Ue,f),w(ar,Ue,null),e(Ue,BT),e(Ue,Zc),e(Zc,RT),e(Ue,HT),e(Ue,rr),e(rr,UT),e(rr,od),e(od,QT),e(rr,VT),e(Ue,JT),e(Ue,ir),e(ir,KT),e(ir,lr),e(lr,GT),e(ir,XT),e(Ue,YT),w(Kn,Ue,null),e(Ue,ZT),e(Ue,ct),w(dr,ct,null),e(ct,e1),e(ct,Go),e(Go,t1),e(Go,nd),e(nd,o1),e(Go,n1),e(Go,ep),e(ep,s1),e(Go,a1),e(ct,r1),w(Gn,ct,null),e(ct,i1),e(ct,tp),e(tp,l1),e(ct,d1),w(cr,ct,null),m(o,ou,f),m(o,Xo,f),e(Xo,Xn),e(Xn,op),w(pr,op,null),e(Xo,c1),e(Xo,np),e(np,p1),m(o,nu,f),m(o,je,f),w(hr,je,null),e(je,h1),e(je,sp),e(sp,m1),e(je,u1),e(je,ap),e(ap,f1),e(je,g1),e(je,mr),e(mr,_1),e(mr,sd),e(sd,v1),e(mr,k1),e(je,T1),e(je,ur),e(ur,E1),e(ur,fr),e(fr,w1),e(ur,b1),e(je,y1),w(Yn,je,null),e(je,F1),e(je,pt),w(gr,pt,null),e(pt,$1),e(pt,Yo),e(Yo,M1),e(Yo,ad),e(ad,z1),e(Yo,x1),e(Yo,rp),e(rp,q1),e(Yo,P1),e(pt,C1),w(Zn,pt,null),e(pt,j1),e(pt,ip),e(ip,A1),e(pt,L1),w(_r,pt,null),m(o,su,f),m(o,Zo,f),e(Zo,es),e(es,lp),w(vr,lp,null),e(Zo,I1),e(Zo,dp),e(dp,N1),m(o,au,f),m(o,Ae,f),w(kr,Ae,null),e(Ae,D1),e(Ae,cp),e(cp,O1),e(Ae,S1),e(Ae,pp),e(pp,W1),e(Ae,B1),e(Ae,Tr),e(Tr,R1),e(Tr,rd),e(rd,H1),e(Tr,U1),e(Ae,Q1),e(Ae,Er),e(Er,V1),e(Er,wr),e(wr,J1),e(Er,K1),e(Ae,G1),w(ts,Ae,null),e(Ae,X1),e(Ae,ht),w(br,ht,null),e(ht,Y1),e(ht,en),e(en,Z1),e(en,id),e(id,eE),e(en,tE),e(en,hp),e(hp,oE),e(en,nE),e(ht,sE),w(os,ht,null),e(ht,aE),e(ht,mp),e(mp,rE),e(ht,iE),w(yr,ht,null),m(o,ru,f),m(o,tn,f),e(tn,ns),e(ns,up),w(Fr,up,null),e(tn,lE),e(tn,fp),e(fp,dE),m(o,iu,f),m(o,Qe,f),w($r,Qe,null),e(Qe,cE),e(Qe,gp),e(gp,pE),e(Qe,hE),e(Qe,Mr),e(Mr,mE),e(Mr,ld),e(ld,uE),e(Mr,fE),e(Qe,gE),e(Qe,zr),e(zr,_E),e(zr,xr),e(xr,vE),e(zr,kE),e(Qe,TE),w(ss,Qe,null),e(Qe,EE),e(Qe,mt),w(qr,mt,null),e(mt,wE),e(mt,on),e(on,bE),e(on,dd),e(dd,yE),e(on,FE),e(on,_p),e(_p,$E),e(on,ME),e(mt,zE),w(as,mt,null),e(mt,xE),e(mt,vp),e(vp,qE),e(mt,PE),w(Pr,mt,null),m(o,lu,f),m(o,nn,f),e(nn,rs),e(rs,kp),w(Cr,kp,null),e(nn,CE),e(nn,Tp),e(Tp,jE),m(o,du,f),m(o,Ve,f),w(jr,Ve,null),e(Ve,AE),e(Ve,Ep),e(Ep,LE),e(Ve,IE),e(Ve,Ar),e(Ar,NE),e(Ar,cd),e(cd,DE),e(Ar,OE),e(Ve,SE),e(Ve,Lr),e(Lr,WE),e(Lr,Ir),e(Ir,BE),e(Lr,RE),e(Ve,HE),w(is,Ve,null),e(Ve,UE),e(Ve,ut),w(Nr,ut,null),e(ut,QE),e(ut,sn),e(sn,VE),e(sn,pd),e(pd,JE),e(sn,KE),e(sn,wp),e(wp,GE),e(sn,XE),e(ut,YE),w(ls,ut,null),e(ut,ZE),e(ut,bp),e(bp,ew),e(ut,tw),w(Dr,ut,null),m(o,cu,f),m(o,an,f),e(an,ds),e(ds,yp),w(Or,yp,null),e(an,ow),e(an,Fp),e(Fp,nw),m(o,pu,f),m(o,Le,f),w(Sr,Le,null),e(Le,sw),e(Le,$p),e($p,aw),e(Le,rw),e(Le,Mp),e(Mp,iw),e(Le,lw),e(Le,Wr),e(Wr,dw),e(Wr,hd),e(hd,cw),e(Wr,pw),e(Le,hw),e(Le,Br),e(Br,mw),e(Br,Rr),e(Rr,uw),e(Br,fw),e(Le,gw),w(cs,Le,null),e(Le,_w),e(Le,ft),w(Hr,ft,null),e(ft,vw),e(ft,rn),e(rn,kw),e(rn,md),e(md,Tw),e(rn,Ew),e(rn,zp),e(zp,ww),e(rn,bw),e(ft,yw),w(ps,ft,null),e(ft,Fw),e(ft,xp),e(xp,$w),e(ft,Mw),w(Ur,ft,null),m(o,hu,f),m(o,ln,f),e(ln,hs),e(hs,qp),w(Qr,qp,null),e(ln,zw),e(ln,Pp),e(Pp,xw),m(o,mu,f),m(o,Je,f),w(Vr,Je,null),e(Je,qw),e(Je,dn),e(dn,Pw),e(dn,Cp),e(Cp,Cw),e(dn,jw),e(dn,jp),e(jp,Aw),e(dn,Lw),e(Je,Iw),e(Je,Jr),e(Jr,Nw),e(Jr,ud),e(ud,Dw),e(Jr,Ow),e(Je,Sw),e(Je,Kr),e(Kr,Ww),e(Kr,Gr),e(Gr,Bw),e(Kr,Rw),e(Je,Hw),w(ms,Je,null),e(Je,Uw),e(Je,gt),w(Xr,gt,null),e(gt,Qw),e(gt,cn),e(cn,Vw),e(cn,fd),e(fd,Jw),e(cn,Kw),e(cn,Ap),e(Ap,Gw),e(cn,Xw),e(gt,Yw),w(us,gt,null),e(gt,Zw),e(gt,Lp),e(Lp,eb),e(gt,tb),w(Yr,gt,null),m(o,uu,f),m(o,pn,f),e(pn,fs),e(fs,Ip),w(Zr,Ip,null),e(pn,ob),e(pn,Np),e(Np,nb),m(o,fu,f),m(o,Ie,f),w(ei,Ie,null),e(Ie,sb),e(Ie,Dp),e(Dp,ab),e(Ie,rb),e(Ie,ti),e(ti,ib),e(ti,gd),e(gd,lb),e(ti,db),e(Ie,cb),e(Ie,oi),e(oi,pb),e(oi,ni),e(ni,hb),e(oi,mb),e(Ie,ub),e(Ie,Op),e(Op,fb),e(Ie,gb),e(Ie,Ht),e(Ht,Sp),e(Sp,si),e(si,_b),e(Ht,vb),e(Ht,Wp),e(Wp,ai),e(ai,kb),e(Ht,Tb),e(Ht,Bp),e(Bp,ri),e(ri,Eb),e(Ht,wb),e(Ht,Rp),e(Rp,ii),e(ii,bb),e(Ie,yb),e(Ie,_t),w(li,_t,null),e(_t,Fb),e(_t,hn),e(hn,$b),e(hn,Hp),e(Hp,Mb),e(hn,zb),e(hn,Up),e(Up,xb),e(hn,qb),e(_t,Pb),w(gs,_t,null),e(_t,Cb),e(_t,Qp),e(Qp,jb),e(_t,Ab),w(di,_t,null),m(o,gu,f),m(o,mn,f),e(mn,_s),e(_s,Vp),w(ci,Vp,null),e(mn,Lb),e(mn,Jp),e(Jp,Ib),m(o,_u,f),m(o,Pe,f),w(pi,Pe,null),e(Pe,Nb),e(Pe,Kp),e(Kp,Db),e(Pe,Ob),e(Pe,Gp),e(Gp,Sb),e(Pe,Wb),e(Pe,hi),e(hi,Bb),e(hi,_d),e(_d,Rb),e(hi,Hb),e(Pe,Ub),e(Pe,mi),e(mi,Qb),e(mi,ui),e(ui,Vb),e(mi,Jb),e(Pe,Kb),e(Pe,Xp),e(Xp,Gb),e(Pe,Xb),e(Pe,Ut),e(Ut,Yp),e(Yp,fi),e(fi,Yb),e(Ut,Zb),e(Ut,Zp),e(Zp,gi),e(gi,ey),e(Ut,ty),e(Ut,eh),e(eh,_i),e(_i,oy),e(Ut,ny),e(Ut,th),e(th,vi),e(vi,sy),e(Pe,ay),e(Pe,vt),w(ki,vt,null),e(vt,ry),e(vt,un),e(un,iy),e(un,oh),e(oh,ly),e(un,dy),e(un,nh),e(nh,cy),e(un,py),e(vt,hy),w(vs,vt,null),e(vt,my),e(vt,sh),e(sh,uy),e(vt,fy),w(Ti,vt,null),m(o,vu,f),m(o,fn,f),e(fn,ks),e(ks,ah),w(Ei,ah,null),e(fn,gy),e(fn,rh),e(rh,_y),m(o,ku,f),m(o,Ne,f),w(wi,Ne,null),e(Ne,vy),e(Ne,bi),e(bi,ky),e(bi,ih),e(ih,Ty),e(bi,Ey),e(Ne,wy),e(Ne,yi),e(yi,by),e(yi,vd),e(vd,yy),e(yi,Fy),e(Ne,$y),e(Ne,Fi),e(Fi,My),e(Fi,$i),e($i,zy),e(Fi,xy),e(Ne,qy),e(Ne,lh),e(lh,Py),e(Ne,Cy),e(Ne,Qt),e(Qt,dh),e(dh,Mi),e(Mi,jy),e(Qt,Ay),e(Qt,ch),e(ch,zi),e(zi,Ly),e(Qt,Iy),e(Qt,ph),e(ph,xi),e(xi,Ny),e(Qt,Dy),e(Qt,hh),e(hh,qi),e(qi,Oy),e(Ne,Sy),e(Ne,kt),w(Pi,kt,null),e(kt,Wy),e(kt,gn),e(gn,By),e(gn,mh),e(mh,Ry),e(gn,Hy),e(gn,uh),e(uh,Uy),e(gn,Qy),e(kt,Vy),w(Ts,kt,null),e(kt,Jy),e(kt,fh),e(fh,Ky),e(kt,Gy),w(Ci,kt,null),m(o,Tu,f),m(o,_n,f),e(_n,Es),e(Es,gh),w(ji,gh,null),e(_n,Xy),e(_n,_h),e(_h,Yy),m(o,Eu,f),m(o,De,f),w(Ai,De,null),e(De,Zy),e(De,vh),e(vh,eF),e(De,tF),e(De,Li),e(Li,oF),e(Li,kd),e(kd,nF),e(Li,sF),e(De,aF),e(De,Ii),e(Ii,rF),e(Ii,Ni),e(Ni,iF),e(Ii,lF),e(De,dF),e(De,kh),e(kh,cF),e(De,pF),e(De,Vt),e(Vt,Th),e(Th,Di),e(Di,hF),e(Vt,mF),e(Vt,Eh),e(Eh,Oi),e(Oi,uF),e(Vt,fF),e(Vt,wh),e(wh,Si),e(Si,gF),e(Vt,_F),e(Vt,bh),e(bh,Wi),e(Wi,vF),e(De,kF),e(De,Tt),w(Bi,Tt,null),e(Tt,TF),e(Tt,vn),e(vn,EF),e(vn,yh),e(yh,wF),e(vn,bF),e(vn,Fh),e(Fh,yF),e(vn,FF),e(Tt,$F),w(ws,Tt,null),e(Tt,MF),e(Tt,$h),e($h,zF),e(Tt,xF),w(Ri,Tt,null),m(o,wu,f),m(o,kn,f),e(kn,bs),e(bs,Mh),w(Hi,Mh,null),e(kn,qF),e(kn,zh),e(zh,PF),m(o,bu,f),m(o,Oe,f),w(Ui,Oe,null),e(Oe,CF),e(Oe,xh),e(xh,jF),e(Oe,AF),e(Oe,Qi),e(Qi,LF),e(Qi,Td),e(Td,IF),e(Qi,NF),e(Oe,DF),e(Oe,Vi),e(Vi,OF),e(Vi,Ji),e(Ji,SF),e(Vi,WF),e(Oe,BF),e(Oe,qh),e(qh,RF),e(Oe,HF),e(Oe,Jt),e(Jt,Ph),e(Ph,Ki),e(Ki,UF),e(Jt,QF),e(Jt,Ch),e(Ch,Gi),e(Gi,VF),e(Jt,JF),e(Jt,jh),e(jh,Xi),e(Xi,KF),e(Jt,GF),e(Jt,Ah),e(Ah,Yi),e(Yi,XF),e(Oe,YF),e(Oe,Et),w(Zi,Et,null),e(Et,ZF),e(Et,Tn),e(Tn,e$),e(Tn,Lh),e(Lh,t$),e(Tn,o$),e(Tn,Ih),e(Ih,n$),e(Tn,s$),e(Et,a$),w(ys,Et,null),e(Et,r$),e(Et,Nh),e(Nh,i$),e(Et,l$),w(el,Et,null),m(o,yu,f),m(o,En,f),e(En,Fs),e(Fs,Dh),w(tl,Dh,null),e(En,d$),e(En,Oh),e(Oh,c$),m(o,Fu,f),m(o,Ce,f),w(ol,Ce,null),e(Ce,p$),e(Ce,Sh),e(Sh,h$),e(Ce,m$),e(Ce,Wh),e(Wh,u$),e(Ce,f$),e(Ce,nl),e(nl,g$),e(nl,Ed),e(Ed,_$),e(nl,v$),e(Ce,k$),e(Ce,sl),e(sl,T$),e(sl,al),e(al,E$),e(sl,w$),e(Ce,b$),e(Ce,Bh),e(Bh,y$),e(Ce,F$),e(Ce,Kt),e(Kt,Rh),e(Rh,rl),e(rl,$$),e(Kt,M$),e(Kt,Hh),e(Hh,il),e(il,z$),e(Kt,x$),e(Kt,Uh),e(Uh,ll),e(ll,q$),e(Kt,P$),e(Kt,Qh),e(Qh,dl),e(dl,C$),e(Ce,j$),e(Ce,wt),w(cl,wt,null),e(wt,A$),e(wt,wn),e(wn,L$),e(wn,Vh),e(Vh,I$),e(wn,N$),e(wn,Jh),e(Jh,D$),e(wn,O$),e(wt,S$),w($s,wt,null),e(wt,W$),e(wt,Kh),e(Kh,B$),e(wt,R$),w(pl,wt,null),m(o,$u,f),m(o,bn,f),e(bn,Ms),e(Ms,Gh),w(hl,Gh,null),e(bn,H$),e(bn,Xh),e(Xh,U$),m(o,Mu,f),m(o,Se,f),w(ml,Se,null),e(Se,Q$),e(Se,yn),e(yn,V$),e(yn,Yh),e(Yh,J$),e(yn,K$),e(yn,Zh),e(Zh,G$),e(yn,X$),e(Se,Y$),e(Se,ul),e(ul,Z$),e(ul,wd),e(wd,e2),e(ul,t2),e(Se,o2),e(Se,fl),e(fl,n2),e(fl,gl),e(gl,s2),e(fl,a2),e(Se,r2),e(Se,em),e(em,i2),e(Se,l2),e(Se,Gt),e(Gt,tm),e(tm,_l),e(_l,d2),e(Gt,c2),e(Gt,om),e(om,vl),e(vl,p2),e(Gt,h2),e(Gt,nm),e(nm,kl),e(kl,m2),e(Gt,u2),e(Gt,sm),e(sm,Tl),e(Tl,f2),e(Se,g2),e(Se,bt),w(El,bt,null),e(bt,_2),e(bt,Fn),e(Fn,v2),e(Fn,am),e(am,k2),e(Fn,T2),e(Fn,rm),e(rm,E2),e(Fn,w2),e(bt,b2),w(zs,bt,null),e(bt,y2),e(bt,im),e(im,F2),e(bt,$2),w(wl,bt,null),zu=!0},p(o,[f]){const bl={};f&2&&(bl.$$scope={dirty:f,ctx:o}),jn.$set(bl);const lm={};f&2&&(lm.$$scope={dirty:f,ctx:o}),Ln.$set(lm);const dm={};f&2&&(dm.$$scope={dirty:f,ctx:o}),Nn.$set(dm);const cm={};f&2&&(cm.$$scope={dirty:f,ctx:o}),On.$set(cm);const yl={};f&2&&(yl.$$scope={dirty:f,ctx:o}),Wn.$set(yl);const pm={};f&2&&(pm.$$scope={dirty:f,ctx:o}),Rn.$set(pm);const hm={};f&2&&(hm.$$scope={dirty:f,ctx:o}),Un.$set(hm);const mm={};f&2&&(mm.$$scope={dirty:f,ctx:o}),Vn.$set(mm);const Fl={};f&2&&(Fl.$$scope={dirty:f,ctx:o}),Kn.$set(Fl);const um={};f&2&&(um.$$scope={dirty:f,ctx:o}),Gn.$set(um);const fm={};f&2&&(fm.$$scope={dirty:f,ctx:o}),Yn.$set(fm);const gm={};f&2&&(gm.$$scope={dirty:f,ctx:o}),Zn.$set(gm);const _m={};f&2&&(_m.$$scope={dirty:f,ctx:o}),ts.$set(_m);const vm={};f&2&&(vm.$$scope={dirty:f,ctx:o}),os.$set(vm);const $l={};f&2&&($l.$$scope={dirty:f,ctx:o}),ss.$set($l);const km={};f&2&&(km.$$scope={dirty:f,ctx:o}),as.$set(km);const Xt={};f&2&&(Xt.$$scope={dirty:f,ctx:o}),is.$set(Xt);const Tm={};f&2&&(Tm.$$scope={dirty:f,ctx:o}),ls.$set(Tm);const Em={};f&2&&(Em.$$scope={dirty:f,ctx:o}),cs.$set(Em);const wm={};f&2&&(wm.$$scope={dirty:f,ctx:o}),ps.$set(wm);const $n={};f&2&&($n.$$scope={dirty:f,ctx:o}),ms.$set($n);const bm={};f&2&&(bm.$$scope={dirty:f,ctx:o}),us.$set(bm);const ym={};f&2&&(ym.$$scope={dirty:f,ctx:o}),gs.$set(ym);const Ml={};f&2&&(Ml.$$scope={dirty:f,ctx:o}),vs.$set(Ml);const Fm={};f&2&&(Fm.$$scope={dirty:f,ctx:o}),Ts.$set(Fm);const $m={};f&2&&($m.$$scope={dirty:f,ctx:o}),ws.$set($m);const Mm={};f&2&&(Mm.$$scope={dirty:f,ctx:o}),ys.$set(Mm);const Lt={};f&2&&(Lt.$$scope={dirty:f,ctx:o}),$s.$set(Lt);const Yt={};f&2&&(Yt.$$scope={dirty:f,ctx:o}),zs.$set(Yt)},i(o){zu||(b(_.$$.fragment,o),b(oe.$$.fragment,o),b(Ds.$$.fragment,o),b(Os.$$.fragment,o),b(Ws.$$.fragment,o),b(Bs.$$.fragment,o),b(Rs.$$.fragment,o),b(Us.$$.fragment,o),b(Qs.$$.fragment,o),b(Ks.$$.fragment,o),b(Gs.$$.fragment,o),b(Ys.$$.fragment,o),b(ea.$$.fragment,o),b(ta.$$.fragment,o),b(aa.$$.fragment,o),b(jn.$$.fragment,o),b(ra.$$.fragment,o),b(ia.$$.fragment,o),b(la.$$.fragment,o),b(ha.$$.fragment,o),b(Ln.$$.fragment,o),b(ma.$$.fragment,o),b(ua.$$.fragment,o),b(fa.$$.fragment,o),b(Ta.$$.fragment,o),b(Nn.$$.fragment,o),b(Ea.$$.fragment,o),b(wa.$$.fragment,o),b(ba.$$.fragment,o),b(Ma.$$.fragment,o),b(On.$$.fragment,o),b(za.$$.fragment,o),b(xa.$$.fragment,o),b(qa.$$.fragment,o),b(Aa.$$.fragment,o),b(Wn.$$.fragment,o),b(La.$$.fragment,o),b(Ia.$$.fragment,o),b(Na.$$.fragment,o),b(Da.$$.fragment,o),b(Ba.$$.fragment,o),b(Rn.$$.fragment,o),b(Ra.$$.fragment,o),b(Ha.$$.fragment,o),b(Ua.$$.fragment,o),b(Ka.$$.fragment,o),b(Un.$$.fragment,o),b(Ga.$$.fragment,o),b(Xa.$$.fragment,o),b(Ya.$$.fragment,o),b(or.$$.fragment,o),b(Vn.$$.fragment,o),b(nr.$$.fragment,o),b(sr.$$.fragment,o),b(ar.$$.fragment,o),b(Kn.$$.fragment,o),b(dr.$$.fragment,o),b(Gn.$$.fragment,o),b(cr.$$.fragment,o),b(pr.$$.fragment,o),b(hr.$$.fragment,o),b(Yn.$$.fragment,o),b(gr.$$.fragment,o),b(Zn.$$.fragment,o),b(_r.$$.fragment,o),b(vr.$$.fragment,o),b(kr.$$.fragment,o),b(ts.$$.fragment,o),b(br.$$.fragment,o),b(os.$$.fragment,o),b(yr.$$.fragment,o),b(Fr.$$.fragment,o),b($r.$$.fragment,o),b(ss.$$.fragment,o),b(qr.$$.fragment,o),b(as.$$.fragment,o),b(Pr.$$.fragment,o),b(Cr.$$.fragment,o),b(jr.$$.fragment,o),b(is.$$.fragment,o),b(Nr.$$.fragment,o),b(ls.$$.fragment,o),b(Dr.$$.fragment,o),b(Or.$$.fragment,o),b(Sr.$$.fragment,o),b(cs.$$.fragment,o),b(Hr.$$.fragment,o),b(ps.$$.fragment,o),b(Ur.$$.fragment,o),b(Qr.$$.fragment,o),b(Vr.$$.fragment,o),b(ms.$$.fragment,o),b(Xr.$$.fragment,o),b(us.$$.fragment,o),b(Yr.$$.fragment,o),b(Zr.$$.fragment,o),b(ei.$$.fragment,o),b(li.$$.fragment,o),b(gs.$$.fragment,o),b(di.$$.fragment,o),b(ci.$$.fragment,o),b(pi.$$.fragment,o),b(ki.$$.fragment,o),b(vs.$$.fragment,o),b(Ti.$$.fragment,o),b(Ei.$$.fragment,o),b(wi.$$.fragment,o),b(Pi.$$.fragment,o),b(Ts.$$.fragment,o),b(Ci.$$.fragment,o),b(ji.$$.fragment,o),b(Ai.$$.fragment,o),b(Bi.$$.fragment,o),b(ws.$$.fragment,o),b(Ri.$$.fragment,o),b(Hi.$$.fragment,o),b(Ui.$$.fragment,o),b(Zi.$$.fragment,o),b(ys.$$.fragment,o),b(el.$$.fragment,o),b(tl.$$.fragment,o),b(ol.$$.fragment,o),b(cl.$$.fragment,o),b($s.$$.fragment,o),b(pl.$$.fragment,o),b(hl.$$.fragment,o),b(ml.$$.fragment,o),b(El.$$.fragment,o),b(zs.$$.fragment,o),b(wl.$$.fragment,o),zu=!0)},o(o){y(_.$$.fragment,o),y(oe.$$.fragment,o),y(Ds.$$.fragment,o),y(Os.$$.fragment,o),y(Ws.$$.fragment,o),y(Bs.$$.fragment,o),y(Rs.$$.fragment,o),y(Us.$$.fragment,o),y(Qs.$$.fragment,o),y(Ks.$$.fragment,o),y(Gs.$$.fragment,o),y(Ys.$$.fragment,o),y(ea.$$.fragment,o),y(ta.$$.fragment,o),y(aa.$$.fragment,o),y(jn.$$.fragment,o),y(ra.$$.fragment,o),y(ia.$$.fragment,o),y(la.$$.fragment,o),y(ha.$$.fragment,o),y(Ln.$$.fragment,o),y(ma.$$.fragment,o),y(ua.$$.fragment,o),y(fa.$$.fragment,o),y(Ta.$$.fragment,o),y(Nn.$$.fragment,o),y(Ea.$$.fragment,o),y(wa.$$.fragment,o),y(ba.$$.fragment,o),y(Ma.$$.fragment,o),y(On.$$.fragment,o),y(za.$$.fragment,o),y(xa.$$.fragment,o),y(qa.$$.fragment,o),y(Aa.$$.fragment,o),y(Wn.$$.fragment,o),y(La.$$.fragment,o),y(Ia.$$.fragment,o),y(Na.$$.fragment,o),y(Da.$$.fragment,o),y(Ba.$$.fragment,o),y(Rn.$$.fragment,o),y(Ra.$$.fragment,o),y(Ha.$$.fragment,o),y(Ua.$$.fragment,o),y(Ka.$$.fragment,o),y(Un.$$.fragment,o),y(Ga.$$.fragment,o),y(Xa.$$.fragment,o),y(Ya.$$.fragment,o),y(or.$$.fragment,o),y(Vn.$$.fragment,o),y(nr.$$.fragment,o),y(sr.$$.fragment,o),y(ar.$$.fragment,o),y(Kn.$$.fragment,o),y(dr.$$.fragment,o),y(Gn.$$.fragment,o),y(cr.$$.fragment,o),y(pr.$$.fragment,o),y(hr.$$.fragment,o),y(Yn.$$.fragment,o),y(gr.$$.fragment,o),y(Zn.$$.fragment,o),y(_r.$$.fragment,o),y(vr.$$.fragment,o),y(kr.$$.fragment,o),y(ts.$$.fragment,o),y(br.$$.fragment,o),y(os.$$.fragment,o),y(yr.$$.fragment,o),y(Fr.$$.fragment,o),y($r.$$.fragment,o),y(ss.$$.fragment,o),y(qr.$$.fragment,o),y(as.$$.fragment,o),y(Pr.$$.fragment,o),y(Cr.$$.fragment,o),y(jr.$$.fragment,o),y(is.$$.fragment,o),y(Nr.$$.fragment,o),y(ls.$$.fragment,o),y(Dr.$$.fragment,o),y(Or.$$.fragment,o),y(Sr.$$.fragment,o),y(cs.$$.fragment,o),y(Hr.$$.fragment,o),y(ps.$$.fragment,o),y(Ur.$$.fragment,o),y(Qr.$$.fragment,o),y(Vr.$$.fragment,o),y(ms.$$.fragment,o),y(Xr.$$.fragment,o),y(us.$$.fragment,o),y(Yr.$$.fragment,o),y(Zr.$$.fragment,o),y(ei.$$.fragment,o),y(li.$$.fragment,o),y(gs.$$.fragment,o),y(di.$$.fragment,o),y(ci.$$.fragment,o),y(pi.$$.fragment,o),y(ki.$$.fragment,o),y(vs.$$.fragment,o),y(Ti.$$.fragment,o),y(Ei.$$.fragment,o),y(wi.$$.fragment,o),y(Pi.$$.fragment,o),y(Ts.$$.fragment,o),y(Ci.$$.fragment,o),y(ji.$$.fragment,o),y(Ai.$$.fragment,o),y(Bi.$$.fragment,o),y(ws.$$.fragment,o),y(Ri.$$.fragment,o),y(Hi.$$.fragment,o),y(Ui.$$.fragment,o),y(Zi.$$.fragment,o),y(ys.$$.fragment,o),y(el.$$.fragment,o),y(tl.$$.fragment,o),y(ol.$$.fragment,o),y(cl.$$.fragment,o),y($s.$$.fragment,o),y(pl.$$.fragment,o),y(hl.$$.fragment,o),y(ml.$$.fragment,o),y(El.$$.fragment,o),y(zs.$$.fragment,o),y(wl.$$.fragment,o),zu=!1},d(o){t(p),o&&t($),o&&t(g),F(_),o&&t(K),o&&t(x),F(oe),o&&t(le),o&&t(J),o&&t(C),o&&t(ae),o&&t(de),o&&t(re),o&&t(ce),o&&t(P),o&&t(B),o&&t(te),o&&t(ye),o&&t(ve),o&&t(Fe),o&&t(Z),F(Ds),o&&t(qm),o&&t(Xe),F(Os),F(Ws),o&&t(Pm),o&&t(Mo),F(Bs),o&&t(Cm),o&&t(jt),F(Rs),o&&t(jm),o&&t(zo),F(Us),o&&t(Am),o&&t(At),F(Qs),o&&t(Lm),o&&t(xo),F(Ks),o&&t(Im),o&&t(qo),F(Gs),o&&t(Nm),o&&t(Po),F(Ys),o&&t(Dm),o&&t(Co),F(ea),o&&t(Om),o&&t(Ye),F(ta),F(aa),F(jn),F(ra),o&&t(Sm),o&&t(Ao),F(ia),o&&t(Wm),o&&t(Be),F(la),F(ha),F(Ln),F(ma),o&&t(Bm),o&&t(Io),F(ua),o&&t(Rm),o&&t(Ze),F(fa),F(Ta),F(Nn),F(Ea),o&&t(Hm),o&&t(Do),F(wa),o&&t(Um),o&&t(Re),F(ba),F(Ma),F(On),F(za),o&&t(Qm),o&&t(So),F(xa),o&&t(Vm),o&&t(et),F(qa),F(Aa),F(Wn),F(La),F(Ia),o&&t(Jm),o&&t(Bo),F(Na),o&&t(Km),o&&t(tt),F(Da),F(Ba),F(Rn),F(Ra),o&&t(Gm),o&&t(Ho),F(Ha),o&&t(Xm),o&&t(He),F(Ua),F(Ka),F(Un),F(Ga),o&&t(Ym),o&&t(Qo),F(Xa),o&&t(Zm),o&&t(ot),F(Ya),F(or),F(Vn),F(nr),o&&t(eu),o&&t(Ko),F(sr),o&&t(tu),o&&t(Ue),F(ar),F(Kn),F(dr),F(Gn),F(cr),o&&t(ou),o&&t(Xo),F(pr),o&&t(nu),o&&t(je),F(hr),F(Yn),F(gr),F(Zn),F(_r),o&&t(su),o&&t(Zo),F(vr),o&&t(au),o&&t(Ae),F(kr),F(ts),F(br),F(os),F(yr),o&&t(ru),o&&t(tn),F(Fr),o&&t(iu),o&&t(Qe),F($r),F(ss),F(qr),F(as),F(Pr),o&&t(lu),o&&t(nn),F(Cr),o&&t(du),o&&t(Ve),F(jr),F(is),F(Nr),F(ls),F(Dr),o&&t(cu),o&&t(an),F(Or),o&&t(pu),o&&t(Le),F(Sr),F(cs),F(Hr),F(ps),F(Ur),o&&t(hu),o&&t(ln),F(Qr),o&&t(mu),o&&t(Je),F(Vr),F(ms),F(Xr),F(us),F(Yr),o&&t(uu),o&&t(pn),F(Zr),o&&t(fu),o&&t(Ie),F(ei),F(li),F(gs),F(di),o&&t(gu),o&&t(mn),F(ci),o&&t(_u),o&&t(Pe),F(pi),F(ki),F(vs),F(Ti),o&&t(vu),o&&t(fn),F(Ei),o&&t(ku),o&&t(Ne),F(wi),F(Pi),F(Ts),F(Ci),o&&t(Tu),o&&t(_n),F(ji),o&&t(Eu),o&&t(De),F(Ai),F(Bi),F(ws),F(Ri),o&&t(wu),o&&t(kn),F(Hi),o&&t(bu),o&&t(Oe),F(Ui),F(Zi),F(ys),F(el),o&&t(yu),o&&t(En),F(tl),o&&t(Fu),o&&t(Ce),F(ol),F(cl),F($s),F(pl),o&&t($u),o&&t(bn),F(hl),o&&t(Mu),o&&t(Se),F(ml),F(El),F(zs),F(wl)}}}const L5={local:"electra",sections:[{local:"overview",title:"Overview"},{local:"transformers.ElectraConfig",title:"ElectraConfig"},{local:"transformers.ElectraTokenizer",title:"ElectraTokenizer"},{local:"transformers.ElectraTokenizerFast",title:"ElectraTokenizerFast"},{local:"transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput",title:"Electra specific outputs"},{local:"transformers.ElectraModel",title:"ElectraModel"},{local:"transformers.ElectraForPreTraining",title:"ElectraForPreTraining"},{local:"transformers.ElectraForCausalLM",title:"ElectraForCausalLM"},{local:"transformers.ElectraForMaskedLM",title:"ElectraForMaskedLM"},{local:"transformers.ElectraForSequenceClassification",title:"ElectraForSequenceClassification"},{local:"transformers.ElectraForMultipleChoice",title:"ElectraForMultipleChoice"},{local:"transformers.ElectraForTokenClassification",title:"ElectraForTokenClassification"},{local:"transformers.ElectraForQuestionAnswering",title:"ElectraForQuestionAnswering"},{local:"transformers.TFElectraModel",title:"TFElectraModel"},{local:"transformers.TFElectraForPreTraining",title:"TFElectraForPreTraining"},{local:"transformers.TFElectraForMaskedLM",title:"TFElectraForMaskedLM"},{local:"transformers.TFElectraForSequenceClassification",title:"TFElectraForSequenceClassification"},{local:"transformers.TFElectraForMultipleChoice",title:"TFElectraForMultipleChoice"},{local:"transformers.TFElectraForTokenClassification",title:"TFElectraForTokenClassification"},{local:"transformers.TFElectraForQuestionAnswering",title:"TFElectraForQuestionAnswering"},{local:"transformers.FlaxElectraModel",title:"FlaxElectraModel"},{local:"transformers.FlaxElectraForPreTraining",title:"FlaxElectraForPreTraining"},{local:"transformers.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 I5(j,p,$){let{fw:g}=p;return j.$$set=v=>{"fw"in v&&$(0,g=v.fw)},[g]}class R5 extends t5{constructor(p){super();o5(this,p,I5,A5,n5,{fw:0})}}export{R5 as default,L5 as metadata};
