import{S as q1,i as C1,s as x1,e as s,k as l,w as v,t as o,M as L1,c as r,d as t,m as d,a,x as b,h as n,b as p,F as e,g as m,y,q as w,o as $,B as F}from"../../chunks/vendor-4833417e.js";import{T as qe}from"../../chunks/Tip-fffd6df1.js";import{D as Y}from"../../chunks/Docstring-4f315ed9.js";import{C as je}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as ze}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function P1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function j1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function D1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function A1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function N1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function O1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function I1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function S1(V){let h,E,g,u,T,k,_,B,ue,X,M,te,N,ne,fe,O,ge,pe,J,j,se,Z,z,C,ae,U,he,ie,I,_e,me,q,ke,S,le,Te,W,ee,oe,P,re,H,ce;return{c(){h=s("p"),E=o("TF 2.0 models accepts two formats as inputs:"),g=l(),u=s("ul"),T=s("li"),k=o("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),B=s("li"),ue=o("having all inputs as a list, tuple or dict in the first positional arguments."),X=l(),M=s("p"),te=o("This second option is useful when using "),N=s("code"),ne=o("tf.keras.Model.fit"),fe=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s("code"),ge=o("model(inputs)"),pe=o("."),J=l(),j=s("p"),se=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Z=l(),z=s("ul"),C=s("li"),ae=o("a single Tensor with "),U=s("code"),he=o("input_ids"),ie=o(" only and nothing else: "),I=s("code"),_e=o("model(inputs_ids)"),me=l(),q=s("li"),ke=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=s("code"),le=o("model([input_ids, attention_mask])"),Te=o(" or "),W=s("code"),ee=o("model([input_ids, attention_mask, token_type_ids])"),oe=l(),P=s("li"),re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=s("code"),ce=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){h=r(c,"P",{});var R=a(h);E=n(R,"TF 2.0 models accepts two formats as inputs:"),R.forEach(t),g=d(c),u=r(c,"UL",{});var x=a(u);T=r(x,"LI",{});var be=a(T);k=n(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),_=d(x),B=r(x,"LI",{});var we=a(B);ue=n(we,"having all inputs as a list, tuple or dict in the first positional arguments."),we.forEach(t),x.forEach(t),X=d(c),M=r(c,"P",{});var L=a(M);te=n(L,"This second option is useful when using "),N=r(L,"CODE",{});var $e=a(N);ne=n($e,"tf.keras.Model.fit"),$e.forEach(t),fe=n(L,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=r(L,"CODE",{});var ye=a(O);ge=n(ye,"model(inputs)"),ye.forEach(t),pe=n(L,"."),L.forEach(t),J=d(c),j=r(c,"P",{});var Fe=a(j);se=n(Fe,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Fe.forEach(t),Z=d(c),z=r(c,"UL",{});var D=a(z);C=r(D,"LI",{});var Q=a(C);ae=n(Q,"a single Tensor with "),U=r(Q,"CODE",{});var ve=a(U);he=n(ve,"input_ids"),ve.forEach(t),ie=n(Q," only and nothing else: "),I=r(Q,"CODE",{});var Re=a(I);_e=n(Re,"model(inputs_ids)"),Re.forEach(t),Q.forEach(t),me=d(D),q=r(D,"LI",{});var A=a(q);ke=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=r(A,"CODE",{});var Ee=a(S);le=n(Ee,"model([input_ids, attention_mask])"),Ee.forEach(t),Te=n(A," or "),W=r(A,"CODE",{});var Be=a(W);ee=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),A.forEach(t),oe=d(D),P=r(D,"LI",{});var de=a(P);re=n(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=r(de,"CODE",{});var Me=a(H);ce=n(Me,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Me.forEach(t),de.forEach(t),D.forEach(t)},m(c,R){m(c,h,R),e(h,E),m(c,g,R),m(c,u,R),e(u,T),e(T,k),e(u,_),e(u,B),e(B,ue),m(c,X,R),m(c,M,R),e(M,te),e(M,N),e(N,ne),e(M,fe),e(M,O),e(O,ge),e(M,pe),m(c,J,R),m(c,j,R),e(j,se),m(c,Z,R),m(c,z,R),e(z,C),e(C,ae),e(C,U),e(U,he),e(C,ie),e(C,I),e(I,_e),e(z,me),e(z,q),e(q,ke),e(q,S),e(S,le),e(q,Te),e(q,W),e(W,ee),e(z,oe),e(z,P),e(P,re),e(P,H),e(H,ce)},d(c){c&&t(h),c&&t(g),c&&t(u),c&&t(X),c&&t(M),c&&t(J),c&&t(j),c&&t(Z),c&&t(z)}}}function W1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function U1(V){let h,E,g,u,T,k,_,B,ue,X,M,te,N,ne,fe,O,ge,pe,J,j,se,Z,z,C,ae,U,he,ie,I,_e,me,q,ke,S,le,Te,W,ee,oe,P,re,H,ce;return{c(){h=s("p"),E=o("TF 2.0 models accepts two formats as inputs:"),g=l(),u=s("ul"),T=s("li"),k=o("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),B=s("li"),ue=o("having all inputs as a list, tuple or dict in the first positional arguments."),X=l(),M=s("p"),te=o("This second option is useful when using "),N=s("code"),ne=o("tf.keras.Model.fit"),fe=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s("code"),ge=o("model(inputs)"),pe=o("."),J=l(),j=s("p"),se=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Z=l(),z=s("ul"),C=s("li"),ae=o("a single Tensor with "),U=s("code"),he=o("input_ids"),ie=o(" only and nothing else: "),I=s("code"),_e=o("model(inputs_ids)"),me=l(),q=s("li"),ke=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=s("code"),le=o("model([input_ids, attention_mask])"),Te=o(" or "),W=s("code"),ee=o("model([input_ids, attention_mask, token_type_ids])"),oe=l(),P=s("li"),re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=s("code"),ce=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){h=r(c,"P",{});var R=a(h);E=n(R,"TF 2.0 models accepts two formats as inputs:"),R.forEach(t),g=d(c),u=r(c,"UL",{});var x=a(u);T=r(x,"LI",{});var be=a(T);k=n(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),_=d(x),B=r(x,"LI",{});var we=a(B);ue=n(we,"having all inputs as a list, tuple or dict in the first positional arguments."),we.forEach(t),x.forEach(t),X=d(c),M=r(c,"P",{});var L=a(M);te=n(L,"This second option is useful when using "),N=r(L,"CODE",{});var $e=a(N);ne=n($e,"tf.keras.Model.fit"),$e.forEach(t),fe=n(L,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=r(L,"CODE",{});var ye=a(O);ge=n(ye,"model(inputs)"),ye.forEach(t),pe=n(L,"."),L.forEach(t),J=d(c),j=r(c,"P",{});var Fe=a(j);se=n(Fe,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Fe.forEach(t),Z=d(c),z=r(c,"UL",{});var D=a(z);C=r(D,"LI",{});var Q=a(C);ae=n(Q,"a single Tensor with "),U=r(Q,"CODE",{});var ve=a(U);he=n(ve,"input_ids"),ve.forEach(t),ie=n(Q," only and nothing else: "),I=r(Q,"CODE",{});var Re=a(I);_e=n(Re,"model(inputs_ids)"),Re.forEach(t),Q.forEach(t),me=d(D),q=r(D,"LI",{});var A=a(q);ke=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=r(A,"CODE",{});var Ee=a(S);le=n(Ee,"model([input_ids, attention_mask])"),Ee.forEach(t),Te=n(A," or "),W=r(A,"CODE",{});var Be=a(W);ee=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),A.forEach(t),oe=d(D),P=r(D,"LI",{});var de=a(P);re=n(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=r(de,"CODE",{});var Me=a(H);ce=n(Me,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Me.forEach(t),de.forEach(t),D.forEach(t)},m(c,R){m(c,h,R),e(h,E),m(c,g,R),m(c,u,R),e(u,T),e(T,k),e(u,_),e(u,B),e(B,ue),m(c,X,R),m(c,M,R),e(M,te),e(M,N),e(N,ne),e(M,fe),e(M,O),e(O,ge),e(M,pe),m(c,J,R),m(c,j,R),e(j,se),m(c,Z,R),m(c,z,R),e(z,C),e(C,ae),e(C,U),e(U,he),e(C,ie),e(C,I),e(I,_e),e(z,me),e(z,q),e(q,ke),e(q,S),e(S,le),e(q,Te),e(q,W),e(W,ee),e(z,oe),e(z,P),e(P,re),e(P,H),e(H,ce)},d(c){c&&t(h),c&&t(g),c&&t(u),c&&t(X),c&&t(M),c&&t(J),c&&t(j),c&&t(Z),c&&t(z)}}}function H1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function Q1(V){let h,E,g,u,T,k,_,B,ue,X,M,te,N,ne,fe,O,ge,pe,J,j,se,Z,z,C,ae,U,he,ie,I,_e,me,q,ke,S,le,Te,W,ee,oe,P,re,H,ce;return{c(){h=s("p"),E=o("TF 2.0 models accepts two formats as inputs:"),g=l(),u=s("ul"),T=s("li"),k=o("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),B=s("li"),ue=o("having all inputs as a list, tuple or dict in the first positional arguments."),X=l(),M=s("p"),te=o("This second option is useful when using "),N=s("code"),ne=o("tf.keras.Model.fit"),fe=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s("code"),ge=o("model(inputs)"),pe=o("."),J=l(),j=s("p"),se=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Z=l(),z=s("ul"),C=s("li"),ae=o("a single Tensor with "),U=s("code"),he=o("input_ids"),ie=o(" only and nothing else: "),I=s("code"),_e=o("model(inputs_ids)"),me=l(),q=s("li"),ke=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=s("code"),le=o("model([input_ids, attention_mask])"),Te=o(" or "),W=s("code"),ee=o("model([input_ids, attention_mask, token_type_ids])"),oe=l(),P=s("li"),re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=s("code"),ce=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){h=r(c,"P",{});var R=a(h);E=n(R,"TF 2.0 models accepts two formats as inputs:"),R.forEach(t),g=d(c),u=r(c,"UL",{});var x=a(u);T=r(x,"LI",{});var be=a(T);k=n(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),_=d(x),B=r(x,"LI",{});var we=a(B);ue=n(we,"having all inputs as a list, tuple or dict in the first positional arguments."),we.forEach(t),x.forEach(t),X=d(c),M=r(c,"P",{});var L=a(M);te=n(L,"This second option is useful when using "),N=r(L,"CODE",{});var $e=a(N);ne=n($e,"tf.keras.Model.fit"),$e.forEach(t),fe=n(L,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=r(L,"CODE",{});var ye=a(O);ge=n(ye,"model(inputs)"),ye.forEach(t),pe=n(L,"."),L.forEach(t),J=d(c),j=r(c,"P",{});var Fe=a(j);se=n(Fe,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Fe.forEach(t),Z=d(c),z=r(c,"UL",{});var D=a(z);C=r(D,"LI",{});var Q=a(C);ae=n(Q,"a single Tensor with "),U=r(Q,"CODE",{});var ve=a(U);he=n(ve,"input_ids"),ve.forEach(t),ie=n(Q," only and nothing else: "),I=r(Q,"CODE",{});var Re=a(I);_e=n(Re,"model(inputs_ids)"),Re.forEach(t),Q.forEach(t),me=d(D),q=r(D,"LI",{});var A=a(q);ke=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=r(A,"CODE",{});var Ee=a(S);le=n(Ee,"model([input_ids, attention_mask])"),Ee.forEach(t),Te=n(A," or "),W=r(A,"CODE",{});var Be=a(W);ee=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),A.forEach(t),oe=d(D),P=r(D,"LI",{});var de=a(P);re=n(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=r(de,"CODE",{});var Me=a(H);ce=n(Me,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Me.forEach(t),de.forEach(t),D.forEach(t)},m(c,R){m(c,h,R),e(h,E),m(c,g,R),m(c,u,R),e(u,T),e(T,k),e(u,_),e(u,B),e(B,ue),m(c,X,R),m(c,M,R),e(M,te),e(M,N),e(N,ne),e(M,fe),e(M,O),e(O,ge),e(M,pe),m(c,J,R),m(c,j,R),e(j,se),m(c,Z,R),m(c,z,R),e(z,C),e(C,ae),e(C,U),e(U,he),e(C,ie),e(C,I),e(I,_e),e(z,me),e(z,q),e(q,ke),e(q,S),e(S,le),e(q,Te),e(q,W),e(W,ee),e(z,oe),e(z,P),e(P,re),e(P,H),e(H,ce)},d(c){c&&t(h),c&&t(g),c&&t(u),c&&t(X),c&&t(M),c&&t(J),c&&t(j),c&&t(Z),c&&t(z)}}}function K1(V){let h,E,g,u,T,k,_,B,ue,X,M,te,N,ne,fe,O,ge,pe,J,j,se,Z,z,C,ae,U,he,ie,I,_e,me,q,ke,S,le,Te,W,ee,oe,P,re,H,ce;return{c(){h=s("p"),E=o("TF 2.0 models accepts two formats as inputs:"),g=l(),u=s("ul"),T=s("li"),k=o("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),B=s("li"),ue=o("having all inputs as a list, tuple or dict in the first positional arguments."),X=l(),M=s("p"),te=o("This second option is useful when using "),N=s("code"),ne=o("tf.keras.Model.fit"),fe=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s("code"),ge=o("model(inputs)"),pe=o("."),J=l(),j=s("p"),se=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Z=l(),z=s("ul"),C=s("li"),ae=o("a single Tensor with "),U=s("code"),he=o("input_ids"),ie=o(" only and nothing else: "),I=s("code"),_e=o("model(inputs_ids)"),me=l(),q=s("li"),ke=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=s("code"),le=o("model([input_ids, attention_mask])"),Te=o(" or "),W=s("code"),ee=o("model([input_ids, attention_mask, token_type_ids])"),oe=l(),P=s("li"),re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=s("code"),ce=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){h=r(c,"P",{});var R=a(h);E=n(R,"TF 2.0 models accepts two formats as inputs:"),R.forEach(t),g=d(c),u=r(c,"UL",{});var x=a(u);T=r(x,"LI",{});var be=a(T);k=n(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),_=d(x),B=r(x,"LI",{});var we=a(B);ue=n(we,"having all inputs as a list, tuple or dict in the first positional arguments."),we.forEach(t),x.forEach(t),X=d(c),M=r(c,"P",{});var L=a(M);te=n(L,"This second option is useful when using "),N=r(L,"CODE",{});var $e=a(N);ne=n($e,"tf.keras.Model.fit"),$e.forEach(t),fe=n(L,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=r(L,"CODE",{});var ye=a(O);ge=n(ye,"model(inputs)"),ye.forEach(t),pe=n(L,"."),L.forEach(t),J=d(c),j=r(c,"P",{});var Fe=a(j);se=n(Fe,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Fe.forEach(t),Z=d(c),z=r(c,"UL",{});var D=a(z);C=r(D,"LI",{});var Q=a(C);ae=n(Q,"a single Tensor with "),U=r(Q,"CODE",{});var ve=a(U);he=n(ve,"input_ids"),ve.forEach(t),ie=n(Q," only and nothing else: "),I=r(Q,"CODE",{});var Re=a(I);_e=n(Re,"model(inputs_ids)"),Re.forEach(t),Q.forEach(t),me=d(D),q=r(D,"LI",{});var A=a(q);ke=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=r(A,"CODE",{});var Ee=a(S);le=n(Ee,"model([input_ids, attention_mask])"),Ee.forEach(t),Te=n(A," or "),W=r(A,"CODE",{});var Be=a(W);ee=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),A.forEach(t),oe=d(D),P=r(D,"LI",{});var de=a(P);re=n(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=r(de,"CODE",{});var Me=a(H);ce=n(Me,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Me.forEach(t),de.forEach(t),D.forEach(t)},m(c,R){m(c,h,R),e(h,E),m(c,g,R),m(c,u,R),e(u,T),e(T,k),e(u,_),e(u,B),e(B,ue),m(c,X,R),m(c,M,R),e(M,te),e(M,N),e(N,ne),e(M,fe),e(M,O),e(O,ge),e(M,pe),m(c,J,R),m(c,j,R),e(j,se),m(c,Z,R),m(c,z,R),e(z,C),e(C,ae),e(C,U),e(U,he),e(C,ie),e(C,I),e(I,_e),e(z,me),e(z,q),e(q,ke),e(q,S),e(S,le),e(q,Te),e(q,W),e(W,ee),e(z,oe),e(z,P),e(P,re),e(P,H),e(H,ce)},d(c){c&&t(h),c&&t(g),c&&t(u),c&&t(X),c&&t(M),c&&t(J),c&&t(j),c&&t(Z),c&&t(z)}}}function V1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function J1(V){let h,E,g,u,T,k,_,B,ue,X,M,te,N,ne,fe,O,ge,pe,J,j,se,Z,z,C,ae,U,he,ie,I,_e,me,q,ke,S,le,Te,W,ee,oe,P,re,H,ce;return{c(){h=s("p"),E=o("TF 2.0 models accepts two formats as inputs:"),g=l(),u=s("ul"),T=s("li"),k=o("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),B=s("li"),ue=o("having all inputs as a list, tuple or dict in the first positional arguments."),X=l(),M=s("p"),te=o("This second option is useful when using "),N=s("code"),ne=o("tf.keras.Model.fit"),fe=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s("code"),ge=o("model(inputs)"),pe=o("."),J=l(),j=s("p"),se=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Z=l(),z=s("ul"),C=s("li"),ae=o("a single Tensor with "),U=s("code"),he=o("input_ids"),ie=o(" only and nothing else: "),I=s("code"),_e=o("model(inputs_ids)"),me=l(),q=s("li"),ke=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=s("code"),le=o("model([input_ids, attention_mask])"),Te=o(" or "),W=s("code"),ee=o("model([input_ids, attention_mask, token_type_ids])"),oe=l(),P=s("li"),re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=s("code"),ce=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){h=r(c,"P",{});var R=a(h);E=n(R,"TF 2.0 models accepts two formats as inputs:"),R.forEach(t),g=d(c),u=r(c,"UL",{});var x=a(u);T=r(x,"LI",{});var be=a(T);k=n(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),_=d(x),B=r(x,"LI",{});var we=a(B);ue=n(we,"having all inputs as a list, tuple or dict in the first positional arguments."),we.forEach(t),x.forEach(t),X=d(c),M=r(c,"P",{});var L=a(M);te=n(L,"This second option is useful when using "),N=r(L,"CODE",{});var $e=a(N);ne=n($e,"tf.keras.Model.fit"),$e.forEach(t),fe=n(L,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=r(L,"CODE",{});var ye=a(O);ge=n(ye,"model(inputs)"),ye.forEach(t),pe=n(L,"."),L.forEach(t),J=d(c),j=r(c,"P",{});var Fe=a(j);se=n(Fe,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Fe.forEach(t),Z=d(c),z=r(c,"UL",{});var D=a(z);C=r(D,"LI",{});var Q=a(C);ae=n(Q,"a single Tensor with "),U=r(Q,"CODE",{});var ve=a(U);he=n(ve,"input_ids"),ve.forEach(t),ie=n(Q," only and nothing else: "),I=r(Q,"CODE",{});var Re=a(I);_e=n(Re,"model(inputs_ids)"),Re.forEach(t),Q.forEach(t),me=d(D),q=r(D,"LI",{});var A=a(q);ke=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=r(A,"CODE",{});var Ee=a(S);le=n(Ee,"model([input_ids, attention_mask])"),Ee.forEach(t),Te=n(A," or "),W=r(A,"CODE",{});var Be=a(W);ee=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),A.forEach(t),oe=d(D),P=r(D,"LI",{});var de=a(P);re=n(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=r(de,"CODE",{});var Me=a(H);ce=n(Me,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Me.forEach(t),de.forEach(t),D.forEach(t)},m(c,R){m(c,h,R),e(h,E),m(c,g,R),m(c,u,R),e(u,T),e(T,k),e(u,_),e(u,B),e(B,ue),m(c,X,R),m(c,M,R),e(M,te),e(M,N),e(N,ne),e(M,fe),e(M,O),e(O,ge),e(M,pe),m(c,J,R),m(c,j,R),e(j,se),m(c,Z,R),m(c,z,R),e(z,C),e(C,ae),e(C,U),e(U,he),e(C,ie),e(C,I),e(I,_e),e(z,me),e(z,q),e(q,ke),e(q,S),e(S,le),e(q,Te),e(q,W),e(W,ee),e(z,oe),e(z,P),e(P,re),e(P,H),e(H,ce)},d(c){c&&t(h),c&&t(g),c&&t(u),c&&t(X),c&&t(M),c&&t(J),c&&t(j),c&&t(Z),c&&t(z)}}}function G1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function X1(V){let h,E,g,u,T,k,_,B,ue,X,M,te,N,ne,fe,O,ge,pe,J,j,se,Z,z,C,ae,U,he,ie,I,_e,me,q,ke,S,le,Te,W,ee,oe,P,re,H,ce;return{c(){h=s("p"),E=o("TF 2.0 models accepts two formats as inputs:"),g=l(),u=s("ul"),T=s("li"),k=o("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),B=s("li"),ue=o("having all inputs as a list, tuple or dict in the first positional arguments."),X=l(),M=s("p"),te=o("This second option is useful when using "),N=s("code"),ne=o("tf.keras.Model.fit"),fe=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s("code"),ge=o("model(inputs)"),pe=o("."),J=l(),j=s("p"),se=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Z=l(),z=s("ul"),C=s("li"),ae=o("a single Tensor with "),U=s("code"),he=o("input_ids"),ie=o(" only and nothing else: "),I=s("code"),_e=o("model(inputs_ids)"),me=l(),q=s("li"),ke=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=s("code"),le=o("model([input_ids, attention_mask])"),Te=o(" or "),W=s("code"),ee=o("model([input_ids, attention_mask, token_type_ids])"),oe=l(),P=s("li"),re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=s("code"),ce=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){h=r(c,"P",{});var R=a(h);E=n(R,"TF 2.0 models accepts two formats as inputs:"),R.forEach(t),g=d(c),u=r(c,"UL",{});var x=a(u);T=r(x,"LI",{});var be=a(T);k=n(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),_=d(x),B=r(x,"LI",{});var we=a(B);ue=n(we,"having all inputs as a list, tuple or dict in the first positional arguments."),we.forEach(t),x.forEach(t),X=d(c),M=r(c,"P",{});var L=a(M);te=n(L,"This second option is useful when using "),N=r(L,"CODE",{});var $e=a(N);ne=n($e,"tf.keras.Model.fit"),$e.forEach(t),fe=n(L,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=r(L,"CODE",{});var ye=a(O);ge=n(ye,"model(inputs)"),ye.forEach(t),pe=n(L,"."),L.forEach(t),J=d(c),j=r(c,"P",{});var Fe=a(j);se=n(Fe,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Fe.forEach(t),Z=d(c),z=r(c,"UL",{});var D=a(z);C=r(D,"LI",{});var Q=a(C);ae=n(Q,"a single Tensor with "),U=r(Q,"CODE",{});var ve=a(U);he=n(ve,"input_ids"),ve.forEach(t),ie=n(Q," only and nothing else: "),I=r(Q,"CODE",{});var Re=a(I);_e=n(Re,"model(inputs_ids)"),Re.forEach(t),Q.forEach(t),me=d(D),q=r(D,"LI",{});var A=a(q);ke=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=r(A,"CODE",{});var Ee=a(S);le=n(Ee,"model([input_ids, attention_mask])"),Ee.forEach(t),Te=n(A," or "),W=r(A,"CODE",{});var Be=a(W);ee=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),A.forEach(t),oe=d(D),P=r(D,"LI",{});var de=a(P);re=n(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=r(de,"CODE",{});var Me=a(H);ce=n(Me,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Me.forEach(t),de.forEach(t),D.forEach(t)},m(c,R){m(c,h,R),e(h,E),m(c,g,R),m(c,u,R),e(u,T),e(T,k),e(u,_),e(u,B),e(B,ue),m(c,X,R),m(c,M,R),e(M,te),e(M,N),e(N,ne),e(M,fe),e(M,O),e(O,ge),e(M,pe),m(c,J,R),m(c,j,R),e(j,se),m(c,Z,R),m(c,z,R),e(z,C),e(C,ae),e(C,U),e(U,he),e(C,ie),e(C,I),e(I,_e),e(z,me),e(z,q),e(q,ke),e(q,S),e(S,le),e(q,Te),e(q,W),e(W,ee),e(z,oe),e(z,P),e(P,re),e(P,H),e(H,ce)},d(c){c&&t(h),c&&t(g),c&&t(u),c&&t(X),c&&t(M),c&&t(J),c&&t(j),c&&t(Z),c&&t(z)}}}function Y1(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function Z1(V){let h,E,g,u,T,k,_,B,ue,X,M,te,N,ne,fe,O,ge,pe,J,j,se,Z,z,C,ae,U,he,ie,I,_e,me,q,ke,S,le,Te,W,ee,oe,P,re,H,ce;return{c(){h=s("p"),E=o("TF 2.0 models accepts two formats as inputs:"),g=l(),u=s("ul"),T=s("li"),k=o("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),B=s("li"),ue=o("having all inputs as a list, tuple or dict in the first positional arguments."),X=l(),M=s("p"),te=o("This second option is useful when using "),N=s("code"),ne=o("tf.keras.Model.fit"),fe=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s("code"),ge=o("model(inputs)"),pe=o("."),J=l(),j=s("p"),se=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Z=l(),z=s("ul"),C=s("li"),ae=o("a single Tensor with "),U=s("code"),he=o("input_ids"),ie=o(" only and nothing else: "),I=s("code"),_e=o("model(inputs_ids)"),me=l(),q=s("li"),ke=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=s("code"),le=o("model([input_ids, attention_mask])"),Te=o(" or "),W=s("code"),ee=o("model([input_ids, attention_mask, token_type_ids])"),oe=l(),P=s("li"),re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=s("code"),ce=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){h=r(c,"P",{});var R=a(h);E=n(R,"TF 2.0 models accepts two formats as inputs:"),R.forEach(t),g=d(c),u=r(c,"UL",{});var x=a(u);T=r(x,"LI",{});var be=a(T);k=n(be,"having all inputs as keyword arguments (like PyTorch models), or"),be.forEach(t),_=d(x),B=r(x,"LI",{});var we=a(B);ue=n(we,"having all inputs as a list, tuple or dict in the first positional arguments."),we.forEach(t),x.forEach(t),X=d(c),M=r(c,"P",{});var L=a(M);te=n(L,"This second option is useful when using "),N=r(L,"CODE",{});var $e=a(N);ne=n($e,"tf.keras.Model.fit"),$e.forEach(t),fe=n(L,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=r(L,"CODE",{});var ye=a(O);ge=n(ye,"model(inputs)"),ye.forEach(t),pe=n(L,"."),L.forEach(t),J=d(c),j=r(c,"P",{});var Fe=a(j);se=n(Fe,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Fe.forEach(t),Z=d(c),z=r(c,"UL",{});var D=a(z);C=r(D,"LI",{});var Q=a(C);ae=n(Q,"a single Tensor with "),U=r(Q,"CODE",{});var ve=a(U);he=n(ve,"input_ids"),ve.forEach(t),ie=n(Q," only and nothing else: "),I=r(Q,"CODE",{});var Re=a(I);_e=n(Re,"model(inputs_ids)"),Re.forEach(t),Q.forEach(t),me=d(D),q=r(D,"LI",{});var A=a(q);ke=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),S=r(A,"CODE",{});var Ee=a(S);le=n(Ee,"model([input_ids, attention_mask])"),Ee.forEach(t),Te=n(A," or "),W=r(A,"CODE",{});var Be=a(W);ee=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),A.forEach(t),oe=d(D),P=r(D,"LI",{});var de=a(P);re=n(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),H=r(de,"CODE",{});var Me=a(H);ce=n(Me,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Me.forEach(t),de.forEach(t),D.forEach(t)},m(c,R){m(c,h,R),e(h,E),m(c,g,R),m(c,u,R),e(u,T),e(T,k),e(u,_),e(u,B),e(B,ue),m(c,X,R),m(c,M,R),e(M,te),e(M,N),e(N,ne),e(M,fe),e(M,O),e(O,ge),e(M,pe),m(c,J,R),m(c,j,R),e(j,se),m(c,Z,R),m(c,z,R),e(z,C),e(C,ae),e(C,U),e(U,he),e(C,ie),e(C,I),e(I,_e),e(z,me),e(z,q),e(q,ke),e(q,S),e(S,le),e(q,Te),e(q,W),e(W,ee),e(z,oe),e(z,P),e(P,re),e(P,H),e(H,ce)},d(c){c&&t(h),c&&t(g),c&&t(u),c&&t(X),c&&t(M),c&&t(J),c&&t(j),c&&t(Z),c&&t(z)}}}function ew(V){let h,E,g,u,T;return{c(){h=s("p"),E=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),u=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){h=r(k,"P",{});var _=a(h);E=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=n(B,"Module"),B.forEach(t),T=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,h,_),e(h,E),e(h,g),e(g,u),e(h,T)},d(k){k&&t(h)}}}function tw(V){let h,E,g,u,T,k,_,B,ue,X,M,te,N,ne,fe,O,ge,pe,J,j,se,Z,z,C,ae,U,he,ie,I,_e,me,q,ke,S,le,Te,W,ee,oe,P,re,H,ce,c,R,x,be,we,L,$e,ye,Fe,D,Q,ve,Re,A,Ee,Be,de,Me,sp,rp,Pa,ap,ip,vn,lp,ja,Da,Aa,Na,dp,cp,Oa,Ia,Sa,$o,Fo,Wa,bn,pp,Ua,hp,mp,Ha,Qa,Ka,Ro,Eo,Va,yn,up,Ja,fp,Ed,Wt,Bo,Ga,wn,gp,Xa,_p,Bd,Ce,$n,kp,Fn,Tp,Rn,vp,bp,yp,En,wp,Ar,$p,Fp,Rp,Bt,Bn,Ep,Ya,Bp,Mp,Mn,Nr,zp,Za,qp,Cp,Or,xp,ei,Lp,Pp,Mo,zn,jp,qn,Dp,ti,Ap,Np,Op,ut,Cn,Ip,oi,Sp,Wp,xn,Up,Ut,Hp,ni,Qp,Kp,si,Vp,Jp,Gp,Ir,Ln,Md,Ht,zo,ri,Pn,Xp,ai,Yp,zd,De,jn,Zp,Ft,eh,ii,th,oh,Dn,nh,sh,Sr,rh,ah,ih,Mt,An,lh,li,dh,ch,Nn,Wr,ph,di,hh,mh,Ur,uh,ci,fh,gh,qo,On,_h,In,kh,pi,Th,vh,bh,ft,Sn,yh,hi,wh,$h,Wn,Fh,mi,Rh,Eh,Hr,Un,qd,Qt,Co,ui,Hn,Bh,fi,Mh,Cd,Ve,Qn,zh,Kn,qh,Vn,Ch,xh,Lh,Jn,Ph,Gn,jh,Dh,Ah,Ae,Nh,gi,Oh,Ih,_i,Sh,Wh,ki,Uh,Hh,Ti,Qh,Kh,vi,Vh,Jh,bi,Gh,Xh,Yh,Je,Xn,Zh,Kt,em,Qr,tm,om,yi,nm,sm,rm,xo,am,wi,im,lm,Yn,xd,Vt,Lo,$i,Zn,dm,Fi,cm,Ld,Rt,es,pm,Jt,hm,Ri,mm,um,ts,fm,gm,_m,Ge,os,km,Gt,Tm,Kr,vm,bm,Ei,ym,wm,$m,Po,Fm,Bi,Rm,Em,ns,Pd,Xt,jo,Mi,ss,Bm,zi,Mm,jd,Et,rs,zm,Yt,qm,qi,Cm,xm,as,Lm,Pm,jm,Xe,is,Dm,Zt,Am,Vr,Nm,Om,Ci,Im,Sm,Wm,Do,Um,xi,Hm,Qm,ls,Dd,eo,Ao,Li,ds,Km,Pi,Vm,Ad,ct,cs,Jm,ji,Gm,Xm,ps,Ym,hs,Zm,eu,tu,Pe,ms,ou,to,nu,Jr,su,ru,Di,au,iu,lu,No,du,Ai,cu,pu,us,hu,Ni,mu,uu,fs,Nd,oo,Oo,Oi,gs,fu,Ii,gu,Od,pt,_s,_u,Si,ku,Tu,ks,vu,Ts,bu,yu,wu,Ye,vs,$u,no,Fu,Gr,Ru,Eu,Wi,Bu,Mu,zu,Io,qu,Ui,Cu,xu,bs,Id,so,So,Hi,ys,Lu,Qi,Pu,Sd,ht,ws,ju,Ki,Du,Au,$s,Nu,Fs,Ou,Iu,Su,Ze,Rs,Wu,ro,Uu,Xr,Hu,Qu,Vi,Ku,Vu,Ju,Wo,Gu,Ji,Xu,Yu,Es,Wd,ao,Uo,Gi,Bs,Zu,Xi,ef,Ud,mt,Ms,tf,io,of,Yi,nf,sf,Zi,rf,af,lf,zs,df,qs,cf,pf,hf,et,Cs,mf,lo,uf,Yr,ff,gf,el,_f,kf,Tf,Ho,vf,tl,bf,yf,xs,Hd,co,Qo,ol,Ls,wf,nl,$f,Qd,Ne,Ps,Ff,sl,Rf,Ef,js,Bf,Zr,Mf,zf,qf,Ds,Cf,As,xf,Lf,Pf,Ko,jf,tt,Ns,Df,po,Af,ea,Nf,Of,rl,If,Sf,Wf,Vo,Uf,al,Hf,Qf,Os,Kd,ho,Jo,il,Is,Kf,ll,Vf,Vd,Oe,Ss,Jf,Ws,Gf,dl,Xf,Yf,Zf,Us,eg,ta,tg,og,ng,Hs,sg,Qs,rg,ag,ig,Go,lg,ot,Ks,dg,mo,cg,oa,pg,hg,cl,mg,ug,fg,Xo,gg,pl,_g,kg,Vs,Jd,uo,Yo,hl,Js,Tg,ml,vg,Gd,Ie,Gs,bg,Xs,yg,ul,wg,$g,Fg,Ys,Rg,na,Eg,Bg,Mg,Zs,zg,er,qg,Cg,xg,Zo,Lg,Qe,tr,Pg,xe,jg,fl,Dg,Ag,gl,Ng,Og,_l,Ig,Sg,kl,Wg,Ug,Tl,Hg,Qg,vl,Kg,Vg,bl,Jg,Gg,Xg,or,nr,Yg,yl,Zg,e_,t_,sr,o_,wl,n_,s_,r_,K,a_,$l,i_,l_,Fl,d_,c_,Rl,p_,h_,El,m_,u_,Bl,f_,g_,Ml,__,k_,zl,T_,v_,ql,b_,y_,Cl,w_,$_,xl,F_,R_,Ll,E_,B_,Pl,M_,z_,jl,q_,C_,Dl,x_,L_,Al,P_,j_,Nl,D_,A_,Ol,N_,O_,Il,I_,S_,Sl,W_,U_,Wl,H_,Q_,K_,Ul,V_,J_,rr,Xd,fo,en,Hl,ar,G_,Ql,X_,Yd,Se,ir,Y_,Kl,Z_,ek,lr,tk,sa,ok,nk,sk,dr,rk,cr,ak,ik,lk,tn,dk,nt,pr,ck,go,pk,ra,hk,mk,Vl,uk,fk,gk,on,_k,Jl,kk,Tk,hr,Zd,_o,nn,Gl,mr,vk,Xl,bk,ec,We,ur,yk,Yl,wk,$k,fr,Fk,aa,Rk,Ek,Bk,gr,Mk,_r,zk,qk,Ck,sn,xk,st,kr,Lk,ko,Pk,ia,jk,Dk,Zl,Ak,Nk,Ok,rn,Ik,ed,Sk,Wk,Tr,tc,To,an,td,vr,Uk,od,Hk,oc,Ue,br,Qk,nd,Kk,Vk,yr,Jk,la,Gk,Xk,Yk,wr,Zk,$r,eT,tT,oT,ln,nT,rt,Fr,sT,vo,rT,da,aT,iT,sd,lT,dT,cT,dn,pT,rd,hT,mT,Rr,nc,bo,cn,ad,Er,uT,id,fT,sc,He,Br,gT,yo,_T,ld,kT,TT,dd,vT,bT,yT,Mr,wT,ca,$T,FT,RT,zr,ET,qr,BT,MT,zT,pn,qT,at,Cr,CT,wo,xT,pa,LT,PT,cd,jT,DT,AT,hn,NT,pd,OT,IT,xr,rc;return k=new ze({}),ne=new ze({}),re=new ze({}),be=new Y({props:{name:"class transformers.RemBertConfig",anchor:"transformers.RemBertConfig",parameters:[{name:"vocab_size",val:" = 250300"},{name:"hidden_size",val:" = 1152"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 18"},{name:"input_embedding_size",val:" = 256"},{name:"output_embedding_size",val:" = 1664"},{name:"intermediate_size",val:" = 4608"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"classifier_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:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = False"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 312"},{name:"eos_token_id",val:" = 313"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/configuration_rembert.py#L29",parametersDescription:[{anchor:"transformers.RemBertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 250300) &#x2014;
Vocabulary size of the RemBERT 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/rembert#transformers.RemBertModel">RemBertModel</a> or <a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.TFRemBertModel">TFRemBertModel</a>. Vocabulary size of the model.
Defines the different tokens that can be represented by the <em>inputs_ids</em> passed to the forward method of
<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertModel">RemBertModel</a>.`,name:"vocab_size"},{anchor:"transformers.RemBertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1152) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RemBertConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RemBertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 18) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RemBertConfig.input_embedding_size",description:`<strong>input_embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the input embeddings.`,name:"input_embedding_size"},{anchor:"transformers.RemBertConfig.output_embedding_size",description:`<strong>output_embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1664) &#x2014;
Dimensionality of the output embeddings.`,name:"output_embedding_size"},{anchor:"transformers.RemBertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4608) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RemBertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</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;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RemBertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RemBertConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RemBertConfig.classifier_dropout_prob",description:`<strong>classifier_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the classifier layer when fine-tuning.`,name:"classifier_dropout_prob"},{anchor:"transformers.RemBertConfig.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.RemBertConfig.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/rembert#transformers.RemBertModel">RemBertModel</a> or <a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.TFRemBertModel">TFRemBertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RemBertConfig.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.RemBertConfig.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.RemBertConfig.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"}]}}),vn=new je({props:{code:"",highlighted:""}}),bn=new ze({}),yn=new ze({}),wn=new ze({}),$n=new Y({props:{name:"class transformers.RemBertTokenizer",anchor:"transformers.RemBertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = False"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = True"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert.py#L43",parametersDescription:[{anchor:"transformers.RemBertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.RemBertTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.RemBertTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.RemBertTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.RemBertTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.RemBertTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RemBertTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.RemBertTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.RemBertTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}]}}),Bn=new Y({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RemBertTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert.py#L172",parametersDescription:[{anchor:"transformers.RemBertTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.RemBertTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),zn=new Y({props:{name:"get_special_tokens_mask",anchor:"transformers.RemBertTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert.py#L197",parametersDescription:[{anchor:"transformers.RemBertTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.RemBertTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.RemBertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Cn=new Y({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RemBertTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert.py#L228",parametersDescription:[{anchor:"transformers.RemBertTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.RemBertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),xn=new je({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),Ln=new Y({props:{name:"save_vocabulary",anchor:"transformers.RemBertTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert.py#L258"}}),Pn=new ze({}),jn=new Y({props:{name:"class transformers.RemBertTokenizerFast",anchor:"transformers.RemBertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = False"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert_fast.py#L52",parametersDescription:[{anchor:"transformers.RemBertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.RemBertTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.RemBertTokenizerFast.remove_space",description:`<strong>remove_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to strip the text when tokenizing (removing excess spaces before and after the string).`,name:"remove_space"},{anchor:"transformers.RemBertTokenizerFast.keep_accents",description:`<strong>keep_accents</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to keep accents when tokenizing.`,name:"keep_accents"},{anchor:"transformers.RemBertTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.RemBertTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token. .. note:: When building a sequence using special tokens, this is not the token
that is used for the end of sequence. The token used is the <code>sep_token</code>.`,name:"eos_token"},{anchor:"transformers.RemBertTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.RemBertTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.RemBertTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RemBertTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.RemBertTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"}]}}),An=new Y({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RemBertTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert_fast.py#L144",parametersDescription:[{anchor:"transformers.RemBertTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added`,name:"token_ids_0"},{anchor:"transformers.RemBertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],returnDescription:`
<p>list of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),On=new Y({props:{name:"get_special_tokens_mask",anchor:"transformers.RemBertTokenizerFast.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert_fast.py#L169",parametersDescription:[{anchor:"transformers.RemBertTokenizerFast.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids.`,name:"token_ids_0"},{anchor:"transformers.RemBertTokenizerFast.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.RemBertTokenizerFast.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Set to True if the token list is already formatted with special tokens for the model`,name:"already_has_special_tokens"}],returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Sn=new Y({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RemBertTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert_fast.py#L200",parametersDescription:[{anchor:"transformers.RemBertTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids.`,name:"token_ids_0"},{anchor:"transformers.RemBertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Wn=new je({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),Un=new Y({props:{name:"save_vocabulary",anchor:"transformers.RemBertTokenizerFast.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/tokenization_rembert_fast.py#L230"}}),Hn=new ze({}),Qn=new Y({props:{name:"class transformers.RemBertModel",anchor:"transformers.RemBertModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_rembert.py#L743",parametersDescription:[{anchor:"transformers.RemBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),Xn=new Y({props:{name:"forward",anchor:"transformers.RemBertModel.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/rembert/modeling_rembert.py#L782",parametersDescription:[{anchor:"transformers.RemBertModel.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/rembert#transformers.RemBertTokenizer">RemBertTokenizer</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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.
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.RemBertModel.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.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
<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>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>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-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(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.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xo=new qe({props:{$$slots:{default:[P1]},$$scope:{ctx:V}}}),Yn=new je({props:{code:`from transformers import RemBertTokenizer, RemBertModel
import torch

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = RemBertModel.from_pretrained("rembert")

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> RemBertTokenizer, RemBertModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertModel.from_pretrained(<span class="hljs-string">&quot;rembert&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`}}),Zn=new ze({}),es=new Y({props:{name:"class transformers.RemBertForCausalLM",anchor:"transformers.RemBertForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_rembert.py#L1016",parametersDescription:[{anchor:"transformers.RemBertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),os=new Y({props:{name:"forward",anchor:"transformers.RemBertForCausalLM.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:"labels",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/rembert/modeling_rembert.py#L1038",parametersDescription:[{anchor:"transformers.RemBertForCausalLM.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/rembert#transformers.RemBertTokenizer">RemBertTokenizer</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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.
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.RemBertForCausalLM.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 n <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.RemBertForCausalLM.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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Po=new qe({props:{$$slots:{default:[j1]},$$scope:{ctx:V}}}),ns=new je({props:{code:`from transformers import RemBertTokenizer, RemBertForCausalLM, RemBertConfig
import torch

tokenizer = RemBertTokenizer.from_pretrained("google/rembert")
config = RemBertConfig.from_pretrained("google/rembert")
config.is_decoder = True
model = RemBertForCausalLM.from_pretrained("google/rembert", 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> RemBertTokenizer, RemBertForCausalLM, RemBertConfig
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = RemBertConfig.from_pretrained(<span class="hljs-string">&quot;google/rembert&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 = RemBertForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/rembert&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`}}),ss=new ze({}),rs=new Y({props:{name:"class transformers.RemBertForMaskedLM",anchor:"transformers.RemBertForMaskedLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_rembert.py#L913",parametersDescription:[{anchor:"transformers.RemBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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 Y({props:{name:"forward",anchor:"transformers.RemBertForMaskedLM.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:"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/rembert/modeling_rembert.py#L935",parametersDescription:[{anchor:"transformers.RemBertForMaskedLM.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/rembert#transformers.RemBertTokenizer">RemBertTokenizer</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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Do=new qe({props:{$$slots:{default:[D1]},$$scope:{ctx:V}}}),ls=new je({props:{code:`from transformers import RemBertTokenizer, RemBertForMaskedLM
import torch

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = RemBertForMaskedLM.from_pretrained("rembert")

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> RemBertTokenizer, RemBertForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;rembert&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`}}),ds=new ze({}),cs=new Y({props:{name:"class transformers.RemBertForSequenceClassification",anchor:"transformers.RemBertForSequenceClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_rembert.py#L1169",parametersDescription:[{anchor:"transformers.RemBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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 Y({props:{name:"forward",anchor:"transformers.RemBertForSequenceClassification.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/rembert/modeling_rembert.py#L1180",parametersDescription:[{anchor:"transformers.RemBertForSequenceClassification.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/rembert#transformers.RemBertTokenizer">RemBertTokenizer</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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),No=new qe({props:{$$slots:{default:[A1]},$$scope:{ctx:V}}}),us=new je({props:{code:`import torch
from transformers import RemBertTokenizer, RemBertForSequenceClassification

torch.manual_seed(0)
tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = RemBertForSequenceClassification.from_pretrained("rembert", 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> RemBertTokenizer, RemBertForSequenceClassification

<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;rembert&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)
`}}),fs=new je({props:{code:`import torch
from transformers import RemBertTokenizer, RemBertForSequenceClassification

torch.manual_seed(0)
tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = RemBertForSequenceClassification.from_pretrained("rembert", 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> RemBertTokenizer, RemBertForSequenceClassification

<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;rembert&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)
`}}),gs=new ze({}),_s=new Y({props:{name:"class transformers.RemBertForMultipleChoice",anchor:"transformers.RemBertForMultipleChoice",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_rembert.py#L1266",parametersDescription:[{anchor:"transformers.RemBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),vs=new Y({props:{name:"forward",anchor:"transformers.RemBertForMultipleChoice.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/rembert/modeling_rembert.py#L1277",parametersDescription:[{anchor:"transformers.RemBertForMultipleChoice.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/rembert#transformers.RemBertTokenizer">RemBertTokenizer</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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Io=new qe({props:{$$slots:{default:[N1]},$$scope:{ctx:V}}}),bs=new je({props:{code:`from transformers import RemBertTokenizer, RemBertForMultipleChoice
import torch

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = RemBertForMultipleChoice.from_pretrained("rembert")

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> RemBertTokenizer, RemBertForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;rembert&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`}}),ys=new ze({}),ws=new Y({props:{name:"class transformers.RemBertForTokenClassification",anchor:"transformers.RemBertForTokenClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_rembert.py#L1358",parametersDescription:[{anchor:"transformers.RemBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),Rs=new Y({props:{name:"forward",anchor:"transformers.RemBertForTokenClassification.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/rembert/modeling_rembert.py#L1370",parametersDescription:[{anchor:"transformers.RemBertForTokenClassification.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/rembert#transformers.RemBertTokenizer">RemBertTokenizer</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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Wo=new qe({props:{$$slots:{default:[O1]},$$scope:{ctx:V}}}),Es=new je({props:{code:`from transformers import RemBertTokenizer, RemBertForTokenClassification
import torch

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = RemBertForTokenClassification.from_pretrained("rembert")

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> RemBertTokenizer, RemBertForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;rembert&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`}}),Bs=new ze({}),Ms=new Y({props:{name:"class transformers.RemBertForQuestionAnswering",anchor:"transformers.RemBertForQuestionAnswering",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_rembert.py#L1437",parametersDescription:[{anchor:"transformers.RemBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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 Y({props:{name:"forward",anchor:"transformers.RemBertForQuestionAnswering.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/rembert/modeling_rembert.py#L1449",parametersDescription:[{anchor:"transformers.RemBertForQuestionAnswering.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/rembert#transformers.RemBertTokenizer">RemBertTokenizer</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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Ho=new qe({props:{$$slots:{default:[I1]},$$scope:{ctx:V}}}),xs=new je({props:{code:`from transformers import RemBertTokenizer, RemBertForQuestionAnswering
import torch

torch.manual_seed(0)
tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = RemBertForQuestionAnswering.from_pretrained("rembert")

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> RemBertTokenizer, RemBertForQuestionAnswering
<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;rembert&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)
`}}),Ls=new ze({}),Ps=new Y({props:{name:"class transformers.TFRemBertModel",anchor:"transformers.TFRemBertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L932",parametersDescription:[{anchor:"transformers.TFRemBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),Ko=new qe({props:{$$slots:{default:[S1]},$$scope:{ctx:V}}}),Ns=new Y({props:{name:"call",anchor:"transformers.TFRemBertModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L938",parametersDescription:[{anchor:"transformers.TFRemBertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</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.TFRemBertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRemBertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.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.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</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/rembert#transformers.RemBertConfig"
>RemBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</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.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>
<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.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vo=new qe({props:{$$slots:{default:[W1]},$$scope:{ctx:V}}}),Os=new je({props:{code:`from transformers import RemBertTokenizer, TFRemBertModel
import tensorflow as tf

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = TFRemBertModel.from_pretrained("rembert")

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> RemBertTokenizer, TFRemBertModel
<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertModel.from_pretrained(<span class="hljs-string">&quot;rembert&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`}}),Is=new ze({}),Ss=new Y({props:{name:"class transformers.TFRemBertForMaskedLM",anchor:"transformers.TFRemBertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1026",parametersDescription:[{anchor:"transformers.TFRemBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),Go=new qe({props:{$$slots:{default:[U1]},$$scope:{ctx:V}}}),Ks=new Y({props:{name:"call",anchor:"transformers.TFRemBertForMaskedLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1042",parametersDescription:[{anchor:"transformers.TFRemBertForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</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.TFRemBertForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRemBertForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRemBertForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Xo=new qe({props:{$$slots:{default:[H1]},$$scope:{ctx:V}}}),Vs=new je({props:{code:`from transformers import RemBertTokenizer, TFRemBertForMaskedLM
import tensorflow as tf

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = TFRemBertForMaskedLM.from_pretrained("rembert")

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> RemBertTokenizer, TFRemBertForMaskedLM
<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;rembert&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`}}),Js=new ze({}),Gs=new Y({props:{name:"class transformers.TFRemBertForCausalLM",anchor:"transformers.TFRemBertForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1108",parametersDescription:[{anchor:"transformers.TFRemBertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),Zo=new qe({props:{$$slots:{default:[Q1]},$$scope:{ctx:V}}}),tr=new Y({props:{name:"call",anchor:"transformers.TFRemBertForCausalLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1134",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</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/rembert#transformers.RemBertConfig"
>RemBertConfig</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 Language modeling loss (for next-token prediction).</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>
<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>
<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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),rr=new je({props:{code:`from transformers import RemBertTokenizer, TFRemBertForCausalLM
import tensorflow as tf

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = TFRemBertForCausalLM.from_pretrained("rembert")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
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> RemBertTokenizer, TFRemBertForCausalLM
<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForCausalLM.from_pretrained(<span class="hljs-string">&quot;rembert&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>logits = outputs.logits`}}),ar=new ze({}),ir=new Y({props:{name:"class transformers.TFRemBertForSequenceClassification",anchor:"transformers.TFRemBertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1251",parametersDescription:[{anchor:"transformers.TFRemBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),tn=new qe({props:{$$slots:{default:[K1]},$$scope:{ctx:V}}}),pr=new Y({props:{name:"call",anchor:"transformers.TFRemBertForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1265",parametersDescription:[{anchor:"transformers.TFRemBertForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</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.TFRemBertForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRemBertForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRemBertForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),on=new qe({props:{$$slots:{default:[V1]},$$scope:{ctx:V}}}),hr=new je({props:{code:`from transformers import RemBertTokenizer, TFRemBertForSequenceClassification
import tensorflow as tf

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = TFRemBertForSequenceClassification.from_pretrained("rembert")

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> RemBertTokenizer, TFRemBertForSequenceClassification
<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;rembert&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`}}),mr=new ze({}),ur=new Y({props:{name:"class transformers.TFRemBertForMultipleChoice",anchor:"transformers.TFRemBertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1336",parametersDescription:[{anchor:"transformers.TFRemBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),sn=new qe({props:{$$slots:{default:[J1]},$$scope:{ctx:V}}}),kr=new Y({props:{name:"call",anchor:"transformers.TFRemBertForMultipleChoice.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1356",parametersDescription:[{anchor:"transformers.TFRemBertForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, 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/bert#transformers.BertTokenizer">BertTokenizer</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.TFRemBertForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFRemBertForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</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.TFRemBertForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</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.TFRemBertForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRemBertForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRemBertForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the 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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),rn=new qe({props:{$$slots:{default:[G1]},$$scope:{ctx:V}}}),Tr=new je({props:{code:`from transformers import RemBertTokenizer, TFRemBertForMultipleChoice
import tensorflow as tf

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = TFRemBertForMultipleChoice.from_pretrained("rembert")

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> RemBertTokenizer, TFRemBertForMultipleChoice
<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;rembert&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`}}),vr=new ze({}),br=new Y({props:{name:"class transformers.TFRemBertForTokenClassification",anchor:"transformers.TFRemBertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1464",parametersDescription:[{anchor:"transformers.TFRemBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),ln=new qe({props:{$$slots:{default:[X1]},$$scope:{ctx:V}}}),Fr=new Y({props:{name:"call",anchor:"transformers.TFRemBertForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1476",parametersDescription:[{anchor:"transformers.TFRemBertForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</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.TFRemBertForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRemBertForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRemBertForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),dn=new qe({props:{$$slots:{default:[Y1]},$$scope:{ctx:V}}}),Rr=new je({props:{code:`from transformers import RemBertTokenizer, TFRemBertForTokenClassification
import tensorflow as tf

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = TFRemBertForTokenClassification.from_pretrained("rembert")

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> RemBertTokenizer, TFRemBertForTokenClassification
<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;rembert&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`}}),Er=new ze({}),Br=new Y({props:{name:"class transformers.TFRemBertForQuestionAnswering",anchor:"transformers.TFRemBertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1545",parametersDescription:[{anchor:"transformers.TFRemBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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"}]}}),pn=new qe({props:{$$slots:{default:[Z1]},$$scope:{ctx:V}}}),Cr=new Y({props:{name:"call",anchor:"transformers.TFRemBertForQuestionAnswering.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"start_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"end_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/rembert/modeling_tf_rembert.py#L1556",parametersDescription:[{anchor:"transformers.TFRemBertForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</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.TFRemBertForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRemBertForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRemBertForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),hn=new qe({props:{$$slots:{default:[ew]},$$scope:{ctx:V}}}),xr=new je({props:{code:`from transformers import RemBertTokenizer, TFRemBertForQuestionAnswering
import tensorflow as tf

tokenizer = RemBertTokenizer.from_pretrained("rembert")
model = TFRemBertForQuestionAnswering.from_pretrained("rembert")

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> RemBertTokenizer, TFRemBertForQuestionAnswering
<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 = RemBertTokenizer.from_pretrained(<span class="hljs-string">&quot;rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;rembert&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>])`}}),{c(){h=s("meta"),E=l(),g=s("h1"),u=s("a"),T=s("span"),v(k.$$.fragment),_=l(),B=s("span"),ue=o("RemBERT"),X=l(),M=s("h2"),te=s("a"),N=s("span"),v(ne.$$.fragment),fe=l(),O=s("span"),ge=o("Overview"),pe=l(),J=s("p"),j=o("The RemBERT model was proposed in "),se=s("a"),Z=o("Rethinking Embedding Coupling in Pre-trained Language Models"),z=o(" by Hyung Won Chung, Thibault F\xE9vry, Henry Tsai, Melvin Johnson, Sebastian Ruder."),C=l(),ae=s("p"),U=o("The abstract from the paper is the following:"),he=l(),ie=s("p"),I=s("em"),_e=o(`We re-evaluate the standard practice of sharing weights between input and output embeddings in state-of-the-art
pre-trained language models. We show that decoupled embeddings provide increased modeling flexibility, allowing us to
significantly improve the efficiency of parameter allocation in the input embedding of multilingual models. By
reallocating the input embedding parameters in the Transformer layers, we achieve dramatically better performance on
standard natural language understanding tasks with the same number of parameters during fine-tuning. We also show that
allocating additional capacity to the output embedding provides benefits to the model that persist through the
fine-tuning stage even though the output embedding is discarded after pre-training. Our analysis shows that larger
output embeddings prevent the model\u2019s last layers from overspecializing to the pre-training task and encourage
Transformer representations to be more general and more transferable to other tasks and languages. Harnessing these
findings, we are able to train models that achieve strong performance on the XTREME benchmark without increasing the
number of parameters at the fine-tuning stage.`),me=l(),q=s("p"),ke=o("Tips:"),S=l(),le=s("p"),Te=o(`For fine-tuning, RemBERT can be thought of as a bigger version of mBERT with an ALBERT-like factorization of the
embedding layer. The embeddings are not tied in pre-training, in contrast with BERT, which enables smaller input
embeddings (preserved during fine-tuning) and bigger output embeddings (discarded at fine-tuning). The tokenizer is
also similar to the Albert one rather than the BERT one.`),W=l(),ee=s("h2"),oe=s("a"),P=s("span"),v(re.$$.fragment),H=l(),ce=s("span"),c=o("RemBertConfig"),R=l(),x=s("div"),v(be.$$.fragment),we=l(),L=s("p"),$e=o("This is the configuration class to store the configuration of a "),ye=s("a"),Fe=o("RemBertModel"),D=o(`. It is used to instantiate an
RemBERT 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 remert-large architecture.`),Q=l(),ve=s("p"),Re=o("Configuration objects inherit from "),A=s("a"),Ee=o("PretrainedConfig"),Be=o(` and can be used to control the model outputs. Read the
documentation from `),de=s("a"),Me=o("PretrainedConfig"),sp=o(" for more information."),rp=l(),Pa=s("p"),ap=o("Example:"),ip=l(),v(vn.$$.fragment),lp=l(),ja=s("blockquote"),Da=s("blockquote"),Aa=s("blockquote"),Na=s("p"),dp=o(`from transformers import RemBertModel, RemBertConfig >>> # Initializing a RemBERT rembert style
configuration >>> configuration = RemBertConfig()`),cp=l(),Oa=s("blockquote"),Ia=s("blockquote"),Sa=s("blockquote"),$o=s("h1"),Fo=s("a"),Wa=s("span"),v(bn.$$.fragment),pp=l(),Ua=s("span"),hp=o("Initializing a model from the rembert style configuration >>> model = RemBertModel(configuration)"),mp=l(),Ha=s("blockquote"),Qa=s("blockquote"),Ka=s("blockquote"),Ro=s("h1"),Eo=s("a"),Va=s("span"),v(yn.$$.fragment),up=l(),Ja=s("span"),fp=o("Accessing the model configuration >>> configuration = model.config"),Ed=l(),Wt=s("h2"),Bo=s("a"),Ga=s("span"),v(wn.$$.fragment),gp=l(),Xa=s("span"),_p=o("RemBertTokenizer"),Bd=l(),Ce=s("div"),v($n.$$.fragment),kp=l(),Fn=s("p"),Tp=o("Construct a RemBERT tokenizer. Based on "),Rn=s("a"),vp=o("SentencePiece"),bp=o("."),yp=l(),En=s("p"),wp=o("This tokenizer inherits from "),Ar=s("a"),$p=o("PreTrainedTokenizer"),Fp=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Rp=l(),Bt=s("div"),v(Bn.$$.fragment),Ep=l(),Ya=s("p"),Bp=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A REMBERT sequence has the following format:`),Mp=l(),Mn=s("ul"),Nr=s("li"),zp=o("single sequence: "),Za=s("code"),qp=o("[CLS] X [SEP]"),Cp=l(),Or=s("li"),xp=o("pair of sequences: "),ei=s("code"),Lp=o("[CLS] A [SEP] B [SEP]"),Pp=l(),Mo=s("div"),v(zn.$$.fragment),jp=l(),qn=s("p"),Dp=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ti=s("code"),Ap=o("prepare_for_model"),Np=o(" method."),Op=l(),ut=s("div"),v(Cn.$$.fragment),Ip=l(),oi=s("p"),Sp=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT
sequence pair mask has the following format:`),Wp=l(),v(xn.$$.fragment),Up=l(),Ut=s("p"),Hp=o("If "),ni=s("code"),Qp=o("token_ids_1"),Kp=o(" is "),si=s("code"),Vp=o("None"),Jp=o(", this method only returns the first portion of the mask (0s)."),Gp=l(),Ir=s("div"),v(Ln.$$.fragment),Md=l(),Ht=s("h2"),zo=s("a"),ri=s("span"),v(Pn.$$.fragment),Xp=l(),ai=s("span"),Yp=o("RemBertTokenizerFast"),zd=l(),De=s("div"),v(jn.$$.fragment),Zp=l(),Ft=s("p"),eh=o("Construct a \u201Cfast\u201D RemBert tokenizer (backed by HuggingFace\u2019s "),ii=s("em"),th=o("tokenizers"),oh=o(` library). Based on
`),Dn=s("a"),nh=o("Unigram"),sh=o(`. This
tokenizer inherits from `),Sr=s("a"),rh=o("PreTrainedTokenizerFast"),ah=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),ih=l(),Mt=s("div"),v(An.$$.fragment),lh=l(),li=s("p"),dh=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RemBERT sequence has the following format:`),ch=l(),Nn=s("ul"),Wr=s("li"),ph=o("single sequence: "),di=s("code"),hh=o("[CLS] X [SEP]"),mh=l(),Ur=s("li"),uh=o("pair of sequences: "),ci=s("code"),fh=o("[CLS] A [SEP] B [SEP]"),gh=l(),qo=s("div"),v(On.$$.fragment),_h=l(),In=s("p"),kh=o(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),pi=s("code"),Th=o("prepare_for_model"),vh=o(" method."),bh=l(),ft=s("div"),v(Sn.$$.fragment),yh=l(),hi=s("p"),wh=o(`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT
sequence pair mask has the following format:`),$h=l(),v(Wn.$$.fragment),Fh=l(),mi=s("p"),Rh=o("if token_ids_1 is None, only returns the first portion of the mask (0s)."),Eh=l(),Hr=s("div"),v(Un.$$.fragment),qd=l(),Qt=s("h2"),Co=s("a"),ui=s("span"),v(Hn.$$.fragment),Bh=l(),fi=s("span"),Mh=o("RemBertModel"),Cd=l(),Ve=s("div"),v(Qn.$$.fragment),zh=l(),Kn=s("p"),qh=o(`The bare RemBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Vn=s("a"),Ch=o("torch.nn.Module"),xh=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Lh=l(),Jn=s("p"),Ph=o(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Gn=s("a"),jh=o(`Attention is
all you need`),Dh=o(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Ah=l(),Ae=s("p"),Nh=o("To behave as an decoder the model needs to be initialized with the "),gi=s("code"),Oh=o("is_decoder"),Ih=o(` argument of the configuration set
to `),_i=s("code"),Sh=o("True"),Wh=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),ki=s("code"),Uh=o("is_decoder"),Hh=o(` argument and
`),Ti=s("code"),Qh=o("add_cross_attention"),Kh=o(" set to "),vi=s("code"),Vh=o("True"),Jh=o("; an "),bi=s("code"),Gh=o("encoder_hidden_states"),Xh=o(" is then expected as an input to the forward pass."),Yh=l(),Je=s("div"),v(Xn.$$.fragment),Zh=l(),Kt=s("p"),em=o("The "),Qr=s("a"),tm=o("RemBertModel"),om=o(" forward method, overrides the "),yi=s("code"),nm=o("__call__"),sm=o(" special method."),rm=l(),v(xo.$$.fragment),am=l(),wi=s("p"),im=o("Example:"),lm=l(),v(Yn.$$.fragment),xd=l(),Vt=s("h2"),Lo=s("a"),$i=s("span"),v(Zn.$$.fragment),dm=l(),Fi=s("span"),cm=o("RemBertForCausalLM"),Ld=l(),Rt=s("div"),v(es.$$.fragment),pm=l(),Jt=s("p"),hm=o("RemBERT Model with a "),Ri=s("code"),mm=o("language modeling"),um=o(` head on top for CLM fine-tuning.
This model is a PyTorch `),ts=s("a"),fm=o("torch.nn.Module"),gm=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),_m=l(),Ge=s("div"),v(os.$$.fragment),km=l(),Gt=s("p"),Tm=o("The "),Kr=s("a"),vm=o("RemBertForCausalLM"),bm=o(" forward method, overrides the "),Ei=s("code"),ym=o("__call__"),wm=o(" special method."),$m=l(),v(Po.$$.fragment),Fm=l(),Bi=s("p"),Rm=o("Example:"),Em=l(),v(ns.$$.fragment),Pd=l(),Xt=s("h2"),jo=s("a"),Mi=s("span"),v(ss.$$.fragment),Bm=l(),zi=s("span"),Mm=o("RemBertForMaskedLM"),jd=l(),Et=s("div"),v(rs.$$.fragment),zm=l(),Yt=s("p"),qm=o("RemBERT Model with a "),qi=s("code"),Cm=o("language modeling"),xm=o(` head on top.
This model is a PyTorch `),as=s("a"),Lm=o("torch.nn.Module"),Pm=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),jm=l(),Xe=s("div"),v(is.$$.fragment),Dm=l(),Zt=s("p"),Am=o("The "),Vr=s("a"),Nm=o("RemBertForMaskedLM"),Om=o(" forward method, overrides the "),Ci=s("code"),Im=o("__call__"),Sm=o(" special method."),Wm=l(),v(Do.$$.fragment),Um=l(),xi=s("p"),Hm=o("Example:"),Qm=l(),v(ls.$$.fragment),Dd=l(),eo=s("h2"),Ao=s("a"),Li=s("span"),v(ds.$$.fragment),Km=l(),Pi=s("span"),Vm=o("RemBertForSequenceClassification"),Ad=l(),ct=s("div"),v(cs.$$.fragment),Jm=l(),ji=s("p"),Gm=o(`RemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Xm=l(),ps=s("p"),Ym=o("This model is a PyTorch "),hs=s("a"),Zm=o("torch.nn.Module"),eu=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),tu=l(),Pe=s("div"),v(ms.$$.fragment),ou=l(),to=s("p"),nu=o("The "),Jr=s("a"),su=o("RemBertForSequenceClassification"),ru=o(" forward method, overrides the "),Di=s("code"),au=o("__call__"),iu=o(" special method."),lu=l(),v(No.$$.fragment),du=l(),Ai=s("p"),cu=o("Example of single-label classification:"),pu=l(),v(us.$$.fragment),hu=l(),Ni=s("p"),mu=o("Example of multi-label classification:"),uu=l(),v(fs.$$.fragment),Nd=l(),oo=s("h2"),Oo=s("a"),Oi=s("span"),v(gs.$$.fragment),fu=l(),Ii=s("span"),gu=o("RemBertForMultipleChoice"),Od=l(),pt=s("div"),v(_s.$$.fragment),_u=l(),Si=s("p"),ku=o(`RemBERT 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.`),Tu=l(),ks=s("p"),vu=o("This model is a PyTorch "),Ts=s("a"),bu=o("torch.nn.Module"),yu=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),wu=l(),Ye=s("div"),v(vs.$$.fragment),$u=l(),no=s("p"),Fu=o("The "),Gr=s("a"),Ru=o("RemBertForMultipleChoice"),Eu=o(" forward method, overrides the "),Wi=s("code"),Bu=o("__call__"),Mu=o(" special method."),zu=l(),v(Io.$$.fragment),qu=l(),Ui=s("p"),Cu=o("Example:"),xu=l(),v(bs.$$.fragment),Id=l(),so=s("h2"),So=s("a"),Hi=s("span"),v(ys.$$.fragment),Lu=l(),Qi=s("span"),Pu=o("RemBertForTokenClassification"),Sd=l(),ht=s("div"),v(ws.$$.fragment),ju=l(),Ki=s("p"),Du=o(`RemBERT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),Au=l(),$s=s("p"),Nu=o("This model is a PyTorch "),Fs=s("a"),Ou=o("torch.nn.Module"),Iu=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Su=l(),Ze=s("div"),v(Rs.$$.fragment),Wu=l(),ro=s("p"),Uu=o("The "),Xr=s("a"),Hu=o("RemBertForTokenClassification"),Qu=o(" forward method, overrides the "),Vi=s("code"),Ku=o("__call__"),Vu=o(" special method."),Ju=l(),v(Wo.$$.fragment),Gu=l(),Ji=s("p"),Xu=o("Example:"),Yu=l(),v(Es.$$.fragment),Wd=l(),ao=s("h2"),Uo=s("a"),Gi=s("span"),v(Bs.$$.fragment),Zu=l(),Xi=s("span"),ef=o("RemBertForQuestionAnswering"),Ud=l(),mt=s("div"),v(Ms.$$.fragment),tf=l(),io=s("p"),of=o(`RemBERT 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 `),Yi=s("code"),nf=o("span start logits"),sf=o(" and "),Zi=s("code"),rf=o("span end logits"),af=o(")."),lf=l(),zs=s("p"),df=o("This model is a PyTorch "),qs=s("a"),cf=o("torch.nn.Module"),pf=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),hf=l(),et=s("div"),v(Cs.$$.fragment),mf=l(),lo=s("p"),uf=o("The "),Yr=s("a"),ff=o("RemBertForQuestionAnswering"),gf=o(" forward method, overrides the "),el=s("code"),_f=o("__call__"),kf=o(" special method."),Tf=l(),v(Ho.$$.fragment),vf=l(),tl=s("p"),bf=o("Example:"),yf=l(),v(xs.$$.fragment),Hd=l(),co=s("h2"),Qo=s("a"),ol=s("span"),v(Ls.$$.fragment),wf=l(),nl=s("span"),$f=o("TFRemBertModel"),Qd=l(),Ne=s("div"),v(Ps.$$.fragment),Ff=l(),sl=s("p"),Rf=o("The bare RemBERT Model transformer outputing raw hidden-states without any specific head on top."),Ef=l(),js=s("p"),Bf=o("This model inherits from "),Zr=s("a"),Mf=o("TFPreTrainedModel"),zf=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),qf=l(),Ds=s("p"),Cf=o("This model is also a "),As=s("a"),xf=o("tf.keras.Model"),Lf=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Pf=l(),v(Ko.$$.fragment),jf=l(),tt=s("div"),v(Ns.$$.fragment),Df=l(),po=s("p"),Af=o("The "),ea=s("a"),Nf=o("TFRemBertModel"),Of=o(" forward method, overrides the "),rl=s("code"),If=o("__call__"),Sf=o(" special method."),Wf=l(),v(Vo.$$.fragment),Uf=l(),al=s("p"),Hf=o("Example:"),Qf=l(),v(Os.$$.fragment),Kd=l(),ho=s("h2"),Jo=s("a"),il=s("span"),v(Is.$$.fragment),Kf=l(),ll=s("span"),Vf=o("TFRemBertForMaskedLM"),Vd=l(),Oe=s("div"),v(Ss.$$.fragment),Jf=l(),Ws=s("p"),Gf=o("RemBERT Model with a "),dl=s("code"),Xf=o("language modeling"),Yf=o(" head on top."),Zf=l(),Us=s("p"),eg=o("This model inherits from "),ta=s("a"),tg=o("TFPreTrainedModel"),og=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ng=l(),Hs=s("p"),sg=o("This model is also a "),Qs=s("a"),rg=o("tf.keras.Model"),ag=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ig=l(),v(Go.$$.fragment),lg=l(),ot=s("div"),v(Ks.$$.fragment),dg=l(),mo=s("p"),cg=o("The "),oa=s("a"),pg=o("TFRemBertForMaskedLM"),hg=o(" forward method, overrides the "),cl=s("code"),mg=o("__call__"),ug=o(" special method."),fg=l(),v(Xo.$$.fragment),gg=l(),pl=s("p"),_g=o("Example:"),kg=l(),v(Vs.$$.fragment),Jd=l(),uo=s("h2"),Yo=s("a"),hl=s("span"),v(Js.$$.fragment),Tg=l(),ml=s("span"),vg=o("TFRemBertForCausalLM"),Gd=l(),Ie=s("div"),v(Gs.$$.fragment),bg=l(),Xs=s("p"),yg=o("RemBERT Model with a "),ul=s("code"),wg=o("language modeling"),$g=o(" head on top for CLM fine-tuning."),Fg=l(),Ys=s("p"),Rg=o("This model inherits from "),na=s("a"),Eg=o("TFPreTrainedModel"),Bg=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Mg=l(),Zs=s("p"),zg=o("This model is also a "),er=s("a"),qg=o("tf.keras.Model"),Cg=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),xg=l(),v(Zo.$$.fragment),Lg=l(),Qe=s("div"),v(tr.$$.fragment),Pg=l(),xe=s("p"),jg=o("encoder_hidden_states  ("),fl=s("code"),Dg=o("tf.Tensor"),Ag=o(" of shape "),gl=s("code"),Ng=o("(batch_size, sequence_length, hidden_size)"),Og=o(", "),_l=s("em"),Ig=o("optional"),Sg=o(`):
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.
encoder_attention_mask (`),kl=s("code"),Wg=o("tf.Tensor"),Ug=o(" of shape "),Tl=s("code"),Hg=o("(batch_size, sequence_length)"),Qg=o(", "),vl=s("em"),Kg=o("optional"),Vg=o(`):
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 `),bl=s("code"),Jg=o("[0, 1]"),Gg=o(":"),Xg=l(),or=s("ul"),nr=s("li"),Yg=o("1 for tokens that are "),yl=s("strong"),Zg=o("not masked"),e_=o(","),t_=l(),sr=s("li"),o_=o("0 for tokens that are "),wl=s("strong"),n_=o("masked"),s_=o("."),r_=l(),K=s("p"),a_=o("past_key_values ("),$l=s("code"),i_=o("Tuple[Tuple[tf.Tensor]]"),l_=o(" of length "),Fl=s("code"),d_=o("config.n_layers"),c_=o(`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),Rl=s("code"),p_=o("past_key_values"),h_=o(" are used, the user can optionally input only the last "),El=s("code"),m_=o("decoder_input_ids"),u_=o(` (those that
don\u2019t have their past key value states given to this model) of shape `),Bl=s("code"),f_=o("(batch_size, 1)"),g_=o(` instead of all
`),Ml=s("code"),__=o("decoder_input_ids"),k_=o(" of shape "),zl=s("code"),T_=o("(batch_size, sequence_length)"),v_=o(`.
use_cache (`),ql=s("code"),b_=o("bool"),y_=o(", "),Cl=s("em"),w_=o("optional"),$_=o(", defaults to "),xl=s("code"),F_=o("True"),R_=o(`):
If set to `),Ll=s("code"),E_=o("True"),B_=o(", "),Pl=s("code"),M_=o("past_key_values"),z_=o(` key value states are returned and can be used to speed up decoding (see
`),jl=s("code"),q_=o("past_key_values"),C_=o("). Set to "),Dl=s("code"),x_=o("False"),L_=o(" during training, "),Al=s("code"),P_=o("True"),j_=o(` during generation
labels (`),Nl=s("code"),D_=o("tf.Tensor"),A_=o(" or "),Ol=s("code"),N_=o("np.ndarray"),O_=o(" of shape "),Il=s("code"),I_=o("(batch_size, sequence_length)"),S_=o(", "),Sl=s("em"),W_=o("optional"),U_=o(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Wl=s("code"),H_=o("[0, ..., config.vocab_size - 1]"),Q_=o("."),K_=l(),Ul=s("p"),V_=o("Example:"),J_=l(),v(rr.$$.fragment),Xd=l(),fo=s("h2"),en=s("a"),Hl=s("span"),v(ar.$$.fragment),G_=l(),Ql=s("span"),X_=o("TFRemBertForSequenceClassification"),Yd=l(),Se=s("div"),v(ir.$$.fragment),Y_=l(),Kl=s("p"),Z_=o("RemBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),ek=l(),lr=s("p"),tk=o("This model inherits from "),sa=s("a"),ok=o("TFPreTrainedModel"),nk=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),sk=l(),dr=s("p"),rk=o("This model is also a "),cr=s("a"),ak=o("tf.keras.Model"),ik=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),lk=l(),v(tn.$$.fragment),dk=l(),nt=s("div"),v(pr.$$.fragment),ck=l(),go=s("p"),pk=o("The "),ra=s("a"),hk=o("TFRemBertForSequenceClassification"),mk=o(" forward method, overrides the "),Vl=s("code"),uk=o("__call__"),fk=o(" special method."),gk=l(),v(on.$$.fragment),_k=l(),Jl=s("p"),kk=o("Example:"),Tk=l(),v(hr.$$.fragment),Zd=l(),_o=s("h2"),nn=s("a"),Gl=s("span"),v(mr.$$.fragment),vk=l(),Xl=s("span"),bk=o("TFRemBertForMultipleChoice"),ec=l(),We=s("div"),v(ur.$$.fragment),yk=l(),Yl=s("p"),wk=o(`RemBERT Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),$k=l(),fr=s("p"),Fk=o("This model inherits from "),aa=s("a"),Rk=o("TFPreTrainedModel"),Ek=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Bk=l(),gr=s("p"),Mk=o("This model is also a "),_r=s("a"),zk=o("tf.keras.Model"),qk=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Ck=l(),v(sn.$$.fragment),xk=l(),st=s("div"),v(kr.$$.fragment),Lk=l(),ko=s("p"),Pk=o("The "),ia=s("a"),jk=o("TFRemBertForMultipleChoice"),Dk=o(" forward method, overrides the "),Zl=s("code"),Ak=o("__call__"),Nk=o(" special method."),Ok=l(),v(rn.$$.fragment),Ik=l(),ed=s("p"),Sk=o("Example:"),Wk=l(),v(Tr.$$.fragment),tc=l(),To=s("h2"),an=s("a"),td=s("span"),v(vr.$$.fragment),Uk=l(),od=s("span"),Hk=o("TFRemBertForTokenClassification"),oc=l(),Ue=s("div"),v(br.$$.fragment),Qk=l(),nd=s("p"),Kk=o(`RemBERT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),Vk=l(),yr=s("p"),Jk=o("This model inherits from "),la=s("a"),Gk=o("TFPreTrainedModel"),Xk=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Yk=l(),wr=s("p"),Zk=o("This model is also a "),$r=s("a"),eT=o("tf.keras.Model"),tT=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),oT=l(),v(ln.$$.fragment),nT=l(),rt=s("div"),v(Fr.$$.fragment),sT=l(),vo=s("p"),rT=o("The "),da=s("a"),aT=o("TFRemBertForTokenClassification"),iT=o(" forward method, overrides the "),sd=s("code"),lT=o("__call__"),dT=o(" special method."),cT=l(),v(dn.$$.fragment),pT=l(),rd=s("p"),hT=o("Example:"),mT=l(),v(Rr.$$.fragment),nc=l(),bo=s("h2"),cn=s("a"),ad=s("span"),v(Er.$$.fragment),uT=l(),id=s("span"),fT=o("TFRemBertForQuestionAnswering"),sc=l(),He=s("div"),v(Br.$$.fragment),gT=l(),yo=s("p"),_T=o(`RemBERT Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),ld=s("code"),kT=o("span start logits"),TT=o(" and "),dd=s("code"),vT=o("span end logits"),bT=o(")."),yT=l(),Mr=s("p"),wT=o("This model inherits from "),ca=s("a"),$T=o("TFPreTrainedModel"),FT=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),RT=l(),zr=s("p"),ET=o("This model is also a "),qr=s("a"),BT=o("tf.keras.Model"),MT=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),zT=l(),v(pn.$$.fragment),qT=l(),at=s("div"),v(Cr.$$.fragment),CT=l(),wo=s("p"),xT=o("The "),pa=s("a"),LT=o("TFRemBertForQuestionAnswering"),PT=o(" forward method, overrides the "),cd=s("code"),jT=o("__call__"),DT=o(" special method."),AT=l(),v(hn.$$.fragment),NT=l(),pd=s("p"),OT=o("Example:"),IT=l(),v(xr.$$.fragment),this.h()},l(i){const f=L1('[data-svelte="svelte-1phssyn"]',document.head);h=r(f,"META",{name:!0,content:!0}),f.forEach(t),E=d(i),g=r(i,"H1",{class:!0});var Lr=a(g);u=r(Lr,"A",{id:!0,class:!0,href:!0});var hd=a(u);T=r(hd,"SPAN",{});var md=a(T);b(k.$$.fragment,md),md.forEach(t),hd.forEach(t),_=d(Lr),B=r(Lr,"SPAN",{});var ud=a(B);ue=n(ud,"RemBERT"),ud.forEach(t),Lr.forEach(t),X=d(i),M=r(i,"H2",{class:!0});var Pr=a(M);te=r(Pr,"A",{id:!0,class:!0,href:!0});var fd=a(te);N=r(fd,"SPAN",{});var gd=a(N);b(ne.$$.fragment,gd),gd.forEach(t),fd.forEach(t),fe=d(Pr),O=r(Pr,"SPAN",{});var _d=a(O);ge=n(_d,"Overview"),_d.forEach(t),Pr.forEach(t),pe=d(i),J=r(i,"P",{});var jr=a(J);j=n(jr,"The RemBERT model was proposed in "),se=r(jr,"A",{href:!0,rel:!0});var kd=a(se);Z=n(kd,"Rethinking Embedding Coupling in Pre-trained Language Models"),kd.forEach(t),z=n(jr," by Hyung Won Chung, Thibault F\xE9vry, Henry Tsai, Melvin Johnson, Sebastian Ruder."),jr.forEach(t),C=d(i),ae=r(i,"P",{});var Td=a(ae);U=n(Td,"The abstract from the paper is the following:"),Td.forEach(t),he=d(i),ie=r(i,"P",{});var vd=a(ie);I=r(vd,"EM",{});var bd=a(I);_e=n(bd,`We re-evaluate the standard practice of sharing weights between input and output embeddings in state-of-the-art
pre-trained language models. We show that decoupled embeddings provide increased modeling flexibility, allowing us to
significantly improve the efficiency of parameter allocation in the input embedding of multilingual models. By
reallocating the input embedding parameters in the Transformer layers, we achieve dramatically better performance on
standard natural language understanding tasks with the same number of parameters during fine-tuning. We also show that
allocating additional capacity to the output embedding provides benefits to the model that persist through the
fine-tuning stage even though the output embedding is discarded after pre-training. Our analysis shows that larger
output embeddings prevent the model\u2019s last layers from overspecializing to the pre-training task and encourage
Transformer representations to be more general and more transferable to other tasks and languages. Harnessing these
findings, we are able to train models that achieve strong performance on the XTREME benchmark without increasing the
number of parameters at the fine-tuning stage.`),bd.forEach(t),vd.forEach(t),me=d(i),q=r(i,"P",{});var yd=a(q);ke=n(yd,"Tips:"),yd.forEach(t),S=d(i),le=r(i,"P",{});var wd=a(le);Te=n(wd,`For fine-tuning, RemBERT can be thought of as a bigger version of mBERT with an ALBERT-like factorization of the
embedding layer. The embeddings are not tied in pre-training, in contrast with BERT, which enables smaller input
embeddings (preserved during fine-tuning) and bigger output embeddings (discarded at fine-tuning). The tokenizer is
also similar to the Albert one rather than the BERT one.`),wd.forEach(t),W=d(i),ee=r(i,"H2",{class:!0});var Dr=a(ee);oe=r(Dr,"A",{id:!0,class:!0,href:!0});var $d=a(oe);P=r($d,"SPAN",{});var Fd=a(P);b(re.$$.fragment,Fd),Fd.forEach(t),$d.forEach(t),H=d(Dr),ce=r(Dr,"SPAN",{});var Rd=a(ce);c=n(Rd,"RemBertConfig"),Rd.forEach(t),Dr.forEach(t),R=d(i),x=r(i,"DIV",{class:!0});var Le=a(x);b(be.$$.fragment,Le),we=d(Le),L=r(Le,"P",{});var ac=a(L);$e=n(ac,"This is the configuration class to store the configuration of a "),ye=r(ac,"A",{href:!0});var QT=a(ye);Fe=n(QT,"RemBertModel"),QT.forEach(t),D=n(ac,`. It is used to instantiate an
RemBERT 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 remert-large architecture.`),ac.forEach(t),Q=d(Le),ve=r(Le,"P",{});var ha=a(ve);Re=n(ha,"Configuration objects inherit from "),A=r(ha,"A",{href:!0});var KT=a(A);Ee=n(KT,"PretrainedConfig"),KT.forEach(t),Be=n(ha,` and can be used to control the model outputs. Read the
documentation from `),de=r(ha,"A",{href:!0});var VT=a(de);Me=n(VT,"PretrainedConfig"),VT.forEach(t),sp=n(ha," for more information."),ha.forEach(t),rp=d(Le),Pa=r(Le,"P",{});var JT=a(Pa);ap=n(JT,"Example:"),JT.forEach(t),ip=d(Le),b(vn.$$.fragment,Le),lp=d(Le),ja=r(Le,"BLOCKQUOTE",{});var GT=a(ja);Da=r(GT,"BLOCKQUOTE",{});var XT=a(Da);Aa=r(XT,"BLOCKQUOTE",{});var YT=a(Aa);Na=r(YT,"P",{});var ZT=a(Na);dp=n(ZT,`from transformers import RemBertModel, RemBertConfig >>> # Initializing a RemBERT rembert style
configuration >>> configuration = RemBertConfig()`),ZT.forEach(t),YT.forEach(t),XT.forEach(t),GT.forEach(t),cp=d(Le),Oa=r(Le,"BLOCKQUOTE",{});var ev=a(Oa);Ia=r(ev,"BLOCKQUOTE",{});var tv=a(Ia);Sa=r(tv,"BLOCKQUOTE",{});var ov=a(Sa);$o=r(ov,"H1",{class:!0});var ic=a($o);Fo=r(ic,"A",{id:!0,class:!0,href:!0});var nv=a(Fo);Wa=r(nv,"SPAN",{});var sv=a(Wa);b(bn.$$.fragment,sv),sv.forEach(t),nv.forEach(t),pp=d(ic),Ua=r(ic,"SPAN",{});var rv=a(Ua);hp=n(rv,"Initializing a model from the rembert style configuration >>> model = RemBertModel(configuration)"),rv.forEach(t),ic.forEach(t),ov.forEach(t),tv.forEach(t),ev.forEach(t),mp=d(Le),Ha=r(Le,"BLOCKQUOTE",{});var av=a(Ha);Qa=r(av,"BLOCKQUOTE",{});var iv=a(Qa);Ka=r(iv,"BLOCKQUOTE",{});var lv=a(Ka);Ro=r(lv,"H1",{class:!0});var lc=a(Ro);Eo=r(lc,"A",{id:!0,class:!0,href:!0});var dv=a(Eo);Va=r(dv,"SPAN",{});var cv=a(Va);b(yn.$$.fragment,cv),cv.forEach(t),dv.forEach(t),up=d(lc),Ja=r(lc,"SPAN",{});var pv=a(Ja);fp=n(pv,"Accessing the model configuration >>> configuration = model.config"),pv.forEach(t),lc.forEach(t),lv.forEach(t),iv.forEach(t),av.forEach(t),Le.forEach(t),Ed=d(i),Wt=r(i,"H2",{class:!0});var dc=a(Wt);Bo=r(dc,"A",{id:!0,class:!0,href:!0});var hv=a(Bo);Ga=r(hv,"SPAN",{});var mv=a(Ga);b(wn.$$.fragment,mv),mv.forEach(t),hv.forEach(t),gp=d(dc),Xa=r(dc,"SPAN",{});var uv=a(Xa);_p=n(uv,"RemBertTokenizer"),uv.forEach(t),dc.forEach(t),Bd=d(i),Ce=r(i,"DIV",{class:!0});var it=a(Ce);b($n.$$.fragment,it),kp=d(it),Fn=r(it,"P",{});var cc=a(Fn);Tp=n(cc,"Construct a RemBERT tokenizer. Based on "),Rn=r(cc,"A",{href:!0,rel:!0});var fv=a(Rn);vp=n(fv,"SentencePiece"),fv.forEach(t),bp=n(cc,"."),cc.forEach(t),yp=d(it),En=r(it,"P",{});var pc=a(En);wp=n(pc,"This tokenizer inherits from "),Ar=r(pc,"A",{href:!0});var gv=a(Ar);$p=n(gv,"PreTrainedTokenizer"),gv.forEach(t),Fp=n(pc,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),pc.forEach(t),Rp=d(it),Bt=r(it,"DIV",{class:!0});var ma=a(Bt);b(Bn.$$.fragment,ma),Ep=d(ma),Ya=r(ma,"P",{});var _v=a(Ya);Bp=n(_v,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A REMBERT sequence has the following format:`),_v.forEach(t),Mp=d(ma),Mn=r(ma,"UL",{});var hc=a(Mn);Nr=r(hc,"LI",{});var ST=a(Nr);zp=n(ST,"single sequence: "),Za=r(ST,"CODE",{});var kv=a(Za);qp=n(kv,"[CLS] X [SEP]"),kv.forEach(t),ST.forEach(t),Cp=d(hc),Or=r(hc,"LI",{});var WT=a(Or);xp=n(WT,"pair of sequences: "),ei=r(WT,"CODE",{});var Tv=a(ei);Lp=n(Tv,"[CLS] A [SEP] B [SEP]"),Tv.forEach(t),WT.forEach(t),hc.forEach(t),ma.forEach(t),Pp=d(it),Mo=r(it,"DIV",{class:!0});var mc=a(Mo);b(zn.$$.fragment,mc),jp=d(mc),qn=r(mc,"P",{});var uc=a(qn);Dp=n(uc,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ti=r(uc,"CODE",{});var vv=a(ti);Ap=n(vv,"prepare_for_model"),vv.forEach(t),Np=n(uc," method."),uc.forEach(t),mc.forEach(t),Op=d(it),ut=r(it,"DIV",{class:!0});var mn=a(ut);b(Cn.$$.fragment,mn),Ip=d(mn),oi=r(mn,"P",{});var bv=a(oi);Sp=n(bv,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT
sequence pair mask has the following format:`),bv.forEach(t),Wp=d(mn),b(xn.$$.fragment,mn),Up=d(mn),Ut=r(mn,"P",{});var ua=a(Ut);Hp=n(ua,"If "),ni=r(ua,"CODE",{});var yv=a(ni);Qp=n(yv,"token_ids_1"),yv.forEach(t),Kp=n(ua," is "),si=r(ua,"CODE",{});var wv=a(si);Vp=n(wv,"None"),wv.forEach(t),Jp=n(ua,", this method only returns the first portion of the mask (0s)."),ua.forEach(t),mn.forEach(t),Gp=d(it),Ir=r(it,"DIV",{class:!0});var $v=a(Ir);b(Ln.$$.fragment,$v),$v.forEach(t),it.forEach(t),Md=d(i),Ht=r(i,"H2",{class:!0});var fc=a(Ht);zo=r(fc,"A",{id:!0,class:!0,href:!0});var Fv=a(zo);ri=r(Fv,"SPAN",{});var Rv=a(ri);b(Pn.$$.fragment,Rv),Rv.forEach(t),Fv.forEach(t),Xp=d(fc),ai=r(fc,"SPAN",{});var Ev=a(ai);Yp=n(Ev,"RemBertTokenizerFast"),Ev.forEach(t),fc.forEach(t),zd=d(i),De=r(i,"DIV",{class:!0});var gt=a(De);b(jn.$$.fragment,gt),Zp=d(gt),Ft=r(gt,"P",{});var un=a(Ft);eh=n(un,"Construct a \u201Cfast\u201D RemBert tokenizer (backed by HuggingFace\u2019s "),ii=r(un,"EM",{});var Bv=a(ii);th=n(Bv,"tokenizers"),Bv.forEach(t),oh=n(un,` library). Based on
`),Dn=r(un,"A",{href:!0,rel:!0});var Mv=a(Dn);nh=n(Mv,"Unigram"),Mv.forEach(t),sh=n(un,`. This
tokenizer inherits from `),Sr=r(un,"A",{href:!0});var zv=a(Sr);rh=n(zv,"PreTrainedTokenizerFast"),zv.forEach(t),ah=n(un,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),un.forEach(t),ih=d(gt),Mt=r(gt,"DIV",{class:!0});var fa=a(Mt);b(An.$$.fragment,fa),lh=d(fa),li=r(fa,"P",{});var qv=a(li);dh=n(qv,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RemBERT sequence has the following format:`),qv.forEach(t),ch=d(fa),Nn=r(fa,"UL",{});var gc=a(Nn);Wr=r(gc,"LI",{});var UT=a(Wr);ph=n(UT,"single sequence: "),di=r(UT,"CODE",{});var Cv=a(di);hh=n(Cv,"[CLS] X [SEP]"),Cv.forEach(t),UT.forEach(t),mh=d(gc),Ur=r(gc,"LI",{});var HT=a(Ur);uh=n(HT,"pair of sequences: "),ci=r(HT,"CODE",{});var xv=a(ci);fh=n(xv,"[CLS] A [SEP] B [SEP]"),xv.forEach(t),HT.forEach(t),gc.forEach(t),fa.forEach(t),gh=d(gt),qo=r(gt,"DIV",{class:!0});var _c=a(qo);b(On.$$.fragment,_c),_h=d(_c),In=r(_c,"P",{});var kc=a(In);kh=n(kc,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),pi=r(kc,"CODE",{});var Lv=a(pi);Th=n(Lv,"prepare_for_model"),Lv.forEach(t),vh=n(kc," method."),kc.forEach(t),_c.forEach(t),bh=d(gt),ft=r(gt,"DIV",{class:!0});var fn=a(ft);b(Sn.$$.fragment,fn),yh=d(fn),hi=r(fn,"P",{});var Pv=a(hi);wh=n(Pv,`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT
sequence pair mask has the following format:`),Pv.forEach(t),$h=d(fn),b(Wn.$$.fragment,fn),Fh=d(fn),mi=r(fn,"P",{});var jv=a(mi);Rh=n(jv,"if token_ids_1 is None, only returns the first portion of the mask (0s)."),jv.forEach(t),fn.forEach(t),Eh=d(gt),Hr=r(gt,"DIV",{class:!0});var Dv=a(Hr);b(Un.$$.fragment,Dv),Dv.forEach(t),gt.forEach(t),qd=d(i),Qt=r(i,"H2",{class:!0});var Tc=a(Qt);Co=r(Tc,"A",{id:!0,class:!0,href:!0});var Av=a(Co);ui=r(Av,"SPAN",{});var Nv=a(ui);b(Hn.$$.fragment,Nv),Nv.forEach(t),Av.forEach(t),Bh=d(Tc),fi=r(Tc,"SPAN",{});var Ov=a(fi);Mh=n(Ov,"RemBertModel"),Ov.forEach(t),Tc.forEach(t),Cd=d(i),Ve=r(i,"DIV",{class:!0});var zt=a(Ve);b(Qn.$$.fragment,zt),zh=d(zt),Kn=r(zt,"P",{});var vc=a(Kn);qh=n(vc,`The bare RemBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Vn=r(vc,"A",{href:!0,rel:!0});var Iv=a(Vn);Ch=n(Iv,"torch.nn.Module"),Iv.forEach(t),xh=n(vc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),vc.forEach(t),Lh=d(zt),Jn=r(zt,"P",{});var bc=a(Jn);Ph=n(bc,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Gn=r(bc,"A",{href:!0,rel:!0});var Sv=a(Gn);jh=n(Sv,`Attention is
all you need`),Sv.forEach(t),Dh=n(bc,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),bc.forEach(t),Ah=d(zt),Ae=r(zt,"P",{});var lt=a(Ae);Nh=n(lt,"To behave as an decoder the model needs to be initialized with the "),gi=r(lt,"CODE",{});var Wv=a(gi);Oh=n(Wv,"is_decoder"),Wv.forEach(t),Ih=n(lt,` argument of the configuration set
to `),_i=r(lt,"CODE",{});var Uv=a(_i);Sh=n(Uv,"True"),Uv.forEach(t),Wh=n(lt,". To be used in a Seq2Seq model, the model needs to initialized with both "),ki=r(lt,"CODE",{});var Hv=a(ki);Uh=n(Hv,"is_decoder"),Hv.forEach(t),Hh=n(lt,` argument and
`),Ti=r(lt,"CODE",{});var Qv=a(Ti);Qh=n(Qv,"add_cross_attention"),Qv.forEach(t),Kh=n(lt," set to "),vi=r(lt,"CODE",{});var Kv=a(vi);Vh=n(Kv,"True"),Kv.forEach(t),Jh=n(lt,"; an "),bi=r(lt,"CODE",{});var Vv=a(bi);Gh=n(Vv,"encoder_hidden_states"),Vv.forEach(t),Xh=n(lt," is then expected as an input to the forward pass."),lt.forEach(t),Yh=d(zt),Je=r(zt,"DIV",{class:!0});var qt=a(Je);b(Xn.$$.fragment,qt),Zh=d(qt),Kt=r(qt,"P",{});var ga=a(Kt);em=n(ga,"The "),Qr=r(ga,"A",{href:!0});var Jv=a(Qr);tm=n(Jv,"RemBertModel"),Jv.forEach(t),om=n(ga," forward method, overrides the "),yi=r(ga,"CODE",{});var Gv=a(yi);nm=n(Gv,"__call__"),Gv.forEach(t),sm=n(ga," special method."),ga.forEach(t),rm=d(qt),b(xo.$$.fragment,qt),am=d(qt),wi=r(qt,"P",{});var Xv=a(wi);im=n(Xv,"Example:"),Xv.forEach(t),lm=d(qt),b(Yn.$$.fragment,qt),qt.forEach(t),zt.forEach(t),xd=d(i),Vt=r(i,"H2",{class:!0});var yc=a(Vt);Lo=r(yc,"A",{id:!0,class:!0,href:!0});var Yv=a(Lo);$i=r(Yv,"SPAN",{});var Zv=a($i);b(Zn.$$.fragment,Zv),Zv.forEach(t),Yv.forEach(t),dm=d(yc),Fi=r(yc,"SPAN",{});var eb=a(Fi);cm=n(eb,"RemBertForCausalLM"),eb.forEach(t),yc.forEach(t),Ld=d(i),Rt=r(i,"DIV",{class:!0});var _a=a(Rt);b(es.$$.fragment,_a),pm=d(_a),Jt=r(_a,"P",{});var ka=a(Jt);hm=n(ka,"RemBERT Model with a "),Ri=r(ka,"CODE",{});var tb=a(Ri);mm=n(tb,"language modeling"),tb.forEach(t),um=n(ka,` head on top for CLM fine-tuning.
This model is a PyTorch `),ts=r(ka,"A",{href:!0,rel:!0});var ob=a(ts);fm=n(ob,"torch.nn.Module"),ob.forEach(t),gm=n(ka,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ka.forEach(t),_m=d(_a),Ge=r(_a,"DIV",{class:!0});var Ct=a(Ge);b(os.$$.fragment,Ct),km=d(Ct),Gt=r(Ct,"P",{});var Ta=a(Gt);Tm=n(Ta,"The "),Kr=r(Ta,"A",{href:!0});var nb=a(Kr);vm=n(nb,"RemBertForCausalLM"),nb.forEach(t),bm=n(Ta," forward method, overrides the "),Ei=r(Ta,"CODE",{});var sb=a(Ei);ym=n(sb,"__call__"),sb.forEach(t),wm=n(Ta," special method."),Ta.forEach(t),$m=d(Ct),b(Po.$$.fragment,Ct),Fm=d(Ct),Bi=r(Ct,"P",{});var rb=a(Bi);Rm=n(rb,"Example:"),rb.forEach(t),Em=d(Ct),b(ns.$$.fragment,Ct),Ct.forEach(t),_a.forEach(t),Pd=d(i),Xt=r(i,"H2",{class:!0});var wc=a(Xt);jo=r(wc,"A",{id:!0,class:!0,href:!0});var ab=a(jo);Mi=r(ab,"SPAN",{});var ib=a(Mi);b(ss.$$.fragment,ib),ib.forEach(t),ab.forEach(t),Bm=d(wc),zi=r(wc,"SPAN",{});var lb=a(zi);Mm=n(lb,"RemBertForMaskedLM"),lb.forEach(t),wc.forEach(t),jd=d(i),Et=r(i,"DIV",{class:!0});var va=a(Et);b(rs.$$.fragment,va),zm=d(va),Yt=r(va,"P",{});var ba=a(Yt);qm=n(ba,"RemBERT Model with a "),qi=r(ba,"CODE",{});var db=a(qi);Cm=n(db,"language modeling"),db.forEach(t),xm=n(ba,` head on top.
This model is a PyTorch `),as=r(ba,"A",{href:!0,rel:!0});var cb=a(as);Lm=n(cb,"torch.nn.Module"),cb.forEach(t),Pm=n(ba,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ba.forEach(t),jm=d(va),Xe=r(va,"DIV",{class:!0});var xt=a(Xe);b(is.$$.fragment,xt),Dm=d(xt),Zt=r(xt,"P",{});var ya=a(Zt);Am=n(ya,"The "),Vr=r(ya,"A",{href:!0});var pb=a(Vr);Nm=n(pb,"RemBertForMaskedLM"),pb.forEach(t),Om=n(ya," forward method, overrides the "),Ci=r(ya,"CODE",{});var hb=a(Ci);Im=n(hb,"__call__"),hb.forEach(t),Sm=n(ya," special method."),ya.forEach(t),Wm=d(xt),b(Do.$$.fragment,xt),Um=d(xt),xi=r(xt,"P",{});var mb=a(xi);Hm=n(mb,"Example:"),mb.forEach(t),Qm=d(xt),b(ls.$$.fragment,xt),xt.forEach(t),va.forEach(t),Dd=d(i),eo=r(i,"H2",{class:!0});var $c=a(eo);Ao=r($c,"A",{id:!0,class:!0,href:!0});var ub=a(Ao);Li=r(ub,"SPAN",{});var fb=a(Li);b(ds.$$.fragment,fb),fb.forEach(t),ub.forEach(t),Km=d($c),Pi=r($c,"SPAN",{});var gb=a(Pi);Vm=n(gb,"RemBertForSequenceClassification"),gb.forEach(t),$c.forEach(t),Ad=d(i),ct=r(i,"DIV",{class:!0});var gn=a(ct);b(cs.$$.fragment,gn),Jm=d(gn),ji=r(gn,"P",{});var _b=a(ji);Gm=n(_b,`RemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),_b.forEach(t),Xm=d(gn),ps=r(gn,"P",{});var Fc=a(ps);Ym=n(Fc,"This model is a PyTorch "),hs=r(Fc,"A",{href:!0,rel:!0});var kb=a(hs);Zm=n(kb,"torch.nn.Module"),kb.forEach(t),eu=n(Fc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Fc.forEach(t),tu=d(gn),Pe=r(gn,"DIV",{class:!0});var dt=a(Pe);b(ms.$$.fragment,dt),ou=d(dt),to=r(dt,"P",{});var wa=a(to);nu=n(wa,"The "),Jr=r(wa,"A",{href:!0});var Tb=a(Jr);su=n(Tb,"RemBertForSequenceClassification"),Tb.forEach(t),ru=n(wa," forward method, overrides the "),Di=r(wa,"CODE",{});var vb=a(Di);au=n(vb,"__call__"),vb.forEach(t),iu=n(wa," special method."),wa.forEach(t),lu=d(dt),b(No.$$.fragment,dt),du=d(dt),Ai=r(dt,"P",{});var bb=a(Ai);cu=n(bb,"Example of single-label classification:"),bb.forEach(t),pu=d(dt),b(us.$$.fragment,dt),hu=d(dt),Ni=r(dt,"P",{});var yb=a(Ni);mu=n(yb,"Example of multi-label classification:"),yb.forEach(t),uu=d(dt),b(fs.$$.fragment,dt),dt.forEach(t),gn.forEach(t),Nd=d(i),oo=r(i,"H2",{class:!0});var Rc=a(oo);Oo=r(Rc,"A",{id:!0,class:!0,href:!0});var wb=a(Oo);Oi=r(wb,"SPAN",{});var $b=a(Oi);b(gs.$$.fragment,$b),$b.forEach(t),wb.forEach(t),fu=d(Rc),Ii=r(Rc,"SPAN",{});var Fb=a(Ii);gu=n(Fb,"RemBertForMultipleChoice"),Fb.forEach(t),Rc.forEach(t),Od=d(i),pt=r(i,"DIV",{class:!0});var _n=a(pt);b(_s.$$.fragment,_n),_u=d(_n),Si=r(_n,"P",{});var Rb=a(Si);ku=n(Rb,`RemBERT 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.`),Rb.forEach(t),Tu=d(_n),ks=r(_n,"P",{});var Ec=a(ks);vu=n(Ec,"This model is a PyTorch "),Ts=r(Ec,"A",{href:!0,rel:!0});var Eb=a(Ts);bu=n(Eb,"torch.nn.Module"),Eb.forEach(t),yu=n(Ec,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ec.forEach(t),wu=d(_n),Ye=r(_n,"DIV",{class:!0});var Lt=a(Ye);b(vs.$$.fragment,Lt),$u=d(Lt),no=r(Lt,"P",{});var $a=a(no);Fu=n($a,"The "),Gr=r($a,"A",{href:!0});var Bb=a(Gr);Ru=n(Bb,"RemBertForMultipleChoice"),Bb.forEach(t),Eu=n($a," forward method, overrides the "),Wi=r($a,"CODE",{});var Mb=a(Wi);Bu=n(Mb,"__call__"),Mb.forEach(t),Mu=n($a," special method."),$a.forEach(t),zu=d(Lt),b(Io.$$.fragment,Lt),qu=d(Lt),Ui=r(Lt,"P",{});var zb=a(Ui);Cu=n(zb,"Example:"),zb.forEach(t),xu=d(Lt),b(bs.$$.fragment,Lt),Lt.forEach(t),_n.forEach(t),Id=d(i),so=r(i,"H2",{class:!0});var Bc=a(so);So=r(Bc,"A",{id:!0,class:!0,href:!0});var qb=a(So);Hi=r(qb,"SPAN",{});var Cb=a(Hi);b(ys.$$.fragment,Cb),Cb.forEach(t),qb.forEach(t),Lu=d(Bc),Qi=r(Bc,"SPAN",{});var xb=a(Qi);Pu=n(xb,"RemBertForTokenClassification"),xb.forEach(t),Bc.forEach(t),Sd=d(i),ht=r(i,"DIV",{class:!0});var kn=a(ht);b(ws.$$.fragment,kn),ju=d(kn),Ki=r(kn,"P",{});var Lb=a(Ki);Du=n(Lb,`RemBERT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),Lb.forEach(t),Au=d(kn),$s=r(kn,"P",{});var Mc=a($s);Nu=n(Mc,"This model is a PyTorch "),Fs=r(Mc,"A",{href:!0,rel:!0});var Pb=a(Fs);Ou=n(Pb,"torch.nn.Module"),Pb.forEach(t),Iu=n(Mc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Mc.forEach(t),Su=d(kn),Ze=r(kn,"DIV",{class:!0});var Pt=a(Ze);b(Rs.$$.fragment,Pt),Wu=d(Pt),ro=r(Pt,"P",{});var Fa=a(ro);Uu=n(Fa,"The "),Xr=r(Fa,"A",{href:!0});var jb=a(Xr);Hu=n(jb,"RemBertForTokenClassification"),jb.forEach(t),Qu=n(Fa," forward method, overrides the "),Vi=r(Fa,"CODE",{});var Db=a(Vi);Ku=n(Db,"__call__"),Db.forEach(t),Vu=n(Fa," special method."),Fa.forEach(t),Ju=d(Pt),b(Wo.$$.fragment,Pt),Gu=d(Pt),Ji=r(Pt,"P",{});var Ab=a(Ji);Xu=n(Ab,"Example:"),Ab.forEach(t),Yu=d(Pt),b(Es.$$.fragment,Pt),Pt.forEach(t),kn.forEach(t),Wd=d(i),ao=r(i,"H2",{class:!0});var zc=a(ao);Uo=r(zc,"A",{id:!0,class:!0,href:!0});var Nb=a(Uo);Gi=r(Nb,"SPAN",{});var Ob=a(Gi);b(Bs.$$.fragment,Ob),Ob.forEach(t),Nb.forEach(t),Zu=d(zc),Xi=r(zc,"SPAN",{});var Ib=a(Xi);ef=n(Ib,"RemBertForQuestionAnswering"),Ib.forEach(t),zc.forEach(t),Ud=d(i),mt=r(i,"DIV",{class:!0});var Tn=a(mt);b(Ms.$$.fragment,Tn),tf=d(Tn),io=r(Tn,"P",{});var Ra=a(io);of=n(Ra,`RemBERT 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 `),Yi=r(Ra,"CODE",{});var Sb=a(Yi);nf=n(Sb,"span start logits"),Sb.forEach(t),sf=n(Ra," and "),Zi=r(Ra,"CODE",{});var Wb=a(Zi);rf=n(Wb,"span end logits"),Wb.forEach(t),af=n(Ra,")."),Ra.forEach(t),lf=d(Tn),zs=r(Tn,"P",{});var qc=a(zs);df=n(qc,"This model is a PyTorch "),qs=r(qc,"A",{href:!0,rel:!0});var Ub=a(qs);cf=n(Ub,"torch.nn.Module"),Ub.forEach(t),pf=n(qc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),qc.forEach(t),hf=d(Tn),et=r(Tn,"DIV",{class:!0});var jt=a(et);b(Cs.$$.fragment,jt),mf=d(jt),lo=r(jt,"P",{});var Ea=a(lo);uf=n(Ea,"The "),Yr=r(Ea,"A",{href:!0});var Hb=a(Yr);ff=n(Hb,"RemBertForQuestionAnswering"),Hb.forEach(t),gf=n(Ea," forward method, overrides the "),el=r(Ea,"CODE",{});var Qb=a(el);_f=n(Qb,"__call__"),Qb.forEach(t),kf=n(Ea," special method."),Ea.forEach(t),Tf=d(jt),b(Ho.$$.fragment,jt),vf=d(jt),tl=r(jt,"P",{});var Kb=a(tl);bf=n(Kb,"Example:"),Kb.forEach(t),yf=d(jt),b(xs.$$.fragment,jt),jt.forEach(t),Tn.forEach(t),Hd=d(i),co=r(i,"H2",{class:!0});var Cc=a(co);Qo=r(Cc,"A",{id:!0,class:!0,href:!0});var Vb=a(Qo);ol=r(Vb,"SPAN",{});var Jb=a(ol);b(Ls.$$.fragment,Jb),Jb.forEach(t),Vb.forEach(t),wf=d(Cc),nl=r(Cc,"SPAN",{});var Gb=a(nl);$f=n(Gb,"TFRemBertModel"),Gb.forEach(t),Cc.forEach(t),Qd=d(i),Ne=r(i,"DIV",{class:!0});var _t=a(Ne);b(Ps.$$.fragment,_t),Ff=d(_t),sl=r(_t,"P",{});var Xb=a(sl);Rf=n(Xb,"The bare RemBERT Model transformer outputing raw hidden-states without any specific head on top."),Xb.forEach(t),Ef=d(_t),js=r(_t,"P",{});var xc=a(js);Bf=n(xc,"This model inherits from "),Zr=r(xc,"A",{href:!0});var Yb=a(Zr);Mf=n(Yb,"TFPreTrainedModel"),Yb.forEach(t),zf=n(xc,`. 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.)`),xc.forEach(t),qf=d(_t),Ds=r(_t,"P",{});var Lc=a(Ds);Cf=n(Lc,"This model is also a "),As=r(Lc,"A",{href:!0,rel:!0});var Zb=a(As);xf=n(Zb,"tf.keras.Model"),Zb.forEach(t),Lf=n(Lc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Lc.forEach(t),Pf=d(_t),b(Ko.$$.fragment,_t),jf=d(_t),tt=r(_t,"DIV",{class:!0});var Dt=a(tt);b(Ns.$$.fragment,Dt),Df=d(Dt),po=r(Dt,"P",{});var Ba=a(po);Af=n(Ba,"The "),ea=r(Ba,"A",{href:!0});var ey=a(ea);Nf=n(ey,"TFRemBertModel"),ey.forEach(t),Of=n(Ba," forward method, overrides the "),rl=r(Ba,"CODE",{});var ty=a(rl);If=n(ty,"__call__"),ty.forEach(t),Sf=n(Ba," special method."),Ba.forEach(t),Wf=d(Dt),b(Vo.$$.fragment,Dt),Uf=d(Dt),al=r(Dt,"P",{});var oy=a(al);Hf=n(oy,"Example:"),oy.forEach(t),Qf=d(Dt),b(Os.$$.fragment,Dt),Dt.forEach(t),_t.forEach(t),Kd=d(i),ho=r(i,"H2",{class:!0});var Pc=a(ho);Jo=r(Pc,"A",{id:!0,class:!0,href:!0});var ny=a(Jo);il=r(ny,"SPAN",{});var sy=a(il);b(Is.$$.fragment,sy),sy.forEach(t),ny.forEach(t),Kf=d(Pc),ll=r(Pc,"SPAN",{});var ry=a(ll);Vf=n(ry,"TFRemBertForMaskedLM"),ry.forEach(t),Pc.forEach(t),Vd=d(i),Oe=r(i,"DIV",{class:!0});var kt=a(Oe);b(Ss.$$.fragment,kt),Jf=d(kt),Ws=r(kt,"P",{});var jc=a(Ws);Gf=n(jc,"RemBERT Model with a "),dl=r(jc,"CODE",{});var ay=a(dl);Xf=n(ay,"language modeling"),ay.forEach(t),Yf=n(jc," head on top."),jc.forEach(t),Zf=d(kt),Us=r(kt,"P",{});var Dc=a(Us);eg=n(Dc,"This model inherits from "),ta=r(Dc,"A",{href:!0});var iy=a(ta);tg=n(iy,"TFPreTrainedModel"),iy.forEach(t),og=n(Dc,`. 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.)`),Dc.forEach(t),ng=d(kt),Hs=r(kt,"P",{});var Ac=a(Hs);sg=n(Ac,"This model is also a "),Qs=r(Ac,"A",{href:!0,rel:!0});var ly=a(Qs);rg=n(ly,"tf.keras.Model"),ly.forEach(t),ag=n(Ac,` 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.`),Ac.forEach(t),ig=d(kt),b(Go.$$.fragment,kt),lg=d(kt),ot=r(kt,"DIV",{class:!0});var At=a(ot);b(Ks.$$.fragment,At),dg=d(At),mo=r(At,"P",{});var Ma=a(mo);cg=n(Ma,"The "),oa=r(Ma,"A",{href:!0});var dy=a(oa);pg=n(dy,"TFRemBertForMaskedLM"),dy.forEach(t),hg=n(Ma," forward method, overrides the "),cl=r(Ma,"CODE",{});var cy=a(cl);mg=n(cy,"__call__"),cy.forEach(t),ug=n(Ma," special method."),Ma.forEach(t),fg=d(At),b(Xo.$$.fragment,At),gg=d(At),pl=r(At,"P",{});var py=a(pl);_g=n(py,"Example:"),py.forEach(t),kg=d(At),b(Vs.$$.fragment,At),At.forEach(t),kt.forEach(t),Jd=d(i),uo=r(i,"H2",{class:!0});var Nc=a(uo);Yo=r(Nc,"A",{id:!0,class:!0,href:!0});var hy=a(Yo);hl=r(hy,"SPAN",{});var my=a(hl);b(Js.$$.fragment,my),my.forEach(t),hy.forEach(t),Tg=d(Nc),ml=r(Nc,"SPAN",{});var uy=a(ml);vg=n(uy,"TFRemBertForCausalLM"),uy.forEach(t),Nc.forEach(t),Gd=d(i),Ie=r(i,"DIV",{class:!0});var Tt=a(Ie);b(Gs.$$.fragment,Tt),bg=d(Tt),Xs=r(Tt,"P",{});var Oc=a(Xs);yg=n(Oc,"RemBERT Model with a "),ul=r(Oc,"CODE",{});var fy=a(ul);wg=n(fy,"language modeling"),fy.forEach(t),$g=n(Oc," head on top for CLM fine-tuning."),Oc.forEach(t),Fg=d(Tt),Ys=r(Tt,"P",{});var Ic=a(Ys);Rg=n(Ic,"This model inherits from "),na=r(Ic,"A",{href:!0});var gy=a(na);Eg=n(gy,"TFPreTrainedModel"),gy.forEach(t),Bg=n(Ic,`. 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.)`),Ic.forEach(t),Mg=d(Tt),Zs=r(Tt,"P",{});var Sc=a(Zs);zg=n(Sc,"This model is also a "),er=r(Sc,"A",{href:!0,rel:!0});var _y=a(er);qg=n(_y,"tf.keras.Model"),_y.forEach(t),Cg=n(Sc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Sc.forEach(t),xg=d(Tt),b(Zo.$$.fragment,Tt),Lg=d(Tt),Qe=r(Tt,"DIV",{class:!0});var vt=a(Qe);b(tr.$$.fragment,vt),Pg=d(vt),xe=r(vt,"P",{});var Ke=a(xe);jg=n(Ke,"encoder_hidden_states  ("),fl=r(Ke,"CODE",{});var ky=a(fl);Dg=n(ky,"tf.Tensor"),ky.forEach(t),Ag=n(Ke," of shape "),gl=r(Ke,"CODE",{});var Ty=a(gl);Ng=n(Ty,"(batch_size, sequence_length, hidden_size)"),Ty.forEach(t),Og=n(Ke,", "),_l=r(Ke,"EM",{});var vy=a(_l);Ig=n(vy,"optional"),vy.forEach(t),Sg=n(Ke,`):
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.
encoder_attention_mask (`),kl=r(Ke,"CODE",{});var by=a(kl);Wg=n(by,"tf.Tensor"),by.forEach(t),Ug=n(Ke," of shape "),Tl=r(Ke,"CODE",{});var yy=a(Tl);Hg=n(yy,"(batch_size, sequence_length)"),yy.forEach(t),Qg=n(Ke,", "),vl=r(Ke,"EM",{});var wy=a(vl);Kg=n(wy,"optional"),wy.forEach(t),Vg=n(Ke,`):
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 `),bl=r(Ke,"CODE",{});var $y=a(bl);Jg=n($y,"[0, 1]"),$y.forEach(t),Gg=n(Ke,":"),Ke.forEach(t),Xg=d(vt),or=r(vt,"UL",{});var Wc=a(or);nr=r(Wc,"LI",{});var Uc=a(nr);Yg=n(Uc,"1 for tokens that are "),yl=r(Uc,"STRONG",{});var Fy=a(yl);Zg=n(Fy,"not masked"),Fy.forEach(t),e_=n(Uc,","),Uc.forEach(t),t_=d(Wc),sr=r(Wc,"LI",{});var Hc=a(sr);o_=n(Hc,"0 for tokens that are "),wl=r(Hc,"STRONG",{});var Ry=a(wl);n_=n(Ry,"masked"),Ry.forEach(t),s_=n(Hc,"."),Hc.forEach(t),Wc.forEach(t),r_=d(vt),K=r(vt,"P",{});var G=a(K);a_=n(G,"past_key_values ("),$l=r(G,"CODE",{});var Ey=a($l);i_=n(Ey,"Tuple[Tuple[tf.Tensor]]"),Ey.forEach(t),l_=n(G," of length "),Fl=r(G,"CODE",{});var By=a(Fl);d_=n(By,"config.n_layers"),By.forEach(t),c_=n(G,`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),Rl=r(G,"CODE",{});var My=a(Rl);p_=n(My,"past_key_values"),My.forEach(t),h_=n(G," are used, the user can optionally input only the last "),El=r(G,"CODE",{});var zy=a(El);m_=n(zy,"decoder_input_ids"),zy.forEach(t),u_=n(G,` (those that
don\u2019t have their past key value states given to this model) of shape `),Bl=r(G,"CODE",{});var qy=a(Bl);f_=n(qy,"(batch_size, 1)"),qy.forEach(t),g_=n(G,` instead of all
`),Ml=r(G,"CODE",{});var Cy=a(Ml);__=n(Cy,"decoder_input_ids"),Cy.forEach(t),k_=n(G," of shape "),zl=r(G,"CODE",{});var xy=a(zl);T_=n(xy,"(batch_size, sequence_length)"),xy.forEach(t),v_=n(G,`.
use_cache (`),ql=r(G,"CODE",{});var Ly=a(ql);b_=n(Ly,"bool"),Ly.forEach(t),y_=n(G,", "),Cl=r(G,"EM",{});var Py=a(Cl);w_=n(Py,"optional"),Py.forEach(t),$_=n(G,", defaults to "),xl=r(G,"CODE",{});var jy=a(xl);F_=n(jy,"True"),jy.forEach(t),R_=n(G,`):
If set to `),Ll=r(G,"CODE",{});var Dy=a(Ll);E_=n(Dy,"True"),Dy.forEach(t),B_=n(G,", "),Pl=r(G,"CODE",{});var Ay=a(Pl);M_=n(Ay,"past_key_values"),Ay.forEach(t),z_=n(G,` key value states are returned and can be used to speed up decoding (see
`),jl=r(G,"CODE",{});var Ny=a(jl);q_=n(Ny,"past_key_values"),Ny.forEach(t),C_=n(G,"). Set to "),Dl=r(G,"CODE",{});var Oy=a(Dl);x_=n(Oy,"False"),Oy.forEach(t),L_=n(G," during training, "),Al=r(G,"CODE",{});var Iy=a(Al);P_=n(Iy,"True"),Iy.forEach(t),j_=n(G,` during generation
labels (`),Nl=r(G,"CODE",{});var Sy=a(Nl);D_=n(Sy,"tf.Tensor"),Sy.forEach(t),A_=n(G," or "),Ol=r(G,"CODE",{});var Wy=a(Ol);N_=n(Wy,"np.ndarray"),Wy.forEach(t),O_=n(G," of shape "),Il=r(G,"CODE",{});var Uy=a(Il);I_=n(Uy,"(batch_size, sequence_length)"),Uy.forEach(t),S_=n(G,", "),Sl=r(G,"EM",{});var Hy=a(Sl);W_=n(Hy,"optional"),Hy.forEach(t),U_=n(G,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Wl=r(G,"CODE",{});var Qy=a(Wl);H_=n(Qy,"[0, ..., config.vocab_size - 1]"),Qy.forEach(t),Q_=n(G,"."),G.forEach(t),K_=d(vt),Ul=r(vt,"P",{});var Ky=a(Ul);V_=n(Ky,"Example:"),Ky.forEach(t),J_=d(vt),b(rr.$$.fragment,vt),vt.forEach(t),Tt.forEach(t),Xd=d(i),fo=r(i,"H2",{class:!0});var Qc=a(fo);en=r(Qc,"A",{id:!0,class:!0,href:!0});var Vy=a(en);Hl=r(Vy,"SPAN",{});var Jy=a(Hl);b(ar.$$.fragment,Jy),Jy.forEach(t),Vy.forEach(t),G_=d(Qc),Ql=r(Qc,"SPAN",{});var Gy=a(Ql);X_=n(Gy,"TFRemBertForSequenceClassification"),Gy.forEach(t),Qc.forEach(t),Yd=d(i),Se=r(i,"DIV",{class:!0});var bt=a(Se);b(ir.$$.fragment,bt),Y_=d(bt),Kl=r(bt,"P",{});var Xy=a(Kl);Z_=n(Xy,"RemBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),Xy.forEach(t),ek=d(bt),lr=r(bt,"P",{});var Kc=a(lr);tk=n(Kc,"This model inherits from "),sa=r(Kc,"A",{href:!0});var Yy=a(sa);ok=n(Yy,"TFPreTrainedModel"),Yy.forEach(t),nk=n(Kc,`. 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.)`),Kc.forEach(t),sk=d(bt),dr=r(bt,"P",{});var Vc=a(dr);rk=n(Vc,"This model is also a "),cr=r(Vc,"A",{href:!0,rel:!0});var Zy=a(cr);ak=n(Zy,"tf.keras.Model"),Zy.forEach(t),ik=n(Vc,` 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.`),Vc.forEach(t),lk=d(bt),b(tn.$$.fragment,bt),dk=d(bt),nt=r(bt,"DIV",{class:!0});var Nt=a(nt);b(pr.$$.fragment,Nt),ck=d(Nt),go=r(Nt,"P",{});var za=a(go);pk=n(za,"The "),ra=r(za,"A",{href:!0});var e1=a(ra);hk=n(e1,"TFRemBertForSequenceClassification"),e1.forEach(t),mk=n(za," forward method, overrides the "),Vl=r(za,"CODE",{});var t1=a(Vl);uk=n(t1,"__call__"),t1.forEach(t),fk=n(za," special method."),za.forEach(t),gk=d(Nt),b(on.$$.fragment,Nt),_k=d(Nt),Jl=r(Nt,"P",{});var o1=a(Jl);kk=n(o1,"Example:"),o1.forEach(t),Tk=d(Nt),b(hr.$$.fragment,Nt),Nt.forEach(t),bt.forEach(t),Zd=d(i),_o=r(i,"H2",{class:!0});var Jc=a(_o);nn=r(Jc,"A",{id:!0,class:!0,href:!0});var n1=a(nn);Gl=r(n1,"SPAN",{});var s1=a(Gl);b(mr.$$.fragment,s1),s1.forEach(t),n1.forEach(t),vk=d(Jc),Xl=r(Jc,"SPAN",{});var r1=a(Xl);bk=n(r1,"TFRemBertForMultipleChoice"),r1.forEach(t),Jc.forEach(t),ec=d(i),We=r(i,"DIV",{class:!0});var yt=a(We);b(ur.$$.fragment,yt),yk=d(yt),Yl=r(yt,"P",{});var a1=a(Yl);wk=n(a1,`RemBERT 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.`),a1.forEach(t),$k=d(yt),fr=r(yt,"P",{});var Gc=a(fr);Fk=n(Gc,"This model inherits from "),aa=r(Gc,"A",{href:!0});var i1=a(aa);Rk=n(i1,"TFPreTrainedModel"),i1.forEach(t),Ek=n(Gc,`. 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.)`),Gc.forEach(t),Bk=d(yt),gr=r(yt,"P",{});var Xc=a(gr);Mk=n(Xc,"This model is also a "),_r=r(Xc,"A",{href:!0,rel:!0});var l1=a(_r);zk=n(l1,"tf.keras.Model"),l1.forEach(t),qk=n(Xc,` 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.`),Xc.forEach(t),Ck=d(yt),b(sn.$$.fragment,yt),xk=d(yt),st=r(yt,"DIV",{class:!0});var Ot=a(st);b(kr.$$.fragment,Ot),Lk=d(Ot),ko=r(Ot,"P",{});var qa=a(ko);Pk=n(qa,"The "),ia=r(qa,"A",{href:!0});var d1=a(ia);jk=n(d1,"TFRemBertForMultipleChoice"),d1.forEach(t),Dk=n(qa," forward method, overrides the "),Zl=r(qa,"CODE",{});var c1=a(Zl);Ak=n(c1,"__call__"),c1.forEach(t),Nk=n(qa," special method."),qa.forEach(t),Ok=d(Ot),b(rn.$$.fragment,Ot),Ik=d(Ot),ed=r(Ot,"P",{});var p1=a(ed);Sk=n(p1,"Example:"),p1.forEach(t),Wk=d(Ot),b(Tr.$$.fragment,Ot),Ot.forEach(t),yt.forEach(t),tc=d(i),To=r(i,"H2",{class:!0});var Yc=a(To);an=r(Yc,"A",{id:!0,class:!0,href:!0});var h1=a(an);td=r(h1,"SPAN",{});var m1=a(td);b(vr.$$.fragment,m1),m1.forEach(t),h1.forEach(t),Uk=d(Yc),od=r(Yc,"SPAN",{});var u1=a(od);Hk=n(u1,"TFRemBertForTokenClassification"),u1.forEach(t),Yc.forEach(t),oc=d(i),Ue=r(i,"DIV",{class:!0});var wt=a(Ue);b(br.$$.fragment,wt),Qk=d(wt),nd=r(wt,"P",{});var f1=a(nd);Kk=n(f1,`RemBERT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),f1.forEach(t),Vk=d(wt),yr=r(wt,"P",{});var Zc=a(yr);Jk=n(Zc,"This model inherits from "),la=r(Zc,"A",{href:!0});var g1=a(la);Gk=n(g1,"TFPreTrainedModel"),g1.forEach(t),Xk=n(Zc,`. 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.)`),Zc.forEach(t),Yk=d(wt),wr=r(wt,"P",{});var ep=a(wr);Zk=n(ep,"This model is also a "),$r=r(ep,"A",{href:!0,rel:!0});var _1=a($r);eT=n(_1,"tf.keras.Model"),_1.forEach(t),tT=n(ep,` 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.`),ep.forEach(t),oT=d(wt),b(ln.$$.fragment,wt),nT=d(wt),rt=r(wt,"DIV",{class:!0});var It=a(rt);b(Fr.$$.fragment,It),sT=d(It),vo=r(It,"P",{});var Ca=a(vo);rT=n(Ca,"The "),da=r(Ca,"A",{href:!0});var k1=a(da);aT=n(k1,"TFRemBertForTokenClassification"),k1.forEach(t),iT=n(Ca," forward method, overrides the "),sd=r(Ca,"CODE",{});var T1=a(sd);lT=n(T1,"__call__"),T1.forEach(t),dT=n(Ca," special method."),Ca.forEach(t),cT=d(It),b(dn.$$.fragment,It),pT=d(It),rd=r(It,"P",{});var v1=a(rd);hT=n(v1,"Example:"),v1.forEach(t),mT=d(It),b(Rr.$$.fragment,It),It.forEach(t),wt.forEach(t),nc=d(i),bo=r(i,"H2",{class:!0});var tp=a(bo);cn=r(tp,"A",{id:!0,class:!0,href:!0});var b1=a(cn);ad=r(b1,"SPAN",{});var y1=a(ad);b(Er.$$.fragment,y1),y1.forEach(t),b1.forEach(t),uT=d(tp),id=r(tp,"SPAN",{});var w1=a(id);fT=n(w1,"TFRemBertForQuestionAnswering"),w1.forEach(t),tp.forEach(t),sc=d(i),He=r(i,"DIV",{class:!0});var $t=a(He);b(Br.$$.fragment,$t),gT=d($t),yo=r($t,"P",{});var xa=a(yo);_T=n(xa,`RemBERT Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),ld=r(xa,"CODE",{});var $1=a(ld);kT=n($1,"span start logits"),$1.forEach(t),TT=n(xa," and "),dd=r(xa,"CODE",{});var F1=a(dd);vT=n(F1,"span end logits"),F1.forEach(t),bT=n(xa,")."),xa.forEach(t),yT=d($t),Mr=r($t,"P",{});var op=a(Mr);wT=n(op,"This model inherits from "),ca=r(op,"A",{href:!0});var R1=a(ca);$T=n(R1,"TFPreTrainedModel"),R1.forEach(t),FT=n(op,`. 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.)`),op.forEach(t),RT=d($t),zr=r($t,"P",{});var np=a(zr);ET=n(np,"This model is also a "),qr=r(np,"A",{href:!0,rel:!0});var E1=a(qr);BT=n(E1,"tf.keras.Model"),E1.forEach(t),MT=n(np,` 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.`),np.forEach(t),zT=d($t),b(pn.$$.fragment,$t),qT=d($t),at=r($t,"DIV",{class:!0});var St=a(at);b(Cr.$$.fragment,St),CT=d(St),wo=r(St,"P",{});var La=a(wo);xT=n(La,"The "),pa=r(La,"A",{href:!0});var B1=a(pa);LT=n(B1,"TFRemBertForQuestionAnswering"),B1.forEach(t),PT=n(La," forward method, overrides the "),cd=r(La,"CODE",{});var M1=a(cd);jT=n(M1,"__call__"),M1.forEach(t),DT=n(La," special method."),La.forEach(t),AT=d(St),b(hn.$$.fragment,St),NT=d(St),pd=r(St,"P",{});var z1=a(pd);OT=n(z1,"Example:"),z1.forEach(t),IT=d(St),b(xr.$$.fragment,St),St.forEach(t),$t.forEach(t),this.h()},h(){p(h,"name","hf:doc:metadata"),p(h,"content",JSON.stringify(ow)),p(u,"id","rembert"),p(u,"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"),p(u,"href","#rembert"),p(g,"class","relative group"),p(te,"id","overview"),p(te,"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"),p(te,"href","#overview"),p(M,"class","relative group"),p(se,"href","https://arxiv.org/abs/2010.12821"),p(se,"rel","nofollow"),p(oe,"id","transformers.RemBertConfig"),p(oe,"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"),p(oe,"href","#transformers.RemBertConfig"),p(ee,"class","relative group"),p(ye,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertModel"),p(A,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),p(de,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),p(Fo,"id","initializing-a-model-from-the-rembert-style-configuration->>>-model-=-rembertmodel(configuration)"),p(Fo,"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"),p(Fo,"href","#initializing-a-model-from-the-rembert-style-configuration->>>-model-=-rembertmodel(configuration)"),p($o,"class","relative group"),p(Eo,"id","accessing-the-model-configuration->>>-configuration-=-model.config"),p(Eo,"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"),p(Eo,"href","#accessing-the-model-configuration->>>-configuration-=-model.config"),p(Ro,"class","relative group"),p(x,"class","docstring"),p(Bo,"id","transformers.RemBertTokenizer"),p(Bo,"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"),p(Bo,"href","#transformers.RemBertTokenizer"),p(Wt,"class","relative group"),p(Rn,"href","https://github.com/google/sentencepiece"),p(Rn,"rel","nofollow"),p(Ar,"href","/docs/transformers/pr_15839/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),p(Bt,"class","docstring"),p(Mo,"class","docstring"),p(ut,"class","docstring"),p(Ir,"class","docstring"),p(Ce,"class","docstring"),p(zo,"id","transformers.RemBertTokenizerFast"),p(zo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(zo,"href","#transformers.RemBertTokenizerFast"),p(Ht,"class","relative group"),p(Dn,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),p(Dn,"rel","nofollow"),p(Sr,"href","/docs/transformers/pr_15839/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),p(Mt,"class","docstring"),p(qo,"class","docstring"),p(ft,"class","docstring"),p(Hr,"class","docstring"),p(De,"class","docstring"),p(Co,"id","transformers.RemBertModel"),p(Co,"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"),p(Co,"href","#transformers.RemBertModel"),p(Qt,"class","relative group"),p(Vn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Vn,"rel","nofollow"),p(Gn,"href","https://arxiv.org/abs/1706.03762"),p(Gn,"rel","nofollow"),p(Qr,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertModel"),p(Je,"class","docstring"),p(Ve,"class","docstring"),p(Lo,"id","transformers.RemBertForCausalLM"),p(Lo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Lo,"href","#transformers.RemBertForCausalLM"),p(Vt,"class","relative group"),p(ts,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(ts,"rel","nofollow"),p(Kr,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertForCausalLM"),p(Ge,"class","docstring"),p(Rt,"class","docstring"),p(jo,"id","transformers.RemBertForMaskedLM"),p(jo,"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"),p(jo,"href","#transformers.RemBertForMaskedLM"),p(Xt,"class","relative group"),p(as,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(as,"rel","nofollow"),p(Vr,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertForMaskedLM"),p(Xe,"class","docstring"),p(Et,"class","docstring"),p(Ao,"id","transformers.RemBertForSequenceClassification"),p(Ao,"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"),p(Ao,"href","#transformers.RemBertForSequenceClassification"),p(eo,"class","relative group"),p(hs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(hs,"rel","nofollow"),p(Jr,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertForSequenceClassification"),p(Pe,"class","docstring"),p(ct,"class","docstring"),p(Oo,"id","transformers.RemBertForMultipleChoice"),p(Oo,"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"),p(Oo,"href","#transformers.RemBertForMultipleChoice"),p(oo,"class","relative group"),p(Ts,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Ts,"rel","nofollow"),p(Gr,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertForMultipleChoice"),p(Ye,"class","docstring"),p(pt,"class","docstring"),p(So,"id","transformers.RemBertForTokenClassification"),p(So,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(So,"href","#transformers.RemBertForTokenClassification"),p(so,"class","relative group"),p(Fs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Fs,"rel","nofollow"),p(Xr,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertForTokenClassification"),p(Ze,"class","docstring"),p(ht,"class","docstring"),p(Uo,"id","transformers.RemBertForQuestionAnswering"),p(Uo,"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"),p(Uo,"href","#transformers.RemBertForQuestionAnswering"),p(ao,"class","relative group"),p(qs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(qs,"rel","nofollow"),p(Yr,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.RemBertForQuestionAnswering"),p(et,"class","docstring"),p(mt,"class","docstring"),p(Qo,"id","transformers.TFRemBertModel"),p(Qo,"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"),p(Qo,"href","#transformers.TFRemBertModel"),p(co,"class","relative group"),p(Zr,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),p(As,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(As,"rel","nofollow"),p(ea,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.TFRemBertModel"),p(tt,"class","docstring"),p(Ne,"class","docstring"),p(Jo,"id","transformers.TFRemBertForMaskedLM"),p(Jo,"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"),p(Jo,"href","#transformers.TFRemBertForMaskedLM"),p(ho,"class","relative group"),p(ta,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),p(Qs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(Qs,"rel","nofollow"),p(oa,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.TFRemBertForMaskedLM"),p(ot,"class","docstring"),p(Oe,"class","docstring"),p(Yo,"id","transformers.TFRemBertForCausalLM"),p(Yo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Yo,"href","#transformers.TFRemBertForCausalLM"),p(uo,"class","relative group"),p(na,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),p(er,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(er,"rel","nofollow"),p(Qe,"class","docstring"),p(Ie,"class","docstring"),p(en,"id","transformers.TFRemBertForSequenceClassification"),p(en,"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"),p(en,"href","#transformers.TFRemBertForSequenceClassification"),p(fo,"class","relative group"),p(sa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),p(cr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(cr,"rel","nofollow"),p(ra,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.TFRemBertForSequenceClassification"),p(nt,"class","docstring"),p(Se,"class","docstring"),p(nn,"id","transformers.TFRemBertForMultipleChoice"),p(nn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(nn,"href","#transformers.TFRemBertForMultipleChoice"),p(_o,"class","relative group"),p(aa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),p(_r,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(_r,"rel","nofollow"),p(ia,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.TFRemBertForMultipleChoice"),p(st,"class","docstring"),p(We,"class","docstring"),p(an,"id","transformers.TFRemBertForTokenClassification"),p(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"),p(an,"href","#transformers.TFRemBertForTokenClassification"),p(To,"class","relative group"),p(la,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),p($r,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p($r,"rel","nofollow"),p(da,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.TFRemBertForTokenClassification"),p(rt,"class","docstring"),p(Ue,"class","docstring"),p(cn,"id","transformers.TFRemBertForQuestionAnswering"),p(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"),p(cn,"href","#transformers.TFRemBertForQuestionAnswering"),p(bo,"class","relative group"),p(ca,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),p(qr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(qr,"rel","nofollow"),p(pa,"href","/docs/transformers/pr_15839/en/model_doc/rembert#transformers.TFRemBertForQuestionAnswering"),p(at,"class","docstring"),p(He,"class","docstring")},m(i,f){e(document.head,h),m(i,E,f),m(i,g,f),e(g,u),e(u,T),y(k,T,null),e(g,_),e(g,B),e(B,ue),m(i,X,f),m(i,M,f),e(M,te),e(te,N),y(ne,N,null),e(M,fe),e(M,O),e(O,ge),m(i,pe,f),m(i,J,f),e(J,j),e(J,se),e(se,Z),e(J,z),m(i,C,f),m(i,ae,f),e(ae,U),m(i,he,f),m(i,ie,f),e(ie,I),e(I,_e),m(i,me,f),m(i,q,f),e(q,ke),m(i,S,f),m(i,le,f),e(le,Te),m(i,W,f),m(i,ee,f),e(ee,oe),e(oe,P),y(re,P,null),e(ee,H),e(ee,ce),e(ce,c),m(i,R,f),m(i,x,f),y(be,x,null),e(x,we),e(x,L),e(L,$e),e(L,ye),e(ye,Fe),e(L,D),e(x,Q),e(x,ve),e(ve,Re),e(ve,A),e(A,Ee),e(ve,Be),e(ve,de),e(de,Me),e(ve,sp),e(x,rp),e(x,Pa),e(Pa,ap),e(x,ip),y(vn,x,null),e(x,lp),e(x,ja),e(ja,Da),e(Da,Aa),e(Aa,Na),e(Na,dp),e(x,cp),e(x,Oa),e(Oa,Ia),e(Ia,Sa),e(Sa,$o),e($o,Fo),e(Fo,Wa),y(bn,Wa,null),e($o,pp),e($o,Ua),e(Ua,hp),e(x,mp),e(x,Ha),e(Ha,Qa),e(Qa,Ka),e(Ka,Ro),e(Ro,Eo),e(Eo,Va),y(yn,Va,null),e(Ro,up),e(Ro,Ja),e(Ja,fp),m(i,Ed,f),m(i,Wt,f),e(Wt,Bo),e(Bo,Ga),y(wn,Ga,null),e(Wt,gp),e(Wt,Xa),e(Xa,_p),m(i,Bd,f),m(i,Ce,f),y($n,Ce,null),e(Ce,kp),e(Ce,Fn),e(Fn,Tp),e(Fn,Rn),e(Rn,vp),e(Fn,bp),e(Ce,yp),e(Ce,En),e(En,wp),e(En,Ar),e(Ar,$p),e(En,Fp),e(Ce,Rp),e(Ce,Bt),y(Bn,Bt,null),e(Bt,Ep),e(Bt,Ya),e(Ya,Bp),e(Bt,Mp),e(Bt,Mn),e(Mn,Nr),e(Nr,zp),e(Nr,Za),e(Za,qp),e(Mn,Cp),e(Mn,Or),e(Or,xp),e(Or,ei),e(ei,Lp),e(Ce,Pp),e(Ce,Mo),y(zn,Mo,null),e(Mo,jp),e(Mo,qn),e(qn,Dp),e(qn,ti),e(ti,Ap),e(qn,Np),e(Ce,Op),e(Ce,ut),y(Cn,ut,null),e(ut,Ip),e(ut,oi),e(oi,Sp),e(ut,Wp),y(xn,ut,null),e(ut,Up),e(ut,Ut),e(Ut,Hp),e(Ut,ni),e(ni,Qp),e(Ut,Kp),e(Ut,si),e(si,Vp),e(Ut,Jp),e(Ce,Gp),e(Ce,Ir),y(Ln,Ir,null),m(i,Md,f),m(i,Ht,f),e(Ht,zo),e(zo,ri),y(Pn,ri,null),e(Ht,Xp),e(Ht,ai),e(ai,Yp),m(i,zd,f),m(i,De,f),y(jn,De,null),e(De,Zp),e(De,Ft),e(Ft,eh),e(Ft,ii),e(ii,th),e(Ft,oh),e(Ft,Dn),e(Dn,nh),e(Ft,sh),e(Ft,Sr),e(Sr,rh),e(Ft,ah),e(De,ih),e(De,Mt),y(An,Mt,null),e(Mt,lh),e(Mt,li),e(li,dh),e(Mt,ch),e(Mt,Nn),e(Nn,Wr),e(Wr,ph),e(Wr,di),e(di,hh),e(Nn,mh),e(Nn,Ur),e(Ur,uh),e(Ur,ci),e(ci,fh),e(De,gh),e(De,qo),y(On,qo,null),e(qo,_h),e(qo,In),e(In,kh),e(In,pi),e(pi,Th),e(In,vh),e(De,bh),e(De,ft),y(Sn,ft,null),e(ft,yh),e(ft,hi),e(hi,wh),e(ft,$h),y(Wn,ft,null),e(ft,Fh),e(ft,mi),e(mi,Rh),e(De,Eh),e(De,Hr),y(Un,Hr,null),m(i,qd,f),m(i,Qt,f),e(Qt,Co),e(Co,ui),y(Hn,ui,null),e(Qt,Bh),e(Qt,fi),e(fi,Mh),m(i,Cd,f),m(i,Ve,f),y(Qn,Ve,null),e(Ve,zh),e(Ve,Kn),e(Kn,qh),e(Kn,Vn),e(Vn,Ch),e(Kn,xh),e(Ve,Lh),e(Ve,Jn),e(Jn,Ph),e(Jn,Gn),e(Gn,jh),e(Jn,Dh),e(Ve,Ah),e(Ve,Ae),e(Ae,Nh),e(Ae,gi),e(gi,Oh),e(Ae,Ih),e(Ae,_i),e(_i,Sh),e(Ae,Wh),e(Ae,ki),e(ki,Uh),e(Ae,Hh),e(Ae,Ti),e(Ti,Qh),e(Ae,Kh),e(Ae,vi),e(vi,Vh),e(Ae,Jh),e(Ae,bi),e(bi,Gh),e(Ae,Xh),e(Ve,Yh),e(Ve,Je),y(Xn,Je,null),e(Je,Zh),e(Je,Kt),e(Kt,em),e(Kt,Qr),e(Qr,tm),e(Kt,om),e(Kt,yi),e(yi,nm),e(Kt,sm),e(Je,rm),y(xo,Je,null),e(Je,am),e(Je,wi),e(wi,im),e(Je,lm),y(Yn,Je,null),m(i,xd,f),m(i,Vt,f),e(Vt,Lo),e(Lo,$i),y(Zn,$i,null),e(Vt,dm),e(Vt,Fi),e(Fi,cm),m(i,Ld,f),m(i,Rt,f),y(es,Rt,null),e(Rt,pm),e(Rt,Jt),e(Jt,hm),e(Jt,Ri),e(Ri,mm),e(Jt,um),e(Jt,ts),e(ts,fm),e(Jt,gm),e(Rt,_m),e(Rt,Ge),y(os,Ge,null),e(Ge,km),e(Ge,Gt),e(Gt,Tm),e(Gt,Kr),e(Kr,vm),e(Gt,bm),e(Gt,Ei),e(Ei,ym),e(Gt,wm),e(Ge,$m),y(Po,Ge,null),e(Ge,Fm),e(Ge,Bi),e(Bi,Rm),e(Ge,Em),y(ns,Ge,null),m(i,Pd,f),m(i,Xt,f),e(Xt,jo),e(jo,Mi),y(ss,Mi,null),e(Xt,Bm),e(Xt,zi),e(zi,Mm),m(i,jd,f),m(i,Et,f),y(rs,Et,null),e(Et,zm),e(Et,Yt),e(Yt,qm),e(Yt,qi),e(qi,Cm),e(Yt,xm),e(Yt,as),e(as,Lm),e(Yt,Pm),e(Et,jm),e(Et,Xe),y(is,Xe,null),e(Xe,Dm),e(Xe,Zt),e(Zt,Am),e(Zt,Vr),e(Vr,Nm),e(Zt,Om),e(Zt,Ci),e(Ci,Im),e(Zt,Sm),e(Xe,Wm),y(Do,Xe,null),e(Xe,Um),e(Xe,xi),e(xi,Hm),e(Xe,Qm),y(ls,Xe,null),m(i,Dd,f),m(i,eo,f),e(eo,Ao),e(Ao,Li),y(ds,Li,null),e(eo,Km),e(eo,Pi),e(Pi,Vm),m(i,Ad,f),m(i,ct,f),y(cs,ct,null),e(ct,Jm),e(ct,ji),e(ji,Gm),e(ct,Xm),e(ct,ps),e(ps,Ym),e(ps,hs),e(hs,Zm),e(ps,eu),e(ct,tu),e(ct,Pe),y(ms,Pe,null),e(Pe,ou),e(Pe,to),e(to,nu),e(to,Jr),e(Jr,su),e(to,ru),e(to,Di),e(Di,au),e(to,iu),e(Pe,lu),y(No,Pe,null),e(Pe,du),e(Pe,Ai),e(Ai,cu),e(Pe,pu),y(us,Pe,null),e(Pe,hu),e(Pe,Ni),e(Ni,mu),e(Pe,uu),y(fs,Pe,null),m(i,Nd,f),m(i,oo,f),e(oo,Oo),e(Oo,Oi),y(gs,Oi,null),e(oo,fu),e(oo,Ii),e(Ii,gu),m(i,Od,f),m(i,pt,f),y(_s,pt,null),e(pt,_u),e(pt,Si),e(Si,ku),e(pt,Tu),e(pt,ks),e(ks,vu),e(ks,Ts),e(Ts,bu),e(ks,yu),e(pt,wu),e(pt,Ye),y(vs,Ye,null),e(Ye,$u),e(Ye,no),e(no,Fu),e(no,Gr),e(Gr,Ru),e(no,Eu),e(no,Wi),e(Wi,Bu),e(no,Mu),e(Ye,zu),y(Io,Ye,null),e(Ye,qu),e(Ye,Ui),e(Ui,Cu),e(Ye,xu),y(bs,Ye,null),m(i,Id,f),m(i,so,f),e(so,So),e(So,Hi),y(ys,Hi,null),e(so,Lu),e(so,Qi),e(Qi,Pu),m(i,Sd,f),m(i,ht,f),y(ws,ht,null),e(ht,ju),e(ht,Ki),e(Ki,Du),e(ht,Au),e(ht,$s),e($s,Nu),e($s,Fs),e(Fs,Ou),e($s,Iu),e(ht,Su),e(ht,Ze),y(Rs,Ze,null),e(Ze,Wu),e(Ze,ro),e(ro,Uu),e(ro,Xr),e(Xr,Hu),e(ro,Qu),e(ro,Vi),e(Vi,Ku),e(ro,Vu),e(Ze,Ju),y(Wo,Ze,null),e(Ze,Gu),e(Ze,Ji),e(Ji,Xu),e(Ze,Yu),y(Es,Ze,null),m(i,Wd,f),m(i,ao,f),e(ao,Uo),e(Uo,Gi),y(Bs,Gi,null),e(ao,Zu),e(ao,Xi),e(Xi,ef),m(i,Ud,f),m(i,mt,f),y(Ms,mt,null),e(mt,tf),e(mt,io),e(io,of),e(io,Yi),e(Yi,nf),e(io,sf),e(io,Zi),e(Zi,rf),e(io,af),e(mt,lf),e(mt,zs),e(zs,df),e(zs,qs),e(qs,cf),e(zs,pf),e(mt,hf),e(mt,et),y(Cs,et,null),e(et,mf),e(et,lo),e(lo,uf),e(lo,Yr),e(Yr,ff),e(lo,gf),e(lo,el),e(el,_f),e(lo,kf),e(et,Tf),y(Ho,et,null),e(et,vf),e(et,tl),e(tl,bf),e(et,yf),y(xs,et,null),m(i,Hd,f),m(i,co,f),e(co,Qo),e(Qo,ol),y(Ls,ol,null),e(co,wf),e(co,nl),e(nl,$f),m(i,Qd,f),m(i,Ne,f),y(Ps,Ne,null),e(Ne,Ff),e(Ne,sl),e(sl,Rf),e(Ne,Ef),e(Ne,js),e(js,Bf),e(js,Zr),e(Zr,Mf),e(js,zf),e(Ne,qf),e(Ne,Ds),e(Ds,Cf),e(Ds,As),e(As,xf),e(Ds,Lf),e(Ne,Pf),y(Ko,Ne,null),e(Ne,jf),e(Ne,tt),y(Ns,tt,null),e(tt,Df),e(tt,po),e(po,Af),e(po,ea),e(ea,Nf),e(po,Of),e(po,rl),e(rl,If),e(po,Sf),e(tt,Wf),y(Vo,tt,null),e(tt,Uf),e(tt,al),e(al,Hf),e(tt,Qf),y(Os,tt,null),m(i,Kd,f),m(i,ho,f),e(ho,Jo),e(Jo,il),y(Is,il,null),e(ho,Kf),e(ho,ll),e(ll,Vf),m(i,Vd,f),m(i,Oe,f),y(Ss,Oe,null),e(Oe,Jf),e(Oe,Ws),e(Ws,Gf),e(Ws,dl),e(dl,Xf),e(Ws,Yf),e(Oe,Zf),e(Oe,Us),e(Us,eg),e(Us,ta),e(ta,tg),e(Us,og),e(Oe,ng),e(Oe,Hs),e(Hs,sg),e(Hs,Qs),e(Qs,rg),e(Hs,ag),e(Oe,ig),y(Go,Oe,null),e(Oe,lg),e(Oe,ot),y(Ks,ot,null),e(ot,dg),e(ot,mo),e(mo,cg),e(mo,oa),e(oa,pg),e(mo,hg),e(mo,cl),e(cl,mg),e(mo,ug),e(ot,fg),y(Xo,ot,null),e(ot,gg),e(ot,pl),e(pl,_g),e(ot,kg),y(Vs,ot,null),m(i,Jd,f),m(i,uo,f),e(uo,Yo),e(Yo,hl),y(Js,hl,null),e(uo,Tg),e(uo,ml),e(ml,vg),m(i,Gd,f),m(i,Ie,f),y(Gs,Ie,null),e(Ie,bg),e(Ie,Xs),e(Xs,yg),e(Xs,ul),e(ul,wg),e(Xs,$g),e(Ie,Fg),e(Ie,Ys),e(Ys,Rg),e(Ys,na),e(na,Eg),e(Ys,Bg),e(Ie,Mg),e(Ie,Zs),e(Zs,zg),e(Zs,er),e(er,qg),e(Zs,Cg),e(Ie,xg),y(Zo,Ie,null),e(Ie,Lg),e(Ie,Qe),y(tr,Qe,null),e(Qe,Pg),e(Qe,xe),e(xe,jg),e(xe,fl),e(fl,Dg),e(xe,Ag),e(xe,gl),e(gl,Ng),e(xe,Og),e(xe,_l),e(_l,Ig),e(xe,Sg),e(xe,kl),e(kl,Wg),e(xe,Ug),e(xe,Tl),e(Tl,Hg),e(xe,Qg),e(xe,vl),e(vl,Kg),e(xe,Vg),e(xe,bl),e(bl,Jg),e(xe,Gg),e(Qe,Xg),e(Qe,or),e(or,nr),e(nr,Yg),e(nr,yl),e(yl,Zg),e(nr,e_),e(or,t_),e(or,sr),e(sr,o_),e(sr,wl),e(wl,n_),e(sr,s_),e(Qe,r_),e(Qe,K),e(K,a_),e(K,$l),e($l,i_),e(K,l_),e(K,Fl),e(Fl,d_),e(K,c_),e(K,Rl),e(Rl,p_),e(K,h_),e(K,El),e(El,m_),e(K,u_),e(K,Bl),e(Bl,f_),e(K,g_),e(K,Ml),e(Ml,__),e(K,k_),e(K,zl),e(zl,T_),e(K,v_),e(K,ql),e(ql,b_),e(K,y_),e(K,Cl),e(Cl,w_),e(K,$_),e(K,xl),e(xl,F_),e(K,R_),e(K,Ll),e(Ll,E_),e(K,B_),e(K,Pl),e(Pl,M_),e(K,z_),e(K,jl),e(jl,q_),e(K,C_),e(K,Dl),e(Dl,x_),e(K,L_),e(K,Al),e(Al,P_),e(K,j_),e(K,Nl),e(Nl,D_),e(K,A_),e(K,Ol),e(Ol,N_),e(K,O_),e(K,Il),e(Il,I_),e(K,S_),e(K,Sl),e(Sl,W_),e(K,U_),e(K,Wl),e(Wl,H_),e(K,Q_),e(Qe,K_),e(Qe,Ul),e(Ul,V_),e(Qe,J_),y(rr,Qe,null),m(i,Xd,f),m(i,fo,f),e(fo,en),e(en,Hl),y(ar,Hl,null),e(fo,G_),e(fo,Ql),e(Ql,X_),m(i,Yd,f),m(i,Se,f),y(ir,Se,null),e(Se,Y_),e(Se,Kl),e(Kl,Z_),e(Se,ek),e(Se,lr),e(lr,tk),e(lr,sa),e(sa,ok),e(lr,nk),e(Se,sk),e(Se,dr),e(dr,rk),e(dr,cr),e(cr,ak),e(dr,ik),e(Se,lk),y(tn,Se,null),e(Se,dk),e(Se,nt),y(pr,nt,null),e(nt,ck),e(nt,go),e(go,pk),e(go,ra),e(ra,hk),e(go,mk),e(go,Vl),e(Vl,uk),e(go,fk),e(nt,gk),y(on,nt,null),e(nt,_k),e(nt,Jl),e(Jl,kk),e(nt,Tk),y(hr,nt,null),m(i,Zd,f),m(i,_o,f),e(_o,nn),e(nn,Gl),y(mr,Gl,null),e(_o,vk),e(_o,Xl),e(Xl,bk),m(i,ec,f),m(i,We,f),y(ur,We,null),e(We,yk),e(We,Yl),e(Yl,wk),e(We,$k),e(We,fr),e(fr,Fk),e(fr,aa),e(aa,Rk),e(fr,Ek),e(We,Bk),e(We,gr),e(gr,Mk),e(gr,_r),e(_r,zk),e(gr,qk),e(We,Ck),y(sn,We,null),e(We,xk),e(We,st),y(kr,st,null),e(st,Lk),e(st,ko),e(ko,Pk),e(ko,ia),e(ia,jk),e(ko,Dk),e(ko,Zl),e(Zl,Ak),e(ko,Nk),e(st,Ok),y(rn,st,null),e(st,Ik),e(st,ed),e(ed,Sk),e(st,Wk),y(Tr,st,null),m(i,tc,f),m(i,To,f),e(To,an),e(an,td),y(vr,td,null),e(To,Uk),e(To,od),e(od,Hk),m(i,oc,f),m(i,Ue,f),y(br,Ue,null),e(Ue,Qk),e(Ue,nd),e(nd,Kk),e(Ue,Vk),e(Ue,yr),e(yr,Jk),e(yr,la),e(la,Gk),e(yr,Xk),e(Ue,Yk),e(Ue,wr),e(wr,Zk),e(wr,$r),e($r,eT),e(wr,tT),e(Ue,oT),y(ln,Ue,null),e(Ue,nT),e(Ue,rt),y(Fr,rt,null),e(rt,sT),e(rt,vo),e(vo,rT),e(vo,da),e(da,aT),e(vo,iT),e(vo,sd),e(sd,lT),e(vo,dT),e(rt,cT),y(dn,rt,null),e(rt,pT),e(rt,rd),e(rd,hT),e(rt,mT),y(Rr,rt,null),m(i,nc,f),m(i,bo,f),e(bo,cn),e(cn,ad),y(Er,ad,null),e(bo,uT),e(bo,id),e(id,fT),m(i,sc,f),m(i,He,f),y(Br,He,null),e(He,gT),e(He,yo),e(yo,_T),e(yo,ld),e(ld,kT),e(yo,TT),e(yo,dd),e(dd,vT),e(yo,bT),e(He,yT),e(He,Mr),e(Mr,wT),e(Mr,ca),e(ca,$T),e(Mr,FT),e(He,RT),e(He,zr),e(zr,ET),e(zr,qr),e(qr,BT),e(zr,MT),e(He,zT),y(pn,He,null),e(He,qT),e(He,at),y(Cr,at,null),e(at,CT),e(at,wo),e(wo,xT),e(wo,pa),e(pa,LT),e(wo,PT),e(wo,cd),e(cd,jT),e(wo,DT),e(at,AT),y(hn,at,null),e(at,NT),e(at,pd),e(pd,OT),e(at,IT),y(xr,at,null),rc=!0},p(i,[f]){const Lr={};f&2&&(Lr.$$scope={dirty:f,ctx:i}),xo.$set(Lr);const hd={};f&2&&(hd.$$scope={dirty:f,ctx:i}),Po.$set(hd);const md={};f&2&&(md.$$scope={dirty:f,ctx:i}),Do.$set(md);const ud={};f&2&&(ud.$$scope={dirty:f,ctx:i}),No.$set(ud);const Pr={};f&2&&(Pr.$$scope={dirty:f,ctx:i}),Io.$set(Pr);const fd={};f&2&&(fd.$$scope={dirty:f,ctx:i}),Wo.$set(fd);const gd={};f&2&&(gd.$$scope={dirty:f,ctx:i}),Ho.$set(gd);const _d={};f&2&&(_d.$$scope={dirty:f,ctx:i}),Ko.$set(_d);const jr={};f&2&&(jr.$$scope={dirty:f,ctx:i}),Vo.$set(jr);const kd={};f&2&&(kd.$$scope={dirty:f,ctx:i}),Go.$set(kd);const Td={};f&2&&(Td.$$scope={dirty:f,ctx:i}),Xo.$set(Td);const vd={};f&2&&(vd.$$scope={dirty:f,ctx:i}),Zo.$set(vd);const bd={};f&2&&(bd.$$scope={dirty:f,ctx:i}),tn.$set(bd);const yd={};f&2&&(yd.$$scope={dirty:f,ctx:i}),on.$set(yd);const wd={};f&2&&(wd.$$scope={dirty:f,ctx:i}),sn.$set(wd);const Dr={};f&2&&(Dr.$$scope={dirty:f,ctx:i}),rn.$set(Dr);const $d={};f&2&&($d.$$scope={dirty:f,ctx:i}),ln.$set($d);const Fd={};f&2&&(Fd.$$scope={dirty:f,ctx:i}),dn.$set(Fd);const Rd={};f&2&&(Rd.$$scope={dirty:f,ctx:i}),pn.$set(Rd);const Le={};f&2&&(Le.$$scope={dirty:f,ctx:i}),hn.$set(Le)},i(i){rc||(w(k.$$.fragment,i),w(ne.$$.fragment,i),w(re.$$.fragment,i),w(be.$$.fragment,i),w(vn.$$.fragment,i),w(bn.$$.fragment,i),w(yn.$$.fragment,i),w(wn.$$.fragment,i),w($n.$$.fragment,i),w(Bn.$$.fragment,i),w(zn.$$.fragment,i),w(Cn.$$.fragment,i),w(xn.$$.fragment,i),w(Ln.$$.fragment,i),w(Pn.$$.fragment,i),w(jn.$$.fragment,i),w(An.$$.fragment,i),w(On.$$.fragment,i),w(Sn.$$.fragment,i),w(Wn.$$.fragment,i),w(Un.$$.fragment,i),w(Hn.$$.fragment,i),w(Qn.$$.fragment,i),w(Xn.$$.fragment,i),w(xo.$$.fragment,i),w(Yn.$$.fragment,i),w(Zn.$$.fragment,i),w(es.$$.fragment,i),w(os.$$.fragment,i),w(Po.$$.fragment,i),w(ns.$$.fragment,i),w(ss.$$.fragment,i),w(rs.$$.fragment,i),w(is.$$.fragment,i),w(Do.$$.fragment,i),w(ls.$$.fragment,i),w(ds.$$.fragment,i),w(cs.$$.fragment,i),w(ms.$$.fragment,i),w(No.$$.fragment,i),w(us.$$.fragment,i),w(fs.$$.fragment,i),w(gs.$$.fragment,i),w(_s.$$.fragment,i),w(vs.$$.fragment,i),w(Io.$$.fragment,i),w(bs.$$.fragment,i),w(ys.$$.fragment,i),w(ws.$$.fragment,i),w(Rs.$$.fragment,i),w(Wo.$$.fragment,i),w(Es.$$.fragment,i),w(Bs.$$.fragment,i),w(Ms.$$.fragment,i),w(Cs.$$.fragment,i),w(Ho.$$.fragment,i),w(xs.$$.fragment,i),w(Ls.$$.fragment,i),w(Ps.$$.fragment,i),w(Ko.$$.fragment,i),w(Ns.$$.fragment,i),w(Vo.$$.fragment,i),w(Os.$$.fragment,i),w(Is.$$.fragment,i),w(Ss.$$.fragment,i),w(Go.$$.fragment,i),w(Ks.$$.fragment,i),w(Xo.$$.fragment,i),w(Vs.$$.fragment,i),w(Js.$$.fragment,i),w(Gs.$$.fragment,i),w(Zo.$$.fragment,i),w(tr.$$.fragment,i),w(rr.$$.fragment,i),w(ar.$$.fragment,i),w(ir.$$.fragment,i),w(tn.$$.fragment,i),w(pr.$$.fragment,i),w(on.$$.fragment,i),w(hr.$$.fragment,i),w(mr.$$.fragment,i),w(ur.$$.fragment,i),w(sn.$$.fragment,i),w(kr.$$.fragment,i),w(rn.$$.fragment,i),w(Tr.$$.fragment,i),w(vr.$$.fragment,i),w(br.$$.fragment,i),w(ln.$$.fragment,i),w(Fr.$$.fragment,i),w(dn.$$.fragment,i),w(Rr.$$.fragment,i),w(Er.$$.fragment,i),w(Br.$$.fragment,i),w(pn.$$.fragment,i),w(Cr.$$.fragment,i),w(hn.$$.fragment,i),w(xr.$$.fragment,i),rc=!0)},o(i){$(k.$$.fragment,i),$(ne.$$.fragment,i),$(re.$$.fragment,i),$(be.$$.fragment,i),$(vn.$$.fragment,i),$(bn.$$.fragment,i),$(yn.$$.fragment,i),$(wn.$$.fragment,i),$($n.$$.fragment,i),$(Bn.$$.fragment,i),$(zn.$$.fragment,i),$(Cn.$$.fragment,i),$(xn.$$.fragment,i),$(Ln.$$.fragment,i),$(Pn.$$.fragment,i),$(jn.$$.fragment,i),$(An.$$.fragment,i),$(On.$$.fragment,i),$(Sn.$$.fragment,i),$(Wn.$$.fragment,i),$(Un.$$.fragment,i),$(Hn.$$.fragment,i),$(Qn.$$.fragment,i),$(Xn.$$.fragment,i),$(xo.$$.fragment,i),$(Yn.$$.fragment,i),$(Zn.$$.fragment,i),$(es.$$.fragment,i),$(os.$$.fragment,i),$(Po.$$.fragment,i),$(ns.$$.fragment,i),$(ss.$$.fragment,i),$(rs.$$.fragment,i),$(is.$$.fragment,i),$(Do.$$.fragment,i),$(ls.$$.fragment,i),$(ds.$$.fragment,i),$(cs.$$.fragment,i),$(ms.$$.fragment,i),$(No.$$.fragment,i),$(us.$$.fragment,i),$(fs.$$.fragment,i),$(gs.$$.fragment,i),$(_s.$$.fragment,i),$(vs.$$.fragment,i),$(Io.$$.fragment,i),$(bs.$$.fragment,i),$(ys.$$.fragment,i),$(ws.$$.fragment,i),$(Rs.$$.fragment,i),$(Wo.$$.fragment,i),$(Es.$$.fragment,i),$(Bs.$$.fragment,i),$(Ms.$$.fragment,i),$(Cs.$$.fragment,i),$(Ho.$$.fragment,i),$(xs.$$.fragment,i),$(Ls.$$.fragment,i),$(Ps.$$.fragment,i),$(Ko.$$.fragment,i),$(Ns.$$.fragment,i),$(Vo.$$.fragment,i),$(Os.$$.fragment,i),$(Is.$$.fragment,i),$(Ss.$$.fragment,i),$(Go.$$.fragment,i),$(Ks.$$.fragment,i),$(Xo.$$.fragment,i),$(Vs.$$.fragment,i),$(Js.$$.fragment,i),$(Gs.$$.fragment,i),$(Zo.$$.fragment,i),$(tr.$$.fragment,i),$(rr.$$.fragment,i),$(ar.$$.fragment,i),$(ir.$$.fragment,i),$(tn.$$.fragment,i),$(pr.$$.fragment,i),$(on.$$.fragment,i),$(hr.$$.fragment,i),$(mr.$$.fragment,i),$(ur.$$.fragment,i),$(sn.$$.fragment,i),$(kr.$$.fragment,i),$(rn.$$.fragment,i),$(Tr.$$.fragment,i),$(vr.$$.fragment,i),$(br.$$.fragment,i),$(ln.$$.fragment,i),$(Fr.$$.fragment,i),$(dn.$$.fragment,i),$(Rr.$$.fragment,i),$(Er.$$.fragment,i),$(Br.$$.fragment,i),$(pn.$$.fragment,i),$(Cr.$$.fragment,i),$(hn.$$.fragment,i),$(xr.$$.fragment,i),rc=!1},d(i){t(h),i&&t(E),i&&t(g),F(k),i&&t(X),i&&t(M),F(ne),i&&t(pe),i&&t(J),i&&t(C),i&&t(ae),i&&t(he),i&&t(ie),i&&t(me),i&&t(q),i&&t(S),i&&t(le),i&&t(W),i&&t(ee),F(re),i&&t(R),i&&t(x),F(be),F(vn),F(bn),F(yn),i&&t(Ed),i&&t(Wt),F(wn),i&&t(Bd),i&&t(Ce),F($n),F(Bn),F(zn),F(Cn),F(xn),F(Ln),i&&t(Md),i&&t(Ht),F(Pn),i&&t(zd),i&&t(De),F(jn),F(An),F(On),F(Sn),F(Wn),F(Un),i&&t(qd),i&&t(Qt),F(Hn),i&&t(Cd),i&&t(Ve),F(Qn),F(Xn),F(xo),F(Yn),i&&t(xd),i&&t(Vt),F(Zn),i&&t(Ld),i&&t(Rt),F(es),F(os),F(Po),F(ns),i&&t(Pd),i&&t(Xt),F(ss),i&&t(jd),i&&t(Et),F(rs),F(is),F(Do),F(ls),i&&t(Dd),i&&t(eo),F(ds),i&&t(Ad),i&&t(ct),F(cs),F(ms),F(No),F(us),F(fs),i&&t(Nd),i&&t(oo),F(gs),i&&t(Od),i&&t(pt),F(_s),F(vs),F(Io),F(bs),i&&t(Id),i&&t(so),F(ys),i&&t(Sd),i&&t(ht),F(ws),F(Rs),F(Wo),F(Es),i&&t(Wd),i&&t(ao),F(Bs),i&&t(Ud),i&&t(mt),F(Ms),F(Cs),F(Ho),F(xs),i&&t(Hd),i&&t(co),F(Ls),i&&t(Qd),i&&t(Ne),F(Ps),F(Ko),F(Ns),F(Vo),F(Os),i&&t(Kd),i&&t(ho),F(Is),i&&t(Vd),i&&t(Oe),F(Ss),F(Go),F(Ks),F(Xo),F(Vs),i&&t(Jd),i&&t(uo),F(Js),i&&t(Gd),i&&t(Ie),F(Gs),F(Zo),F(tr),F(rr),i&&t(Xd),i&&t(fo),F(ar),i&&t(Yd),i&&t(Se),F(ir),F(tn),F(pr),F(on),F(hr),i&&t(Zd),i&&t(_o),F(mr),i&&t(ec),i&&t(We),F(ur),F(sn),F(kr),F(rn),F(Tr),i&&t(tc),i&&t(To),F(vr),i&&t(oc),i&&t(Ue),F(br),F(ln),F(Fr),F(dn),F(Rr),i&&t(nc),i&&t(bo),F(Er),i&&t(sc),i&&t(He),F(Br),F(pn),F(Cr),F(hn),F(xr)}}}const ow={local:"rembert",sections:[{local:"overview",title:"Overview"},{local:"transformers.RemBertConfig",title:"RemBertConfig"},{local:"transformers.RemBertTokenizer",title:"RemBertTokenizer"},{local:"transformers.RemBertTokenizerFast",title:"RemBertTokenizerFast"},{local:"transformers.RemBertModel",title:"RemBertModel"},{local:"transformers.RemBertForCausalLM",title:"RemBertForCausalLM"},{local:"transformers.RemBertForMaskedLM",title:"RemBertForMaskedLM"},{local:"transformers.RemBertForSequenceClassification",title:"RemBertForSequenceClassification"},{local:"transformers.RemBertForMultipleChoice",title:"RemBertForMultipleChoice"},{local:"transformers.RemBertForTokenClassification",title:"RemBertForTokenClassification"},{local:"transformers.RemBertForQuestionAnswering",title:"RemBertForQuestionAnswering"},{local:"transformers.TFRemBertModel",title:"TFRemBertModel"},{local:"transformers.TFRemBertForMaskedLM",title:"TFRemBertForMaskedLM"},{local:"transformers.TFRemBertForCausalLM",title:"TFRemBertForCausalLM"},{local:"transformers.TFRemBertForSequenceClassification",title:"TFRemBertForSequenceClassification"},{local:"transformers.TFRemBertForMultipleChoice",title:"TFRemBertForMultipleChoice"},{local:"transformers.TFRemBertForTokenClassification",title:"TFRemBertForTokenClassification"},{local:"transformers.TFRemBertForQuestionAnswering",title:"TFRemBertForQuestionAnswering"}],title:"RemBERT"};function nw(V,h,E){let{fw:g}=h;return V.$$set=u=>{"fw"in u&&E(0,g=u.fw)},[g]}class cw extends q1{constructor(h){super();C1(this,h,nw,tw,x1,{fw:0})}}export{cw as default,ow as metadata};
